mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Destroy node environment when a JS context in renderer is destroyed
This commit is contained in:
@@ -381,6 +381,9 @@ void AtomRendererClient::WillReleaseScriptContext(
|
||||
node::Environment* env = node::Environment::GetCurrent(context);
|
||||
if (env)
|
||||
mate::EmitEvent(env->isolate(), env->process_object(), "exit");
|
||||
|
||||
// Destroy the node environment.
|
||||
node::FreeEnvironment(env);
|
||||
}
|
||||
|
||||
bool AtomRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||
|
||||
Reference in New Issue
Block a user