Index: ppapi/shared_impl/tracked_callback.cc |
diff --git a/ppapi/shared_impl/tracked_callback.cc b/ppapi/shared_impl/tracked_callback.cc |
index 1a3ac21adb5610b332f617b3c10b13f1ec74acf2..055b2abfe8f80e8f3b1ca317bdae46257ff7f8cf 100644 |
--- a/ppapi/shared_impl/tracked_callback.cc |
+++ b/ppapi/shared_impl/tracked_callback.cc |
@@ -167,7 +167,12 @@ void TrackedCallback::PostRun(int32_t result) { |
base::Closure callback_closure( |
RunWhileLocked(base::Bind(&TrackedCallback::Run, this, result))); |
bbudge
2013/09/04 22:31:45
We should probably move this into the 'else' claus
|
- if (!target_loop_.get()) { |
+ if (is_blocking()) { |
+ // We might not have a MessageLoop to post to, so we must call Run() |
+ // directly. Since we don't want to attempt to re-acquire the lock, we |
+ // don't use the locking closure. |
+ Run(result); |
+ } else if (!target_loop_.get()) { |
// We must be running in-process and on the main thread (the Enter |
// classes protect against having a null target_loop_ otherwise). |
DCHECK(IsMainThread()); |