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

Issue 182903005: split client and server channels (Closed)

Created:
6 years, 9 months ago by danrubel
Modified:
6 years, 9 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 10

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+421 lines, -41 lines) Patch
M pkg/analysis_server/lib/http_server.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analysis_server/lib/src/analysis_manager.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analysis_server/lib/src/analysis_server.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analysis_server/lib/src/channel.dart View 4 chunks +101 lines, -19 lines 0 comments Download
M pkg/analysis_server/lib/src/protocol.dart View 8 chunks +74 lines, -9 lines 0 comments Download
A pkg/analysis_server/test/channel_test.dart View 1 1 chunk +105 lines, -0 lines 0 comments Download
M pkg/analysis_server/test/mocks.dart View 1 chunk +26 lines, -6 lines 0 comments Download
M pkg/analysis_server/test/protocol_test.dart View 4 chunks +111 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
danrubel
6 years, 9 months ago (2014-02-27 18:21:57 UTC) #1
Brian Wilkerson
LGTM https://codereview.chromium.org/182903005/diff/1/pkg/analysis_server/lib/src/protocol.dart File pkg/analysis_server/lib/src/protocol.dart (right): https://codereview.chromium.org/182903005/diff/1/pkg/analysis_server/lib/src/protocol.dart#newcode78 pkg/analysis_server/lib/src/protocol.dart:78: var params = result[Request.PARAMS]; Why did you remove ...
6 years, 9 months ago (2014-02-27 19:06:01 UTC) #2
danrubel
https://codereview.chromium.org/182903005/diff/1/pkg/analysis_server/lib/src/protocol.dart File pkg/analysis_server/lib/src/protocol.dart (right): https://codereview.chromium.org/182903005/diff/1/pkg/analysis_server/lib/src/protocol.dart#newcode78 pkg/analysis_server/lib/src/protocol.dart:78: var params = result[Request.PARAMS]; On 2014/02/27 19:06:02, Brian Wilkerson ...
6 years, 9 months ago (2014-02-27 20:21:14 UTC) #3
danrubel
Committed patchset #2 manually as r33131 (presubmit successful).
6 years, 9 months ago (2014-02-27 20:23:44 UTC) #4
Brian Wilkerson
6 years, 9 months ago (2014-02-27 21:12:40 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/182903005/diff/1/pkg/analysis_server/lib/src/...
File pkg/analysis_server/lib/src/protocol.dart (right):

https://codereview.chromium.org/182903005/diff/1/pkg/analysis_server/lib/src/...
pkg/analysis_server/lib/src/protocol.dart:78: var params =
result[Request.PARAMS];
> Given valid but inappropriate JSON from the client, this could be a String.

Ah. Then we should probably be checking the type of everything else as well.
That is, the code should read

  String id = getString(result, Request.ID);

where getString will get the property and throw an exception if it's not a
string. The exception should then be caught and an invalid request response
should be returned to the client.

https://codereview.chromium.org/182903005/diff/1/pkg/analysis_server/lib/src/...
pkg/analysis_server/lib/src/protocol.dart:436: if (data != null) {
We're not checking here to ensure that data is a Map.

Powered by Google App Engine
This is Rietveld 408576698