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

Side by Side Diff: ppapi/proxy/ppp_instance_private_proxy.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/ppp_instance_private_proxy.h" 5 #include "ppapi/proxy/ppp_instance_private_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ppapi/c/pp_var.h" 9 #include "ppapi/c/pp_var.h"
10 #include "ppapi/c/private/ppp_instance_private.h" 10 #include "ppapi/c/private/ppp_instance_private.h"
11 #include "ppapi/proxy/host_dispatcher.h" 11 #include "ppapi/proxy/host_dispatcher.h"
12 #include "ppapi/proxy/plugin_dispatcher.h" 12 #include "ppapi/proxy/plugin_dispatcher.h"
13 #include "ppapi/proxy/plugin_resource_tracker.h" 13 #include "ppapi/proxy/plugin_resource_tracker.h"
14 #include "ppapi/proxy/ppapi_messages.h" 14 #include "ppapi/proxy/ppapi_messages.h"
15 #include "ppapi/shared_impl/proxy_lock.h"
16 15
17 namespace ppapi { 16 namespace ppapi {
18 namespace proxy { 17 namespace proxy {
19 18
20 namespace { 19 namespace {
21 20
22 PP_Var GetInstanceObject(PP_Instance instance) { 21 PP_Var GetInstanceObject(PP_Instance instance) {
23 Dispatcher* dispatcher = HostDispatcher::GetForInstance(instance); 22 Dispatcher* dispatcher = HostDispatcher::GetForInstance(instance);
24 ReceiveSerializedVarReturnValue result; 23 ReceiveSerializedVarReturnValue result;
25 dispatcher->Send(new PpapiMsg_PPPInstancePrivate_GetInstanceObject( 24 dispatcher->Send(new PpapiMsg_PPPInstancePrivate_GetInstanceObject(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 OnMsgGetInstanceObject) 67 OnMsgGetInstanceObject)
69 IPC_MESSAGE_UNHANDLED(handled = false) 68 IPC_MESSAGE_UNHANDLED(handled = false)
70 IPC_END_MESSAGE_MAP() 69 IPC_END_MESSAGE_MAP()
71 return handled; 70 return handled;
72 } 71 }
73 72
74 void PPP_Instance_Private_Proxy::OnMsgGetInstanceObject( 73 void PPP_Instance_Private_Proxy::OnMsgGetInstanceObject(
75 PP_Instance instance, 74 PP_Instance instance,
76 SerializedVarReturnValue result) { 75 SerializedVarReturnValue result) {
77 result.Return(dispatcher(), 76 result.Return(dispatcher(),
78 CallWhileUnlocked(ppp_instance_private_impl_->GetInstanceObject, 77 ppp_instance_private_impl_->GetInstanceObject(instance));
79 instance));
80 } 78 }
81 79
82 } // namespace proxy 80 } // namespace proxy
83 } // namespace ppapi 81 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_input_event_proxy.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