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

Unified Diff: ppapi/proxy/plugin_resource_tracker.cc

Issue 8016008: Make much of the proxy thread-safe with 1 great big lock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 2 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/plugin_resource_tracker.h ('k') | ppapi/proxy/ppb_core_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_resource_tracker.cc
diff --git a/ppapi/proxy/plugin_resource_tracker.cc b/ppapi/proxy/plugin_resource_tracker.cc
index e47c35e0ca6b20f6db71bec18f2a92b403d63963..4abd8f74b9e792c673e8f8bc216378b7c0dd2822 100644
--- a/ppapi/proxy/plugin_resource_tracker.cc
+++ b/ppapi/proxy/plugin_resource_tracker.cc
@@ -9,6 +9,7 @@
#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/serialized_var.h"
+#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/shared_impl/resource.h"
#include "ppapi/shared_impl/tracker_base.h"
#include "ppapi/shared_impl/var.h"
@@ -29,9 +30,17 @@ TrackerBase* GetTrackerBase() {
PluginResourceTracker::PluginResourceTracker()
: var_tracker_test_override_(NULL) {
+#ifdef ENABLE_PEPPER_THREADING
+ // Set the global proxy lock, since the plugin-side of the proxy needs to be
+ // synchronized.
+ ppapi::ProxyLock::Set(&proxy_lock_);
+#endif
}
PluginResourceTracker::~PluginResourceTracker() {
+#ifdef ENABLE_PEPPER_THREADING
+ ppapi::ProxyLock::Reset();
+#endif
}
// static
« no previous file with comments | « ppapi/proxy/plugin_resource_tracker.h ('k') | ppapi/proxy/ppb_core_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698