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

This commit is contained in:
Shelley Vohr 2025-03-13 19:09:23 +01:00 committed by GitHub
parent 962d8b325a
commit a90d50e13f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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());