| Index: pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
|
| diff --git a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
|
| index 2ab44419a0cf7f1398373c033fe76064e915cb89..cc0274d3b2922465f7694566bda51dba38a7cbf7 100644
|
| --- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
|
| +++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
|
| @@ -103,7 +103,10 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
|
| if (_closed.isCompleted) {
|
| return;
|
| }
|
| - output.writeln(JSON.encode(notification.toJson()));
|
| + ServerCommunicationChannel.ToJson.start();
|
| + String jsonEncoding = JSON.encode(notification.toJson());
|
| + ServerCommunicationChannel.ToJson.stop();
|
| + output.writeln(jsonEncoding);
|
| }
|
|
|
| @override
|
| @@ -113,7 +116,10 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
|
| if (_closed.isCompleted) {
|
| return;
|
| }
|
| - output.writeln(JSON.encode(response.toJson()));
|
| + ServerCommunicationChannel.ToJson.start();
|
| + String jsonEncoding = JSON.encode(response.toJson());
|
| + ServerCommunicationChannel.ToJson.stop();
|
| + output.writeln(jsonEncoding);
|
| }
|
|
|
| /**
|
| @@ -127,7 +133,9 @@ class ByteStreamServerChannel implements ServerCommunicationChannel {
|
| }
|
| // Parse the string as a JSON descriptor and process the resulting
|
| // structure as a request.
|
| + ServerCommunicationChannel.FromJson.start();
|
| Request request = new Request.fromString(data);
|
| + ServerCommunicationChannel.FromJson.stop();
|
| if (request == null) {
|
| sendResponse(new Response.invalidRequestFormat());
|
| return;
|
|
|