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

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 second round of 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') | no next file with comments »
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..8e04a4cc9d79124812c75569bf55adc22b0b9d8c 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. When a non-null value is
+ * returned, the buffer must remain valid until after the callback runs. If used
+ * with a blocking callback, the buffer must remain valid until after the
+ * function returns. The plugin can then free any memory that it allocated.
*/
typedef mem_t PP_ArrayOutput_GetDataBuffer([inout] mem_t user_data,
[in] uint32_t element_count,
@@ -78,7 +81,7 @@ typedef mem_t PP_ArrayOutput_GetDataBuffer([inout] mem_t user_data,
[passByValue]
struct PP_ArrayOutput {
/**
- * A pointer to the allocation function that the browser implements.
+ * A pointer to the allocation function that the browser will call.
*/
PP_ArrayOutput_GetDataBuffer GetDataBuffer;
« no previous file with comments | « no previous file | ppapi/api/ppb_file_io.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698