Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2036463002: Use nav_entry_id in UpdateTitle for OOPIF-enabled modes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e67fc30d38417aa139d25eeab2d84c7e4051ff2e..9384823e8000da59f626a22982ef13fbbb2bde8b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4451,10 +4451,18 @@ void WebContentsImpl::UpdateTitle(RenderFrameHost* render_frame_host,
NavigationEntryImpl* entry = controller_.GetEntryWithPageID(
render_frame_host->GetSiteInstance(), page_id);
- // TODO(creis): Switch to use this as the default.
NavigationEntryImpl* new_entry = controller_.GetEntryWithUniqueID(
static_cast<RenderFrameHostImpl*>(render_frame_host)->nav_entry_id());
- DCHECK_EQ(entry, new_entry);
+ if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) {
+ // In out-of-process iframe enabled modes, page_id can't keep track of
+ // navigations in other processes, so we must use nav_entry_id.
+ // TODO(creis): Switch to use this as the default.
+ entry = new_entry;
+ } else {
+ // In modes that have no out-of-process iframes, nav_entry_id and page_id
+ // should agree on which entry to update.
+ DCHECK_EQ(entry, new_entry);
+ }
// We can handle title updates when we don't have an entry in
// UpdateTitleForEntry, but only if the update is from the current RVH.
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698