Index: chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc |
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc |
index 4c8dfa7073f31d0c5d000d0b250b4333813cd912..bfdac00436b8773856480fbb26cfb0f828ff861f 100644 |
--- a/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc |
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_view_views.cc |
@@ -361,10 +361,8 @@ void TabContentsViewViews::ShowContextMenu(const ContextMenuParams& params) { |
// Enable recursive tasks on the message loop so we can get updates while |
// the context menu is being displayed. |
- bool old_state = MessageLoop::current()->NestableTasksAllowed(); |
- MessageLoop::current()->SetNestableTasksAllowed(true); |
+ MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); |
context_menu_->RunMenuAt(screen_point.x(), screen_point.y()); |
- MessageLoop::current()->SetNestableTasksAllowed(old_state); |
} |
void TabContentsViewViews::ShowPopupMenu(const gfx::Rect& bounds, |