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

Unified Diff: ppapi/shared_impl/var_tracker.cc

Issue 8930010: Implement in-process PPB_VarArrayBuffer_Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/var_tracker.h ('k') | ppapi/tests/all_c_includes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/var_tracker.cc
diff --git a/ppapi/shared_impl/var_tracker.cc b/ppapi/shared_impl/var_tracker.cc
index d95a759069169bdb2a44fe384b6b74254efcd3e9..852d586d5dd1fd84eb384151be1b70f023a07697 100644
--- a/ppapi/shared_impl/var_tracker.cc
+++ b/ppapi/shared_impl/var_tracker.cc
@@ -139,7 +139,14 @@ VarTracker::VarMap::const_iterator VarTracker::GetLiveVar(
}
bool VarTracker::IsVarTypeRefcounted(PP_VarType type) const {
- return type == PP_VARTYPE_STRING || type == PP_VARTYPE_OBJECT;
+ return type >= PP_VARTYPE_STRING;
+}
+
+PP_Var VarTracker::MakeArrayBufferPPVar(uint32 size_in_bytes) {
+ scoped_refptr<ArrayBufferVar> array_buffer(CreateArrayBuffer(size_in_bytes));
+ if (!array_buffer)
+ return PP_MakeNull();
+ return array_buffer->GetPPVar();
}
void VarTracker::TrackedObjectGettingOneRef(VarMap::const_iterator obj) {
« no previous file with comments | « ppapi/shared_impl/var_tracker.h ('k') | ppapi/tests/all_c_includes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698