diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-24 16:59:11 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-24 16:59:11 +0000 |
commit | 44903a076984c27d2fe98ac872a455cefd01aa51 (patch) | |
tree | e2cb6fb3e9eaa2a74485e133107c3abd79d226e4 /chrome | |
parent | bc00cd0ad4c91a0a4e4cd0e0956af8f4d018521f (diff) | |
download | chromium_src-44903a076984c27d2fe98ac872a455cefd01aa51.zip chromium_src-44903a076984c27d2fe98ac872a455cefd01aa51.tar.gz chromium_src-44903a076984c27d2fe98ac872a455cefd01aa51.tar.bz2 |
Linux: Stop hitting a DCHECK in GoButtonGtk on shutdown.
Turns out we can get 2 gtk leave events in a row on shutdown, if the cursor is already hovering over the go button.
BUG=10851
Review URL: http://codereview.chromium.org/93055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14432 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/go_button_gtk.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/gtk/go_button_gtk.cc b/chrome/browser/gtk/go_button_gtk.cc index ebc48bb..0dffad5 100644 --- a/chrome/browser/gtk/go_button_gtk.cc +++ b/chrome/browser/gtk/go_button_gtk.cc @@ -92,7 +92,14 @@ gboolean GoButtonGtk::OnEnter(GtkButton* widget, GoButtonGtk* button) { // static gboolean GoButtonGtk::OnLeave(GtkButton* widget, GoButtonGtk* button) { - DCHECK_EQ(BS_HOT, button->state()); + // It's possible on shutdown for a "leave" event to be emitted twice in a row + // for this button. I'm not sure if this is a gtk quirk or something wrong + // with our usage, but it's harmless. I'm commenting out this DCHECK for now. + // and adding a LOG(WARNING) instead. + // See http://www.crbug.com/10851 for details. + // DCHECK_EQ(BS_HOT, button->state()); + if (button->state() != BS_HOT) + LOG(WARNING) << "Button state should be BS_HOT when leaving."; button->state_ = BS_NORMAL; button->ChangeMode(button->intended_mode_, true); return TRUE; |