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

Unified Diff: content/browser/tab_contents/tab_contents.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/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 0b06b975200dce0dce4aec261d136bed54ff41aa..bfdaa8a1ec699dc35450bbb1a08cc6ab4988e8b2 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -596,12 +596,21 @@ bool TabContents::NavigateToEntry(
return true;
}
-void TabContents::SetHistoryLengthAndClear(int history_length) {
+void TabContents::SetHistoryLengthAndClear(const SiteInstance* site_instance,
+ int history_length,
+ int32 page_id) {
RenderViewHost* rvh = render_view_host();
if (!rvh)
return;
+ // It's possible that the current render view host is different from the
+ // one that needs to be pruned.
Charlie Reis 2011/08/11 20:49:24 Well, we're hoping it isn't possible if called cor
+ if (rvh->site_instance() != site_instance) {
+ LOG(ERROR) << "Mismatches site instance";
+ return;
+ }
rvh->Send(new ViewMsg_SetHistoryLengthAndClear(rvh->routing_id(),
- history_length));
+ history_length,
+ page_id));
}
void TabContents::Stop() {

Powered by Google App Engine
This is Rietveld 408576698