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

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: also EXIT_DESTROYED 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..d1547c41a8c3d4aaec0de657a595a2777328e742 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -434,6 +434,10 @@ MenuItemView* MenuController::Run(Widget* parent,
// Set exit_all_, which makes sure all nested loops exit immediately.
if (exit_type_ != EXIT_DESTROYED)
SetExitType(EXIT_ALL);
+ } else if (exit_type_ != EXIT_NONE && message_loop_depth_) {
+ // If we're closing all menus, also mark the next topmost menu
+ // message loop for termination, so that we'll unwind fully.
+ TerminateNestedMessageLoop();
}
}
« 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