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