Chromium Code Reviews| Index: tests/standalone/debugger/debug_lib.dart |
| =================================================================== |
| --- tests/standalone/debugger/debug_lib.dart (revision 20873) |
| +++ tests/standalone/debugger/debug_lib.dart (working copy) |
| @@ -154,11 +154,6 @@ |
| } |
| -class Matcher { |
| - void match(Debugger debugger); |
| -} |
| - |
| - |
| class Command { |
| var template; |
| @@ -429,10 +424,9 @@ |
| void openConnection() { |
| Socket.connect("127.0.0.1", portNumber).then((s) { |
|
kustermann
2013/04/04 11:41:39
Although I really hate putting in sleep's in tests
hausner
2013/04/04 15:12:05
I agree but couldn't figure out how to add a sleep
|
| - socket = s; |
| - var stringStream = socket.transform(new StringDecoder()); |
| - stringStream.listen( |
| - (str) { |
| + this.socket = s; |
| + var stringStream = socket.transform(new StringDecoder()); |
| + stringStream.listen((str) { |
| try { |
| responses.append(str); |
| handleMessages(); |
| @@ -449,6 +443,10 @@ |
| print("Error '$e' detected in input stream from debug target"); |
| close(killDebugee: true); |
| }); |
| + }, |
| + onError: (asyncErr) { |
| + print("Error while connecting to debugee: $asyncErr"); |
| + close(killDebugee: true); |
| }); |
|
kustermann
2013/04/04 11:41:39
I think there is a bug here: If we were not able t
hausner
2013/04/04 15:12:05
I had this at one point and then removed it again.
|
| } |
| @@ -456,7 +454,7 @@ |
| if (errorsDetected) { |
| for (int i = 0; i < errors.length; i++) print(errors[i]); |
| } |
| - socket.close(); |
| + if (socket != null) socket.close(); |
|
Tom Ball
2013/04/03 21:22:26
Braces surrounding socket.close()? I don't know if
hausner
2013/04/04 15:12:05
I've seen both kinds of formatting in Dart code. (
|
| if (killDebugee) { |
| targetProcess.kill(); |
| print("Target process killed"); |