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

Unified Diff: ppapi/shared_impl/var_tracker.h

Issue 12096099: PPAPI: Fix WebSocket Var ref leak receiving binary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
Index: ppapi/shared_impl/var_tracker.h
diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h
index b873250f6dd4689a8fd9afb6040ae96db419f865..1d0c0d681d90f5dee4b12dc56ffdc21d8b6d2a3a 100644
--- a/ppapi/shared_impl/var_tracker.h
+++ b/ppapi/shared_impl/var_tracker.h
@@ -73,6 +73,12 @@ class PPAPI_SHARED_EXPORT VarTracker
// Same as above, but copy the contents of |data| in to the new array buffer.
PP_Var MakeArrayBufferPPVar(uint32 size_in_bytes, const void* data);
+ // Create an ArrayBuffer and copy the contents of |data| in to it. The
+ // returned object has 0 reference count in the tracker, and like all
+ // RefCounted objects, has a 0 initial internal reference count. (You should
+ // usually immediately put this in a scoped_refptr).
+ ArrayBufferVar* MakeArrayBufferVar(uint32 size_in_bytes, const void* data);
+
// 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,

Powered by Google App Engine
This is Rietveld 408576698