| 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 f66dac33cdaf72794e6c0aaaa5bf9e34212b7aac..6e8e5c630b91101ce07215afb213fdeee9603e69 100644
|
| --- a/content/browser/frame_host/render_frame_host_manager.cc
|
| +++ b/content/browser/frame_host/render_frame_host_manager.cc
|
| @@ -987,9 +987,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() &&
|
| @@ -1428,18 +1428,20 @@ RenderFrameHostManager::DetermineSiteInstanceForURL(
|
| SiteIsolationPolicy::IsTopDocumentIsolationEnabled() &&
|
| !SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context,
|
| dest_url)) {
|
| + RenderFrameHostImpl* main_frame =
|
| + frame_tree_node_->frame_tree()->root()->current_frame_host();
|
| if (GetContentClient()
|
| ->browser()
|
| - ->ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
|
| - dest_url, current_instance)) {
|
| - return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance());
|
| + ->ShouldIsolateFrameForTopDocumentIsolation(
|
| + transfer_navigation_handle_.get(),
|
| + 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);
|
| }
|
| -
|
| - // 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);
|
| + return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance());
|
| }
|
|
|
| // Keep subframes in the parent's SiteInstance unless a dedicated process is
|
|
|