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

Side by Side Diff: ppapi/proxy/ppb_var_deprecated_proxy.cc

Issue 10559095: Merge 143201 - Fix a crash in Pepper object scripting. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ppb_var_deprecated_proxy.h" 5 #include "ppapi/proxy/ppb_var_deprecated_proxy.h"
6 6
7 #include <stdlib.h> // For malloc 7 #include <stdlib.h> // For malloc
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ReceiveSerializedVarReturnValue result; 262 ReceiveSerializedVarReturnValue result;
263 int64 class_int = static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class)); 263 int64 class_int = static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class));
264 int64 data_int = 264 int64 data_int =
265 static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class_data)); 265 static_cast<int64>(reinterpret_cast<intptr_t>(ppp_class_data));
266 dispatcher->Send(new PpapiHostMsg_PPBVar_CreateObjectDeprecated( 266 dispatcher->Send(new PpapiHostMsg_PPBVar_CreateObjectDeprecated(
267 API_ID_PPB_VAR_DEPRECATED, instance, class_int, data_int, 267 API_ID_PPB_VAR_DEPRECATED, instance, class_int, data_int,
268 &result)); 268 &result));
269 PP_Var ret_var = result.Return(dispatcher); 269 PP_Var ret_var = result.Return(dispatcher);
270 270
271 // Register this object as being implemented by the plugin. 271 // Register this object as being implemented by the plugin.
272 tracker->PluginImplementedObjectCreated(instance, ret_var, 272 if (ret_var.type == PP_VARTYPE_OBJECT) {
273 ppp_class, ppp_class_data); 273 tracker->PluginImplementedObjectCreated(instance, ret_var,
274 ppp_class, ppp_class_data);
275 }
274 return ret_var; 276 return ret_var;
275 } 277 }
276 278
277 InterfaceProxy* CreateVarDeprecatedProxy(Dispatcher* dispatcher) { 279 InterfaceProxy* CreateVarDeprecatedProxy(Dispatcher* dispatcher) {
278 return new PPB_Var_Deprecated_Proxy(dispatcher ); 280 return new PPB_Var_Deprecated_Proxy(dispatcher );
279 } 281 }
280 282
281 } // namespace 283 } // namespace
282 284
283 PPB_Var_Deprecated_Proxy::PPB_Var_Deprecated_Proxy( 285 PPB_Var_Deprecated_Proxy::PPB_Var_Deprecated_Proxy(
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 525 }
524 526
525 void PPB_Var_Deprecated_Proxy::DoReleaseObject(int64 object_id) { 527 void PPB_Var_Deprecated_Proxy::DoReleaseObject(int64 object_id) {
526 PP_Var var = { PP_VARTYPE_OBJECT }; 528 PP_Var var = { PP_VARTYPE_OBJECT };
527 var.value.as_id = object_id; 529 var.value.as_id = object_id;
528 ppb_var_impl_->Release(var); 530 ppb_var_impl_->Release(var);
529 } 531 }
530 532
531 } // namespace proxy 533 } // namespace proxy
532 } // namespace ppapi 534 } // namespace ppapi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698