| 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 db2793f785e72d40657a27deebbc060a62efcc15..aedc4874e4e46c97530035de0c62cc3fac8b4da6 100644
|
| --- a/runtime/vm/dart_api_impl_test.cc
|
| +++ b/runtime/vm/dart_api_impl_test.cc
|
| @@ -3390,10 +3390,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_ScopeAllocate(sizeof(Dart_CObject)));
|
| + response->type = Dart_CObject::kInt32;
|
| + response->value.as_int32 = 123;
|
| + Dart_PostCObject(reply_port_id, response);
|
| }
|
|
|
|
|
| @@ -3405,10 +3406,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_ScopeAllocate(sizeof(Dart_CObject)));
|
| + response->type = Dart_CObject::kInt32;
|
| + response->value.as_int32 = 321;
|
| + Dart_PostCObject(reply_port_id, response);
|
| }
|
|
|
|
|
|
|