fix the 'dart:profiler' bug

...by requiring a new version of analyzer.

Also, when the subprocess is terminated unexpectedly, report the actual
problem in more detail.
This commit is contained in:
Hixie
2015-11-02 13:09:55 -08:00
parent 5978f1355d
commit 466a91ab41
4 changed files with 15 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ class JSONSocket {
final WebSocket _socket;
final Stream stream;
final Future unusualTermination;
final Future<String> unusualTermination;
void send(dynamic data) {
_socket.add(JSON.encode(data));

View File

@@ -90,7 +90,7 @@ void main() {
''');
Completer<Iterable<RemoteTest>> completer = new Completer<Iterable<RemoteTest>>();
Completer deathCompleter = new Completer();
Completer<String> deathCompleter = new Completer();
Process process = await _startProcess(
listenerFile.path,
@@ -139,7 +139,7 @@ void main() {
if (kExpectAllTestsToCloseCleanly && output != '')
print('Unexpected failure after test claimed to pass:\n$output');
}
deathCompleter.complete();
deathCompleter.complete(output);
} catch (e) {
// Throwing inside this block causes all kinds of hard-to-debug issues
// like stack overflows and hangs. So catch everything just in case.

View File

@@ -53,8 +53,9 @@ class RemoteTest extends Test {
}
});
_socket.unusualTermination.then((_) {
_socket.unusualTermination.then((String message) {
if (subscription != null) {
controller.print('Unexpected subprocess termination: $message');
controller.addError(new Exception('Unexpected subprocess termination.'), new Trace.current());
controller.setState(new State(Status.complete, Result.error));
subscription.cancel();