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

Unified Diff: content/browser/tab_contents/navigation_controller.cc

Issue 7618016: Additional fixes for prerender/instant + browsing history. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: content/browser/tab_contents/navigation_controller.cc
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc
index 0144fef9b691ea047279e75249cd6688102e25f0..2722535c130a1c912d7b547d30c46c00e4719626 100644
--- a/content/browser/tab_contents/navigation_controller.cc
+++ b/content/browser/tab_contents/navigation_controller.cc
@@ -933,7 +933,15 @@ void NavigationController::CopyStateFromAndPrune(NavigationController* source,
}
// Update the history in the RenderView.
- tab_contents_->SetHistoryLengthAndClear(max_source_index);
+ // Note, I don't know if this makes sense if the active entry is transient.
+ NavigationEntry* active_entry = GetActiveEntry();
+ if (!active_entry) {
+ LOG(ERROR) << "!active_entry";
+ return;
+ }
+ tab_contents_->SetHistoryLengthAndClear(active_entry->site_instance(),
+ max_source_index,
+ active_entry->page_id());
}
void NavigationController::PruneAllButActive() {
« no previous file with comments | « no previous file | content/browser/tab_contents/tab_contents.h » ('j') | content/browser/tab_contents/tab_contents.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698