Index: runtime/vm/service.cc |
=================================================================== |
--- runtime/vm/service.cc (revision 36729) |
+++ runtime/vm/service.cc (working copy) |
@@ -162,8 +162,11 @@ |
StackZone zone(isolate); |
HANDLESCOPE(isolate); |
GET_NON_NULL_NATIVE_ARGUMENT(SendPort, sp, arguments->NativeArgAt(0)); |
- GET_NON_NULL_NATIVE_ARGUMENT(Instance, message, arguments->NativeArgAt(1)); |
+ GET_NON_NULL_NATIVE_ARGUMENT(Array, message, arguments->NativeArgAt(1)); |
+ // Set the type of the OOB message. |
+ message.SetAt(0, Smi::Handle(isolate, Smi::New(Message::kServiceOOBMsg))); |
+ |
// Serialize message. |
uint8_t* data = NULL; |
MessageWriter writer(&data, &allocator); |
@@ -619,24 +622,24 @@ |
void Service::HandleIsolateMessage(Isolate* isolate, const Instance& msg) { |
ASSERT(isolate != NULL); |
ASSERT(!msg.IsNull()); |
- ASSERT(msg.IsGrowableObjectArray()); |
+ ASSERT(msg.IsArray()); |
{ |
StackZone zone(isolate); |
HANDLESCOPE(isolate); |
- const GrowableObjectArray& message = GrowableObjectArray::Cast(msg); |
- // Message is a list with four entries. |
- ASSERT(message.Length() == 4); |
+ const Array& message = Array::Cast(msg); |
+ // Message is a list with five entries. |
+ ASSERT(message.Length() == 5); |
Instance& reply_port = Instance::Handle(isolate); |
GrowableObjectArray& path = GrowableObjectArray::Handle(isolate); |
- GrowableObjectArray& option_keys = GrowableObjectArray::Handle(isolate); |
- GrowableObjectArray& option_values = GrowableObjectArray::Handle(isolate); |
- reply_port ^= message.At(0); |
- path ^= message.At(1); |
- option_keys ^= message.At(2); |
- option_values ^= message.At(3); |
+ Array& option_keys = Array::Handle(isolate); |
+ Array& option_values = Array::Handle(isolate); |
+ reply_port ^= message.At(1); |
+ path ^= message.At(2); |
+ option_keys ^= message.At(3); |
+ option_values ^= message.At(4); |
ASSERT(!path.IsNull()); |
ASSERT(!option_keys.IsNull()); |
@@ -1833,25 +1836,25 @@ |
void Service::HandleRootMessage(const Instance& msg) { |
Isolate* isolate = Isolate::Current(); |
ASSERT(!msg.IsNull()); |
- ASSERT(msg.IsGrowableObjectArray()); |
+ ASSERT(msg.IsArray()); |
{ |
StackZone zone(isolate); |
HANDLESCOPE(isolate); |
- const GrowableObjectArray& message = GrowableObjectArray::Cast(msg); |
- // Message is a list with four entries. |
- ASSERT(message.Length() == 4); |
+ const Array& message = Array::Cast(msg); |
+ // Message is a list with five entries. |
+ ASSERT(message.Length() == 5); |
Instance& reply_port = Instance::Handle(isolate); |
GrowableObjectArray& path = GrowableObjectArray::Handle(isolate); |
- GrowableObjectArray& option_keys = GrowableObjectArray::Handle(isolate); |
- GrowableObjectArray& option_values = GrowableObjectArray::Handle(isolate); |
+ Array& option_keys = Array::Handle(isolate); |
+ Array& option_values = Array::Handle(isolate); |
- reply_port ^= message.At(0); |
- path ^= message.At(1); |
- option_keys ^= message.At(2); |
- option_values ^= message.At(3); |
+ reply_port ^= message.At(1); |
+ path ^= message.At(2); |
+ option_keys ^= message.At(3); |
+ option_values ^= message.At(4); |
ASSERT(!path.IsNull()); |
ASSERT(!option_keys.IsNull()); |