Skip to content

Commit bc730ba

Browse files
committed
test local frame in willHandleNavigationPolicy
Fix nwjs#7187
1 parent 2376718 commit bc730ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/renderer/nw_extensions_renderer_hooks.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,8 @@ void willHandleNavigationPolicy(content::RenderView* rv,
529529
v8::Isolate* isolate = v8::Isolate::GetCurrent();
530530
v8::HandleScope scope(isolate);
531531
blink::WebFrame* f = rv->GetWebView()->MainFrame();
532+
if (!f->IsWebLocalFrame())
533+
return;
532534
blink::WebLocalFrame* local_frame = f->ToWebLocalFrame();
533535
v8::Handle<v8::Context> v8_context =
534536
local_frame->MainWorldScriptContext();

0 commit comments

Comments
 (0)