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

Unified Diff: ppapi/shared_impl/scoped_pp_var.cc

Issue 459553003: Replace NPObject usage in ppapi with gin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 | « ppapi/shared_impl/scoped_pp_var.h ('k') | ppapi/tests/test_post_message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/scoped_pp_var.cc
diff --git a/ppapi/shared_impl/scoped_pp_var.cc b/ppapi/shared_impl/scoped_pp_var.cc
index 95748392fce2cfae1c5b045ed5e591cc91cc669c..a6d1aa34997713d08504b24b6b5e962444496967 100644
--- a/ppapi/shared_impl/scoped_pp_var.cc
+++ b/ppapi/shared_impl/scoped_pp_var.cc
@@ -73,20 +73,18 @@ ScopedPPVarArray::~ScopedPPVarArray() {
}
-PP_Var* ScopedPPVarArray::Release(const PassPPBMemoryAllocatedArray&,
- size_t* size) {
+PP_Var* ScopedPPVarArray::Release(const PassPPBMemoryAllocatedArray&) {
PP_Var* result = array_;
- *size = size_;
array_ = NULL;
size_ = 0;
return result;
}
-void ScopedPPVarArray::Set(size_t index, PP_Var var) {
+void ScopedPPVarArray::Set(size_t index, const ScopedPPVar& var) {
DCHECK(index < size_);
- CallAddRef(var);
+ CallAddRef(var.get());
CallRelease(array_[index]);
- array_[index] = var;
+ array_[index] = var.get();
}
} // namespace ppapi
« no previous file with comments | « ppapi/shared_impl/scoped_pp_var.h ('k') | ppapi/tests/test_post_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698