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

Unified Diff: runtime/observatory/tests/service/test_helper.dart

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/observatory/tests/service/steal_breakpoint_test.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/test_helper.dart
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index 6da69becfc01f52b5f273e55768acc87ae72a345..20d140651c46001180a118370bc1b28089df49c4 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -138,10 +138,12 @@ typedef void ServiceEventHandler(ServiceEvent event,
StreamSubscription subscription,
Completer completer);
-Future processServiceEvents(VM vm, ServiceEventHandler handler) {
+Future processServiceEvents(VM vm,
+ String streamId,
+ ServiceEventHandler handler) {
Completer completer = new Completer();
var subscription;
- subscription = vm.events.stream.listen((ServiceEvent event) {
+ subscription = vm.getEventStream(streamId).listen((ServiceEvent event) {
handler(event, subscription, completer);
});
return completer.future;
@@ -159,7 +161,7 @@ Future<Isolate> hasStoppedAtBreakpoint(Isolate isolate) {
// Set up a listener to wait for breakpoint events.
Completer completer = new Completer();
var subscription;
- subscription = isolate.vm.events.stream.listen((ServiceEvent event) {
+ subscription = isolate.vm.debugEvents.listen((ServiceEvent event) {
if (event.eventType == ServiceEvent.kPauseBreakpoint) {
print('Breakpoint reached');
subscription.cancel();
« no previous file with comments | « runtime/observatory/tests/service/steal_breakpoint_test.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698