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

Unified Diff: runtime/bin/socket.h

Issue 2791423002: [dart:io] Don't close stdin with a socket finalizer (Closed)
Patch Set: Address comments Created 3 years, 8 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.cc ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.h
diff --git a/runtime/bin/socket.h b/runtime/bin/socket.h
index 7b8a03df6f01026ecc83f5c179d4a53b40ded8f3..a34fd73585921e228659da9b65137bb819e5d183 100644
--- a/runtime/bin/socket.h
+++ b/runtime/bin/socket.h
@@ -260,6 +260,12 @@ class Socket : public ReferenceCounted<Socket> {
kReverseLookupRequest = 2,
};
+ enum SocketFinalizer {
+ kFinalizerNormal,
+ kFinalizerListening,
+ kFinalizerStdio,
+ };
+
explicit Socket(intptr_t fd);
intptr_t fd() const { return fd_; }
@@ -349,10 +355,10 @@ class Socket : public ReferenceCounted<Socket> {
static void SetSocketIdNativeField(Dart_Handle handle,
intptr_t id,
- bool listening);
+ SocketFinalizer finalizer);
static void ReuseSocketIdNativeField(Dart_Handle handle,
Socket* socket,
- bool listening);
+ SocketFinalizer finalizer);
static Socket* GetSocketIdNativeField(Dart_Handle socket);
private:
« no previous file with comments | « runtime/bin/process.cc ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698