Fix crash when releasing a script context that never had node injected (#12741)
This commit is contained in:
parent
d355bf0267
commit
78ab97ab04
1 changed files with 2 additions and 0 deletions
|
@ -122,6 +122,8 @@ void AtomRendererClient::DidCreateScriptContext(
|
||||||
void AtomRendererClient::WillReleaseScriptContext(
|
void AtomRendererClient::WillReleaseScriptContext(
|
||||||
v8::Handle<v8::Context> context,
|
v8::Handle<v8::Context> context,
|
||||||
content::RenderFrame* render_frame) {
|
content::RenderFrame* render_frame) {
|
||||||
|
if (injected_frames_.find(render_frame) == injected_frames_.end())
|
||||||
|
return;
|
||||||
injected_frames_.erase(render_frame);
|
injected_frames_.erase(render_frame);
|
||||||
|
|
||||||
node::Environment* env = node::Environment::GetCurrent(context);
|
node::Environment* env = node::Environment::GetCurrent(context);
|
||||||
|
|
Loading…
Reference in a new issue