Commit e80da6ed authored by Rakina Zata Amni's avatar Rakina Zata Amni Committed by Commit Bot

DCHECK(IsMainFrame) when trying to reuse process on cross-BI history nav

This was previously used as a condition instead of a DCHECK because of
crbug.com/1107269.

Bug: 1107269
Change-Id: I16c814fb60b40bb508c8fa43fa91f41b27feb5af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359970
Auto-Submit: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799260}
parent 25c86c83
......@@ -1577,13 +1577,11 @@ RenderFrameHostManager::GetSiteInstanceForNavigation(
IsProactivelySwapBrowsingInstanceOnSameSiteNavigationEnabled() ||
IsSameSiteBackForwardCacheEnabled();
if (is_same_site_proactive_swap_enabled && is_history_navigation &&
swapped_browsing_instance && frame_tree_node_->IsMainFrame() &&
swapped_browsing_instance &&
IsCurrentlySameSite(
static_cast<RenderFrameHostImpl*>(render_frame_host_.get()),
dest_url)) {
// TODO(crbug.com/1107269): DCHECK for frame_tree_node_->IsMainFrame() once
// we can guarantee all cross-BrowsingInstance history navigations only
// happen on main frames.
DCHECK(frame_tree_node_->IsMainFrame());
new_instance_impl->ReuseCurrentProcessIfPossible(
current_instance->GetProcess());
}
......
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