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

Unified Diff: runtime/bin/eventhandler_win.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 | « no previous file | runtime/bin/eventhandler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_win.h
diff --git a/runtime/bin/eventhandler_win.h b/runtime/bin/eventhandler_win.h
index 6e73efe0bac1b31933b3dda279f06e6ace294ec1..93dd44c3edc2d5cf8d337b5f71bcc39ad851d34e 100644
--- a/runtime/bin/eventhandler_win.h
+++ b/runtime/bin/eventhandler_win.h
@@ -310,6 +310,22 @@ class FileHandle : public DescriptorInfoSingleMixin<Handle> {
class StdHandle : public FileHandle {
public:
+ static StdHandle* Stdin(HANDLE handle);
+
+ virtual void DoClose();
+ virtual intptr_t Write(const void* buffer, intptr_t num_bytes);
+
+ void WriteSyncCompleteAsync();
+ void RunWriteLoop();
+
+#if defined(DEBUG)
+ static StdHandle* StdinPtr() { return stdin_; }
+#endif
+
+ private:
+ static Mutex* stdin_mutex_;
+ static StdHandle* stdin_;
+
explicit StdHandle(HANDLE handle)
: FileHandle(handle),
thread_id_(Thread::kInvalidThreadId),
@@ -320,13 +336,6 @@ class StdHandle : public FileHandle {
type_ = kStd;
}
- virtual void DoClose();
- virtual intptr_t Write(const void* buffer, intptr_t num_bytes);
-
- void WriteSyncCompleteAsync();
- void RunWriteLoop();
-
- private:
ThreadId thread_id_;
HANDLE thread_handle_;
intptr_t thread_wrote_;
« no previous file with comments | « no previous file | runtime/bin/eventhandler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698