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

Unified Diff: ppapi/shared_impl/var_tracker.h

Issue 8982006: Add GetLiveVars to PPB_Testing_Dev. Fix leaks it uncovered. (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
Index: ppapi/shared_impl/var_tracker.h
diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h
index a2debe0761f7f31ef9a6ccf290e3a3524555e43e..4dc8a2db9742c4da2dc3a0cdad1d185916087f28 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();

Powered by Google App Engine
This is Rietveld 408576698