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

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

Issue 9384024: Prefer ScopedNestableTaskAllower over manual save/restore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename back to "allow". Created 8 years, 10 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 | « ppapi/proxy/ppb_testing_proxy.cc ('k') | webkit/database/database_connections.cc » ('j') | 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 873fcf52ef6cd342b0b73004d92e48b576faa298..73149c28bcad8d2a3aef5ee6eb69d7107dc3a692 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -323,11 +323,11 @@ MenuItemView* MenuController::Run(Widget* parent,
aura::client::GetDispatcherClient()->RunWithDispatcher(this,
parent->GetNativeWindow(), true);
#else
- MessageLoopForUI* loop = MessageLoopForUI::current();
- bool did_allow_task_nesting = loop->NestableTasksAllowed();
- loop->SetNestableTasksAllowed(true);
- loop->RunWithDispatcher(this);
- loop->SetNestableTasksAllowed(did_allow_task_nesting);
+ {
+ MessageLoopForUI* loop = MessageLoopForUI::current();
+ MessageLoop::ScopedNestableTaskAllower allow(loop);
+ loop->RunWithDispatcher(this);
+ }
#endif
if (ViewsDelegate::views_delegate)
« no previous file with comments | « ppapi/proxy/ppb_testing_proxy.cc ('k') | webkit/database/database_connections.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698