| 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 final _allocationProfileRepository = new AllocationProfileRepository(); | 7 final _allocationProfileRepository = new AllocationProfileRepository(); |
| 8 final _breakpointRepository = new BreakpointRepository(); | 8 final _breakpointRepository = new BreakpointRepository(); |
| 9 final _classRepository = new ClassRepository(); | 9 final _classRepository = new ClassRepository(); |
| 10 final _classSampleProfileRepository = new ClassSampleProfileRepository(); | 10 final _classSampleProfileRepository = new ClassSampleProfileRepository(); |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 Logger.root.severe('MemoryDashboard has no VM'); | 702 Logger.root.severe('MemoryDashboard has no VM'); |
| 703 // Reroute to vm-connect. | 703 // Reroute to vm-connect. |
| 704 app.locationManager.go(Uris.vmConnect()); | 704 app.locationManager.go(Uris.vmConnect()); |
| 705 return; | 705 return; |
| 706 } | 706 } |
| 707 final editor = getEditor(uri); | 707 final editor = getEditor(uri); |
| 708 app.vm.reload().then((VM vm) async { | 708 app.vm.reload().then((VM vm) async { |
| 709 // Preload all isolates to avoid sorting problems. | 709 // Preload all isolates to avoid sorting problems. |
| 710 await Future.wait(vm.isolates.map((i) => i.load())); | 710 await Future.wait(vm.isolates.map((i) => i.load())); |
| 711 container.children = [ | 711 container.children = [ |
| 712 new MemoryDashboardElement(vm, _vmrepository, new IsolateRepository(vm), | 712 new MemoryDashboardElement( |
| 713 editor, _allocationProfileRepository, app.events, app.notifications, | 713 vm, |
| 714 _vmrepository, |
| 715 new IsolateRepository(vm), |
| 716 editor, |
| 717 _allocationProfileRepository, |
| 718 _heapSnapshotRepository, |
| 719 _objectRepository, |
| 720 app.events, |
| 721 app.notifications, |
| 714 queue: app.queue) | 722 queue: app.queue) |
| 715 ]; | 723 ]; |
| 716 }).catchError((e, stack) { | 724 }).catchError((e, stack) { |
| 717 Logger.root.severe('MemoryDashboard visit error: $e'); | 725 Logger.root.severe('MemoryDashboard visit error: $e'); |
| 718 // Reroute to vm-connect. | 726 // Reroute to vm-connect. |
| 719 app.locationManager.go(Uris.vmConnect()); | 727 app.locationManager.go(Uris.vmConnect()); |
| 720 }); | 728 }); |
| 721 } | 729 } |
| 722 | 730 |
| 723 void onInstall() { | 731 void onInstall() { |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 element = new TimelinePageElement(app.vm, app.events, app.notifications, | 973 element = new TimelinePageElement(app.vm, app.events, app.notifications, |
| 966 queue: app.queue); | 974 queue: app.queue); |
| 967 } | 975 } |
| 968 | 976 |
| 969 void _visit(Uri uri) { | 977 void _visit(Uri uri) { |
| 970 assert(canVisit(uri)); | 978 assert(canVisit(uri)); |
| 971 } | 979 } |
| 972 | 980 |
| 973 bool canVisit(Uri uri) => uri.path == 'timeline'; | 981 bool canVisit(Uri uri) => uri.path == 'timeline'; |
| 974 } | 982 } |
| OLD | NEW |