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

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: 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
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 ccefd18cf36e9ed66857e81b4066561cf45eb064..87ffab95b96f169910c0f60e4bfab14416e4a607 100644
--- a/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_message_loop_impl.cc
@@ -88,13 +88,11 @@ int32_t PPB_Flash_MessageLoop_Impl::InternalRun(
// destroyed when the nested message loop exits.
scoped_refptr<State> state_protector(state_);
- bool old_value = MessageLoop::current()->NestableTasksAllowed();
- MessageLoop::current()->SetNestableTasksAllowed(true);
+ 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();
Ryan Sleevi 2012/02/11 02:17:22 Also here - state_protector->result() runs while n
jar (doing other things) 2012/02/11 03:24:38 +1 Please put lines 91 and 92 into a local scope.
dhollowa 2012/02/13 17:44:26 Done.
}

Powered by Google App Engine
This is Rietveld 408576698