| 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 AllocationProfileRepository _allocationProfileRepository | 7 AllocationProfileRepository _allocationProfileRepository |
| 8 = new AllocationProfileRepository(); | 8 = new AllocationProfileRepository(); |
| 9 ContextRepository _contextRepository = new ContextRepository(); | 9 ContextRepository _contextRepository = new ContextRepository(); |
| 10 HeapSnapshotRepository _heapSnapshotRepository | 10 HeapSnapshotRepository _heapSnapshotRepository |
| 11 = new HeapSnapshotRepository(); | 11 = new HeapSnapshotRepository(); |
| 12 ICDataRepository _icdataRepository = new ICDataRepository(); | 12 ICDataRepository _icdataRepository = new ICDataRepository(); |
| 13 InboundReferencesRepository _inboundReferencesRepository | 13 InboundReferencesRepository _inboundReferencesRepository |
| 14 = new InboundReferencesRepository(); | 14 = new InboundReferencesRepository(); |
| 15 InstanceRepository _instanceRepository = new InstanceRepository(); | 15 InstanceRepository _instanceRepository = new InstanceRepository(); |
| 16 IsolateSampleProfileRepository _isolateSampleProfileRepository | 16 IsolateSampleProfileRepository _isolateSampleProfileRepository |
| 17 = new IsolateSampleProfileRepository(); | 17 = new IsolateSampleProfileRepository(); |
| 18 ObjectStoreRepository _objectstoreRepository |
| 19 = new ObjectStoreRepository(); |
| 18 PortsRepository _portsRepository = new PortsRepository(); | 20 PortsRepository _portsRepository = new PortsRepository(); |
| 19 | 21 |
| 20 class IsolateNotFound implements Exception { | 22 class IsolateNotFound implements Exception { |
| 21 String isolateId; | 23 String isolateId; |
| 22 IsolateNotFound(this.isolateId); | 24 IsolateNotFound(this.isolateId); |
| 23 String toString() => "IsolateNotFound: $isolateId"; | 25 String toString() => "IsolateNotFound: $isolateId"; |
| 24 } | 26 } |
| 25 RetainedSizeRepository _retainedSizeRepository = new RetainedSizeRepository(); | 27 RetainedSizeRepository _retainedSizeRepository = new RetainedSizeRepository(); |
| 26 ReachableSizeRepository _reachableSizeRepository | 28 ReachableSizeRepository _reachableSizeRepository |
| 27 = new ReachableSizeRepository(); | 29 = new ReachableSizeRepository(); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 getIsolate(uri).then((isolate) { | 250 getIsolate(uri).then((isolate) { |
| 249 if (element != null) { | 251 if (element != null) { |
| 250 /// Update the page. | 252 /// Update the page. |
| 251 DebuggerPageElement page = element; | 253 DebuggerPageElement page = element; |
| 252 page.isolate = isolate; | 254 page.isolate = isolate; |
| 253 } | 255 } |
| 254 }); | 256 }); |
| 255 } | 257 } |
| 256 } | 258 } |
| 257 | 259 |
| 260 class ObjectStorePage extends MatchingPage { |
| 261 ObjectStorePage(app) : super('object-store', app); |
| 258 | 262 |
| 259 class ObjectStorePage extends SimplePage { | 263 final DivElement container = new DivElement(); |
| 260 ObjectStorePage(app) : super('object-store', 'objectstore-view', app); | |
| 261 | 264 |
| 262 void _visit(Uri uri) { | 265 void _visit(Uri uri) { |
| 263 super._visit(uri); | 266 super._visit(uri); |
| 264 getIsolate(uri).then((isolate) { | 267 getIsolate(uri).then((isolate) async { |
| 265 isolate.getObjectStore().then((objectStore) { | 268 container.children = [ |
| 266 if (element != null) { | 269 new ObjectStoreViewElement(isolate.vm, isolate, |
| 267 /// Update the page. | 270 app.events, |
| 268 ObjectStoreViewElement page = element; | 271 app.notifications, |
| 269 page.objectStore = objectStore; | 272 _objectstoreRepository, |
| 270 } | 273 _instanceRepository) |
| 271 }); | 274 ]; |
| 272 }); | 275 }); |
| 273 } | 276 } |
| 277 |
| 278 void onInstall() { |
| 279 if (element == null) { |
| 280 element = container; |
| 281 } |
| 282 assert(element != null); |
| 283 } |
| 274 } | 284 } |
| 275 | 285 |
| 276 class CpuProfilerPage extends MatchingPage { | 286 class CpuProfilerPage extends MatchingPage { |
| 277 CpuProfilerPage(app) : super('profiler', app); | 287 CpuProfilerPage(app) : super('profiler', app); |
| 278 | 288 |
| 279 final DivElement container = new DivElement(); | 289 final DivElement container = new DivElement(); |
| 280 | 290 |
| 281 void _visit(Uri uri) { | 291 void _visit(Uri uri) { |
| 282 super._visit(uri); | 292 super._visit(uri); |
| 283 getIsolate(uri).then((isolate) { | 293 getIsolate(uri).then((isolate) { |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 assert(element != null); | 587 assert(element != null); |
| 578 } | 588 } |
| 579 | 589 |
| 580 void _visit(Uri uri) { | 590 void _visit(Uri uri) { |
| 581 assert(element != null); | 591 assert(element != null); |
| 582 assert(canVisit(uri)); | 592 assert(canVisit(uri)); |
| 583 } | 593 } |
| 584 | 594 |
| 585 bool canVisit(Uri uri) => uri.path == 'timeline'; | 595 bool canVisit(Uri uri) => uri.path == 'timeline'; |
| 586 } | 596 } |
| OLD | NEW |