summaryrefslogtreecommitdiff
path: root/core/runtime.rs
diff options
context:
space:
mode:
authorAndreu Botella <abb@randomunok.com>2021-09-30 19:52:58 +0200
committerGitHub <noreply@github.com>2021-09-30 19:52:58 +0200
commita2632c86b1ddceae588886c7623a86f46e6098d5 (patch)
tree71bfff4f95a437577cbae57a53279d98a954624a /core/runtime.rs
parent68e5cdaff0620b497e265d6e50bae6e994e86144 (diff)
fix: Don't panic when a worker is closed in the reactions to a wasm operation. (#12270)
Diffstat (limited to 'core/runtime.rs')
-rw-r--r--core/runtime.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/runtime.rs b/core/runtime.rs
index 9a60a65ed..ffd8e49c5 100644
--- a/core/runtime.rs
+++ b/core/runtime.rs
@@ -1572,6 +1572,10 @@ impl JsRuntime {
return exception_to_err_result(tc_scope, exception, false);
}
+ if tc_scope.has_terminated() || tc_scope.is_execution_terminating() {
+ break;
+ }
+
let is_done = is_done.unwrap();
if is_done.is_true() {
break;