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

Unified Diff: ppapi/shared_impl/tracked_callback.cc

Issue 869883003: Never lock the Pepper proxy lock on the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops, version without the TrackedCallback changes. Created 5 years, 9 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
« ppapi/proxy/udp_socket_resource_base.cc ('K') | « ppapi/shared_impl/proxy_lock.h ('k') | no next file » | 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 8e353463c3c848c198e591157fbb4a9d1b71c364..103d58fedccb058c4a9958e61744cf26d85b61e9 100644
--- a/ppapi/shared_impl/tracked_callback.cc
+++ b/ppapi/shared_impl/tracked_callback.cc
@@ -37,12 +37,6 @@ int32_t RunCompletionTask(TrackedCallback::CompletionTask completion_task,
return result;
}
-void AcquireProxyLockAndRun(const base::Closure& closure) {
- ProxyAutoLock acquire;
- closure.Run();
-}
-
-
} // namespace
// TrackedCallback -------------------------------------------------------------
@@ -252,14 +246,8 @@ void TrackedCallback::PostRunWithLock(int32_t result) {
// directly.
SignalBlockingCallback(result);
} else {
- // Note we can't use "RunWhileLocked" from proxy_lock.h, because it requires
- // that the ProxyLock is held (to protect Resource and Var ref-counting).
- // Here, we must not acquire the ProxyLock, because we may be on the IO
- // thread. But we're not passing any parameters that would require
- // the ProxyLock (such as Var or Resource).
base::Closure callback_closure(
- base::Bind(&ppapi::AcquireProxyLockAndRun,
- base::Bind(&TrackedCallback::Run, this, result)));
+ RunWhileLocked(base::Bind(&TrackedCallback::Run, this, result)));
raymes 2015/03/25 01:43:59 I don't really understand this change but maybe bb
dmichael (off chromium) 2015/03/25 17:35:04 That CL hasn't landed yet, and you're right... th
if (target_loop_) {
target_loop_->PostClosure(FROM_HERE, callback_closure, 0);
} else {
« ppapi/proxy/udp_socket_resource_base.cc ('K') | « ppapi/shared_impl/proxy_lock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698