Chromium Code Reviews| Index: include/dart_api.h |
| =================================================================== |
| --- include/dart_api.h (revision 14589) |
| +++ include/dart_api.h (working copy) |
| @@ -1483,6 +1483,25 @@ |
| intptr_t* length); |
| +/** |
| + * Converts a String into an ExternalString. |
|
Anton Muhin
2012/11/07 10:05:46
From the documentation and a signature it's not ob
siva
2012/11/07 21:43:27
I am assuming converts means it morphs the existin
Anton Muhin
2012/11/08 08:05:29
Up to you, Siva.
Ivan Posva
2012/11/08 08:50:47
Anton, the reason I think this "optimization" paid
Anton Muhin
2012/11/08 08:56:08
I am not quite sure---if memory serves V8 was alwa
|
| + * |
| + * \param array External space into which the string data will be |
| + * copied into. This must not move. |
| + * \param length The length of the provided space. |
| + * \param peer An external pointer to associate with this string. |
| + * \param cback A callback to be called when this string is finalized. |
| + * |
| + * \return the converted ExternalString object if no error occurs. |
| + * Otherwise returns an error handle. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_MakeExternalString(Dart_Handle str, |
| + void* array, |
| + intptr_t length, |
|
Anton Muhin
2012/11/07 10:05:46
how embedder can find out this length?
siva
2012/11/07 21:43:27
This is the length of array passed in by the embed
Anton Muhin
2012/11/08 08:05:29
I might be missing something, sorry if it's the ca
siva
2012/11/09 02:55:06
Added an API function to determine the storage siz
|
| + void* peer, |
| + Dart_PeerFinalizer cback); |
| + |
| + |
| // --- Lists --- |
| /** |