Chromium Code Reviews| Index: mojo/public/c/bindings/array.h |
| diff --git a/mojo/public/c/bindings/array.h b/mojo/public/c/bindings/array.h |
| index 93134be53e9ad0fc53ed25e49b8e54d197b1f3dd..2051e295c3f2fdf7371921f759aa3a65e7e4f8c5 100644 |
| --- a/mojo/public/c/bindings/array.h |
| +++ b/mojo/public/c/bindings/array.h |
| @@ -114,6 +114,21 @@ MojomValidationResult MojomArray_Validate( |
| uint32_t in_num_handles, |
| struct MojomValidationContext* inout_context); |
| +// Creates a new copy of |in_array| using |buffer| to allocate space. |
| +// Recursively creates new copies of any references from |in_array|, and |
| +// updates the references to point to the new copies. All handles are moved |
| +// from |in_array| to the new copy (the copies in |in_array| are assigned an |
| +// invalid handle value). This operation is useful if you want to linearize |
| +// |in_array| using the buffer backed by |buffer|. The new copy of the array |
| +// is returned. |
| +// |buffer|: A mojom buffer used to allocate space for the new array. |
|
viettrungluu
2016/08/02 20:15:06
What's the size/space requirement on |buffer|?
|
| +// |in_type_desc|: Describes the pointer and handle fields of the mojom array. |
| +// |in_array|: The unencoded mojom array to be copied. |
| +struct MojomArrayHeader* MojomArray_DeepCopy( |
| + struct MojomBuffer* buffer, |
| + const struct MojomTypeDescriptorArray* in_type_desc, |
| + struct MojomArrayHeader* in_array); |
| + |
| MOJO_END_EXTERN_C |
| #endif // MOJO_PUBLIC_C_BINDINGS_ARRAY_H_ |