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() { |