Browse Source

fix: run Node.js at-exit callbacks in renderer proc (#23544)

Co-authored-by: Shelley Vohr <[email protected]>
trop[bot] 5 years ago
parent
commit
8252565979
1 changed files with 1 additions and 0 deletions
  1. 1 0
      shell/renderer/electron_renderer_client.cc

+ 1 - 0
shell/renderer/electron_renderer_client.cc

@@ -178,6 +178,7 @@ void ElectronRendererClient::WillReleaseScriptContext(
   if (command_line->HasSwitch(switches::kNodeIntegrationInSubFrames) ||
       command_line->HasSwitch(
           switches::kDisableElectronSiteInstanceOverrides)) {
+    node::RunAtExit(env);
     node::FreeEnvironment(env);
     if (env == node_bindings_->uv_env())
       node::FreeIsolateData(node_bindings_->isolate_data());