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

Side by Side Diff: sdk/lib/io/websocket_impl.dart

Issue 46663003: Fix sdk/lib/io errors found by the analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More fixes. Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 const String _webSocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; 7 const String _webSocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
8 8
9 class _WebSocketMessageType { 9 class _WebSocketMessageType {
10 static const int NONE = 0; 10 static const int NONE = 0;
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 } 891 }
892 892
893 int get readyState => _readyState; 893 int get readyState => _readyState;
894 894
895 String get extensions => null; 895 String get extensions => null;
896 String get protocol => null; 896 String get protocol => null;
897 int get closeCode => _closeCode; 897 int get closeCode => _closeCode;
898 String get closeReason => _closeReason; 898 String get closeReason => _closeReason;
899 899
900 void add(data) => _sink.add(data); 900 void add(data) => _sink.add(data);
901 void addError(error) => _sink.addError(error); 901 void addError(error, [StackTrace stackTrace]) =>
902 _sink.addError(error, stackTrace);
902 Future addStream(Stream stream) => _sink.addStream(stream); 903 Future addStream(Stream stream) => _sink.addStream(stream);
903 Future get done => _sink.done; 904 Future get done => _sink.done;
904 905
905 Future close([int code, String reason]) { 906 Future close([int code, String reason]) {
906 if (_isReservedStatusCode(code)) { 907 if (_isReservedStatusCode(code)) {
907 throw new WebSocketException("Reserved status code $code"); 908 throw new WebSocketException("Reserved status code $code");
908 } 909 }
909 if (_outCloseCode == null) { 910 if (_outCloseCode == null) {
910 _outCloseCode = code; 911 _outCloseCode = code;
911 _outCloseReason = reason; 912 _outCloseReason = reason;
(...skipping 16 matching lines...) Expand all
928 (code < WebSocketStatus.NORMAL_CLOSURE || 929 (code < WebSocketStatus.NORMAL_CLOSURE ||
929 code == WebSocketStatus.RESERVED_1004 || 930 code == WebSocketStatus.RESERVED_1004 ||
930 code == WebSocketStatus.NO_STATUS_RECEIVED || 931 code == WebSocketStatus.NO_STATUS_RECEIVED ||
931 code == WebSocketStatus.ABNORMAL_CLOSURE || 932 code == WebSocketStatus.ABNORMAL_CLOSURE ||
932 (code > WebSocketStatus.INTERNAL_SERVER_ERROR && 933 (code > WebSocketStatus.INTERNAL_SERVER_ERROR &&
933 code < WebSocketStatus.RESERVED_1015) || 934 code < WebSocketStatus.RESERVED_1015) ||
934 (code >= WebSocketStatus.RESERVED_1015 && 935 (code >= WebSocketStatus.RESERVED_1015 &&
935 code < 3000)); 936 code < 3000));
936 } 937 }
937 } 938 }
OLDNEW
« no previous file with comments | « sdk/lib/io/string_transformer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698