From c30d95f2e36cb3519e1e23c0934b388ebba6bc2c Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 19 Apr 2022 09:59:51 +0100 Subject: feat(ext/web): add globalThis.reportError() (#13799) --- runtime/web_worker.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime') 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::::new(scope, poll_for_messages_fn); let fn_ = v8::Local::::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(), &[]); } } -- cgit v1.2.3