Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: pkg/analysis_server/lib/src/protocol.dart

Issue 185313002: restructure client api to use streams (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/channel.dart ('k') | pkg/analysis_server/test/channel_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/protocol.dart
diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
index 0d39c312dbf0a6811b826d9d7ca1661bf18ae985..9423825157d03a017efef429bc17f666308a9e62 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -265,8 +265,10 @@ class Response {
*/
factory Response.fromJson(Map<String, Object> json) {
try {
- // TODO process result
- String id = json[Response.ID];
+ var id = json[Response.ID];
+ if (id is! String) {
+ return null;
+ }
var error = json[Response.ERROR];
var result = json[Response.RESULT];
Response response;
« no previous file with comments | « pkg/analysis_server/lib/src/channel.dart ('k') | pkg/analysis_server/test/channel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698