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

Unified Diff: runtime/bin/http_impl.dart

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index c8394a74a6811a19bbf75207b0d45343f4d7a8dd..db2ceca28e7401f6416b96ec5ea79afff22d8d80 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -1202,8 +1202,8 @@ class _HttpOutputStream extends _BaseOutputStream implements OutputStream {
class _HttpConnectionBase {
_HttpConnectionBase() : _sendBuffers = new Queue(),
- _httpParser = new _HttpParser() {
- _hashCode = _nextHashCode;
+ _httpParser = new _HttpParser(),
+ hashCode = _nextHashCode {
_nextHashCode = (_nextHashCode + 1) & 0xFFFFFFF;
}
@@ -1307,8 +1307,6 @@ class _HttpConnectionBase {
}
}
- int hashCode() => _hashCode;
-
Socket _socket;
bool _closing = false; // Is the socket closed by the client?
bool _error = false; // Is the socket closed due to an error?
@@ -1319,7 +1317,7 @@ class _HttpConnectionBase {
Function onDetach;
// Hash code for HTTP connection. Currently this is just a counter.
- int _hashCode;
+ final int hashCode;
static int _nextHashCode = 0;
}
@@ -1964,7 +1962,7 @@ class _SocketConnection {
Duration _idleTime(Date now) => now.difference(_returnTime);
- int hashCode() => _socket.hashCode();
+ int get hashCode => _socket.hashCode;
String _host;
int _port;

Powered by Google App Engine
This is Rietveld 408576698