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

Unified Diff: runtime/include/dart_api.h

Issue 9104041: Added API Dart_PostCMessage for posting a Dart_CMessage structure (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from asiva@ Created 8 years, 10 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 | « runtime/bin/socket_impl.dart ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 683d727a7cc866ddb420ce3e62794f5bff70dab2..8dd6495e32e03f819bdd8ddd5cf709daf4e22ce3 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -499,22 +499,6 @@ DART_EXPORT Dart_Port Dart_GetMainPortId();
DART_EXPORT bool Dart_HasLivePorts();
/**
- * Posts a message for some isolate. The message is built from a raw
- * array.
- *
- * \param port The destination port.
- * \param length The length of the data array.
- * \param data A data array to be sent in the message.
- *
- * \return True if the message was posted.
- */
-DART_EXPORT bool Dart_PostIntArray(Dart_Port port_id,
- intptr_t length,
- intptr_t* data);
-// TODO(turnidge): Should this be intptr_t or some fixed length type?
-// TODO(turnidge): Reverse length/data for consistency.
-
-/**
* Posts a message for some isolate. The message is a serialized
* object.
*
@@ -1438,17 +1422,20 @@ struct Dart_CObject {
};
/**
- * A Dart_CMessage is used for receiving and sending messages from
- * native code not running in an isolate. A message contains an object
- * graph represented as Dart_CObject structures rooted as the provided
- * root.
+ * Posts a message on some port. The message will contain the
+ * Dart_CObject object graph rooted in the provided Dart_CObject.
+ *
+ * While the message is being sent the state of the graph of
+ * Dart_CObject structures rooted in message should not be accessed,
siva 2012/02/06 18:55:12 rooted in 'message' or rooted in 'root', we could
+ * as the message generation will make temporaly modification to the
siva 2012/02/06 18:55:12 'temporary modifications to the'
+ * data. When the message has been sent the graph will be fully
+ * restored.
+ *
+ * \param port_id The destination port.
+ * \param message The message to send.
*
- * For information on the lifetime of this data, when provided in
- * callbacks, see the documentation for the individual callbacks.
+ * \return True if the message was posted.
*/
-struct Dart_CMessage {
- Dart_CObject* root;
-};
-
+DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* root);
#endif // INCLUDE_DART_API_H_
« no previous file with comments | « runtime/bin/socket_impl.dart ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698