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

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

Issue 2441803002: DO NOT COMMIT: Revert "Enable subframe FrameNavigationEntries by default." (Closed)
Patch Set: Fix bug in UpdateState. Created 4 years, 2 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 | « chrome/common/extensions/extension_process_policy.cc ('k') | content/common/site_isolation_policy.cc » ('j') | 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 253e13548810c5ae985a15dfdadf79d3165012b4..a85fd683d5bb0e044354669b07adcde1a244984a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4304,16 +4304,13 @@ void WebContentsImpl::UpdateState(RenderViewHost* rvh,
if (rvh->GetDelegate()->GetAsWebContents() != this)
return;
- if (!rvh->GetMainFrame()) {
- // When UseSubframeNavigationEntries is turned off, state updates only come
- // in on main frames. When UseSubframeNavigationEntries is turned on,
- // UpdateStateForFrame() should have been called rather than this function.
- NOTREACHED();
+ if (!rvh->GetMainFrame())
return;
- }
NavigationEntryImpl* entry = controller_.GetEntryWithUniqueID(
static_cast<RenderFrameHostImpl*>(rvh->GetMainFrame())->nav_entry_id());
+ if (!entry)
+ return;
if (page_state == entry->GetPageState())
return; // Nothing to update.
« no previous file with comments | « chrome/common/extensions/extension_process_policy.cc ('k') | content/common/site_isolation_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698