diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-11 18:58:22 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-11 18:58:22 +0000 |
commit | 67c125db892ec5222d74012da3c6d353cdf24671 (patch) | |
tree | f8380f814530c5b6a05543c91cc3c68212454ad3 /ppapi/proxy/plugin_resource_tracker.cc | |
parent | 339651d588733a950864e7cac566b614421ca9cd (diff) | |
download | chromium_src-67c125db892ec5222d74012da3c6d353cdf24671.zip chromium_src-67c125db892ec5222d74012da3c6d353cdf24671.tar.gz chromium_src-67c125db892ec5222d74012da3c6d353cdf24671.tar.bz2 |
Add global lock for Enter* classes. Add ScopedProxyLock for non-thunk proxies. Add multi-threading test for PPB_Var.
BUG=92909
TEST=None yet
Review URL: http://codereview.chromium.org/8016008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/plugin_resource_tracker.cc')
-rw-r--r-- | ppapi/proxy/plugin_resource_tracker.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ppapi/proxy/plugin_resource_tracker.cc b/ppapi/proxy/plugin_resource_tracker.cc index e47c35e..4abd8f7 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 |