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

Unified Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 11361075: Enable pepper threading by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lock on resource replies Created 8 years, 1 month 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/flash_resource.cc ('k') | ppapi/proxy/ppp_instance_private_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_dispatcher.cc
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc
index 1c1eedcc5d6dce66b90bce4392284a19b7c8f78b..bf3d7930cc38744f5956859fd80823f85731f9f8 100644
--- a/ppapi/proxy/plugin_dispatcher.cc
+++ b/ppapi/proxy/plugin_dispatcher.cc
@@ -274,6 +274,10 @@ thunk::ResourceCreationAPI* PluginDispatcher::GetResourceCreationAPI() {
void PluginDispatcher::DispatchResourceReply(
const ppapi::proxy::ResourceMessageReplyParams& reply_params,
const IPC::Message& nested_msg) {
+ // We need to grab the proxy lock to ensure that we don't collide with the
+ // plugin making pepper calls on a different thread.
+ ProxyAutoLock lock;
+
Resource* resource = PpapiGlobals::Get()->GetResourceTracker()->GetResource(
reply_params.pp_resource());
if (!resource) {
« no previous file with comments | « ppapi/proxy/flash_resource.cc ('k') | ppapi/proxy/ppp_instance_private_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698