summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 21:10:13 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-29 21:10:13 +0000
commit9baf6f860d8ba7c71319a4f371dd586be50def7e (patch)
tree50633bbc9d464abdc9e9b347313fefaf2ce603a7 /views
parent8c169d20455b37a5bf8761e8d13cb157c390e126 (diff)
downloadchromium_src-9baf6f860d8ba7c71319a4f371dd586be50def7e.zip
chromium_src-9baf6f860d8ba7c71319a4f371dd586be50def7e.tar.gz
chromium_src-9baf6f860d8ba7c71319a4f371dd586be50def7e.tar.bz2
Fixes crash in menu code. MenuItemView doesn't handle trying to show a
menu while it's already showing. BUG=90862 TEST=none R=rhashimoto@chromium.org Review URL: http://codereview.chromium.org/7529026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/menu/menu_runner.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/views/controls/menu/menu_runner.cc b/views/controls/menu/menu_runner.cc
index f210cc3..1941d69a 100644
--- a/views/controls/menu/menu_runner.cc
+++ b/views/controls/menu/menu_runner.cc
@@ -62,6 +62,11 @@ void MenuRunner::Holder::RunMenuAt(Widget* parent,
const gfx::Rect& bounds,
MenuItemView::AnchorPosition anchor,
bool has_mnemonics) {
+ if (running_) {
+ // Ignore requests to show the menu while it's already showing. MenuItemView
+ // doesn't handle this very well (meaning it crashes).
+ return;
+ }
running_ = true;
menu_->RunMenuAt(parent, button, bounds, anchor, has_mnemonics);
if (delete_after_run_) {