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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2239413002: Don't mark a history navigation as in page in a new renderer process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/frame_host/navigation_controller_impl_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 3a2094408cf8e876b2f266deaa32c7dfd869c6c4..5b7bc9438580ddb4bf931fa5538a510a400a531d 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5492,6 +5492,16 @@ void RenderFrameImpl::NavigateInternal(
: blink::WebFrameLoadType::BackForward;
should_load_request = true;
+ // If this is marked as a same document load but we haven't committed
+ // anything, treat it as a new load. The browser shouldn't let this
+ // happen.
+ // TODO(creis): Add a similar check if the DSN doesn't match, and add a
+ // NOTREACHED when we're confident this won't happen.
+ if (history_load_type == blink::WebHistorySameDocumentLoad &&
+ current_history_item_.isNull()) {
+ history_load_type = blink::WebHistoryDifferentDocumentLoad;
+ }
+
// If this navigation is to a history item for a new child frame, we may
// want to ignore it in some cases. If a Javascript navigation (i.e.,
// client redirect) interrupted it and has either been scheduled,
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698