Chromium Code Reviews| 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 dab752ccce8ef6062353966fc765bb3091c2e4f1..3bc5b185b5dd34bce27e42db390a9059c86d7e55 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager.cc |
| @@ -2319,11 +2319,22 @@ RenderFrameHostImpl* RenderFrameHostManager::UpdateStateForNavigate( |
| bool dest_is_view_source_mode, |
| const GlobalRequestID& transferred_request_id, |
| int bindings) { |
| - // Don't swap for subframes unless we are in --site-per-process. We can get |
| - // here in tests for subframes (e.g., NavigateFrameToURL). |
| - if (!frame_tree_node_->IsMainFrame() && |
| - !SiteIsolationPolicy::AreCrossProcessFramesPossible()) { |
| - return render_frame_host_.get(); |
| + if (!frame_tree_node_->IsMainFrame()) { |
| + // Don't swap for subframes unless we are in an OOPIF-enabled mode. We can |
| + // get here in tests for subframes (e.g., NavigateFrameToURL). |
| + if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
|
ncarter (slow)
2015/12/08 20:14:13
I think it might be cleaner to structure this as f
Charlie Reis
2015/12/08 20:34:11
Sure. As you noted offline, we may not get to the
|
| + return render_frame_host_.get(); |
| + |
| + // If we are in an OOPIF mode that only applies to some sites, only swap if |
| + // the policy determines that a transfer would have been needed. We can get |
| + // here for session restore. |
| + if (!SiteIsolationPolicy::UseDedicatedProcessesForAllSites() && |
|
ncarter (slow)
2015/12/08 20:14:13
I don't think you need to check UseDedicatedProces
Charlie Reis
2015/12/08 20:34:11
Acknowledged.
|
| + !IsRendererTransferNeededForNavigation(render_frame_host_.get(), |
| + dest_url)) { |
| + DCHECK(!dest_instance || |
| + dest_instance == render_frame_host_->GetSiteInstance()); |
| + return render_frame_host_.get(); |
| + } |
| } |
| SiteInstance* current_instance = render_frame_host_->GetSiteInstance(); |