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

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

Issue 2472253002: Fix navigation requests starting too early and not getting associated with the <webview>. (Closed)
Patch Set: nits Created 4 years, 1 month 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
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f16dbea41617ce9478f50f67ccc10c760307836c..5f7253580ba5551fa6a3f4140f483487e6cfc9d1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1558,7 +1558,8 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
GetRenderManager()->Init(site_instance.get(), view_routing_id,
params.main_frame_routing_id,
- main_frame_widget_routing_id);
+ main_frame_widget_routing_id,
+ params.renderer_initiated_creation);
// blink::FrameTree::setName always keeps |unique_name| empty in case of a
// main frame - let's do the same thing here.
@@ -2059,10 +2060,15 @@ void WebContentsImpl::CreateNewWindow(
// delete the RenderView that had already been created.
Send(new ViewMsg_Close(route_id));
}
+ // Note: even though we're not creating a WebContents here, it could have
+ // been created by the embedder so ensure that the RenderFrameHost is
+ // properly initialized.
// It's safe to only target the frame because the render process will not
// have a chance to create more frames at this point.
- ResourceDispatcherHostImpl::ResumeBlockedRequestsForRouteFromUI(
- GlobalFrameRoutingId(render_process_id, main_frame_route_id));
+ RenderFrameHostImpl* rfh =
+ RenderFrameHostImpl::FromID(render_process_id, main_frame_route_id);
+ if (rfh)
+ rfh->Init();
return;
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698