fix: don't crash Web Workers on unhandled rejections (#46021)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
8275f7e402
commit
5c73799f52
1 changed files with 3 additions and 0 deletions
|
@ -85,6 +85,9 @@ void WebWorkerObserver::WorkerScriptReadyForEvaluation(
|
|||
}
|
||||
}
|
||||
|
||||
// We do not want to crash Web Workers on unhandled rejections.
|
||||
env->options()->unhandled_rejections = "warn-with-error-code";
|
||||
|
||||
// Add Electron extended APIs.
|
||||
electron_bindings_->BindTo(env->isolate(), env->process_object());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue