refactor: modify Node.js options object directly (#29939)

* refactor: modify Node.js options object directly

* chore: update patch to reflect upstream
This commit is contained in:
Shelley Vohr 2021-06-30 16:07:28 +02:00 committed by GitHub
parent a310bd7473
commit 675bbfe092
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 62 deletions

View file

@ -110,11 +110,11 @@ void ElectronRendererClient::DidCreateScriptContext(
node_bindings_->CreateEnvironment(renderer_context, nullptr);
// If we have disabled the site instance overrides we should prevent loading
// any non-context aware native module
env->set_force_context_aware(true);
// any non-context aware native module.
env->options()->force_context_aware = true;
// We do not want to crash the renderer process on unhandled rejections.
env->set_unhandled_rejections_mode("warn");
env->options()->unhandled_rejections = "warn";
environments_.insert(env);