| 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 c8b4275d5537de424b021c6173c1df17442e49bf..af7ba906a7c3f8bf037204bf2b2fd1ef813b9836 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::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() &&
|
| @@ -1434,20 +1434,18 @@
|
| SiteIsolationPolicy::IsTopDocumentIsolationEnabled() &&
|
| !SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context,
|
| dest_url)) {
|
| - RenderFrameHostImpl* main_frame =
|
| - frame_tree_node_->frame_tree()->root()->current_frame_host();
|
| if (GetContentClient()
|
| ->browser()
|
| - ->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);
|
| - }
|
| - return SiteInstanceDescriptor(render_frame_host_->GetSiteInstance());
|
| + ->ShouldFrameShareParentSiteInstanceDespiteTopDocumentIsolation(
|
| + dest_url, current_instance)) {
|
| + 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
|
|
|