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

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

Issue 558703005: Do not navigate to vm-connect page upon disconnect (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « no previous file | runtime/bin/vmservice/observatory/lib/src/app/location_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/observatory/lib/src/app/application.dart
diff --git a/runtime/bin/vmservice/observatory/lib/src/app/application.dart b/runtime/bin/vmservice/observatory/lib/src/app/application.dart
index f6eb6344b26532cdea5157cde4c542794a5e1bfb..a848c35ee4dd8ab52e41c9441045d2fe81ffbcbe 100644
--- a/runtime/bin/vmservice/observatory/lib/src/app/application.dart
+++ b/runtime/bin/vmservice/observatory/lib/src/app/application.dart
@@ -87,6 +87,7 @@ class ObservatoryApplication extends Observable {
notifications.add(event);
break;
+
case 'GC':
// Ignore GC events for now.
break;
@@ -201,10 +202,17 @@ class ObservatoryApplication extends Observable {
_initOnce(false);
}
+ void _removeDisconnectEvents() {
+ notifications.removeWhere((oldEvent) {
+ return (oldEvent.eventType == 'VMDisconnected');
+ });
+ }
+
_vmConnected(VM vm) {
if (vm is WebSocketVM) {
targets.add(vm.target);
}
+ _removeDisconnectEvents();
}
_vmDisconnected(VM vm) {
@@ -213,6 +221,6 @@ class ObservatoryApplication extends Observable {
return;
}
this.vm = null;
- locationManager.go(locationManager.makeLink('/vm-connect/'));
+ notifications.add(new ServiceEvent.vmDisconencted());
}
}
« no previous file with comments | « no previous file | runtime/bin/vmservice/observatory/lib/src/app/location_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698