chore: fix IsolateData handling (#20918)
This commit is contained in:
parent
776cab96b1
commit
b194d5d0e2
4 changed files with 17 additions and 4 deletions
|
@ -176,8 +176,12 @@ void AtomRendererClient::WillReleaseScriptContext(
|
|||
// avoid memory leaks
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
if (command_line->HasSwitch(switches::kNodeIntegrationInSubFrames) ||
|
||||
command_line->HasSwitch(switches::kDisableElectronSiteInstanceOverrides))
|
||||
command_line->HasSwitch(
|
||||
switches::kDisableElectronSiteInstanceOverrides)) {
|
||||
node::FreeEnvironment(env);
|
||||
if (env == node_bindings_->uv_env())
|
||||
node::FreeIsolateData(node_bindings_->isolate_data());
|
||||
}
|
||||
|
||||
// ElectronBindings is tracking node environments.
|
||||
electron_bindings_->EnvironmentDestroyed(env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue