| Index: runtime/vm/service_isolate.cc
|
| diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
|
| index faffd6676f08f1195e8f7ee28393125403460502..9ff38ef9cc19714c08278a4c450ce213aee49e17 100644
|
| --- a/runtime/vm/service_isolate.cc
|
| +++ b/runtime/vm/service_isolate.cc
|
| @@ -296,6 +296,26 @@ class ServiceIsolateNatives : public AllStatic {
|
| }
|
| }
|
| }
|
| +
|
| + static void ListenStream(Dart_NativeArguments args) {
|
| + NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
|
| + Isolate* isolate = arguments->thread()->isolate();
|
| + StackZone stack_zone(isolate);
|
| + Zone* zone = stack_zone.GetZone(); // Used by GET_NON_NULL_NATIVE_ARGUMENT.
|
| + HANDLESCOPE(isolate);
|
| + GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0));
|
| + Service::ListenStream(stream_id.ToCString());
|
| + }
|
| +
|
| + static void CancelStream(Dart_NativeArguments args) {
|
| + NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
|
| + Isolate* isolate = arguments->thread()->isolate();
|
| + StackZone stack_zone(isolate);
|
| + Zone* zone = stack_zone.GetZone(); // Used by GET_NON_NULL_NATIVE_ARGUMENT.
|
| + HANDLESCOPE(isolate);
|
| + GET_NON_NULL_NATIVE_ARGUMENT(String, stream_id, arguments->NativeArgAt(0));
|
| + Service::CancelStream(stream_id.ToCString());
|
| + }
|
| };
|
|
|
|
|
| @@ -315,6 +335,10 @@ static ServiceNativeEntry _ServiceNativeEntries[] = {
|
| ServiceIsolateNatives::OnStart },
|
| {"VMService_OnExit", 0,
|
| ServiceIsolateNatives::OnExit },
|
| + {"VMService_ListenStream", 1,
|
| + ServiceIsolateNatives::ListenStream },
|
| + {"VMService_CancelStream", 1,
|
| + ServiceIsolateNatives::CancelStream },
|
| };
|
|
|
|
|
|
|