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

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

Issue 782093002: Ensure that before creating proxy of site A, RVH of site A is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: call CreateFrame() if RVH is not live Created 6 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree.cc
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc
index 96890f09075d9e438e750271b3405f8ae3b2d80f..79ca6b73c1a368c6ae49efd5a98c8c728872554a 100644
--- a/content/browser/frame_host/frame_tree.cc
+++ b/content/browser/frame_host/frame_tree.cc
@@ -204,7 +204,7 @@ void FrameTree::CreateProxiesForSiteInstance(
if (!source->IsMainFrame()) {
RenderViewHostImpl* render_view_host =
source->frame_tree()->GetRenderViewHost(site_instance);
- if (!render_view_host) {
+ if (!render_view_host || !render_view_host->IsRenderViewLive()) {
root()->render_manager()->CreateRenderFrame(
site_instance, nullptr, MSG_ROUTING_NONE,
CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, nullptr);
@@ -265,8 +265,10 @@ RenderViewHostImpl* FrameTree::CreateRenderViewHost(SiteInstance* site_instance,
// Otherwise return the existing RenderViewHost for the SiteInstance.
RenderFrameHostImpl* main_frame = static_cast<RenderFrameHostImpl*>(
iter->second->GetMainFrame());
- if (main_frame->frame_tree_node()->render_manager()->IsPendingDeletion(
- main_frame)) {
+ // |main_frame| is NULL when the RVH is uninitialized.
+ if (main_frame &&
+ main_frame->frame_tree_node()->render_manager()->IsPendingDeletion(
+ main_frame)) {
render_view_host_pending_shutdown_map_.insert(
std::pair<int, RenderViewHostImpl*>(site_instance->GetId(),
iter->second));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698