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

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

Issue 304513004: Add 'owner' field to sockets, that point to a potential IO resource using that Socket. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix. Created 6 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 | « runtime/bin/vmservice/client/lib/src/elements/io_view.html ('k') | sdk/lib/io/secure_server_socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index dc2877b5532104529b91fe424a245e951e8befc8..2af9f6cb9db19e754c6efb9b330c54fa2e40c827 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -2088,6 +2088,7 @@ class _HttpServer
onCancel: close);
idleTimeout = const Duration(seconds: 120);
_servers[_serviceId] = this;
+ _serverSocket._owner = this;
}
_HttpServer.listenOn(this._serverSocket) : _closeServer = false {
@@ -2095,6 +2096,7 @@ class _HttpServer
onCancel: close);
idleTimeout = const Duration(seconds: 120);
_servers[_serviceId] = this;
+ try { _serverSocket._owner = this; } catch (_) {}
}
Duration get idleTimeout => _idleTimeout;
@@ -2461,6 +2463,7 @@ class _DetachedSocket extends Stream<List<int>> implements Socket {
}
Map _toJSON(bool ref) => _socket._toJSON(ref);
+ void set _owner(owner) { _socket._owner = owner; }
}
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/elements/io_view.html ('k') | sdk/lib/io/secure_server_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698