fix: don't crash Web Workers on unhandled rejections (#46019)

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:
trop[bot]
2025-03-14 09:58:37 +01:00
committed by GitHub
parent be7b06108e
commit 3782fe51ff

View File

@@ -86,6 +86,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());