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

Unified Diff: ppapi/shared_impl/tracked_callback.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/shared_impl/proxy_lock.cc ('k') | ppapi/thunk/enter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/tracked_callback.cc
diff --git a/ppapi/shared_impl/tracked_callback.cc b/ppapi/shared_impl/tracked_callback.cc
index a49f4ff942773737777851c549ba042509f5d270..b792c511b86026401cfb15fd1106cb80bd401ffb 100644
--- a/ppapi/shared_impl/tracked_callback.cc
+++ b/ppapi/shared_impl/tracked_callback.cc
@@ -12,6 +12,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/shared_impl/callback_tracker.h"
#include "ppapi/shared_impl/ppapi_globals.h"
+#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/shared_impl/resource.h"
namespace ppapi {
@@ -49,8 +50,8 @@ void TrackedCallback::PostAbort() {
if (!abort_impl_factory_.HasWeakPtrs()) {
MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&TrackedCallback::Abort,
- abort_impl_factory_.GetWeakPtr()));
+ RunWhileLocked(base::Bind(&TrackedCallback::Abort,
+ abort_impl_factory_.GetWeakPtr())));
}
}
}
@@ -69,7 +70,7 @@ void TrackedCallback::Run(int32_t result) {
// Do this before running the callback in case of reentrancy (which
// shouldn't happen, but avoid strange failures).
MarkAsCompleted();
- PP_RunCompletionCallback(&callback, result);
+ CallWhileUnlocked(PP_RunCompletionCallback, &callback, result);
}
}
« no previous file with comments | « ppapi/shared_impl/proxy_lock.cc ('k') | ppapi/thunk/enter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698