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

Unified Diff: include/dart_api.h

Issue 11360114: - Add functionality to morph a string into an external string (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 1 month 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 | vm/dart_api_impl.cc » ('j') | vm/dart_api_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ---
/**
« no previous file with comments | « no previous file | vm/dart_api_impl.cc » ('j') | vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698