summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/extension_popup_gtk.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 01:06:07 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 01:06:07 +0000
commit75ab8a0ef23b8fcdd7a0c2ff35ad4622b2e14f1d (patch)
tree9fa8eacde5127a1259191b9d3fc7eacd290049f6 /chrome/browser/gtk/extension_popup_gtk.cc
parentd550b676e7acb035b1a118d92a9d3b5be12dc9d5 (diff)
downloadchromium_src-75ab8a0ef23b8fcdd7a0c2ff35ad4622b2e14f1d.zip
chromium_src-75ab8a0ef23b8fcdd7a0c2ff35ad4622b2e14f1d.tar.gz
chromium_src-75ab8a0ef23b8fcdd7a0c2ff35ad4622b2e14f1d.tar.bz2
GTK: fix DCHECK triggered when multiple ExtensionPopupGtks existed concurrently.
BUG=35211 TEST=see bug Review URL: http://codereview.chromium.org/601014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38560 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/extension_popup_gtk.cc')
-rw-r--r--chrome/browser/gtk/extension_popup_gtk.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/gtk/extension_popup_gtk.cc b/chrome/browser/gtk/extension_popup_gtk.cc
index 75fab2df..2d25d96 100644
--- a/chrome/browser/gtk/extension_popup_gtk.cc
+++ b/chrome/browser/gtk/extension_popup_gtk.cc
@@ -25,7 +25,6 @@ ExtensionPopupGtk::ExtensionPopupGtk(Browser* browser,
bubble_(NULL),
host_(host),
relative_to_(relative_to) {
-
// If the host had somehow finished loading, then we'd miss the notification
// and not show. This seems to happen in single-process mode.
if (host->did_stop_loading()) {
@@ -63,8 +62,12 @@ void ExtensionPopupGtk::ShowPopup() {
return;
}
- // Only one instance should be showing at a time.
- DCHECK(!current_extension_popup_);
+ // Only one instance should be showing at a time. Get rid of the old one, if
+ // any. Typically, |current_extension_popup_| will be NULL, but it can be
+ // non-NULL if a browser action button is clicked while another extension
+ // popup's extension host is still loading.
+ if (current_extension_popup_)
+ current_extension_popup_->DestroyPopup();
current_extension_popup_ = this;
// We'll be in the upper-right corner of the window for LTR languages, so we