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) { |