diff options
Diffstat (limited to 'ui/views/controls/menu/menu_controller.cc')
-rw-r--r-- | ui/views/controls/menu/menu_controller.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc index 873fcf5..73149c2 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) |