Leak the Node environment when context is released
This commit is contained in:
parent
25f168cecb
commit
0719650315
1 changed files with 6 additions and 1 deletions
|
@ -132,7 +132,12 @@ void AtomRendererClient::WillReleaseScriptContext(
|
||||||
node_bindings_->set_uv_env(nullptr);
|
node_bindings_->set_uv_env(nullptr);
|
||||||
|
|
||||||
// Destroy the node environment.
|
// Destroy the node environment.
|
||||||
node::FreeEnvironment(env);
|
// This is disabled because pending async tasks may still use the environment
|
||||||
|
// and would cause crashes later. Node does not seem to clear all async tasks
|
||||||
|
// when the environment is destroyed.
|
||||||
|
// node::FreeEnvironment(env);
|
||||||
|
|
||||||
|
// AtomBindings is tracking node environments.
|
||||||
atom_bindings_->EnvironmentDestroyed(env);
|
atom_bindings_->EnvironmentDestroyed(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue