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

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 2397373005: Catch empty PageStates on history navigations earlier. (Closed)
Patch Set: Remove page ID check. 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 | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index 93063b600cffe3aa9c0ea574b67ebeebd58a6a09..f419648f4ce9966f43974171a4d48d40f9920e17 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -378,6 +378,14 @@ bool NavigatorImpl::NavigateToEntry(
if (is_transfer)
dest_render_frame_host->set_is_loading(true);
+ // A session history navigation should have been accompanied by state.
+ // TODO(creis): This is known to be failing in UseSubframeNavigationEntries
+ // in https://crbug.com/568703, when the PageState on a FrameNavigationEntry
+ // is unexpectedly empty. Until the cause is found, keep this as a DCHECK
+ // and load the URL without PageState.
+ if (is_pending_entry && controller_->GetPendingEntryIndex() != -1)
+ DCHECK(frame_entry.page_state().IsValid());
+
// Navigate in the desired RenderFrameHost.
// We can skip this step in the rare case that this is a transfer navigation
// which began in the chosen RenderFrameHost, since the request has already
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698