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

Unified Diff: ppapi/proxy/ppb_message_loop_proxy.cc

Issue 9391006: PPAPI: Add unlocking for PPP calls and callbacks. Add more locking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 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 | « ppapi/proxy/ppb_flash_proxy.cc ('k') | ppapi/proxy/ppb_testing_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_message_loop_proxy.cc
diff --git a/ppapi/proxy/ppb_message_loop_proxy.cc b/ppapi/proxy/ppb_message_loop_proxy.cc
index 12a48bb6496fd5b534485da9431844c00beba109..7a64b502a8409d26638b6df398f3271add326418 100644
--- a/ppapi/proxy/ppb_message_loop_proxy.cc
+++ b/ppapi/proxy/ppb_message_loop_proxy.cc
@@ -55,6 +55,9 @@ class MessageLoopResource : public Resource, public PPB_MessageLoop_API {
// Handles posting to the message loop if there is one, or the pending queue
// if there isn't.
+ // NOTE: The given closure will be run *WITHOUT* acquiring the Proxy lock.
+ // This only makes sense for user code and completely thread-safe
+ // proxy operations (e.g., MessageLoop::QuitClosure).
void PostClosure(const tracked_objects::Location& from_here,
const base::Closure& closure,
int64 delay_ms);
@@ -197,8 +200,9 @@ void MessageLoopResource::PostClosure(
const base::Closure& closure,
int64 delay_ms) {
if (loop_.get()) {
- loop_->PostDelayedTask(
- from_here, closure, base::TimeDelta::FromMilliseconds(delay_ms));
+ loop_->PostDelayedTask(from_here,
+ closure,
+ base::TimeDelta::FromMilliseconds(delay_ms));
} else {
TaskInfo info;
info.from_here = FROM_HERE;
« no previous file with comments | « ppapi/proxy/ppb_flash_proxy.cc ('k') | ppapi/proxy/ppb_testing_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698