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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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