| 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 af2df612b36515c58cdb10401682c7a0a7aa2406..e69be788a8134583351b0f4787d71b7052241b52 100644
|
| --- a/runtime/vm/dart_api_impl_test.cc
|
| +++ b/runtime/vm/dart_api_impl_test.cc
|
| @@ -3173,10 +3173,11 @@ void NewNativePort_send123(Dart_Port dest_port_id,
|
| EXPECT_EQ(Dart_CObject::kNull, message->type);
|
|
|
| // Post integer value.
|
| - Dart_CObject response;
|
| - response.type = Dart_CObject::kInt32;
|
| - response.value.as_int32 = 123;
|
| - Dart_PostCObject(reply_port_id, &response);
|
| + Dart_CObject* response =
|
| + reinterpret_cast<Dart_CObject*>(Dart_ZoneAllocate(sizeof(Dart_CObject)));
|
| + response->type = Dart_CObject::kInt32;
|
| + response->value.as_int32 = 123;
|
| + Dart_PostCObject(reply_port_id, response);
|
| }
|
|
|
|
|
| @@ -3188,10 +3189,11 @@ void NewNativePort_send321(Dart_Port dest_port_id,
|
| EXPECT_EQ(Dart_CObject::kNull, message->type);
|
|
|
| // Post integer value.
|
| - Dart_CObject response;
|
| - response.type = Dart_CObject::kInt32;
|
| - response.value.as_int32 = 321;
|
| - Dart_PostCObject(reply_port_id, &response);
|
| + Dart_CObject* response =
|
| + reinterpret_cast<Dart_CObject*>(Dart_ZoneAllocate(sizeof(Dart_CObject)));
|
| + response->type = Dart_CObject::kInt32;
|
| + response->value.as_int32 = 321;
|
| + Dart_PostCObject(reply_port_id, response);
|
| }
|
|
|
|
|
|
|