Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: runtime/observatory/lib/src/elements/debugger.dart

Issue 2873013004: Omnibus Observatory UI fixes: (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 library debugger_page_element; 5 library debugger_page_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:svg'; 8 import 'dart:svg';
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:math'; 10 import 'dart:math';
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 debugger.console.print('No stack'); 171 debugger.console.print('No stack');
172 return; 172 return;
173 } 173 }
174 var expression = args.join(''); 174 var expression = args.join('');
175 var response = 175 var response =
176 await debugger.isolate.evalFrame(debugger.currentFrame, expression); 176 await debugger.isolate.evalFrame(debugger.currentFrame, expression);
177 if (response is S.DartError) { 177 if (response is S.DartError) {
178 debugger.console.print(response.message); 178 debugger.console.print(response.message);
179 } else { 179 } else {
180 debugger.console.print('= ', newline: false); 180 debugger.console.print('= ', newline: false);
181 debugger.console.printRef(debugger.isolate, response, debugger.instances); 181 debugger.console.printRef(debugger.isolate, response, debugger.objects);
182 } 182 }
183 } 183 }
184 184
185 String helpShort = 'Evaluate and print an expression in the current frame'; 185 String helpShort = 'Evaluate and print an expression in the current frame';
186 186
187 String helpLong = 'Evaluate and print an expression in the current frame.\n' 187 String helpLong = 'Evaluate and print an expression in the current frame.\n'
188 '\n' 188 '\n'
189 'Syntax: print <expression>\n' 189 'Syntax: print <expression>\n'
190 ' p <expression>\n'; 190 ' p <expression>\n';
191 } 191 }
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 var bpId = event.breakpoint.number; 1639 var bpId = event.breakpoint.number;
1640 console.print('Paused at breakpoint ${bpId} at ' 1640 console.print('Paused at breakpoint ${bpId} at '
1641 '${script.name}:${line}:${col}'); 1641 '${script.name}:${line}:${col}');
1642 } else if ((event is M.PauseExceptionEvent) && 1642 } else if ((event is M.PauseExceptionEvent) &&
1643 (event.exception != null)) { 1643 (event.exception != null)) {
1644 console.print('Paused due to exception at ' 1644 console.print('Paused due to exception at '
1645 '${script.name}:${line}:${col}'); 1645 '${script.name}:${line}:${col}');
1646 // This seems to be missing if we are paused-at-exception after 1646 // This seems to be missing if we are paused-at-exception after
1647 // paused-at-isolate-exit. Maybe we shutdown part of the debugger too 1647 // paused-at-isolate-exit. Maybe we shutdown part of the debugger too
1648 // soon? 1648 // soon?
1649 console.printRef(isolate, event.exception, instances); 1649 console.printRef(isolate, event.exception, objects);
1650 } else { 1650 } else {
1651 console.print('Paused at ${script.name}:${line}:${col}'); 1651 console.print('Paused at ${script.name}:${line}:${col}');
1652 } 1652 }
1653 }); 1653 });
1654 } else { 1654 } else {
1655 console.print("Paused in message loop (type 'continue' or [F7] " 1655 console.print("Paused in message loop (type 'continue' or [F7] "
1656 "to resume processing messages)"); 1656 "to resume processing messages)");
1657 } 1657 }
1658 } 1658 }
1659 1659
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 static const tag = 1993 static const tag =
1994 const Tag<DebuggerPageElement>('debugger-page', dependencies: const [ 1994 const Tag<DebuggerPageElement>('debugger-page', dependencies: const [
1995 NavTopMenuElement.tag, 1995 NavTopMenuElement.tag,
1996 NavVMMenuElement.tag, 1996 NavVMMenuElement.tag,
1997 NavIsolateMenuElement.tag, 1997 NavIsolateMenuElement.tag,
1998 NavNotifyElement.tag, 1998 NavNotifyElement.tag,
1999 ]); 1999 ]);
2000 2000
2001 S.Isolate _isolate; 2001 S.Isolate _isolate;
2002 ObservatoryDebugger _debugger; 2002 ObservatoryDebugger _debugger;
2003 M.InstanceRepository _instances; 2003 M.ObjectRepository _objects;
2004 M.ScriptRepository _scripts; 2004 M.ScriptRepository _scripts;
2005 M.EventRepository _events; 2005 M.EventRepository _events;
2006 2006
2007 factory DebuggerPageElement(S.Isolate isolate, M.InstanceRepository instances, 2007 factory DebuggerPageElement(S.Isolate isolate, M.ObjectRepository objects,
2008 M.ScriptRepository scripts, M.EventRepository events) { 2008 M.ScriptRepository scripts, M.EventRepository events) {
2009 assert(isolate != null); 2009 assert(isolate != null);
2010 assert(instances != null); 2010 assert(objects != null);
2011 assert(scripts != null); 2011 assert(scripts != null);
2012 assert(events != null); 2012 assert(events != null);
2013 final e = document.createElement(tag.name); 2013 final e = document.createElement(tag.name);
2014 final debugger = new ObservatoryDebugger(isolate); 2014 final debugger = new ObservatoryDebugger(isolate);
2015 debugger.page = e; 2015 debugger.page = e;
2016 debugger.instances = instances; 2016 debugger.objects = objects;
2017 e._isolate = isolate; 2017 e._isolate = isolate;
2018 e._debugger = debugger; 2018 e._debugger = debugger;
2019 e._instances = instances; 2019 e._objects = objects;
2020 e._scripts = scripts; 2020 e._scripts = scripts;
2021 e._events = events; 2021 e._events = events;
2022 return e; 2022 return e;
2023 } 2023 }
2024 2024
2025 DebuggerPageElement.created() : super.created(); 2025 DebuggerPageElement.created() : super.created();
2026 2026
2027 Future<StreamSubscription> _vmSubscriptionFuture; 2027 Future<StreamSubscription> _vmSubscriptionFuture;
2028 Future<StreamSubscription> _isolateSubscriptionFuture; 2028 Future<StreamSubscription> _isolateSubscriptionFuture;
2029 Future<StreamSubscription> _debugSubscriptionFuture; 2029 Future<StreamSubscription> _debugSubscriptionFuture;
2030 Future<StreamSubscription> _stdoutSubscriptionFuture; 2030 Future<StreamSubscription> _stdoutSubscriptionFuture;
2031 Future<StreamSubscription> _stderrSubscriptionFuture; 2031 Future<StreamSubscription> _stderrSubscriptionFuture;
2032 Future<StreamSubscription> _logSubscriptionFuture; 2032 Future<StreamSubscription> _logSubscriptionFuture;
2033 2033
2034 ObservatoryApplication get app => ObservatoryApplication.app; 2034 ObservatoryApplication get app => ObservatoryApplication.app;
2035 2035
2036 Timer _timer; 2036 Timer _timer;
2037 2037
2038 static final consoleElement = new DebuggerConsoleElement(); 2038 static final consoleElement = new DebuggerConsoleElement();
2039 2039
2040 @override 2040 @override
2041 void attached() { 2041 void attached() {
2042 super.attached(); 2042 super.attached();
2043 2043
2044 final stackDiv = new DivElement()..classes = ['stack']; 2044 final stackDiv = new DivElement()..classes = ['stack'];
2045 final stackElement = new DebuggerStackElement( 2045 final stackElement = new DebuggerStackElement(
2046 _isolate, _debugger, stackDiv, _instances, _scripts, _events); 2046 _isolate, _debugger, stackDiv, _objects, _scripts, _events);
2047 stackDiv.children = [stackElement]; 2047 stackDiv.children = [stackElement];
2048 final consoleDiv = new DivElement() 2048 final consoleDiv = new DivElement()
2049 ..classes = ['console'] 2049 ..classes = ['console']
2050 ..children = [consoleElement]; 2050 ..children = [consoleElement];
2051 final commandElement = new DebuggerInputElement(_isolate, _debugger); 2051 final commandElement = new DebuggerInputElement(_isolate, _debugger);
2052 final commandDiv = new DivElement() 2052 final commandDiv = new DivElement()
2053 ..classes = ['commandline'] 2053 ..classes = ['commandline']
2054 ..children = [commandElement]; 2054 ..children = [commandElement];
2055 2055
2056 children = [ 2056 children = [
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 S.cancelFutureSubscription(_logSubscriptionFuture); 2148 S.cancelFutureSubscription(_logSubscriptionFuture);
2149 _logSubscriptionFuture = null; 2149 _logSubscriptionFuture = null;
2150 super.detached(); 2150 super.detached();
2151 } 2151 }
2152 } 2152 }
2153 2153
2154 class DebuggerStackElement extends HtmlElement implements Renderable { 2154 class DebuggerStackElement extends HtmlElement implements Renderable {
2155 static const tag = const Tag<DebuggerStackElement>('debugger-stack'); 2155 static const tag = const Tag<DebuggerStackElement>('debugger-stack');
2156 2156
2157 S.Isolate _isolate; 2157 S.Isolate _isolate;
2158 M.InstanceRepository _instances; 2158 M.ObjectRepository _objects;
2159 M.ScriptRepository _scripts; 2159 M.ScriptRepository _scripts;
2160 M.EventRepository _events; 2160 M.EventRepository _events;
2161 Element _scroller; 2161 Element _scroller;
2162 DivElement _isSampled; 2162 DivElement _isSampled;
2163 bool get isSampled => !_isSampled.classes.contains('hidden'); 2163 bool get isSampled => !_isSampled.classes.contains('hidden');
2164 set isSampled(bool value) { 2164 set isSampled(bool value) {
2165 if (value != isSampled) { 2165 if (value != isSampled) {
2166 _isSampled.classes.toggle('hidden'); 2166 _isSampled.classes.toggle('hidden');
2167 } 2167 }
2168 } 2168 }
(...skipping 16 matching lines...) Expand all
2185 2185
2186 UListElement _frameList; 2186 UListElement _frameList;
2187 UListElement _messageList; 2187 UListElement _messageList;
2188 int currentFrame; 2188 int currentFrame;
2189 ObservatoryDebugger _debugger; 2189 ObservatoryDebugger _debugger;
2190 2190
2191 factory DebuggerStackElement( 2191 factory DebuggerStackElement(
2192 S.Isolate isolate, 2192 S.Isolate isolate,
2193 ObservatoryDebugger debugger, 2193 ObservatoryDebugger debugger,
2194 Element scroller, 2194 Element scroller,
2195 M.InstanceRepository instances, 2195 M.ObjectRepository objects,
2196 M.ScriptRepository scripts, 2196 M.ScriptRepository scripts,
2197 M.EventRepository events) { 2197 M.EventRepository events) {
2198 assert(isolate != null); 2198 assert(isolate != null);
2199 assert(debugger != null); 2199 assert(debugger != null);
2200 assert(scroller != null); 2200 assert(scroller != null);
2201 assert(instances != null); 2201 assert(objects != null);
2202 assert(scripts != null); 2202 assert(scripts != null);
2203 assert(events != null); 2203 assert(events != null);
2204 final e = document.createElement(tag.name); 2204 final e = document.createElement(tag.name);
2205 e._isolate = isolate; 2205 e._isolate = isolate;
2206 e._debugger = debugger; 2206 e._debugger = debugger;
2207 e._scroller = scroller; 2207 e._scroller = scroller;
2208 e._instances = instances; 2208 e._objects = objects;
2209 e._scripts = scripts; 2209 e._scripts = scripts;
2210 e._events = events; 2210 e._events = events;
2211 2211
2212 var btnPause; 2212 var btnPause;
2213 var btnRefresh; 2213 var btnRefresh;
2214 e.children = [ 2214 e.children = [
2215 e._isSampled = new DivElement() 2215 e._isSampled = new DivElement()
2216 ..classes = ['sampledMessage', 'hidden'] 2216 ..classes = ['sampledMessage', 'hidden']
2217 ..children = [ 2217 ..children = [
2218 new SpanElement() 2218 new SpanElement()
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 ]; 2256 ];
2257 return e; 2257 return e;
2258 } 2258 }
2259 2259
2260 void render() { 2260 void render() {
2261 /* nothing to do */ 2261 /* nothing to do */
2262 } 2262 }
2263 2263
2264 _addFrame(List frameList, S.Frame frameInfo) { 2264 _addFrame(List frameList, S.Frame frameInfo) {
2265 final frameElement = new DebuggerFrameElement( 2265 final frameElement = new DebuggerFrameElement(
2266 _isolate, frameInfo, _scroller, _instances, _scripts, _events, 2266 _isolate, frameInfo, _scroller, _objects, _scripts, _events,
2267 queue: app.queue); 2267 queue: app.queue);
2268 2268
2269 if (frameInfo.index == currentFrame) { 2269 if (frameInfo.index == currentFrame) {
2270 frameElement.setCurrent(true); 2270 frameElement.setCurrent(true);
2271 } else { 2271 } else {
2272 frameElement.setCurrent(false); 2272 frameElement.setCurrent(false);
2273 } 2273 }
2274 2274
2275 var li = new LIElement(); 2275 var li = new LIElement();
2276 li.classes.add('list-group-item'); 2276 li.classes.add('list-group-item');
2277 li.children.insert(0, frameElement); 2277 li.children.insert(0, frameElement);
2278 2278
2279 frameList.insert(0, li); 2279 frameList.insert(0, li);
2280 } 2280 }
2281 2281
2282 _addMessage(List messageList, S.ServiceMessage messageInfo) { 2282 _addMessage(List messageList, S.ServiceMessage messageInfo) {
2283 final messageElement = new DebuggerMessageElement( 2283 final messageElement = new DebuggerMessageElement(
2284 _isolate, messageInfo, _instances, _scripts, _events, 2284 _isolate, messageInfo, _objects, _scripts, _events,
2285 queue: app.queue); 2285 queue: app.queue);
2286 2286
2287 var li = new LIElement(); 2287 var li = new LIElement();
2288 li.classes.add('list-group-item'); 2288 li.classes.add('list-group-item');
2289 li.children.insert(0, messageElement); 2289 li.children.insert(0, messageElement);
2290 2290
2291 messageList.add(li); 2291 messageList.add(li);
2292 } 2292 }
2293 2293
2294 ObservatoryApplication get app => ObservatoryApplication.app; 2294 ObservatoryApplication get app => ObservatoryApplication.app;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 2412
2413 RenderingScheduler<DebuggerMessageElement> _r; 2413 RenderingScheduler<DebuggerMessageElement> _r;
2414 2414
2415 Stream<RenderedEvent<DebuggerMessageElement>> get onRendered => _r.onRendered; 2415 Stream<RenderedEvent<DebuggerMessageElement>> get onRendered => _r.onRendered;
2416 2416
2417 Element _scroller; 2417 Element _scroller;
2418 DivElement _varsDiv; 2418 DivElement _varsDiv;
2419 M.Isolate _isolate; 2419 M.Isolate _isolate;
2420 S.Frame _frame; 2420 S.Frame _frame;
2421 S.Frame get frame => _frame; 2421 S.Frame get frame => _frame;
2422 M.InstanceRepository _instances; 2422 M.ObjectRepository _objects;
2423 M.ScriptRepository _scripts; 2423 M.ScriptRepository _scripts;
2424 M.EventRepository _events; 2424 M.EventRepository _events;
2425 2425
2426 // Is this the current frame? 2426 // Is this the current frame?
2427 bool _current = false; 2427 bool _current = false;
2428 2428
2429 // Has this frame been pinned open? 2429 // Has this frame been pinned open?
2430 bool _pinned = false; 2430 bool _pinned = false;
2431 2431
2432 bool _expanded = false; 2432 bool _expanded = false;
(...skipping 14 matching lines...) Expand all
2447 _unexpand(); 2447 _unexpand();
2448 } 2448 }
2449 } 2449 }
2450 }); 2450 });
2451 } 2451 }
2452 2452
2453 factory DebuggerFrameElement( 2453 factory DebuggerFrameElement(
2454 M.Isolate isolate, 2454 M.Isolate isolate,
2455 S.Frame frame, 2455 S.Frame frame,
2456 Element scroller, 2456 Element scroller,
2457 M.InstanceRepository instances, 2457 M.ObjectRepository objects,
2458 M.ScriptRepository scripts, 2458 M.ScriptRepository scripts,
2459 M.EventRepository events, 2459 M.EventRepository events,
2460 {RenderingQueue queue}) { 2460 {RenderingQueue queue}) {
2461 assert(isolate != null); 2461 assert(isolate != null);
2462 assert(frame != null); 2462 assert(frame != null);
2463 assert(scroller != null); 2463 assert(scroller != null);
2464 assert(instances != null); 2464 assert(objects != null);
2465 assert(scripts != null); 2465 assert(scripts != null);
2466 assert(events != null); 2466 assert(events != null);
2467 final DebuggerFrameElement e = document.createElement(tag.name); 2467 final DebuggerFrameElement e = document.createElement(tag.name);
2468 e._r = new RenderingScheduler(e, queue: queue); 2468 e._r = new RenderingScheduler(e, queue: queue);
2469 e._isolate = isolate; 2469 e._isolate = isolate;
2470 e._frame = frame; 2470 e._frame = frame;
2471 e._scroller = scroller; 2471 e._scroller = scroller;
2472 e._instances = instances; 2472 e._objects = objects;
2473 e._scripts = scripts; 2473 e._scripts = scripts;
2474 e._events = events; 2474 e._events = events;
2475 return e; 2475 return e;
2476 } 2476 }
2477 2477
2478 DebuggerFrameElement.created() : super.created(); 2478 DebuggerFrameElement.created() : super.created();
2479 2479
2480 void render() { 2480 void render() {
2481 if (_pinned) { 2481 if (_pinned) {
2482 classes.add('shadow'); 2482 classes.add('shadow');
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2530 ..children = [ 2530 ..children = [
2531 new DivElement() 2531 new DivElement()
2532 ..classes = ['flex-item-script'] 2532 ..classes = ['flex-item-script']
2533 ..children = _frame.function?.location == null 2533 ..children = _frame.function?.location == null
2534 ? const [] 2534 ? const []
2535 : [ 2535 : [
2536 new SourceInsetElement( 2536 new SourceInsetElement(
2537 _isolate, 2537 _isolate,
2538 _frame.function.location, 2538 _frame.function.location,
2539 _scripts, 2539 _scripts,
2540 _instances, 2540 _objects,
2541 _events, 2541 _events,
2542 currentPos: _frame.location.tokenPos, 2542 currentPos: _frame.location.tokenPos,
2543 variables: _frame.variables, 2543 variables: _frame.variables,
2544 inDebuggerContext: true, 2544 inDebuggerContext: true,
2545 queue: _r.queue) 2545 queue: _r.queue)
2546 ], 2546 ],
2547 new DivElement() 2547 new DivElement()
2548 ..classes = ['flex-item-vars'] 2548 ..classes = ['flex-item-vars']
2549 ..children = [ 2549 ..children = [
2550 _varsDiv = new DivElement() 2550 _varsDiv = new DivElement()
2551 ..classes = ['memberList', 'frameVars'] 2551 ..classes = ['memberList', 'frameVars']
2552 ..children = ([ 2552 ..children = ([
2553 new DivElement() 2553 new DivElement()
2554 ..classes = ['memberItem'] 2554 ..classes = ['memberItem']
2555 ..children = homeMethodName == null 2555 ..children = homeMethodName == null
2556 ? const [] 2556 ? const []
2557 : [ 2557 : [
2558 new DivElement() 2558 new DivElement()
2559 ..classes = ['memberName'] 2559 ..classes = ['memberName']
2560 ..text = homeMethodName, 2560 ..text = homeMethodName,
2561 new DivElement() 2561 new DivElement()
2562 ..classes = ['memberName'] 2562 ..classes = ['memberName']
2563 ..children = [ 2563 ..children = [
2564 anyRef(_isolate, homeMethod.dartOwner, 2564 anyRef(_isolate, homeMethod.dartOwner,
2565 _instances, 2565 _objects,
2566 queue: _r.queue) 2566 queue: _r.queue)
2567 ] 2567 ]
2568 ] 2568 ]
2569 ]..addAll(_frame.variables 2569 ]..addAll(_frame.variables
2570 .map((v) => new DivElement() 2570 .map((v) => new DivElement()
2571 ..classes = ['memberItem'] 2571 ..classes = ['memberItem']
2572 ..children = [ 2572 ..children = [
2573 new DivElement() 2573 new DivElement()
2574 ..classes = ['memberName'] 2574 ..classes = ['memberName']
2575 ..text = v.name, 2575 ..text = v.name,
2576 new DivElement() 2576 new DivElement()
2577 ..classes = ['memberName'] 2577 ..classes = ['memberName']
2578 ..children = [ 2578 ..children = [
2579 anyRef(_isolate, v['value'], _instances, 2579 anyRef(_isolate, v['value'], _objects,
2580 queue: _r.queue) 2580 queue: _r.queue)
2581 ] 2581 ]
2582 ]) 2582 ])
2583 .toList())) 2583 .toList()))
2584 ] 2584 ]
2585 ], 2585 ],
2586 new DivElement() 2586 new DivElement()
2587 ..classes = ['frameContractor'] 2587 ..classes = ['frameContractor']
2588 ..children = [ 2588 ..children = [
2589 collapseButton = new ButtonElement() 2589 collapseButton = new ButtonElement()
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
2769 class DebuggerMessageElement extends HtmlElement implements Renderable { 2769 class DebuggerMessageElement extends HtmlElement implements Renderable {
2770 static const tag = const Tag<DebuggerMessageElement>('debugger-message'); 2770 static const tag = const Tag<DebuggerMessageElement>('debugger-message');
2771 2771
2772 RenderingScheduler<DebuggerMessageElement> _r; 2772 RenderingScheduler<DebuggerMessageElement> _r;
2773 2773
2774 Stream<RenderedEvent<DebuggerMessageElement>> get onRendered => _r.onRendered; 2774 Stream<RenderedEvent<DebuggerMessageElement>> get onRendered => _r.onRendered;
2775 2775
2776 S.Isolate _isolate; 2776 S.Isolate _isolate;
2777 S.ServiceMessage _message; 2777 S.ServiceMessage _message;
2778 S.ServiceObject _preview; 2778 S.ServiceObject _preview;
2779 M.InstanceRepository _instances; 2779 M.ObjectRepository _objects;
2780 M.ScriptRepository _scripts; 2780 M.ScriptRepository _scripts;
2781 M.EventRepository _events; 2781 M.EventRepository _events;
2782 2782
2783 // Is this the current message? 2783 // Is this the current message?
2784 bool _current = false; 2784 bool _current = false;
2785 2785
2786 // Has this message been pinned open? 2786 // Has this message been pinned open?
2787 bool _pinned = false; 2787 bool _pinned = false;
2788 2788
2789 bool _expanded = false; 2789 bool _expanded = false;
2790 2790
2791 factory DebuggerMessageElement( 2791 factory DebuggerMessageElement(
2792 S.Isolate isolate, 2792 S.Isolate isolate,
2793 S.ServiceMessage message, 2793 S.ServiceMessage message,
2794 M.InstanceRepository instances, 2794 M.ObjectRepository objects,
2795 M.ScriptRepository scripts, 2795 M.ScriptRepository scripts,
2796 M.EventRepository events, 2796 M.EventRepository events,
2797 {RenderingQueue queue}) { 2797 {RenderingQueue queue}) {
2798 assert(isolate != null); 2798 assert(isolate != null);
2799 assert(message != null); 2799 assert(message != null);
2800 assert(instances != null); 2800 assert(objects != null);
2801 assert(instances != null);
2802 assert(events != null); 2801 assert(events != null);
2803 final DebuggerMessageElement e = document.createElement(tag.name); 2802 final DebuggerMessageElement e = document.createElement(tag.name);
2804 e._r = new RenderingScheduler(e, queue: queue); 2803 e._r = new RenderingScheduler(e, queue: queue);
2805 e._isolate = isolate; 2804 e._isolate = isolate;
2806 e._message = message; 2805 e._message = message;
2807 e._instances = instances; 2806 e._objects = objects;
2808 e._scripts = scripts; 2807 e._scripts = scripts;
2809 e._events = events; 2808 e._events = events;
2810 return e; 2809 return e;
2811 } 2810 }
2812 2811
2813 DebuggerMessageElement.created() : super.created(); 2812 DebuggerMessageElement.created() : super.created();
2814 2813
2815 void render() { 2814 void render() {
2816 if (_pinned) { 2815 if (_pinned) {
2817 classes.add('shadow'); 2816 classes.add('shadow');
(...skipping 30 matching lines...) Expand all
2848 ..children = [ 2847 ..children = [
2849 new DivElement() 2848 new DivElement()
2850 ..classes = ['flex-item-script'] 2849 ..classes = ['flex-item-script']
2851 ..children = _message.handler == null 2850 ..children = _message.handler == null
2852 ? const [] 2851 ? const []
2853 : [ 2852 : [
2854 new SourceInsetElement( 2853 new SourceInsetElement(
2855 _isolate, 2854 _isolate,
2856 _message.handler.location, 2855 _message.handler.location,
2857 _scripts, 2856 _scripts,
2858 _instances, 2857 _objects,
2859 _events, 2858 _events,
2860 inDebuggerContext: true, 2859 inDebuggerContext: true,
2861 queue: _r.queue) 2860 queue: _r.queue)
2862 ], 2861 ],
2863 new DivElement() 2862 new DivElement()
2864 ..classes = ['flex-item-vars'] 2863 ..classes = ['flex-item-vars']
2865 ..children = [ 2864 ..children = [
2866 new DivElement() 2865 new DivElement()
2867 ..classes = ['memberItem'] 2866 ..classes = ['memberItem']
2868 ..children = [ 2867 ..children = [
2869 new DivElement()..classes = ['memberName'], 2868 new DivElement()..classes = ['memberName'],
2870 new DivElement() 2869 new DivElement()
2871 ..classes = ['memberValue'] 2870 ..classes = ['memberValue']
2872 ..children = ([ 2871 ..children = ([
2873 previewButton = new ButtonElement() 2872 previewButton = new ButtonElement()
2874 ..text = 'preview' 2873 ..text = 'preview'
2875 ..onClick.listen((_) { 2874 ..onClick.listen((_) {
2876 previewButton.disabled = true; 2875 previewButton.disabled = true;
2877 }) 2876 })
2878 ]..addAll(_preview == null 2877 ]..addAll(_preview == null
2879 ? const [] 2878 ? const []
2880 : [ 2879 : [
2881 anyRef(_isolate, _preview, _instances, 2880 anyRef(_isolate, _preview, _objects,
2882 queue: _r.queue) 2881 queue: _r.queue)
2883 ])) 2882 ]))
2884 ] 2883 ]
2885 ] 2884 ]
2886 ], 2885 ],
2887 new DivElement() 2886 new DivElement()
2888 ..classes = ['messageContractor'] 2887 ..classes = ['messageContractor']
2889 ..children = [ 2888 ..children = [
2890 collapseButton = new ButtonElement() 2889 collapseButton = new ButtonElement()
2891 ..onClick.listen((e) async { 2890 ..onClick.listen((e) async {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 span.classes.add('green'); 3065 span.classes.add('green');
3067 span.appendText(line); 3066 span.appendText(line);
3068 span.appendText('\n'); 3067 span.appendText('\n');
3069 children.add(span); 3068 children.add(span);
3070 } 3069 }
3071 if (autoScroll) { 3070 if (autoScroll) {
3072 _scrollToBottom(parent); 3071 _scrollToBottom(parent);
3073 } 3072 }
3074 } 3073 }
3075 3074
3076 void printRef( 3075 void printRef(S.Isolate isolate, S.Instance ref, M.ObjectRepository objects,
3077 S.Isolate isolate, S.Instance ref, M.InstanceRepository instances,
3078 {bool newline: true}) { 3076 {bool newline: true}) {
3079 _append(new InstanceRefElement(isolate, ref, instances, queue: app.queue)); 3077 _append(new InstanceRefElement(isolate, ref, objects, queue: app.queue));
3080 if (newline) { 3078 if (newline) {
3081 this.newline(); 3079 this.newline();
3082 } 3080 }
3083 } 3081 }
3084 3082
3085 void newline() { 3083 void newline() {
3086 _append(new BRElement()); 3084 _append(new BRElement());
3087 } 3085 }
3088 3086
3089 void clear() { 3087 void clear() {
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
3345 ..setAttribute('height', '24') 3343 ..setAttribute('height', '24')
3346 ..children = [ 3344 ..children = [
3347 new PathElement() 3345 new PathElement()
3348 ..setAttribute( 3346 ..setAttribute(
3349 'd', 3347 'd',
3350 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 ' 3348 'M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 '
3351 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 ' 3349 '10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 '
3352 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 ' 3350 '0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 '
3353 '9h2V7h-2v2z') 3351 '9h2V7h-2v2z')
3354 ]; 3352 ];
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/context_view.dart ('k') | runtime/observatory/lib/src/elements/eval_box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698