| 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 17 matching lines...) Expand all Loading... |
| 28 final _persistentHandlesRepository = new PersistentHandlesRepository(); | 28 final _persistentHandlesRepository = new PersistentHandlesRepository(); |
| 29 final _portsRepository = new PortsRepository(); | 29 final _portsRepository = new PortsRepository(); |
| 30 final _scriptRepository = new ScriptRepository(); | 30 final _scriptRepository = new ScriptRepository(); |
| 31 final _singleTargetCacheRepository = new SingleTargetCacheRepository(); | 31 final _singleTargetCacheRepository = new SingleTargetCacheRepository(); |
| 32 final _stronglyReachangleInstancesRepository = | 32 final _stronglyReachangleInstancesRepository = |
| 33 new StronglyReachableInstancesRepository(); | 33 new StronglyReachableInstancesRepository(); |
| 34 final _subtypeTestCacheRepository = new SubtypeTestCacheRepository(); | 34 final _subtypeTestCacheRepository = new SubtypeTestCacheRepository(); |
| 35 final _topRetainingInstancesRepository = new TopRetainingInstancesRepository(); | 35 final _topRetainingInstancesRepository = new TopRetainingInstancesRepository(); |
| 36 final _typeArgumentsRepository = new TypeArgumentsRepository(); | 36 final _typeArgumentsRepository = new TypeArgumentsRepository(); |
| 37 final _unlinkedCallRepository = new UnlinkedCallRepository(); | 37 final _unlinkedCallRepository = new UnlinkedCallRepository(); |
| 38 final _vmrepository = new VMRepository(); | |
| 39 | 38 |
| 40 class IsolateNotFound implements Exception { | 39 class IsolateNotFound implements Exception { |
| 41 String isolateId; | 40 String isolateId; |
| 42 IsolateNotFound(this.isolateId); | 41 IsolateNotFound(this.isolateId); |
| 43 String toString() => "IsolateNotFound: $isolateId"; | 42 String toString() => "IsolateNotFound: $isolateId"; |
| 44 } | 43 } |
| 45 | 44 |
| 46 RetainedSizeRepository _retainedSizeRepository = new RetainedSizeRepository(); | 45 RetainedSizeRepository _retainedSizeRepository = new RetainedSizeRepository(); |
| 47 ReachableSizeRepository _reachableSizeRepository = | 46 ReachableSizeRepository _reachableSizeRepository = |
| 48 new ReachableSizeRepository(); | 47 new ReachableSizeRepository(); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 void _visit(Uri uri) { | 163 void _visit(Uri uri) { |
| 165 super._visit(uri); | 164 super._visit(uri); |
| 166 if (app.vm == null) { | 165 if (app.vm == null) { |
| 167 Logger.root.severe('VMPage has no VM'); | 166 Logger.root.severe('VMPage has no VM'); |
| 168 // Reroute to vm-connect. | 167 // Reroute to vm-connect. |
| 169 app.locationManager.go(Uris.vmConnect()); | 168 app.locationManager.go(Uris.vmConnect()); |
| 170 return; | 169 return; |
| 171 } | 170 } |
| 172 app.vm.reload().then((VM vm) { | 171 app.vm.reload().then((VM vm) { |
| 173 container.children = [ | 172 container.children = [ |
| 174 new VMViewElement(vm, _vmrepository, app.events, app.notifications, | 173 new VMViewElement(vm, app.events, app.notifications, |
| 175 new IsolateRepository(app.vm), _scriptRepository, | 174 new IsolateRepository(app.vm), _scriptRepository, |
| 176 queue: app.queue) | 175 queue: app.queue) |
| 177 ]; | 176 ]; |
| 178 }).catchError((e, stack) { | 177 }).catchError((e, stack) { |
| 179 Logger.root.severe('VMPage visit error: $e'); | 178 Logger.root.severe('VMPage visit error: $e'); |
| 180 // Reroute to vm-connect. | 179 // Reroute to vm-connect. |
| 181 app.locationManager.go(Uris.vmConnect()); | 180 app.locationManager.go(Uris.vmConnect()); |
| 182 }); | 181 }); |
| 183 } | 182 } |
| 184 } | 183 } |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 Logger.root.severe('MemoryDashboard has no VM'); | 701 Logger.root.severe('MemoryDashboard has no VM'); |
| 703 // Reroute to vm-connect. | 702 // Reroute to vm-connect. |
| 704 app.locationManager.go(Uris.vmConnect()); | 703 app.locationManager.go(Uris.vmConnect()); |
| 705 return; | 704 return; |
| 706 } | 705 } |
| 707 final editor = getEditor(uri); | 706 final editor = getEditor(uri); |
| 708 app.vm.reload().then((VM vm) async { | 707 app.vm.reload().then((VM vm) async { |
| 709 // Preload all isolates to avoid sorting problems. | 708 // Preload all isolates to avoid sorting problems. |
| 710 await Future.wait(vm.isolates.map((i) => i.load())); | 709 await Future.wait(vm.isolates.map((i) => i.load())); |
| 711 container.children = [ | 710 container.children = [ |
| 712 new MemoryDashboardElement(vm, _vmrepository, new IsolateRepository(vm), | 711 new MemoryDashboardElement(vm, new IsolateRepository(vm), editor, |
| 713 editor, _allocationProfileRepository, app.events, app.notifications, | 712 _allocationProfileRepository, app.events, app.notifications, |
| 714 queue: app.queue) | 713 queue: app.queue) |
| 715 ]; | 714 ]; |
| 716 }).catchError((e, stack) { | 715 }).catchError((e, stack) { |
| 717 Logger.root.severe('MemoryDashboard visit error: $e'); | 716 Logger.root.severe('MemoryDashboard visit error: $e'); |
| 718 // Reroute to vm-connect. | 717 // Reroute to vm-connect. |
| 719 app.locationManager.go(Uris.vmConnect()); | 718 app.locationManager.go(Uris.vmConnect()); |
| 720 }); | 719 }); |
| 721 } | 720 } |
| 722 | 721 |
| 723 void onInstall() { | 722 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, | 964 element = new TimelinePageElement(app.vm, app.events, app.notifications, |
| 966 queue: app.queue); | 965 queue: app.queue); |
| 967 } | 966 } |
| 968 | 967 |
| 969 void _visit(Uri uri) { | 968 void _visit(Uri uri) { |
| 970 assert(canVisit(uri)); | 969 assert(canVisit(uri)); |
| 971 } | 970 } |
| 972 | 971 |
| 973 bool canVisit(Uri uri) => uri.path == 'timeline'; | 972 bool canVisit(Uri uri) => uri.path == 'timeline'; |
| 974 } | 973 } |
| OLD | NEW |