Chromium Code Reviews| Index: content/renderer/history_controller.cc |
| diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc |
| index 14ced356b8896426cd4f027aac3ff5c594a45e46..dbdb11214fe277781b5e8f3857baf8952152aab7 100644 |
| --- a/content/renderer/history_controller.cc |
| +++ b/content/renderer/history_controller.cc |
| @@ -177,6 +177,13 @@ void HistoryController::UpdateForInitialLoadInChildFrame( |
| return; |
| if (HistoryEntry::HistoryNode* existing_node = |
| current_entry_->GetHistoryNodeForFrame(frame)) { |
| + // Clear the children and any NavigationParams if this commit isn't for |
| + // the same item. Otherwise we might have stale data after a redirect. |
| + if (existing_node->item().itemSequenceNumber() != |
| + item.itemSequenceNumber()) { |
| + existing_node->RemoveChildren(); |
| + navigation_params_.reset(); |
| + } |
|
Charlie Reis
2016/07/15 22:42:59
This is actually the same fix I made to UpdateForC
|
| existing_node->set_item(item); |
| return; |
| } |