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

Unified Diff: runtime/bin/socket_fuchsia.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_android.cc ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_fuchsia.cc
diff --git a/runtime/bin/socket_fuchsia.cc b/runtime/bin/socket_fuchsia.cc
index 5ea7f5207a7c8965fdff6c1a10df2605da065d36..0ecae8e4fd638a23e4d9e277ddf1024b1b57743a 100644
--- a/runtime/bin/socket_fuchsia.cc
+++ b/runtime/bin/socket_fuchsia.cc
@@ -72,6 +72,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 Fuchsia.
return true;
« no previous file with comments | « runtime/bin/socket_android.cc ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698