Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: runtime/vm/service_isolate.cc

Issue 1143783003: Add the streamListen and streamCancel rpcs to the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: before commit Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/service_event.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_isolate.cc
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index 3665cf3da69f31e91b501b4d33a5fd6e844888df..ad6be9d1d98b97cfb88d017e7ad28ca781a6917b 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->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->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 },
};
« no previous file with comments | « runtime/vm/service_event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698