summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/var_tracker.h
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-22 08:35:52 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-22 08:35:52 +0000
commita732cec70e194fb770c0eee12430fcc416843364 (patch)
tree7ceafca7e48d4a5da68ef28f4b77f1b7ba21c2f3 /ppapi/shared_impl/var_tracker.h
parent02871872970e86b2255049ebe66c7f54ef50c721 (diff)
downloadchromium_src-a732cec70e194fb770c0eee12430fcc416843364.zip
chromium_src-a732cec70e194fb770c0eee12430fcc416843364.tar.gz
chromium_src-a732cec70e194fb770c0eee12430fcc416843364.tar.bz2
Add GetLiveVars to PPB_Testing_Dev. Fix leaks it uncovered.
BUG=108308,108314 TEST= Review URL: http://codereview.chromium.org/8982006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115503 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/var_tracker.h')
-rw-r--r--ppapi/shared_impl/var_tracker.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h
index a2debe0..4dc8a2d 100644
--- a/ppapi/shared_impl/var_tracker.h
+++ b/ppapi/shared_impl/var_tracker.h
@@ -5,6 +5,8 @@
#ifndef PPAPI_SHARED_IMPL_VAR_TRACKER_H_
#define PPAPI_SHARED_IMPL_VAR_TRACKER_H_
+#include <vector>
+
#include "base/basictypes.h"
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
@@ -60,6 +62,12 @@ class PPAPI_SHARED_EXPORT VarTracker {
// that references it and has an initial reference-count of 1.
PP_Var MakeArrayBufferPPVar(uint32 size_in_bytes);
+ // Return a vector containing all PP_Vars that are in the tracker. This is
+ // to help implement PPB_Testing_Dev.GetLiveVars and should generally not be
+ // used in production code. The PP_Vars are returned in no particular order,
+ // and their reference counts are unaffected.
+ std::vector<PP_Var> GetLiveVars();
+
protected:
struct VarInfo {
VarInfo();