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

Unified Diff: runtime/bin/socket_impl.dart

Issue 9703023: Fix some minor static type issues in dart:io implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove change to _File.openSync optional argument. Created 8 years, 9 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 | « runtime/bin/process_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index 364e5b6ac2e851bc85c1f9756fcbef827b3a36c2..1199907394097c429392d9fb27c9c588aa1fe981 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -91,7 +91,7 @@ class _SocketBase {
}
}
- void _getPort() native "Socket_GetPort";
+ int _getPort() native "Socket_GetPort";
void set onError(void callback()) {
_setHandler(_ERROR_EVENT, callback);
@@ -206,6 +206,8 @@ class _SocketBase {
// Hash code for the socket. Currently this is just a counter.
int _hashCode;
static int _nextHashCode = 0;
+ bool _closedRead = false;
+ bool _closedWrite = false;
}
@@ -216,7 +218,7 @@ class _ServerSocket extends _SocketBase implements ServerSocket {
// and port to the socket. Null is returned if file descriptor creation or
// bind failed.
factory _ServerSocket(String bindAddress, int port, int backlog) {
- ServerSocket socket = new _ServerSocket._internal();
+ _ServerSocket socket = new _ServerSocket._internal();
if (!socket._createBindListen(bindAddress, port, backlog)) {
socket.close();
return null;
@@ -261,7 +263,7 @@ class _Socket extends _SocketBase implements Socket {
// host on the given port. Null is returned if file descriptor creation
// or connect failed.
factory _Socket(String host, int port) {
- Socket socket = new _Socket._internal();
+ _Socket socket = new _Socket._internal();
if (!socket._createConnect(host, port)) {
socket.close();
return null;
@@ -270,8 +272,8 @@ class _Socket extends _SocketBase implements Socket {
}
_Socket._internal();
- _Socket._internalReadOnly() : _closedWrite = true, _pipe = true;
- _Socket._internalWriteOnly() : _closedRead = true, _pipe = true;
+ _Socket._internalReadOnly() : _pipe = true { super._closedWrite = true; }
+ _Socket._internalWriteOnly() : _pipe = true { super._closedRead = true; }
int available() {
if (_id >= 0) {
@@ -283,8 +285,6 @@ class _Socket extends _SocketBase implements Socket {
int _available() native "Socket_Available";
- bool get closed() => _closed;
-
int readList(List<int> buffer, int offset, int bytes) {
if (_id >= 0) {
if (bytes == 0) {
@@ -478,8 +478,6 @@ class _Socket extends _SocketBase implements Socket {
}
bool _seenFirstOutEvent = false;
- bool _closedRead = false;
- bool _closedWrite = false;
bool _pipe = false;
Function _clientConnectHandler;
Function _clientWriteHandler;
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698