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

Unified Diff: sdk/lib/io/websocket_impl.dart

Issue 1966373002: Revert "Fix strong mode errors in dart:io." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « sdk/lib/io/string_transformer.dart ('k') | tests/standalone/io/https_bad_certificate_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/websocket_impl.dart
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index 18d1cf22bc2407a2bce1ea4461cc9431ddebe43d..ec1320a6e6d551e0340f1bed48b68fe00314172e 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -59,7 +59,7 @@ class _CompressionMaxWindowBits {
*/
// TODO(ajohnsen): make this transformer reusable?
class _WebSocketProtocolTransformer
- implements StreamTransformer<List<int>, dynamic>, EventSink<Uint8List> {
+ implements StreamTransformer<List<int>, dynamic>, EventSink<List<int>> {
static const int START = 0;
static const int LEN_FIRST = 1;
static const int LEN_REST = 2;
@@ -1000,7 +1000,6 @@ class _WebSocketImpl extends Stream with _ServiceObject implements WebSocket {
return request.close();
}).then((response) {
-
void error(String message) {
// Flush data.
response.detachSocket().then((socket) {
@@ -1008,7 +1007,6 @@ class _WebSocketImpl extends Stream with _ServiceObject implements WebSocket {
});
throw new WebSocketException(message);
}
-
if (response.statusCode != HttpStatus.SWITCHING_PROTOCOLS ||
response.headers[HttpHeaders.CONNECTION] == null ||
!response.headers[HttpHeaders.CONNECTION]
@@ -1038,7 +1036,7 @@ class _WebSocketImpl extends Stream with _ServiceObject implements WebSocket {
_WebSocketPerMessageDeflate deflate =
negotiateClientCompression(response, compression);
- return response.detachSocket().then/*<WebSocket>*/((socket) =>
+ return response.detachSocket().then((socket) =>
new _WebSocketImpl._fromSocket(
socket, protocol, compression, false, deflate));
});
@@ -1066,7 +1064,8 @@ class _WebSocketImpl extends Stream with _ServiceObject implements WebSocket {
return DEFAULT_WINDOW_BITS;
}
- return int.parse(o, onError: (s) => DEFAULT_WINDOW_BITS);
+ o = int.parse(o, onError: (s) => DEFAULT_WINDOW_BITS);
+ return o;
}
return new _WebSocketPerMessageDeflate(
@@ -1221,7 +1220,7 @@ class _WebSocketImpl extends Stream with _ServiceObject implements WebSocket {
String get _serviceTypePath => 'io/websockets';
String get _serviceTypeName => 'WebSocket';
- Map<String, dynamic> _toJSON(bool ref) {
+ Map _toJSON(bool ref) {
var name = '${_socket.address.host}:${_socket.port}';
var r = <String, dynamic>{
'id': _servicePath,
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | tests/standalone/io/https_bad_certificate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698