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

Unified Diff: content/browser/frame_host/navigation_controller_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 | « no previous file | content/browser/frame_host/navigation_controller_impl_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 2b21fd9296ce3828ee0b2417a9174fc788e022e6..4a288c1744edb2bd1af9d430370765df98e7a94c 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1910,9 +1910,16 @@ void NavigationControllerImpl::FindFramesToNavigate(
new_item->item_sequence_number() != old_item->item_sequence_number() ||
(new_item->site_instance() != nullptr &&
new_item->site_instance() != old_item->site_instance())) {
+ // Same document loads happen if the previous item has the same document
+ // sequence number. Note that we should treat them as different document if
+ // the destination RenderFrameHost (which is necessarily the current
+ // RenderFrameHost for same document navigations) doesn't have a last
+ // committed page. This case can happen for Ctrl+Back or after a renderer
+ // crash.
if (old_item &&
new_item->document_sequence_number() ==
- old_item->document_sequence_number()) {
+ old_item->document_sequence_number() &&
+ !frame->current_frame_host()->last_committed_url().is_empty()) {
same_document_loads->push_back(std::make_pair(frame, new_item));
// TODO(avi, creis): This is a bug; we should not return here. Rather, we
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698