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

Unified Diff: ppapi/api/pp_array_output.idl

Issue 27730003: Avoid memory allocation for PPB_FileIO Read when callback is blocking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address David's comments. Created 7 years, 2 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/api/ppb_file_io.idl » ('j') | ppapi/api/ppb_file_io.idl » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/pp_array_output.idl
diff --git a/ppapi/api/pp_array_output.idl b/ppapi/api/pp_array_output.idl
index be1aca7bf8328064a7eb68e3235fdc7db9adb216..64c67bd5c52a6f0df74061638663cb83f33078db 100644
--- a/ppapi/api/pp_array_output.idl
+++ b/ppapi/api/pp_array_output.idl
@@ -9,7 +9,7 @@
*
* This function will be called reentrantly. This means that if you call a
* function PPB_Foo.GetData(&array_output), GetData will call your
- * GetDataBuffer function before it returns.
+ * GetDataBuffer function before it returns.
*
* This function will be called even when returning 0-length arrays, so be sure
* your implementation can support that. You can return NULL for 0 length
@@ -34,7 +34,10 @@
* @param element_size The size of each element in bytes.
*
* @return Returns a pointer to the allocated memory. On failure, returns null.
- * You can also return null if the element_count is 0.
+ * You can also return null if the element_count is 0. If memory is allocated on
+ * the heap, the plugin is responsible for freeing it after the callback runs.
+ * If used with a blocking callback, the memory must remain valid until the
+ * callback runs even if the plugin causes the operation to abort.
*/
typedef mem_t PP_ArrayOutput_GetDataBuffer([inout] mem_t user_data,
[in] uint32_t element_count,
« no previous file with comments | « no previous file | ppapi/api/ppb_file_io.idl » ('j') | ppapi/api/ppb_file_io.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698