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

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

Issue 995883002: Yesterday's deadlock fix was wrong. It could drop notifications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/message_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:html'; 8 import 'dart:html';
9 import 'observatory_element.dart'; 9 import 'observatory_element.dart';
10 import 'package:observatory/cli.dart'; 10 import 'package:observatory/cli.dart';
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (args.length < 1) { 113 if (args.length < 1) {
114 debugger.console.print('print expects arguments'); 114 debugger.console.print('print expects arguments');
115 return new Future.value(null); 115 return new Future.value(null);
116 } 116 }
117 var expr = args.join(''); 117 var expr = args.join('');
118 return debugger.isolate.evalFrame(debugger.currentFrame, expr) 118 return debugger.isolate.evalFrame(debugger.currentFrame, expr)
119 .then((response) { 119 .then((response) {
120 if (response is DartError) { 120 if (response is DartError) {
121 debugger.console.print(response.message); 121 debugger.console.print(response.message);
122 } else { 122 } else {
123 ServiceMap instance = response;
124 debugger.console.print('= ', newline:false); 123 debugger.console.print('= ', newline:false);
125 debugger.console.printRef(instance); 124 debugger.console.printRef(response);
126 } 125 }
127 }); 126 });
128 } 127 }
129 128
130 String helpShort = 'Evaluate and print an expression in the current frame'; 129 String helpShort = 'Evaluate and print an expression in the current frame';
131 130
132 String helpLong = 131 String helpLong =
133 'Evaluate and print an expression in the current frame.\n' 132 'Evaluate and print an expression in the current frame.\n'
134 '\n' 133 '\n'
135 'Syntax: print <expression>\n' 134 'Syntax: print <expression>\n'
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 var span = new SpanElement(); 1268 var span = new SpanElement();
1270 span.classes.add('bold'); 1269 span.classes.add('bold');
1271 span.appendText(line); 1270 span.appendText(line);
1272 if (newline) { 1271 if (newline) {
1273 span.appendText('\n'); 1272 span.appendText('\n');
1274 } 1273 }
1275 $['consoleText'].children.add(span); 1274 $['consoleText'].children.add(span);
1276 span.scrollIntoView(); 1275 span.scrollIntoView();
1277 } 1276 }
1278 1277
1279 void printRef(ServiceMap ref, { bool newline:true }) { 1278 void printRef(Instance ref, { bool newline:true }) {
1280 var refElement = new Element.tag('instance-ref'); 1279 var refElement = new Element.tag('instance-ref');
1281 refElement.ref = ref; 1280 refElement.ref = ref;
1282 $['consoleText'].children.add(refElement); 1281 $['consoleText'].children.add(refElement);
1283 if (newline) { 1282 if (newline) {
1284 this.newline(); 1283 this.newline();
1285 } 1284 }
1286 refElement.scrollIntoView(); 1285 refElement.scrollIntoView();
1287 } 1286 }
1288 1287
1289 void newline() { 1288 void newline() {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 default: 1346 default:
1348 busy = false; 1347 busy = false;
1349 break; 1348 break;
1350 } 1349 }
1351 }); 1350 });
1352 } 1351 }
1353 1352
1354 DebuggerInputElement.created() : super.created(); 1353 DebuggerInputElement.created() : super.created();
1355 } 1354 }
1356 1355
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698