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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_model.cc

Issue 342112: Try to add more sanity checking to help track down a crash.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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: chrome/browser/autocomplete/autocomplete_popup_model.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_popup_model.cc (revision 30836)
+++ chrome/browser/autocomplete/autocomplete_popup_model.cc (working copy)
@@ -175,7 +175,12 @@
// If there are no results, the popup should be closed (so we should have
// failed the CHECK above), and URLsForDefaultMatch() should have been
// called instead.
- CHECK(!result->empty());
+ if (result->empty()) {
+ // We're going to checkfail, but first see whether
+ // controller_->latest_result() is actually in sync with |result|.
+ CHECK(controller_->latest_result().empty());
+ CHECK(FALSE);
sky 2009/11/04 00:27:47 nit: FALSE -> false
+ }
CHECK(selected_line_ < result->size());
match = result->begin() + selected_line_;
}

Powered by Google App Engine
This is Rietveld 408576698