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

This commit is contained in:
Shelley Vohr
2020-05-12 13:09:56 -07:00
committed by GitHub
parent b11836e195
commit 3daeec5e3e

View File

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