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

Unified Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 9348092: Revert 121901 - PPAPI: Add unlocking for PPP calls and callbacks. Add more locking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | « no previous file | 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_dispatcher.cc
===================================================================
--- ppapi/proxy/plugin_dispatcher.cc (revision 121902)
+++ ppapi/proxy/plugin_dispatcher.cc (working copy)
@@ -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() {
// 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 @@
"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()));
« no previous file with comments | « no previous file | ppapi/proxy/ppb_core_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698