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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 class DebuggerPage extends SimplePage { | 185 class DebuggerPage extends SimplePage { |
186 DebuggerPage(app) : super('debugger', 'debugger-page', app); | 186 DebuggerPage(app) : super('debugger', 'debugger-page', app); |
187 | 187 |
188 void _visit(Uri uri) { | 188 void _visit(Uri uri) { |
189 super._visit(uri); | 189 super._visit(uri); |
190 getIsolate(uri).then((isolate) { | 190 getIsolate(uri).then((isolate) { |
191 if (element != null) { | 191 if (element != null) { |
192 /// Update the page. | 192 /// Update the page. |
193 DebuggerPageElement page = element; | 193 DebuggerPageElement page = element; |
| 194 page.app = app; |
194 page.isolate = isolate; | 195 page.isolate = isolate; |
195 } | 196 } |
196 }); | 197 }); |
197 } | 198 } |
198 } | 199 } |
199 | 200 |
200 class CpuProfilerPage extends SimplePage { | 201 class CpuProfilerPage extends SimplePage { |
201 CpuProfilerPage(app) : super('profiler', 'cpu-profile', app); | 202 CpuProfilerPage(app) : super('profiler', 'cpu-profile', app); |
202 | 203 |
203 void _visit(Uri uri) { | 204 void _visit(Uri uri) { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 void _visit(Uri uri) { | 388 void _visit(Uri uri) { |
388 assert(element != null); | 389 assert(element != null); |
389 assert(canVisit(uri)); | 390 assert(canVisit(uri)); |
390 app.vm.getIsolate(uri.queryParameters['isolateId']).then((i) { | 391 app.vm.getIsolate(uri.queryParameters['isolateId']).then((i) { |
391 (element as MetricsPageElement).isolate = i; | 392 (element as MetricsPageElement).isolate = i; |
392 }); | 393 }); |
393 } | 394 } |
394 | 395 |
395 bool canVisit(Uri uri) => uri.path == 'metrics'; | 396 bool canVisit(Uri uri) => uri.path == 'metrics'; |
396 } | 397 } |
OLD | NEW |