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

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

Issue 831413002: views: menu: Unwind multiple menu message loops eagerly with EXIT_ALL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_controller.cc
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 796ecc37ff4dff318d76855eae6d57a06b262eb3..22654d714e611a31c1d3566e57b68a56292a56d2 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -441,6 +441,11 @@ MenuItemView* MenuController::Run(Widget* parent,
// The lock handles the case if the button was destroyed.
pressed_lock_.reset(nested_pressed_lock.release());
+ // If we're closing all menus, also mark the next topmost menu
+ // message loop for termination, so that we'll unwind fully.
+ if (exit_type_ == EXIT_ALL && message_loop_depth_)
+ TerminateNestedMessageLoop();
sky 2015/01/06 01:00:15 Move this up to around 437'ish. An else case for t
spang 2015/01/06 19:14:12 Done.
+
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698