Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1168)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1159143008: Fix wrong initialization of renderer_initiated_creation parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing after rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 51695bc38dfbcfcd5b71355a806d85028a3e3da8..f6fbfde0da0b8d176f8d8938d18913aaf8b10919 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1289,6 +1289,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
// corresponding RenderView and main RenderFrame have already been created.
// Ensure observers are notified about this.
if (params.renderer_initiated_creation) {
+ GetRenderViewHost()->set_renderer_initialized(true);
RenderViewCreated(GetRenderViewHost());
GetRenderManager()->current_frame_host()->SetRenderFrameCreated(true);
}
@@ -1614,7 +1615,8 @@ void WebContentsImpl::CreateNewWindow(
create_params.opener_suppressed = params.opener_suppressed;
if (params.disposition == NEW_BACKGROUND_TAB)
create_params.initially_hidden = true;
- create_params.renderer_initiated_creation = true;
+ create_params.renderer_initiated_creation =
+ main_frame_route_id != MSG_ROUTING_NONE;
WebContentsImpl* new_contents = NULL;
if (!is_guest) {

Powered by Google App Engine
This is Rietveld 408576698