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

Unified Diff: ppapi/api/pp_var.idl

Issue 23757014: [PPAPI] Updated documentation for PP_VarType enum constants. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Mention refcounting in the OBJECT and ARRAY_BUFFER docs. Created 7 years, 3 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
« no previous file with comments | « no previous file | ppapi/c/pp_var.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/pp_var.idl
diff --git a/ppapi/api/pp_var.idl b/ppapi/api/pp_var.idl
index fda2332b895509588ce700ab551fec8c921a3709..aeeb7bf8fd8d87bc9faf4d90a418a16ccdb047af 100644
--- a/ppapi/api/pp_var.idl
+++ b/ppapi/api/pp_var.idl
@@ -44,23 +44,33 @@ enum PP_VarType {
/**
* The Var represents a string. The <code>as_id</code> field is used to
* identify the string, which may be created and retrieved from the
- * <code>PPB_Var</code> interface.
+ * <code>PPB_Var</code> interface. These objects are reference counted, so
+ * AddRef and Release must be used properly to avoid memory leaks.
*/
PP_VARTYPE_STRING = 5,
/**
* Represents a JavaScript object. This vartype is not currently usable
- * from modules, although it is used internally for some tasks.
+ * from modules, although it is used internally for some tasks. These objects
+ * are reference counted, so AddRef and Release must be used properly to avoid
+ * memory leaks.
*/
PP_VARTYPE_OBJECT = 6,
/**
- * Arrays and dictionaries are not currently supported but will be added
- * in future revisions. These objects are reference counted so be sure
- * to properly AddRef/Release them as you would with strings to ensure your
- * module will continue to work with future versions of the API.
+ * Represents an array of Vars. The <code>as_id</code> field is used to
+ * identify the array, which may be created and manipulated from the
+ * <code>PPB_VarArray</code> interface. These objects are reference counted,
+ * so AddRef and Release must be used properly to avoid memory leaks.
*/
PP_VARTYPE_ARRAY = 7,
+
+ /**
+ * Represents a mapping from strings to Vars. The <code>as_id</code> field is
+ * used to identify the dictionary, which may be created and manipulated from
+ * the <code>PPB_VarDictionary</code> interface. These objects are reference
+ * counted, so AddRef and Release must be used properly to avoid memory leaks.
+ */
PP_VARTYPE_DICTIONARY = 8,
/**
@@ -68,7 +78,8 @@ enum PP_VarType {
* represents Typed Arrays in JavaScript. Unlike JavaScript 'Array', it is
* only meant to contain basic numeric types, and is always stored
* contiguously. See PPB_VarArrayBuffer_Dev for functions special to
- * ArrayBuffer vars.
+ * ArrayBuffer vars. These objects are reference counted, so AddRef and
+ * Release must be used properly to avoid memory leaks.
*/
PP_VARTYPE_ARRAY_BUFFER = 9
};
« no previous file with comments | « no previous file | ppapi/c/pp_var.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698