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

Side by Side Diff: runtime/bin/socket_impl.dart

Issue 10441078: Add test that passes invalid arguments to socket methods and fix (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 5
6 class _SocketBase { 6 class _SocketBase {
7 // Bit flags used when communicating between the eventhandler and 7 // Bit flags used when communicating between the eventhandler and
8 // dart code. The EVENT flags are used to indicate events of 8 // dart code. The EVENT flags are used to indicate events of
9 // interest when sending a message from dart code to the 9 // interest when sending a message from dart code to the
10 // eventhandler. When receiving a message from the eventhandler the 10 // eventhandler. When receiving a message from the eventhandler the
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 doReportError(new Exception("Unknown error")); 218 doReportError(new Exception("Unknown error"));
219 break; 219 break;
220 } 220 }
221 } else { 221 } else {
222 doReportError(new SocketIOException(message)); 222 doReportError(new SocketIOException(message));
223 } 223 }
224 } 224 }
225 225
226 int hashCode() => _hashCode; 226 int hashCode() => _hashCode;
227 227
228 bool _propagateError(Exception e) => null; 228 bool _propagateError(Exception e) => false;
229 229
230 abstract bool _isListenSocket(); 230 abstract bool _isListenSocket();
231 abstract bool _isPipe(); 231 abstract bool _isPipe();
232 232
233 // Socket id is set from native. -1 indicates that the socket was closed. 233 // Socket id is set from native. -1 indicates that the socket was closed.
234 int _id; 234 int _id;
235 235
236 // Dedicated ReceivePort for socket events. 236 // Dedicated ReceivePort for socket events.
237 ReceivePort _handler; 237 ReceivePort _handler;
238 238
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 bool _seenFirstOutEvent = false; 585 bool _seenFirstOutEvent = false;
586 bool _pipe = false; 586 bool _pipe = false;
587 Function _clientConnectHandler; 587 Function _clientConnectHandler;
588 Function _clientWriteHandler; 588 Function _clientWriteHandler;
589 SocketInputStream _inputStream; 589 SocketInputStream _inputStream;
590 SocketOutputStream _outputStream; 590 SocketOutputStream _outputStream;
591 String _remoteHost; 591 String _remoteHost;
592 int _remotePort; 592 int _remotePort;
593 static SendPort _socketService; 593 static SendPort _socketService;
594 } 594 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698