Destroy node environment when a JS context in renderer is destroyed
This commit is contained in:
parent
d379b05890
commit
29278e500b
1 changed files with 3 additions and 0 deletions
|
@ -381,6 +381,9 @@ void AtomRendererClient::WillReleaseScriptContext(
|
||||||
node::Environment* env = node::Environment::GetCurrent(context);
|
node::Environment* env = node::Environment::GetCurrent(context);
|
||||||
if (env)
|
if (env)
|
||||||
mate::EmitEvent(env->isolate(), env->process_object(), "exit");
|
mate::EmitEvent(env->isolate(), env->process_object(), "exit");
|
||||||
|
|
||||||
|
// Destroy the node environment.
|
||||||
|
node::FreeEnvironment(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtomRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
bool AtomRendererClient::ShouldFork(blink::WebLocalFrame* frame,
|
||||||
|
|
Loading…
Reference in a new issue