| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |