summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2022-04-19 09:59:51 +0100
committerGitHub <noreply@github.com>2022-04-19 10:59:51 +0200
commitc30d95f2e36cb3519e1e23c0934b388ebba6bc2c (patch)
treef34db42cce4803e76affb12ccb95ad59a77354ad /runtime
parenta64e63c3614b98aa2b51fb6b7ef4e30251e03111 (diff)
feat(ext/web): add globalThis.reportError() (#13799)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/web_worker.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index 40b222417..f4c040aa4 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -638,7 +638,8 @@ impl WebWorker {
v8::Local::<v8::Value>::new(scope, poll_for_messages_fn);
let fn_ = v8::Local::<v8::Function>::try_from(poll_for_messages).unwrap();
let undefined = v8::undefined(scope);
- fn_.call(scope, undefined.into(), &[]).unwrap();
+ // This call may return `None` if worker is terminated.
+ fn_.call(scope, undefined.into(), &[]);
}
}