Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Unified Diff: content/browser/web_contents/navigation_controller_impl.cc

Issue 19699007: Ensure we don't crash if user navigates back from NTP to Chrome sign-in page before it has fully lo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing indent. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/navigation_controller_impl.cc
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index e593397ad7282b9668ed79ff772e3fc2d35392f9..6176606cbd44d6bbaeb66e9ee368e57bcd2ac80a 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -600,11 +600,13 @@ void NavigationControllerImpl::GoToOffset(int offset) {
GoToIndex(GetIndexForOffset(offset));
}
-void NavigationControllerImpl::RemoveEntryAtIndex(int index) {
- if (index == last_committed_entry_index_)
- return;
+bool NavigationControllerImpl::RemoveEntryAtIndex(int index) {
+ if (index == last_committed_entry_index_ ||
+ index == pending_entry_index_)
+ return false;
RemoveEntryAtIndexInternal(index);
+ return true;
}
void NavigationControllerImpl::UpdateVirtualURLToURL(

Powered by Google App Engine
This is Rietveld 408576698