Chromium Code Reviews| Index: chrome/browser/tab_contents/navigation_controller.cc |
| =================================================================== |
| --- chrome/browser/tab_contents/navigation_controller.cc (revision 28624) |
| +++ chrome/browser/tab_contents/navigation_controller.cc (working copy) |
| @@ -661,6 +661,10 @@ |
| if (entry == pending_entry_) |
| DiscardNonCommittedEntriesInternal(); |
| + // If a transient entry was removed, the indeces might have changed, get |
|
brettw
2009/10/14 20:47:09
indeces -> indices
|
| + // entry_index again. |
| + entry_index = GetEntryIndexWithPageID(tab_contents_->GetSiteInstance(), |
|
brettw
2009/10/14 20:47:09
How about skipping entry_index and just setting la
|
| + params.page_id); |
| last_committed_entry_index_ = entry_index; |
| } |
| @@ -977,6 +981,8 @@ |
| if (transient_entry_index_ == -1) |
| return; |
| entries_.erase(entries_.begin() + transient_entry_index_); |
| + if (last_committed_entry_index_ > transient_entry_index_) |
| + last_committed_entry_index_--; |
| transient_entry_index_ = -1; |
| } |