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

Unified Diff: webkit/plugins/ppapi/ppb_flash_message_loop_impl.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 | « webkit/plugins/ppapi/ppb_flash_impl.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc b/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
index 8a3ff48129c11e37000d186d59a3a114874c0c27..647e1a84943697f45737d7804801f2a883e49bd4 100644
--- a/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
@@ -87,14 +87,12 @@ int32_t PPB_Flash_MessageLoop_Impl::InternalRun(
// It is possible that the PPB_Flash_MessageLoop_Impl object has been
// destroyed when the nested message loop exits.
scoped_refptr<State> state_protector(state_);
-
- bool old_value = MessageLoop::current()->NestableTasksAllowed();
- MessageLoop::current()->SetNestableTasksAllowed(true);
- MessageLoop::current()->Run();
-
+ {
+ MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
+ MessageLoop::current()->Run();
+ }
// Don't access data members of the class below.
- MessageLoop::current()->SetNestableTasksAllowed(old_value);
return state_protector->result();
}
« no previous file with comments | « webkit/plugins/ppapi/ppb_flash_impl.cc ('k') | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698