summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/web_worker.rs3
-rw-r--r--runtime/worker.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index f8aadf4c2..1fcd57dc2 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -427,7 +427,8 @@ impl WebWorker {
name: &str,
source_code: &str,
) -> Result<(), AnyError> {
- self.js_runtime.execute_script(name, source_code)
+ self.js_runtime.execute_script(name, source_code)?;
+ Ok(())
}
/// Loads and instantiates specified JavaScript module.
diff --git a/runtime/worker.rs b/runtime/worker.rs
index 04c294146..543eae6f6 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -191,7 +191,8 @@ impl MainWorker {
name: &str,
source_code: &str,
) -> Result<(), AnyError> {
- self.js_runtime.execute_script(name, source_code)
+ self.js_runtime.execute_script(name, source_code)?;
+ Ok(())
}
/// Loads and instantiates specified JavaScript module.