| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library instance_view_element; | 5 library instance_view_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'package:observatory/models.dart' as M; | 9 import 'package:observatory/models.dart' as M; |
| 10 import 'package:observatory/src/elements/class_ref.dart'; | 10 import 'package:observatory/src/elements/class_ref.dart'; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 RenderingScheduler<InstanceViewElement> _r; | 57 RenderingScheduler<InstanceViewElement> _r; |
| 58 | 58 |
| 59 Stream<RenderedEvent<InstanceViewElement>> get onRendered => _r.onRendered; | 59 Stream<RenderedEvent<InstanceViewElement>> get onRendered => _r.onRendered; |
| 60 | 60 |
| 61 M.VM _vm; | 61 M.VM _vm; |
| 62 M.IsolateRef _isolate; | 62 M.IsolateRef _isolate; |
| 63 M.EventRepository _events; | 63 M.EventRepository _events; |
| 64 M.NotificationRepository _notifications; | 64 M.NotificationRepository _notifications; |
| 65 M.Instance _instance; | 65 M.Instance _instance; |
| 66 M.LibraryRef _library; | 66 M.LibraryRef _library; |
| 67 M.InstanceRepository _instances; | 67 M.ObjectRepository _objects; |
| 68 M.ClassRepository _classes; | 68 M.ClassRepository _classes; |
| 69 M.RetainedSizeRepository _retainedSizes; | 69 M.RetainedSizeRepository _retainedSizes; |
| 70 M.ReachableSizeRepository _reachableSizes; | 70 M.ReachableSizeRepository _reachableSizes; |
| 71 M.InboundReferencesRepository _references; | 71 M.InboundReferencesRepository _references; |
| 72 M.RetainingPathRepository _retainingPaths; | 72 M.RetainingPathRepository _retainingPaths; |
| 73 M.ScriptRepository _scripts; | 73 M.ScriptRepository _scripts; |
| 74 M.EvalRepository _eval; | 74 M.EvalRepository _eval; |
| 75 M.TypeArguments _typeArguments; | 75 M.TypeArguments _typeArguments; |
| 76 M.TypeArgumentsRepository _arguments; | 76 M.TypeArgumentsRepository _arguments; |
| 77 M.BreakpointRepository _breakpoints; | 77 M.BreakpointRepository _breakpoints; |
| 78 M.FunctionRepository _functions; | 78 M.FunctionRepository _functions; |
| 79 M.SourceLocation _location; | 79 M.SourceLocation _location; |
| 80 | 80 |
| 81 M.VMRef get vm => _vm; | 81 M.VMRef get vm => _vm; |
| 82 M.IsolateRef get isolate => _isolate; | 82 M.IsolateRef get isolate => _isolate; |
| 83 M.NotificationRepository get notifications => _notifications; | 83 M.NotificationRepository get notifications => _notifications; |
| 84 M.Instance get instance => _instance; | 84 M.Instance get instance => _instance; |
| 85 | 85 |
| 86 factory InstanceViewElement( | 86 factory InstanceViewElement( |
| 87 M.VM vm, | 87 M.VM vm, |
| 88 M.IsolateRef isolate, | 88 M.IsolateRef isolate, |
| 89 M.Instance instance, | 89 M.Instance instance, |
| 90 M.EventRepository events, | 90 M.EventRepository events, |
| 91 M.NotificationRepository notifications, | 91 M.NotificationRepository notifications, |
| 92 M.InstanceRepository instances, | 92 M.ObjectRepository objects, |
| 93 M.ClassRepository classes, | 93 M.ClassRepository classes, |
| 94 M.RetainedSizeRepository retainedSizes, | 94 M.RetainedSizeRepository retainedSizes, |
| 95 M.ReachableSizeRepository reachableSizes, | 95 M.ReachableSizeRepository reachableSizes, |
| 96 M.InboundReferencesRepository references, | 96 M.InboundReferencesRepository references, |
| 97 M.RetainingPathRepository retainingPaths, | 97 M.RetainingPathRepository retainingPaths, |
| 98 M.ScriptRepository scripts, | 98 M.ScriptRepository scripts, |
| 99 M.EvalRepository eval, | 99 M.EvalRepository eval, |
| 100 M.TypeArgumentsRepository arguments, | 100 M.TypeArgumentsRepository arguments, |
| 101 M.BreakpointRepository breakpoints, | 101 M.BreakpointRepository breakpoints, |
| 102 M.FunctionRepository functions, | 102 M.FunctionRepository functions, |
| 103 {RenderingQueue queue}) { | 103 {RenderingQueue queue}) { |
| 104 assert(vm != null); | 104 assert(vm != null); |
| 105 assert(isolate != null); | 105 assert(isolate != null); |
| 106 assert(events != null); | 106 assert(events != null); |
| 107 assert(notifications != null); | 107 assert(notifications != null); |
| 108 assert(instance != null); | 108 assert(instance != null); |
| 109 assert(instances != null); | 109 assert(objects != null); |
| 110 assert(classes != null); | 110 assert(classes != null); |
| 111 assert(retainedSizes != null); | 111 assert(retainedSizes != null); |
| 112 assert(reachableSizes != null); | 112 assert(reachableSizes != null); |
| 113 assert(references != null); | 113 assert(references != null); |
| 114 assert(retainingPaths != null); | 114 assert(retainingPaths != null); |
| 115 assert(scripts != null); | 115 assert(scripts != null); |
| 116 assert(eval != null); | 116 assert(eval != null); |
| 117 assert(arguments != null); | 117 assert(arguments != null); |
| 118 assert(breakpoints != null); | 118 assert(breakpoints != null); |
| 119 assert(functions != null); | 119 assert(functions != null); |
| 120 InstanceViewElement e = document.createElement(tag.name); | 120 InstanceViewElement e = document.createElement(tag.name); |
| 121 e._r = new RenderingScheduler(e, queue: queue); | 121 e._r = new RenderingScheduler(e, queue: queue); |
| 122 e._vm = vm; | 122 e._vm = vm; |
| 123 e._isolate = isolate; | 123 e._isolate = isolate; |
| 124 e._events = events; | 124 e._events = events; |
| 125 e._notifications = notifications; | 125 e._notifications = notifications; |
| 126 e._instance = instance; | 126 e._instance = instance; |
| 127 e._instances = instances; | 127 e._objects = objects; |
| 128 e._classes = classes; | 128 e._classes = classes; |
| 129 e._retainedSizes = retainedSizes; | 129 e._retainedSizes = retainedSizes; |
| 130 e._reachableSizes = reachableSizes; | 130 e._reachableSizes = reachableSizes; |
| 131 e._references = references; | 131 e._references = references; |
| 132 e._retainingPaths = retainingPaths; | 132 e._retainingPaths = retainingPaths; |
| 133 e._scripts = scripts; | 133 e._scripts = scripts; |
| 134 e._eval = eval; | 134 e._eval = eval; |
| 135 e._arguments = arguments; | 135 e._arguments = arguments; |
| 136 e._breakpoints = breakpoints; | 136 e._breakpoints = breakpoints; |
| 137 e._functions = functions; | 137 e._functions = functions; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 void render() { | 157 void render() { |
| 158 final content = [ | 158 final content = [ |
| 159 new HeadingElement.h2() | 159 new HeadingElement.h2() |
| 160 ..text = M.isAbstractType(_instance.kind) | 160 ..text = M.isAbstractType(_instance.kind) |
| 161 ? 'type ${_instance.name}' | 161 ? 'type ${_instance.name}' |
| 162 : 'instance of ${_instance.clazz.name}', | 162 : 'instance of ${_instance.clazz.name}', |
| 163 new HRElement(), | 163 new HRElement(), |
| 164 new ObjectCommonElement(_isolate, _instance, _retainedSizes, | 164 new ObjectCommonElement(_isolate, _instance, _retainedSizes, |
| 165 _reachableSizes, _references, _retainingPaths, _instances, | 165 _reachableSizes, _references, _retainingPaths, _objects, |
| 166 queue: _r.queue), | 166 queue: _r.queue), |
| 167 new BRElement(), | 167 new BRElement(), |
| 168 new DivElement() | 168 new DivElement() |
| 169 ..classes = ['memberList'] | 169 ..classes = ['memberList'] |
| 170 ..children = _createMembers(), | 170 ..children = _createMembers(), |
| 171 new HRElement(), | 171 new HRElement(), |
| 172 new EvalBoxElement(_isolate, _instance, _instances, _eval, | 172 new EvalBoxElement(_isolate, _instance, _objects, _eval, |
| 173 quickExpressions: const ['toString()', 'runtimeType'], | 173 quickExpressions: const ['toString()', 'runtimeType'], |
| 174 queue: _r.queue) | 174 queue: _r.queue) |
| 175 ]; | 175 ]; |
| 176 if (_location != null) { | 176 if (_location != null) { |
| 177 content.addAll([ | 177 content.addAll([ |
| 178 new HRElement(), | 178 new HRElement(), |
| 179 new SourceInsetElement( | 179 new SourceInsetElement(_isolate, _location, _scripts, _objects, _events, |
| 180 _isolate, _location, _scripts, _instances, _events, | |
| 181 queue: _r.queue) | 180 queue: _r.queue) |
| 182 ]); | 181 ]); |
| 183 } | 182 } |
| 184 content.addAll([new HRElement(), new ViewFooterElement(queue: _r.queue)]); | 183 content.addAll([new HRElement(), new ViewFooterElement(queue: _r.queue)]); |
| 185 children = [ | 184 children = [ |
| 186 navBar(_createMenu()), | 185 navBar(_createMenu()), |
| 187 new DivElement() | 186 new DivElement() |
| 188 ..classes = ['content-centered-big'] | 187 ..classes = ['content-centered-big'] |
| 189 ..children = content | 188 ..children = content |
| 190 ]; | 189 ]; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 members.add(new DivElement() | 249 members.add(new DivElement() |
| 251 ..classes = ['memberItem'] | 250 ..classes = ['memberItem'] |
| 252 ..children = [ | 251 ..children = [ |
| 253 new DivElement() | 252 new DivElement() |
| 254 ..classes = ['memberName'] | 253 ..classes = ['memberName'] |
| 255 ..text = 'type arguments', | 254 ..text = 'type arguments', |
| 256 new DivElement() | 255 new DivElement() |
| 257 ..classes = ['memberValue'] | 256 ..classes = ['memberValue'] |
| 258 ..children = ([new SpanElement()..text = '< '] | 257 ..children = ([new SpanElement()..text = '< '] |
| 259 ..addAll(_typeArguments.types.expand((type) => [ | 258 ..addAll(_typeArguments.types.expand((type) => [ |
| 260 new InstanceRefElement(_isolate, type, _instances, | 259 new InstanceRefElement(_isolate, type, _objects, |
| 261 queue: _r.queue), | 260 queue: _r.queue), |
| 262 new SpanElement()..text = ', ' | 261 new SpanElement()..text = ', ' |
| 263 ])) | 262 ])) |
| 264 ..removeLast() | 263 ..removeLast() |
| 265 ..add(new SpanElement()..text = ' >')) | 264 ..add(new SpanElement()..text = ' >')) |
| 266 ]); | 265 ]); |
| 267 } | 266 } |
| 268 if (_instance.parameterizedClass != null) { | 267 if (_instance.parameterizedClass != null) { |
| 269 members.add(new DivElement() | 268 members.add(new DivElement() |
| 270 ..classes = ['memberItem'] | 269 ..classes = ['memberItem'] |
| (...skipping 24 matching lines...) Expand all Loading... |
| 295 if (_instance.targetType != null) { | 294 if (_instance.targetType != null) { |
| 296 members.add(new DivElement() | 295 members.add(new DivElement() |
| 297 ..classes = ['memberItem'] | 296 ..classes = ['memberItem'] |
| 298 ..children = [ | 297 ..children = [ |
| 299 new DivElement() | 298 new DivElement() |
| 300 ..classes = ['memberName'] | 299 ..classes = ['memberName'] |
| 301 ..text = 'target type', | 300 ..text = 'target type', |
| 302 new DivElement() | 301 new DivElement() |
| 303 ..classes = ['memberValue'] | 302 ..classes = ['memberValue'] |
| 304 ..children = [ | 303 ..children = [ |
| 305 new InstanceRefElement(_isolate, _instance.targetType, _instances, | 304 new InstanceRefElement(_isolate, _instance.targetType, _objects, |
| 306 queue: _r.queue) | 305 queue: _r.queue) |
| 307 ] | 306 ] |
| 308 ]); | 307 ]); |
| 309 } | 308 } |
| 310 if (_instance.bound != null) { | 309 if (_instance.bound != null) { |
| 311 members.add(new DivElement() | 310 members.add(new DivElement() |
| 312 ..classes = ['memberItem'] | 311 ..classes = ['memberItem'] |
| 313 ..children = [ | 312 ..children = [ |
| 314 new DivElement() | 313 new DivElement() |
| 315 ..classes = ['memberName'] | 314 ..classes = ['memberName'] |
| 316 ..text = 'bound', | 315 ..text = 'bound', |
| 317 new DivElement() | 316 new DivElement() |
| 318 ..classes = ['memberValue'] | 317 ..classes = ['memberValue'] |
| 319 ..children = [ | 318 ..children = [ |
| 320 new InstanceRefElement(_isolate, _instance.bound, _instances, | 319 new InstanceRefElement(_isolate, _instance.bound, _objects, |
| 321 queue: _r.queue) | 320 queue: _r.queue) |
| 322 ] | 321 ] |
| 323 ]); | 322 ]); |
| 324 } | 323 } |
| 325 if (_instance.closureFunction != null) { | 324 if (_instance.closureFunction != null) { |
| 326 members.add(new DivElement() | 325 members.add(new DivElement() |
| 327 ..classes = ['memberItem'] | 326 ..classes = ['memberItem'] |
| 328 ..children = [ | 327 ..children = [ |
| 329 new DivElement() | 328 new DivElement() |
| 330 ..classes = ['memberName'] | 329 ..classes = ['memberName'] |
| 331 ..text = 'closure function', | 330 ..text = 'closure function', |
| 332 new DivElement() | 331 new DivElement() |
| 333 ..classes = ['memberValue'] | 332 ..classes = ['memberValue'] |
| 334 ..children = [ | 333 ..children = [ |
| 335 new FunctionRefElement(_isolate, _instance.closureFunction, | 334 new FunctionRefElement(_isolate, _instance.closureFunction, |
| 336 queue: _r.queue) | 335 queue: _r.queue) |
| 337 ] | 336 ] |
| 338 ]); | 337 ]); |
| 339 } | 338 } |
| 340 if (_instance.closureContext != null) { | 339 if (_instance.closureContext != null) { |
| 341 members.add(new DivElement() | 340 members.add(new DivElement() |
| 342 ..classes = ['memberItem'] | 341 ..classes = ['memberItem'] |
| 343 ..children = [ | 342 ..children = [ |
| 344 new DivElement() | 343 new DivElement() |
| 345 ..classes = ['memberName'] | 344 ..classes = ['memberName'] |
| 346 ..text = 'closure context', | 345 ..text = 'closure context', |
| 347 new DivElement() | 346 new DivElement() |
| 348 ..classes = ['memberValue'] | 347 ..classes = ['memberValue'] |
| 349 ..children = [ | 348 ..children = [ |
| 350 new ContextRefElement(_isolate, _instance.closureContext, | 349 new ContextRefElement( |
| 350 _isolate, _instance.closureContext, _objects, |
| 351 queue: _r.queue) | 351 queue: _r.queue) |
| 352 ] | 352 ] |
| 353 ]); | 353 ]); |
| 354 } | 354 } |
| 355 if (_instance.kind == M.InstanceKind.closure) { | 355 if (_instance.kind == M.InstanceKind.closure) { |
| 356 ButtonElement btn; | 356 ButtonElement btn; |
| 357 members.add(new DivElement() | 357 members.add(new DivElement() |
| 358 ..classes = ['memberItem'] | 358 ..classes = ['memberItem'] |
| 359 ..children = [ | 359 ..children = [ |
| 360 new DivElement() | 360 new DivElement() |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 ..content = [ | 425 ..content = [ |
| 426 new DivElement() | 426 new DivElement() |
| 427 ..classes = ['memberList'] | 427 ..classes = ['memberList'] |
| 428 ..children = fields | 428 ..children = fields |
| 429 .map((f) => new DivElement() | 429 .map((f) => new DivElement() |
| 430 ..classes = ['memberItem'] | 430 ..classes = ['memberItem'] |
| 431 ..children = [ | 431 ..children = [ |
| 432 new DivElement() | 432 new DivElement() |
| 433 ..classes = ['memberName'] | 433 ..classes = ['memberName'] |
| 434 ..children = [ | 434 ..children = [ |
| 435 new FieldRefElement( | 435 new FieldRefElement(_isolate, f.decl, _objects, |
| 436 _isolate, f.decl, _instances, | |
| 437 queue: _r.queue) | 436 queue: _r.queue) |
| 438 ], | 437 ], |
| 439 new DivElement() | 438 new DivElement() |
| 440 ..classes = ['memberValue'] | 439 ..classes = ['memberValue'] |
| 441 ..children = [ | 440 ..children = [ |
| 442 new SpanElement()..text = ' = ', | 441 new SpanElement()..text = ' = ', |
| 443 anyRef(_isolate, f.value, _instances, | 442 anyRef(_isolate, f.value, _objects, |
| 444 queue: _r.queue) | 443 queue: _r.queue) |
| 445 ] | 444 ] |
| 446 ]) | 445 ]) |
| 447 .toList() | 446 .toList() |
| 448 ] | 447 ] |
| 449 ] | 448 ] |
| 450 ]); | 449 ]); |
| 451 } | 450 } |
| 452 | 451 |
| 453 if (_instance.elements != null && _instance.elements.isNotEmpty) { | 452 if (_instance.elements != null && _instance.elements.isNotEmpty) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 470 ..children = elements | 469 ..children = elements |
| 471 .map((element) => new DivElement() | 470 .map((element) => new DivElement() |
| 472 ..classes = ['memberItem'] | 471 ..classes = ['memberItem'] |
| 473 ..children = [ | 472 ..children = [ |
| 474 new DivElement() | 473 new DivElement() |
| 475 ..classes = ['memberName'] | 474 ..classes = ['memberName'] |
| 476 ..text = '[ ${i++} ]', | 475 ..text = '[ ${i++} ]', |
| 477 new DivElement() | 476 new DivElement() |
| 478 ..classes = ['memberValue'] | 477 ..classes = ['memberValue'] |
| 479 ..children = [ | 478 ..children = [ |
| 480 anyRef(_isolate, element, _instances, | 479 anyRef(_isolate, element, _objects, |
| 481 queue: _r.queue) | 480 queue: _r.queue) |
| 482 ] | 481 ] |
| 483 ]) | 482 ]) |
| 484 .toList() | 483 .toList() |
| 485 ] | 484 ] |
| 486 ] | 485 ] |
| 487 ]); | 486 ]); |
| 488 if (_instance.length != elements.length) { | 487 if (_instance.length != elements.length) { |
| 489 members.add(new DivElement() | 488 members.add(new DivElement() |
| 490 ..classes = ['memberItem'] | 489 ..classes = ['memberItem'] |
| (...skipping 25 matching lines...) Expand all Loading... |
| 516 new DivElement() | 515 new DivElement() |
| 517 ..classes = ['memberList'] | 516 ..classes = ['memberList'] |
| 518 ..children = associations | 517 ..children = associations |
| 519 .map((a) => new DivElement() | 518 .map((a) => new DivElement() |
| 520 ..classes = ['memberItem'] | 519 ..classes = ['memberItem'] |
| 521 ..children = [ | 520 ..children = [ |
| 522 new DivElement() | 521 new DivElement() |
| 523 ..classes = ['memberName'] | 522 ..classes = ['memberName'] |
| 524 ..children = [ | 523 ..children = [ |
| 525 new SpanElement()..text = '[ ', | 524 new SpanElement()..text = '[ ', |
| 526 anyRef(_isolate, a.key, _instances, | 525 anyRef(_isolate, a.key, _objects, |
| 527 queue: _r.queue), | 526 queue: _r.queue), |
| 528 new SpanElement()..text = ' ]', | 527 new SpanElement()..text = ' ]', |
| 529 ], | 528 ], |
| 530 new DivElement() | 529 new DivElement() |
| 531 ..classes = ['memberValue'] | 530 ..classes = ['memberValue'] |
| 532 ..children = [ | 531 ..children = [ |
| 533 anyRef(_isolate, a.value, _instances, | 532 anyRef(_isolate, a.value, _objects, |
| 534 queue: _r.queue) | 533 queue: _r.queue) |
| 535 ] | 534 ] |
| 536 ]) | 535 ]) |
| 537 .toList() | 536 .toList() |
| 538 ] | 537 ] |
| 539 ] | 538 ] |
| 540 ]); | 539 ]); |
| 541 if (_instance.length != associations.length) { | 540 if (_instance.length != associations.length) { |
| 542 members.add(new DivElement() | 541 members.add(new DivElement() |
| 543 ..classes = ['memberItem'] | 542 ..classes = ['memberItem'] |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 members.addAll([ | 603 members.addAll([ |
| 605 new DivElement() | 604 new DivElement() |
| 606 ..classes = ['memberItem'] | 605 ..classes = ['memberItem'] |
| 607 ..children = [ | 606 ..children = [ |
| 608 new DivElement() | 607 new DivElement() |
| 609 ..classes = ['memberName'] | 608 ..classes = ['memberName'] |
| 610 ..text = 'pattern', | 609 ..text = 'pattern', |
| 611 new DivElement() | 610 new DivElement() |
| 612 ..classes = ['memberValue'] | 611 ..classes = ['memberValue'] |
| 613 ..children = [ | 612 ..children = [ |
| 614 anyRef(_isolate, _instance.pattern, _instances, queue: _r.queue) | 613 anyRef(_isolate, _instance.pattern, _objects, queue: _r.queue) |
| 615 ] | 614 ] |
| 616 ], | 615 ], |
| 617 new DivElement() | 616 new DivElement() |
| 618 ..classes = ['memberItem'] | 617 ..classes = ['memberItem'] |
| 619 ..children = [ | 618 ..children = [ |
| 620 new DivElement() | 619 new DivElement() |
| 621 ..classes = ['memberName'] | 620 ..classes = ['memberName'] |
| 622 ..text = 'isCaseSensitive', | 621 ..text = 'isCaseSensitive', |
| 623 new DivElement() | 622 new DivElement() |
| 624 ..classes = ['memberValue'] | 623 ..classes = ['memberValue'] |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 new DivElement() | 690 new DivElement() |
| 692 ..classes = ['memberItem'] | 691 ..classes = ['memberItem'] |
| 693 ..children = [ | 692 ..children = [ |
| 694 new DivElement() | 693 new DivElement() |
| 695 ..classes = ['memberName'] | 694 ..classes = ['memberName'] |
| 696 ..text = 'oneByteBytecode', | 695 ..text = 'oneByteBytecode', |
| 697 new DivElement() | 696 new DivElement() |
| 698 ..classes = ['memberValue'] | 697 ..classes = ['memberValue'] |
| 699 ..children = [ | 698 ..children = [ |
| 700 new InstanceRefElement( | 699 new InstanceRefElement( |
| 701 _isolate, _instance.oneByteBytecode, _instances, | 700 _isolate, _instance.oneByteBytecode, _objects, |
| 702 queue: _r.queue) | 701 queue: _r.queue) |
| 703 ] | 702 ] |
| 704 ], | 703 ], |
| 705 new DivElement() | 704 new DivElement() |
| 706 ..classes = ['memberItem'] | 705 ..classes = ['memberItem'] |
| 707 ..children = [ | 706 ..children = [ |
| 708 new DivElement() | 707 new DivElement() |
| 709 ..classes = ['memberName'] | 708 ..classes = ['memberName'] |
| 710 ..text = 'twoByteBytecode', | 709 ..text = 'twoByteBytecode', |
| 711 new DivElement() | 710 new DivElement() |
| 712 ..classes = ['memberValue'] | 711 ..classes = ['memberValue'] |
| 713 ..children = [ | 712 ..children = [ |
| 714 new InstanceRefElement( | 713 new InstanceRefElement( |
| 715 _isolate, _instance.twoByteBytecode, _instances, | 714 _isolate, _instance.twoByteBytecode, _objects, |
| 716 queue: _r.queue) | 715 queue: _r.queue) |
| 717 ] | 716 ] |
| 718 ] | 717 ] |
| 719 ]); | 718 ]); |
| 720 } | 719 } |
| 721 | 720 |
| 722 if (_instance.kind == M.InstanceKind.mirrorReference) { | 721 if (_instance.kind == M.InstanceKind.mirrorReference) { |
| 723 members.add(new DivElement() | 722 members.add(new DivElement() |
| 724 ..classes = ['memberItem'] | 723 ..classes = ['memberItem'] |
| 725 ..children = [ | 724 ..children = [ |
| 726 new DivElement() | 725 new DivElement() |
| 727 ..classes = ['memberName'] | 726 ..classes = ['memberName'] |
| 728 ..text = 'referent', | 727 ..text = 'referent', |
| 729 new DivElement() | 728 new DivElement() |
| 730 ..classes = ['memberValue'] | 729 ..classes = ['memberValue'] |
| 731 ..children = [ | 730 ..children = [ |
| 732 new ContextRefElement(_isolate, _instance.referent, | 731 anyRef(_isolate, _instance.referent, _objects, queue: _r.queue) |
| 733 queue: _r.queue) | |
| 734 ] | 732 ] |
| 735 ]); | 733 ]); |
| 736 } | 734 } |
| 737 if (_instance.kind == M.InstanceKind.weakProperty) { | 735 if (_instance.kind == M.InstanceKind.weakProperty) { |
| 738 members.addAll([ | 736 members.addAll([ |
| 739 new DivElement() | 737 new DivElement() |
| 740 ..classes = ['memberItem'] | 738 ..classes = ['memberItem'] |
| 741 ..children = [ | 739 ..children = [ |
| 742 new DivElement() | 740 new DivElement() |
| 743 ..classes = ['memberName'] | 741 ..classes = ['memberName'] |
| 744 ..text = 'key', | 742 ..text = 'key', |
| 745 new DivElement() | 743 new DivElement() |
| 746 ..classes = ['memberValue'] | 744 ..classes = ['memberValue'] |
| 747 ..children = [ | 745 ..children = [ |
| 748 new InstanceRefElement(_isolate, _instance.key, _instances, | 746 new InstanceRefElement(_isolate, _instance.key, _objects, |
| 749 queue: _r.queue), | 747 queue: _r.queue), |
| 750 ] | 748 ] |
| 751 ], | 749 ], |
| 752 new DivElement() | 750 new DivElement() |
| 753 ..classes = ['memberItem'] | 751 ..classes = ['memberItem'] |
| 754 ..children = [ | 752 ..children = [ |
| 755 new DivElement() | 753 new DivElement() |
| 756 ..classes = ['memberName'] | 754 ..classes = ['memberName'] |
| 757 ..text = 'value', | 755 ..text = 'value', |
| 758 new DivElement() | 756 new DivElement() |
| 759 ..classes = ['memberValue'] | 757 ..classes = ['memberValue'] |
| 760 ..children = [ | 758 ..children = [ |
| 761 new InstanceRefElement(_isolate, _instance.value, _instances, | 759 new InstanceRefElement(_isolate, _instance.value, _objects, |
| 762 queue: _r.queue), | 760 queue: _r.queue), |
| 763 ] | 761 ] |
| 764 ] | 762 ] |
| 765 ]); | 763 ]); |
| 766 } | 764 } |
| 767 return members; | 765 return members; |
| 768 } | 766 } |
| 769 | 767 |
| 770 Future _refresh() async { | 768 Future _refresh() async { |
| 771 _instance = await _instances.get(_isolate, _instance.id); | 769 _instance = await _objects.get(_isolate, _instance.id); |
| 772 await _loadExtraData(); | 770 await _loadExtraData(); |
| 773 _r.dirty(); | 771 _r.dirty(); |
| 774 } | 772 } |
| 775 | 773 |
| 776 Future _loadExtraData() async { | 774 Future _loadExtraData() async { |
| 777 _library = (await _classes.get(_isolate, _instance.clazz.id)).library; | 775 _library = (await _classes.get(_isolate, _instance.clazz.id)).library; |
| 778 if (_instance.typeArguments != null) { | 776 if (_instance.typeArguments != null) { |
| 779 _typeArguments = | 777 _typeArguments = |
| 780 await _arguments.get(_isolate, _instance.typeArguments.id); | 778 await _arguments.get(_isolate, _instance.typeArguments.id); |
| 781 } else { | 779 } else { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 793 | 791 |
| 794 Future _toggleBreakpoint() async { | 792 Future _toggleBreakpoint() async { |
| 795 if (_instance.activationBreakpoint == null) { | 793 if (_instance.activationBreakpoint == null) { |
| 796 await _breakpoints.addOnActivation(_isolate, _instance); | 794 await _breakpoints.addOnActivation(_isolate, _instance); |
| 797 } else { | 795 } else { |
| 798 await _breakpoints.remove(_isolate, _instance.activationBreakpoint); | 796 await _breakpoints.remove(_isolate, _instance.activationBreakpoint); |
| 799 } | 797 } |
| 800 await _refresh(); | 798 await _refresh(); |
| 801 } | 799 } |
| 802 } | 800 } |
| OLD | NEW |