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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 9325022: Decode the Dart message into a Dart_CMessage structure before calling the native port callback (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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
Index: runtime/vm/dart_api_impl_test.cc
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 63aafc6f2d3306f6dd0e46dd660811ad46ad70b0..abefc53ca19ff4ecc761b7b5ebd6105ead38b6c4 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -2889,7 +2889,11 @@ TEST_CASE(ImportLibrary5) {
void NewNativePort_send123(Dart_Port dest_port_id,
Dart_Port reply_port_id,
- uint8_t* data) {
+ Dart_CMessage* message) {
+ // Gets a null message.
+ EXPECT_NOTNULL(message);
+ EXPECT_EQ(Dart_CObject::kNull, message->root->type);
+
intptr_t response = 123;
Dart_PostIntArray(reply_port_id, 1, &response);
}
@@ -2897,7 +2901,11 @@ void NewNativePort_send123(Dart_Port dest_port_id,
void NewNativePort_send321(Dart_Port dest_port_id,
Dart_Port reply_port_id,
- uint8_t* data) {
+ Dart_CMessage* message) {
+ // Gets a null message.
+ EXPECT_NOTNULL(message);
+ EXPECT_EQ(Dart_CObject::kNull, message->root->type);
+
intptr_t response = 321;
Dart_PostIntArray(reply_port_id, 1, &response);
}

Powered by Google App Engine
This is Rietveld 408576698