Index: content/renderer/history_controller.cc |
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc |
index 35f072ad78cf736ac7c15869f2871287f7e2f089..ad3485277b16dd7c9a612334316c58f48e73a2d0 100644 |
--- a/content/renderer/history_controller.cc |
+++ b/content/renderer/history_controller.cc |
@@ -169,6 +169,16 @@ void HistoryController::UpdateForCommit(RenderFrameImpl* frame, |
CreateNewBackForwardItem(frame, item, navigation_within_page); |
} else if (commit_type == blink::WebInitialCommitInChildFrame) { |
UpdateForInitialLoadInChildFrame(frame, item); |
+ } else { |
Nate Chapin
2015/04/30 18:24:10
Now that this if-else block includes all WebHistor
Charlie Reis
2015/04/30 18:36:30
Done.
|
+ // Even for inert commits (e.g., location.replace, client redirects), make |
+ // sure the current entry gets updated, if there is one. |
+ DCHECK_EQ(blink::WebHistoryInertCommit, commit_type); |
+ if (current_entry_) { |
+ if (HistoryEntry::HistoryNode* node = |
+ current_entry_->GetHistoryNodeForFrame(frame)) { |
+ node->set_item(item); |
+ } |
+ } |
} |
} |