mirror of
https://github.com/electron/electron.git
synced 2026-01-26 07:48:08 -05:00
Merge pull request #10099 from electron/leak-node-environment
Leak the Node environment when context is released
This commit is contained in:
@@ -132,7 +132,12 @@ void AtomRendererClient::WillReleaseScriptContext(
|
||||
node_bindings_->set_uv_env(nullptr);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user