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 8da3cb7c28df139f4e1521911bdda3154a4c652b..414bfd41ca75a4abee3ef65001d5e6a825421bb4 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.cc |
+++ b/content/browser/frame_host/render_frame_host_manager.cc |
@@ -1024,9 +1024,9 @@ void RenderFrameHostManager::RenderProcessGone(SiteInstanceImpl* instance) { |
void RenderFrameHostManager::CancelPendingIfNecessary( |
RenderFrameHostImpl* render_frame_host) { |
- if (render_frame_host == pending_render_frame_host_.get()) |
+ if (render_frame_host == pending_render_frame_host_.get()) { |
CancelPending(); |
- else if (render_frame_host == speculative_render_frame_host_.get()) { |
+ } else if (render_frame_host == speculative_render_frame_host_.get()) { |
// TODO(nasko, clamy): This should just clean up the speculative RFH |
// without canceling the request. See https://crbug.com/636119. |
if (frame_tree_node_->navigation_request() && |
@@ -1485,18 +1485,19 @@ RenderFrameHostManager::DetermineSiteInstanceForURL( |
SiteIsolationPolicy::IsTopDocumentIsolationEnabled() && |
!SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context, |
dest_url)) { |
- if (GetContentClient() |
- ->browser() |
- ->ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation( |
- dest_url, current_instance)) { |
+ RenderFrameHostImpl* main_frame = |
+ frame_tree_node_->frame_tree()->root()->current_frame_host(); |
+ if (GetContentClient()->browser()->ShouldIsolateFrameFromMainContent( |
Charlie Reis
2017/06/30 23:28:45
Hmm. It feels a little odd to have the embedder m
Łukasz Anforowicz
2017/07/01 00:10:53
Do you think that maybe the base::Feature for TopD
Charlie Reis
2017/07/06 20:02:29
I think I'd rather keep it in content. Among othe
|
+ frame_tree_node_->current_frame_host(), dest_url, |
+ main_frame->GetSiteInstance())) { |
+ // This is a cross-site subframe of a non-isolated origin, so place this |
+ // frame in the default subframe site instance. |
+ return SiteInstanceDescriptor( |
+ browser_context, dest_url, |
+ SiteInstanceRelation::RELATED_DEFAULT_SUBFRAME); |
+ } else { |
return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance()); |
} |
- |
- // This is a cross-site subframe of a non-isolated origin, so place this |
- // frame in the default subframe site instance. |
- return SiteInstanceDescriptor( |
- browser_context, dest_url, |
- SiteInstanceRelation::RELATED_DEFAULT_SUBFRAME); |
} |
// Keep subframes in the parent's SiteInstance unless a dedicated process is |