| Index: runtime/bin/vmservice_impl.cc
|
| ===================================================================
|
| --- runtime/bin/vmservice_impl.cc (revision 31674)
|
| +++ runtime/bin/vmservice_impl.cc (working copy)
|
| @@ -20,6 +20,7 @@
|
| #include "vm/native_arguments.h"
|
| #include "vm/object.h"
|
| #include "vm/port.h"
|
| +#include "vm/service.h"
|
| #include "vm/snapshot.h"
|
|
|
| namespace dart {
|
| @@ -486,7 +487,7 @@
|
| }
|
|
|
|
|
| -static void SendServiceMessage(Dart_NativeArguments args) {
|
| +static void SendIsolateServiceMessage(Dart_NativeArguments args) {
|
| NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
|
| Isolate* isolate = arguments->isolate();
|
| StackZone zone(isolate);
|
| @@ -499,7 +500,7 @@
|
| if (sp_id_obj.IsError()) {
|
| Exceptions::PropagateError(Error::Cast(sp_id_obj));
|
| }
|
| - Integer& id = Integer::Handle();
|
| + Integer& id = Integer::Handle(isolate);
|
| id ^= sp_id_obj.raw();
|
| Dart_Port sp_id = static_cast<Dart_Port>(id.AsInt64Value());
|
| ASSERT(sp_id != ILLEGAL_PORT);
|
| @@ -515,6 +516,16 @@
|
| }
|
|
|
|
|
| +static void SendRootServiceMessage(Dart_NativeArguments args) {
|
| + NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
|
| + Isolate* isolate = arguments->isolate();
|
| + StackZone zone(isolate);
|
| + HANDLESCOPE(isolate);
|
| + GET_NON_NULL_NATIVE_ARGUMENT(Instance, message, arguments->NativeArgAt(0));
|
| + Service::HandleRootMessage(message);
|
| +}
|
| +
|
| +
|
| struct VmServiceNativeEntry {
|
| const char* name;
|
| int num_arguments;
|
| @@ -523,7 +534,8 @@
|
|
|
|
|
| static VmServiceNativeEntry _VmServiceNativeEntries[] = {
|
| - {"VMService_SendServiceMessage", 2, SendServiceMessage}
|
| + {"VMService_SendServiceMessage", 2, SendIsolateServiceMessage},
|
| + {"VMService_SendRootServiceMessage", 1, SendRootServiceMessage}
|
| };
|
|
|
|
|
|
|