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

Unified Diff: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.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/views/autocomplete/autocomplete_popup_contents_view.cc
===================================================================
--- chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (revision 30836)
+++ chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (working copy)
@@ -591,7 +591,8 @@
edit_view_(edit_view),
bubble_positioner_(bubble_positioner),
result_font_(font.DeriveFont(kEditFontAdjust)),
- ALLOW_THIS_IN_INITIALIZER_LIST(size_animation_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(size_animation_(this)),
+ is_open_(false) {
// The following little dance is required because set_border() requires a
// pointer to a non-const object.
BubbleBorder* bubble_border = new BubbleBorder;
@@ -619,7 +620,9 @@
// AutocompletePopupContentsView, AutocompletePopupView overrides:
bool AutocompletePopupContentsView::IsOpen() const {
- return popup_->IsOpen();
+ const bool is_open = popup_->IsOpen();
+ CHECK(is_open == is_open_);
+ return is_open;
}
void AutocompletePopupContentsView::InvalidateLine(size_t line) {
@@ -633,6 +636,7 @@
size_animation_.Stop();
popup_->Hide();
}
+ is_open_ = false;
return;
}
@@ -681,6 +685,7 @@
start_bounds_ = target_bounds_;
popup_->Show();
}
+ is_open_ = true;
SchedulePaint();
}

Powered by Google App Engine
This is Rietveld 408576698