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

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

Issue 8982006: Add GetLiveVars to PPB_Testing_Dev. Fix leaks it uncovered. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 9 years 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 | « ppapi/proxy/serialized_var.h ('k') | ppapi/proxy/serialized_var_unittest.cc » ('j') | 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) 2011 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/serialized_var.h" 5 #include "ppapi/proxy/serialized_var.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ipc/ipc_message_utils.h" 8 #include "ipc/ipc_message_utils.h"
9 #include "ppapi/proxy/dispatcher.h" 9 #include "ppapi/proxy/dispatcher.h"
10 #include "ppapi/proxy/interface_proxy.h" 10 #include "ppapi/proxy/interface_proxy.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 for (size_t i = 0; i < deserialized_.size(); i++) { 404 for (size_t i = 0; i < deserialized_.size(); i++) {
405 serialized_[i].inner_->serialization_rules()->EndReceiveCallerOwned( 405 serialized_[i].inner_->serialization_rules()->EndReceiveCallerOwned(
406 deserialized_[i]); 406 deserialized_[i]);
407 } 407 }
408 } 408 }
409 409
410 PP_Var* SerializedVarVectorReceiveInput::Get(Dispatcher* dispatcher, 410 PP_Var* SerializedVarVectorReceiveInput::Get(Dispatcher* dispatcher,
411 uint32_t* array_size) { 411 uint32_t* array_size) {
412 deserialized_.resize(serialized_.size()); 412 deserialized_.resize(serialized_.size());
413 for (size_t i = 0; i < serialized_.size(); i++) { 413 for (size_t i = 0; i < serialized_.size(); i++) {
414 // The vector must be able to clean themselves up after this call is 414 // The vectors must be able to clean themselves up after this call is
415 // torn down. 415 // torn down.
416 serialized_[i].inner_->set_serialization_rules( 416 serialized_[i].inner_->set_serialization_rules(
417 dispatcher->serialization_rules()); 417 dispatcher->serialization_rules());
418 418
419 serialized_[i].inner_->SetVar( 419 serialized_[i].inner_->SetVar(
420 serialized_[i].inner_->serialization_rules()->BeginReceiveCallerOwned( 420 serialized_[i].inner_->serialization_rules()->BeginReceiveCallerOwned(
421 serialized_[i].inner_->GetIncompleteVar(), 421 serialized_[i].inner_->GetIncompleteVar(),
422 serialized_[i].inner_->GetStringPtr(), 422 serialized_[i].inner_->GetStringPtr(),
423 dispatcher)); 423 dispatcher));
424 deserialized_[i] = serialized_[i].inner_->GetVar(); 424 deserialized_[i] = serialized_[i].inner_->GetVar();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 inner_->ForceSetStringValueForTest(str); 539 inner_->ForceSetStringValueForTest(str);
540 } 540 }
541 541
542 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) 542 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var)
543 : SerializedVar(var) { 543 : SerializedVar(var) {
544 } 544 }
545 545
546 } // namespace proxy 546 } // namespace proxy
547 } // namespace ppapi 547 } // namespace ppapi
548 548
OLDNEW
« no previous file with comments | « ppapi/proxy/serialized_var.h ('k') | ppapi/proxy/serialized_var_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698