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

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 536473002: PlzNavigate: Initialize the renderer on commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 0d95e1e361c7f630c4187a8eec3a49fa0828b8a0..a027d934f79c79b4d49711136289bdfe78d19f9f 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -618,6 +618,20 @@ void RenderFrameHostManager::CommitNavigation(
render_frame_host_->render_view_host()->AttachToFrameTree();
}
+ // If the renderer that needs to navigate is not live (it was just created or
+ // it crashed), initialize it.
+ if (!render_frame_host_->render_view_host()->IsRenderViewLive()) {
+ // Recreate the opener chain.
+ int opener_route_id = delegate_->CreateOpenerRenderViewsForRenderManager(
+ render_frame_host_->GetSiteInstance());
+ if (!InitRenderView(render_frame_host_->render_view_host(),
+ opener_route_id,
+ MSG_ROUTING_NONE,
+ frame_tree_node_->IsMainFrame())) {
+ return;
+ }
+ }
+
frame_tree_node_->navigator()->CommitNavigation(
render_frame_host_.get(), info);
}
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698