Skip to content

Commit 9d8b792

Browse files
committed
set force close only when dealing with top frames
1 parent e5a6011 commit 9d8b792

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/renderer/shell_content_renderer_client.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,12 @@ void ShellContentRendererClient::InstallNodeSymbols(
354354
int ret;
355355
RenderViewImpl* render_view = RenderViewImpl::FromWebView(frame->view());
356356

357-
render_view->Send(new ShellViewHostMsg_SetForceClose(
357+
if (frame->parent() == NULL) {
358+
// do this only for top frames, or initialization of iframe
359+
// could override parent settings here
360+
render_view->Send(new ShellViewHostMsg_SetForceClose(
358361
render_view->GetRoutingID(), true, &ret));
362+
}
359363
}
360364
}
361365

0 commit comments

Comments
 (0)