summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/plugin_dispatcher.cc
diff options
context:
space:
mode:
authordpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 18:22:49 +0000
committerdpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 18:22:49 +0000
commitaa036eee91668fd6f60791fd44df9153a8869072 (patch)
tree0bcd6c7c067f2834e4bbbb754352bdb5a7108bde /ppapi/proxy/plugin_dispatcher.cc
parent28fa793cc1c6f9945bb2dacce70a48cc72e100c7 (diff)
downloadchromium_src-aa036eee91668fd6f60791fd44df9153a8869072.zip
chromium_src-aa036eee91668fd6f60791fd44df9153a8869072.tar.gz
chromium_src-aa036eee91668fd6f60791fd44df9153a8869072.tar.bz2
Revert 121901 - PPAPI: Add unlocking for PPP calls and callbacks. Add more locking.
With this patch, ppapi_tests pass locally when building with enable_pepper_threading=1. (They didn't before). TODO: Test more calls off the main thread, make sync completion callbacks work. BUG=92909 TEST= Review URL: http://codereview.chromium.org/9391006 TBR=dmichael@chromium.org Review URL: https://chromiumcodereview.appspot.com/9348092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121903 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/plugin_dispatcher.cc')
-rw-r--r--ppapi/proxy/plugin_dispatcher.cc20
1 files changed, 4 insertions, 16 deletions
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc
index bfa7917..efe0803 100644
--- a/ppapi/proxy/plugin_dispatcher.cc
+++ b/ppapi/proxy/plugin_dispatcher.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -25,7 +25,6 @@
#include "ppapi/proxy/ppb_instance_proxy.h"
#include "ppapi/proxy/ppp_class_proxy.h"
#include "ppapi/proxy/resource_creation_proxy.h"
-#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/shared_impl/resource.h"
#if defined(OS_POSIX)
@@ -53,11 +52,8 @@ InstanceData::InstanceData()
InstanceData::~InstanceData() {
// Run any pending mouse lock callback to prevent leaks.
- if (mouse_lock_callback.func) {
- CallWhileUnlocked(PP_RunAndClearCompletionCallback,
- &mouse_lock_callback,
- static_cast<int32_t>(PP_ERROR_ABORTED));
- }
+ if (mouse_lock_callback.func)
+ PP_RunAndClearCompletionCallback(&mouse_lock_callback, PP_ERROR_ABORTED);
}
PluginDispatcher::PluginDispatcher(base::ProcessHandle remote_process_handle,
@@ -168,25 +164,17 @@ bool PluginDispatcher::Send(IPC::Message* msg) {
"Class", IPC_MESSAGE_ID_CLASS(msg->type()),
"Line", IPC_MESSAGE_ID_LINE(msg->type()));
// We always want plugin->renderer messages to arrive in-order. If some sync
- // and some async messages are sent in response to a synchronous
+ // and some async messages are send in response to a synchronous
// renderer->plugin call, the sync reply will be processed before the async
// reply, and everything will be confused.
//
// Allowing all async messages to unblock the renderer means more reentrancy
// there but gives correct ordering.
msg->set_unblock(true);
- if (msg->is_sync()) {
- // Synchronous messages might be re-entrant, so we need to drop the lock.
- ProxyAutoUnlock unlock;
- return Dispatcher::Send(msg);
- }
return Dispatcher::Send(msg);
}
bool PluginDispatcher::OnMessageReceived(const IPC::Message& 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;
TRACE_EVENT2("ppapi proxy", "PluginDispatcher::OnMessageReceived",
"Class", IPC_MESSAGE_ID_CLASS(msg.type()),
"Line", IPC_MESSAGE_ID_LINE(msg.type()));