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

Unified Diff: ui/views/controls/menu/menu_host.cc

Issue 2155243007: Turn Bookmark Menus Async (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge the pretarget handlers Created 4 years, 4 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 | « ui/views/controls/menu/menu_host.h ('k') | ui/views/controls/menu/menu_key_event_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_host.cc
diff --git a/ui/views/controls/menu/menu_host.cc b/ui/views/controls/menu/menu_host.cc
index d07d1efcc758ffbfc90ad68b9ed5f31d86a7b8c9..c6750a6e0cd51be18d9470a45969bed6b27c0e4c 100644
--- a/ui/views/controls/menu/menu_host.cc
+++ b/ui/views/controls/menu/menu_host.cc
@@ -219,9 +219,13 @@ void MenuHost::OnDragWillStart() {
}
void MenuHost::OnDragComplete() {
+ // If we are being destroyed there is no guarantee that the menu items are
+ // available.
+ if (destroying_)
+ return;
MenuController* menu_controller =
submenu_->GetMenuItem()->GetMenuController();
- if (destroying_ || !menu_controller)
+ if (!menu_controller)
return;
bool should_close = true;
« no previous file with comments | « ui/views/controls/menu/menu_host.h ('k') | ui/views/controls/menu/menu_key_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698