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 4325e40d7c4697c11bd992b6ba4b49a6465b89f0..45dde04a732d961e9faa1d5970e4167dbd564aca 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 |
@@ -362,10 +362,8 @@ void TabContentsViewViews::ShowContextMenu( |
// 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, |