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

Side by Side Diff: runtime/observatory/lib/src/app/page.dart

Issue 1678353002: If the VM page fails to load, route to the VM connect page (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of app; 5 part of app;
6 6
7 class IsolateNotFound implements Exception { 7 class IsolateNotFound implements Exception {
8 String isolateId; 8 String isolateId;
9 IsolateNotFound(this.isolateId); 9 IsolateNotFound(this.isolateId);
10 String toString() => "IsolateNotFound: $isolateId"; 10 String toString() => "IsolateNotFound: $isolateId";
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 void _visit(Uri uri) { 116 void _visit(Uri uri) {
117 super._visit(uri); 117 super._visit(uri);
118 app.vm.reload().then((vm) { 118 app.vm.reload().then((vm) {
119 if (element != null) { 119 if (element != null) {
120 ServiceObjectViewElement serviceElement = element; 120 ServiceObjectViewElement serviceElement = element;
121 serviceElement.object = vm; 121 serviceElement.object = vm;
122 } 122 }
123 }).catchError((e, stack) { 123 }).catchError((e, stack) {
124 Logger.root.severe('VMPage visit error: $e'); 124 Logger.root.severe('VMPage visit error: $e');
125 // Reroute to vm-connect.
126 app.locationManager.go(app.locationManager.makeLink('/vm-connect'));
125 }); 127 });
126 } 128 }
127 } 129 }
128 130
129 class FlagsPage extends SimplePage { 131 class FlagsPage extends SimplePage {
130 FlagsPage(app) : super('flags', 'flag-list', app); 132 FlagsPage(app) : super('flags', 'flag-list', app);
131 133
132 void _visit(Uri uri) { 134 void _visit(Uri uri) {
133 super._visit(uri); 135 super._visit(uri);
134 app.vm.getFlagList().then((flags) { 136 app.vm.getFlagList().then((flags) {
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 assert(element != null); 438 assert(element != null);
437 } 439 }
438 440
439 void _visit(Uri uri) { 441 void _visit(Uri uri) {
440 assert(element != null); 442 assert(element != null);
441 assert(canVisit(uri)); 443 assert(canVisit(uri));
442 } 444 }
443 445
444 bool canVisit(Uri uri) => uri.path == 'timeline'; 446 bool canVisit(Uri uri) => uri.path == 'timeline';
445 } 447 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698