Chromium Code Reviews| 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..3934ec5d941084d0edecda7416665f0cd0169773 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( |
|
Charlie Reis
2014/12/12 19:18:31
I took a closer look, and now I'm not sure this is
nasko
2014/12/12 22:25:01
I agree we shouldn't be calling CreateRenderFrame.
lazyboy
2014/12/16 07:10:04
For context about uninitialized RVH:
1
/ \
2
|
| 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. |
|
nasko
2014/12/12 22:25:01
What sequence of events causes uninitialized RVH t
lazyboy
2014/12/23 22:03:11
Since we keep around the proxy (with swapped out r
|
| + 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)); |