summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/var_tracker.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 21:22:31 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 21:22:31 +0000
commit8cc26a4c78767feaf47fa94af34471d63e3596e5 (patch)
tree24399869b26449df2a6a838796941c984106f4b2 /ppapi/shared_impl/var_tracker.cc
parentb40a1f1acb4d3fa0c56a3706dd47a2ca8d471834 (diff)
downloadchromium_src-8cc26a4c78767feaf47fa94af34471d63e3596e5.zip
chromium_src-8cc26a4c78767feaf47fa94af34471d63e3596e5.tar.gz
chromium_src-8cc26a4c78767feaf47fa94af34471d63e3596e5.tar.bz2
Implement in-process PPB_VarArrayBuffer_Dev.
+tony TBR for webkit/glue/webkit_glue.gypi BUG=103435 TEST=N/A TBR=tony Review URL: http://codereview.chromium.org/8930010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114700 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/var_tracker.cc')
-rw-r--r--ppapi/shared_impl/var_tracker.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/ppapi/shared_impl/var_tracker.cc b/ppapi/shared_impl/var_tracker.cc
index d95a759..852d586 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) {