feat(ext/web): add globalThis.reportError() (#13799)

This commit is contained in:
Nayeem Rahman 2022-04-19 09:59:51 +01:00 committed by GitHub
parent a64e63c361
commit c30d95f2e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 93 additions and 17 deletions

View file

@ -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(), &[]);
}
}