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

Side by Side Diff: tools/ddbg.dart

Issue 85003003: Fix ddbg completers (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | « no previous file | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Simple interactive debugger shell that connects to the Dart VM's debugger 5 // Simple interactive debugger shell that connects to the Dart VM's debugger
6 // connection port. 6 // connection port.
7 7
8 import "dart:convert"; 8 import "dart:convert";
9 import "dart:io"; 9 import "dart:io";
10 import "dart:async"; 10 import "dart:async";
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 80
81 void quitShell() { 81 void quitShell() {
82 vmSubscription.cancel(); 82 vmSubscription.cancel();
83 vmSock.close(); 83 vmSock.close();
84 cmdo.done(); 84 cmdo.done();
85 } 85 }
86 86
87 87
88 Future sendCmd(Map<String, dynamic> cmd) { 88 Future sendCmd(Map<String, dynamic> cmd) {
89 var completer = new Completer(); 89 var completer = new Completer.sync();
90 int id = cmd["id"]; 90 int id = cmd["id"];
91 outstandingCommands[id] = completer; 91 outstandingCommands[id] = completer;
92 if (verbose) { 92 if (verbose) {
93 print("sending: '${JSON.encode(cmd)}'"); 93 print("sending: '${JSON.encode(cmd)}'");
94 } 94 }
95 vmSock.write(JSON.encode(cmd)); 95 vmSock.write(JSON.encode(cmd));
96 return completer.future; 96 return completer.future;
97 } 97 }
98 98
99 99
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 print('Program exited with code $exitCode.'); 837 print('Program exited with code $exitCode.');
838 } 838 }
839 }); 839 });
840 840
841 debuggerMain(); 841 debuggerMain();
842 }); 842 });
843 } else { 843 } else {
844 debuggerMain(); 844 debuggerMain();
845 } 845 }
846 } 846 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698