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

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: addressing mmenke@'s comments 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 3cb44c6dd55f200789a37666adeb7b361facfc11..bf0350803d0c58b71e00855fcf511340c1b37184 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1292,6 +1292,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);
}
@@ -1617,7 +1618,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) {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/test/web_contents_observer_sanity_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698