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

Unified Diff: views/controls/menu/menu_item_view.cc

Issue 1664001: Fixes possible crash if the window hosting a menu was closed while the (Closed)
Patch Set: Incorporated review feedback Created 10 years, 8 months 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
« no previous file with comments | « views/controls/menu/menu_host_win.cc ('k') | views/controls/menu/submenu_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/menu/menu_item_view.cc
diff --git a/views/controls/menu/menu_item_view.cc b/views/controls/menu/menu_item_view.cc
index 79f430615e1742fc918806c76bd5af210dc6c72e..64b8270a0604dfd53fbe513d32a1f47f74e3dd8e 100644
--- a/views/controls/menu/menu_item_view.cc
+++ b/views/controls/menu/menu_item_view.cc
@@ -98,7 +98,7 @@ void MenuItemView::RunMenuAt(gfx::NativeWindow parent,
// A menu is already showing, but it isn't a blocking menu. Cancel it.
// We can get here during drag and drop if the user right clicks on the
// menu quickly after the drop.
- controller->Cancel(true);
+ controller->Cancel(MenuController::EXIT_ALL);
controller = NULL;
}
bool owns_controller = false;
@@ -145,7 +145,7 @@ void MenuItemView::RunMenuForDropAt(gfx::NativeWindow parent,
// If there is a menu, hide it so that only one menu is shown during dnd.
MenuController* current_controller = MenuController::GetActiveInstance();
if (current_controller) {
- current_controller->Cancel(true);
+ current_controller->Cancel(MenuController::EXIT_ALL);
}
// Always create a new controller for non-blocking.
@@ -160,7 +160,7 @@ void MenuItemView::RunMenuForDropAt(gfx::NativeWindow parent,
void MenuItemView::Cancel() {
if (controller_ && !canceled_) {
canceled_ = true;
- controller_->Cancel(true);
+ controller_->Cancel(MenuController::EXIT_ALL);
}
}
« no previous file with comments | « views/controls/menu/menu_host_win.cc ('k') | views/controls/menu/submenu_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698