mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
fix: don't crash Utility Processes on unhandled rejections (#45921)
* fix: don't crash on unhandled rejections * Update docs/breaking-changes.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> --------- Co-authored-by: Niklas Wenzel <dev@nikwen.de>
This commit is contained in:
@@ -155,6 +155,9 @@ void NodeService::Initialize(
|
||||
|
||||
node_env_->set_trace_sync_io(node_env_->options()->trace_sync_io);
|
||||
|
||||
// We do not want to crash the utility process on unhandled rejections.
|
||||
node_env_->options()->unhandled_rejections = "warn-with-error-code";
|
||||
|
||||
// Add Electron extended APIs.
|
||||
electron_bindings_->BindTo(node_env_->isolate(), node_env_->process_object());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user