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

Unified Diff: runtime/observatory/lib/src/app/application.dart

Issue 1217823009: Make VM event streams look like real dart streams. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Polish Created 5 years, 5 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
Index: runtime/observatory/lib/src/app/application.dart
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart
index ef565f59f1492cd50874006cce095feb8c1a5ef4..12f8df20a9c3bff9f665b466cb94cae80f747421 100644
--- a/runtime/observatory/lib/src/app/application.dart
+++ b/runtime/observatory/lib/src/app/application.dart
@@ -23,6 +23,10 @@ class ObservatoryApplication extends Observable {
@observable Page currentPage;
VM _vm;
VM get vm => _vm;
+
+ Future<StreamSubscription> isolateStreamSubscription;
+ Future<StreamSubscription> debugStreamSubscription;
+
set vm(VM vm) {
if (_vm == vm) {
// Do nothing.
@@ -53,7 +57,12 @@ class ObservatoryApplication extends Observable {
new ServiceEvent.connectionClosed(reason)));
});
- vm.events.stream.listen(_onEvent);
+ vm.getIsolateEventStream().then((stream) {
+ stream.listen(_onEvent);
+ });
+ vm.getDebugEventStream().then((stream) {
+ stream.listen(_onEvent);
+ });
}
_vm = vm;
}
@@ -88,11 +97,9 @@ class ObservatoryApplication extends Observable {
switch(event.kind) {
case ServiceEvent.kIsolateStart:
case ServiceEvent.kIsolateUpdate:
- case ServiceEvent.kGraph:
case ServiceEvent.kBreakpointAdded:
case ServiceEvent.kBreakpointResolved:
case ServiceEvent.kBreakpointRemoved:
- case ServiceEvent.kGC:
case ServiceEvent.kDebuggerSettingsUpdate:
// Ignore for now.
break;

Powered by Google App Engine
This is Rietveld 408576698