Commit cf27abd2 authored by Alex Moshchuk's avatar Alex Moshchuk Committed by Commit Bot

Remove process consolidation shortcut in DetermineSiteInstanceForURL.

DetermineSiteInstanceForURL has some logic for placing a subframe
into its parent's SiteInstance if neither frame requires a dedicated
process.  This was a best-effort heuristic for process consolidation
in a common case, but it is no longer needed given that default
SiteInstances are now implemented and enabled by default in issue
787576.

Bug: 1015882
Change-Id: Idb23813ea422bc8934bad0be29cf4eb575d686fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1876979
Commit-Queue: Aaron Colwell <acolwell@chromium.org>
Auto-Submit: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: default avatarAaron Colwell <acolwell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780518}
parent edd196ea
...@@ -1763,30 +1763,6 @@ RenderFrameHostManager::DetermineSiteInstanceForURL( ...@@ -1763,30 +1763,6 @@ RenderFrameHostManager::DetermineSiteInstanceForURL(
return SiteInstanceDescriptor(opener_frame->GetSiteInstance()); return SiteInstanceDescriptor(opener_frame->GetSiteInstance());
} }
// Keep subframes in the parent's SiteInstance unless a dedicated process is
// required for either the parent or the subframe's destination URL. This
// isn't a strict invariant but rather a heuristic to avoid unnecessary
// OOPIFs; see https://crbug.com/711006.
//
// TODO(alexmos): Remove this check after fixing https://crbug.com/787576.
//
// Also if kProcessSharingWithStrictSiteInstances is enabled, don't lump the
// subframe into the same SiteInstance as the parent. These separate
// SiteInstances can get assigned to the same process later.
if (!base::FeatureList::IsEnabled(
features::kProcessSharingWithStrictSiteInstances)) {
if (!frame_tree_node_->IsMainFrame()) {
RenderFrameHostImpl* parent = frame_tree_node_->parent();
bool dest_url_requires_dedicated_process =
SiteInstanceImpl::DoesSiteRequireDedicatedProcess(
parent->GetSiteInstance()->GetIsolationContext(), dest_url);
if (!parent->GetSiteInstance()->RequiresDedicatedProcess() &&
!dest_url_requires_dedicated_process) {
return SiteInstanceDescriptor(parent->GetSiteInstance());
}
}
}
// Start the new renderer in a new SiteInstance, but in the current // Start the new renderer in a new SiteInstance, but in the current
// BrowsingInstance. // BrowsingInstance.
return SiteInstanceDescriptor(dest_url, SiteInstanceRelation::RELATED); return SiteInstanceDescriptor(dest_url, SiteInstanceRelation::RELATED);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment