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:
@@ -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));
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user