| 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 _classSampleProfileRepository = new ClassSampleProfileRepository(); | 9 final _classSampleProfileRepository = new ClassSampleProfileRepository(); |
| 10 final _classRepository = new ClassRepository(); | 10 final _classRepository = new ClassRepository(); |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 new ScriptViewElement(app.vm, obj.isolate, obj, app.events, | 375 new ScriptViewElement(app.vm, obj.isolate, obj, app.events, |
| 376 app.notifications, | 376 app.notifications, |
| 377 _scriptRepository, | 377 _scriptRepository, |
| 378 _retainedSizeRepository, | 378 _retainedSizeRepository, |
| 379 _reachableSizeRepository, | 379 _reachableSizeRepository, |
| 380 _inboundReferencesRepository, | 380 _inboundReferencesRepository, |
| 381 _retainingPathRepository, | 381 _retainingPathRepository, |
| 382 _instanceRepository, | 382 _instanceRepository, |
| 383 pos: pos, queue: app.queue) | 383 pos: pos, queue: app.queue) |
| 384 ]; | 384 ]; |
| 385 } else if (obj.type == 'Object') { | 385 } else if (obj is HeapObject) { |
| 386 container.children = [ | 386 container.children = [ |
| 387 new ObjectViewElement(app.vm, obj.isolate, obj, app.events, | 387 new ObjectViewElement(app.vm, obj.isolate, obj, app.events, |
| 388 app.notifications, | 388 app.notifications, |
| 389 _objectRepository, | 389 _objectRepository, |
| 390 _retainedSizeRepository, | 390 _retainedSizeRepository, |
| 391 _reachableSizeRepository, | 391 _reachableSizeRepository, |
| 392 _inboundReferencesRepository, | 392 _inboundReferencesRepository, |
| 393 _retainingPathRepository, | 393 _retainingPathRepository, |
| 394 _instanceRepository, | 394 _instanceRepository, |
| 395 queue: app.queue) | 395 queue: app.queue) |
| 396 ]; | 396 ]; |
| 397 } else if (obj is Sentinel) { | 397 } else if (obj is Sentinel) { |
| 398 container.children = [ | 398 container.children = [ |
| 399 new SentinelViewElement(app.vm, obj.isolate, obj, app.events, | 399 new SentinelViewElement(app.vm, obj.isolate, obj, app.events, |
| 400 app.notifications, queue: app.queue) | 400 app.notifications, queue: app.queue) |
| 401 ]; | 401 ]; |
| 402 } else { | 402 } else { |
| 403 ServiceObjectViewElement serviceElement =new Element.tag('service-view'); | 403 container.children = [ |
| 404 serviceElement.object = obj; | 404 new JSONViewElement(obj, app.notifications, queue: app.queue) |
| 405 container.children = [serviceElement]; | 405 ]; |
| 406 } | 406 } |
| 407 } | 407 } |
| 408 } | 408 } |
| 409 | 409 |
| 410 | 410 |
| 411 /// Class tree page. | 411 /// Class tree page. |
| 412 class ClassTreePage extends SimplePage { | 412 class ClassTreePage extends SimplePage { |
| 413 ClassTreePage(app) : super('class-tree', 'class-tree', app); | 413 ClassTreePage(app) : super('class-tree', 'class-tree', app); |
| 414 | 414 |
| 415 final DivElement container = new DivElement(); | 415 final DivElement container = new DivElement(); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 page.isolate = isolate; | 657 page.isolate = isolate; |
| 658 } | 658 } |
| 659 }); | 659 }); |
| 660 } | 660 } |
| 661 } | 661 } |
| 662 | 662 |
| 663 class ErrorViewPage extends Page { | 663 class ErrorViewPage extends Page { |
| 664 ErrorViewPage(app) : super(app); | 664 ErrorViewPage(app) : super(app); |
| 665 | 665 |
| 666 void onInstall() { | 666 void onInstall() { |
| 667 if (element == null) { | 667 element = new ErrorViewElement(app.notifications, |
| 668 /// Lazily create page. | 668 app.lastErrorOrException as DartError, |
| 669 element = new Element.tag('service-view'); | 669 queue: app.queue); |
| 670 } | |
| 671 } | 670 } |
| 672 | 671 |
| 673 void _visit(Uri uri) { | 672 void _visit(Uri uri) { |
| 674 assert(element != null); | 673 assert(element != null); |
| 675 assert(canVisit(uri)); | 674 assert(canVisit(uri)); |
| 676 (element as ServiceObjectViewElement).object = app.lastErrorOrException; | |
| 677 } | 675 } |
| 678 | 676 |
| 679 // TODO(turnidge): How to test this page? | 677 // TODO(turnidge): How to test this page? |
| 680 bool canVisit(Uri uri) => uri.path == 'error'; | 678 bool canVisit(Uri uri) => uri.path == 'error'; |
| 681 } | 679 } |
| 682 | 680 |
| 683 class VMConnectPage extends Page { | 681 class VMConnectPage extends Page { |
| 684 VMConnectPage(app) : super(app); | 682 VMConnectPage(app) : super(app); |
| 685 | 683 |
| 686 void onInstall() { | 684 void onInstall() { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 assert(element != null); | 792 assert(element != null); |
| 795 } | 793 } |
| 796 | 794 |
| 797 void _visit(Uri uri) { | 795 void _visit(Uri uri) { |
| 798 assert(element != null); | 796 assert(element != null); |
| 799 assert(canVisit(uri)); | 797 assert(canVisit(uri)); |
| 800 } | 798 } |
| 801 | 799 |
| 802 bool canVisit(Uri uri) => uri.path == 'timeline'; | 800 bool canVisit(Uri uri) => uri.path == 'timeline'; |
| 803 } | 801 } |
| OLD | NEW |