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

Unified Diff: ppapi/proxy/ppb_testing_proxy.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 | « net/socket/transport_client_socket_pool_unittest.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_testing_proxy.cc
diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc
index 9c0a14b62d72a3e295803079ee77a25e5cd9d735..d1f5cec651209bf66a2ce773235554e5c0ff164c 100644
--- a/ppapi/proxy/ppb_testing_proxy.cc
+++ b/ppapi/proxy/ppb_testing_proxy.cc
@@ -50,10 +50,8 @@ PP_Bool ReadImageData(PP_Resource graphics_2d,
}
void RunMessageLoop(PP_Instance instance) {
- bool old_state = MessageLoop::current()->NestableTasksAllowed();
- MessageLoop::current()->SetNestableTasksAllowed(true);
+ MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
MessageLoop::current()->Run();
- MessageLoop::current()->SetNestableTasksAllowed(old_state);
}
void QuitMessageLoop(PP_Instance instance) {
« no previous file with comments | « net/socket/transport_client_socket_pool_unittest.cc ('k') | ui/views/controls/menu/menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698