Chromium Code Reviews| Index: pkg/analysis_server/lib/src/channel.dart |
| diff --git a/pkg/analysis_server/lib/src/channel.dart b/pkg/analysis_server/lib/src/channel.dart |
| index 7ffec7044833e2722daf9ee10dc2c34611357301..2a3dd9385a56ad6c483a58042b058b3aff5bb43e 100644 |
| --- a/pkg/analysis_server/lib/src/channel.dart |
| +++ b/pkg/analysis_server/lib/src/channel.dart |
| @@ -202,7 +202,7 @@ class ByteStreamClientChannel implements ClientCommunicationChannel { |
| @override |
| Future close() { |
| - // TODO: implement close |
| + return output.close(); |
| } |
| @override |
| @@ -279,7 +279,12 @@ class ByteStreamServerChannel implements ServerCommunicationChannel { |
| */ |
| class JsonStreamDecoder extends Converter<String, Map> { |
| @override |
| - Map convert(String text) => JSON.decode(text); |
| + Map convert(String text) { |
| + if (text == null || text.isEmpty || text[0] != '{') { |
|
Paul Berry
2014/05/16 18:01:27
Is this an intentional part of the CL? What's the
danrubel
2014/05/19 17:32:25
This is to allow stack traces from the analysis se
|
| + return null; |
| + } |
| + return JSON.decode(text); |
| + } |
| @override |
| ChunkedConversionSink startChunkedConversion(Sink sink) => |