Chromium Code Reviews| Index: runtime/observatory/lib/src/app/page.dart |
| diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart |
| index a8cbe2e84a60e862350daf1a51f4bbb3b0c80970..6fe950e4ba6a8ff49cd073763d13327eb57007e9 100644 |
| --- a/runtime/observatory/lib/src/app/page.dart |
| +++ b/runtime/observatory/lib/src/app/page.dart |
| @@ -105,10 +105,8 @@ abstract class MatchingPage extends Page { |
| } |
| EditorRepository getEditor(Uri uri) { |
| - var editor = uri.queryParameters['editor']; |
| - if (editor != null) { |
| - return new EditorRepository(editor); |
| - } |
| + final editor = uri.queryParameters['editor']; |
| + return new EditorRepository(app.vm, editor: editor); |
| return null; |
| } |
| @@ -699,12 +697,25 @@ class MemoryDashboardPage extends MatchingPage { |
| void _visit(Uri uri) { |
| super._visit(uri); |
| - getIsolate(uri).then((isolate) { |
| + if (app.vm == null) { |
| + Logger.root.severe('MemoryDashboard has no VM'); |
| + // Reroute to vm-connect. |
| + app.locationManager.go(Uris.vmConnect()); |
| + return; |
| + } |
| + final editor = getEditor(uri); |
| + app.vm.reload().then((VM vm) async { |
| + // Preload all isolate to avoid sorting problems |
|
siva
2017/08/03 18:14:51
isolates
and period at the end.
cbernaschina
2017/08/03 22:32:52
Done.
|
| + await Future.wait(vm.isolates.map((i) => i.load())); |
| container.children = [ |
| - new MemoryDashboardElement(isolate.vm, isolate, app.events, |
| - app.notifications, _allocationProfileRepository, getEditor(uri), |
| + new MemoryDashboardElement(vm, new IsolateRepository(vm), editor, |
| + _allocationProfileRepository, app.events, app.notifications, |
| queue: app.queue) |
| ]; |
| + }).catchError((e, stack) { |
| + Logger.root.severe('MemoryDashboard visit error: $e'); |
|
siva
2017/08/03 18:14:51
Where does these messages show up?
cbernaschina
2017/08/03 22:32:53
In the console of the browser
|
| + // Reroute to vm-connect. |
| + app.locationManager.go(Uris.vmConnect()); |
| }); |
| } |