summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppp_messaging_proxy.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 18:05:39 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-14 18:05:39 +0000
commit2ef706e47ff06fb0509f660475e12392f6b40a72 (patch)
tree79af67b204457912f3735619d8a2c52b6edf903e /ppapi/proxy/ppp_messaging_proxy.cc
parentbd9ea1bc4abd3dea19674737d963d6a50272ad45 (diff)
downloadchromium_src-2ef706e47ff06fb0509f660475e12392f6b40a72.zip
chromium_src-2ef706e47ff06fb0509f660475e12392f6b40a72.tar.gz
chromium_src-2ef706e47ff06fb0509f660475e12392f6b40a72.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppp_messaging_proxy.cc')
-rw-r--r--ppapi/proxy/ppp_messaging_proxy.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/ppapi/proxy/ppp_messaging_proxy.cc b/ppapi/proxy/ppp_messaging_proxy.cc
index 7a45fd30..16e639e 100644
--- a/ppapi/proxy/ppp_messaging_proxy.cc
+++ b/ppapi/proxy/ppp_messaging_proxy.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -13,6 +13,7 @@
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/serialized_var.h"
#include "ppapi/shared_impl/ppapi_globals.h"
+#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/shared_impl/var_tracker.h"
namespace ppapi {
@@ -85,7 +86,9 @@ void PPP_Messaging_Proxy::OnMsgHandleMessage(
// SerializedVarReceiveInput will decrement the reference count, but we want
// to give the recipient a reference.
PpapiGlobals::Get()->GetVarTracker()->AddRefVar(received_var);
- ppp_messaging_impl_->HandleMessage(instance, received_var);
+ CallWhileUnlocked(ppp_messaging_impl_->HandleMessage,
+ instance,
+ received_var);
}
} // namespace proxy