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

Unified Diff: runtime/bin/socket_android.cc

Issue 2760293002: [dart:io] Adds a finalizer to _NativeSocket to avoid socket leaks (Closed)
Patch Set: Address comments Created 3 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/socket.cc ('k') | runtime/bin/socket_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_android.cc
diff --git a/runtime/bin/socket_android.cc b/runtime/bin/socket_android.cc
index f9ed3489db825b4c1442ef7dc4d0be5ddb7a9f62..b2be713480a6fda28ebc29324383aab88d156e27 100644
--- a/runtime/bin/socket_android.cc
+++ b/runtime/bin/socket_android.cc
@@ -43,6 +43,15 @@ bool Socket::FormatNumericAddress(const RawAddr& addr, char* address, int len) {
}
+Socket::Socket(intptr_t fd)
+ : ReferenceCounted(), fd_(fd), port_(ILLEGAL_PORT) {}
+
+
+void Socket::SetClosedFd() {
+ fd_ = kClosedFd;
+}
+
+
bool Socket::Initialize() {
// Nothing to do on Android.
return true;
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/bin/socket_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698