Chromium Code Reviews| Index: ppapi/api/pp_var.idl |
| diff --git a/ppapi/api/pp_var.idl b/ppapi/api/pp_var.idl |
| index 425d99ba7bfb6ff854601fb9b8a59786966ea30d..75b7e03263ed98ef0fd24072b7503be12ab81663 100644 |
| --- a/ppapi/api/pp_var.idl |
| +++ b/ppapi/api/pp_var.idl |
| @@ -45,15 +45,15 @@ 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. These objects are reference counted, so |
| - * AddRef and Release must be used properly to avoid memory leaks. |
| + * 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. These objects |
| - * are reference counted, so AddRef and Release must be used properly to avoid |
| - * memory leaks. |
| + * are reference counted, so AddRef() and Release() must be used properly to |
| + * avoid memory leaks. |
| */ |
| PP_VARTYPE_OBJECT = 6, |
| @@ -61,7 +61,7 @@ enum PP_VarType { |
| * 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. |
| + * so AddRef() and Release() must be used properly to avoid memory leaks. |
| */ |
| PP_VARTYPE_ARRAY = 7, |
| @@ -69,7 +69,8 @@ enum PP_VarType { |
| * 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. |
| + * counted, so AddRef() and Release() must be used properly to avoid memory |
| + * leaks. |
| */ |
| PP_VARTYPE_DICTIONARY = 8, |
| @@ -78,15 +79,24 @@ 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. These objects are reference counted, so AddRef and |
| - * Release must be used properly to avoid memory leaks. |
| + * ArrayBuffer vars. These objects are reference counted, so AddRef() and |
| + * Release() must be used properly to avoid memory leaks. |
| */ |
| PP_VARTYPE_ARRAY_BUFFER = 9, |
| /** |
| - * Resources are not currently supported but will be added in the future |
| - * These objects are reference counted, so AddRef and Release must be used |
| - * properly to avoid memory leaks. |
| + * This type allows the <code>PP_Var</code> to wrap a <code>PP_Resource |
| + * </code>. This can be useful for sending or receiving some types of |
| + * <code>PP_Resource</code> using <code>PPB_Messaging</code> or |
| + * <code>PPP_Messaging</code>. |
| + * |
| + * These objects are reference counted, so AddRef() and Release() must be used |
| + * properly to avoid memory leaks. Under normal circumstances, the PP_Var will |
|
raymes
2014/04/09 00:16:18
nit (here and below): not sure if we should be con
|
| + * implicitly hold a reference count on the PP_Resource on your behalf. For |
| + * example, if you call VarFromResource(), it implicitly calls |
| + * PPB_Core::AddRefResource() on the PP_Resource. Likewise, PPB_Var::Release() |
| + * on a Resource <code>PP_Var</code> will invoke PPB_Core::ReleaseResource() |
| + * when the Var reference count goes to zero. |
| */ |
| PP_VARTYPE_RESOURCE = 10 |
| }; |