|
@@ -108,12 +108,12 @@ void ElectronRendererClient::DidCreateScriptContext(
|
|
|
|
|
|
injected_frames_.insert(render_frame);
|
|
|
|
|
|
- // If this is the first environment we are creating, prepare the node
|
|
|
- // bindings.
|
|
|
if (!node_integration_initialized_) {
|
|
|
node_integration_initialized_ = true;
|
|
|
node_bindings_->Initialize();
|
|
|
node_bindings_->PrepareMessageLoop();
|
|
|
+ } else if (reuse_renderer_processes_enabled) {
|
|
|
+ node_bindings_->PrepareMessageLoop();
|
|
|
}
|
|
|
|
|
|
// Setup node tracing controller.
|
|
@@ -129,7 +129,7 @@ void ElectronRendererClient::DidCreateScriptContext(
|
|
|
|
|
|
// If we have disabled the site instance overrides we should prevent loading
|
|
|
// any non-context aware native module
|
|
|
- if (command_line->HasSwitch(switches::kDisableElectronSiteInstanceOverrides))
|
|
|
+ if (reuse_renderer_processes_enabled)
|
|
|
env->ForceOnlyContextAwareNativeModules();
|
|
|
env->WarnNonContextAwareNativeModules();
|
|
|
|