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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 11410032: Add support for non ASCII strings when communicating with native ports (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase + update test expectations 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
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index f3ea2810f78b05df283626bf2ba5c4873fdde075..c69f875919ec8ad09f5cc869a90c2b097dc8965c 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1019,10 +1019,13 @@ DART_EXPORT bool Dart_PostIntArray(Dart_Port port_id,
}
-DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message) {
+DART_EXPORT bool Dart_PostCObject(Dart_Port port_id,
+ Dart_CObject* message) {
Ivan Posva 2012/11/14 19:07:15 No need to wrap the line.
Søren Gjesse 2012/11/15 08:16:53 https://codereview.chromium.org//11308031.
uint8_t* buffer = NULL;
ApiMessageWriter writer(&buffer, allocator);
- writer.WriteCMessage(message);
+ bool success = writer.WriteCMessage(message);
+
+ if (!success) return success;
// Post the message at the given port.
return PortMap::PostMessage(new Message(

Powered by Google App Engine
This is Rietveld 408576698