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

Unified Diff: dart/runtime/bin/socket_patch.dart

Issue 900363004: Introduce a kSetEventMaskCommand, some cleanups in windows eventhandler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 5 years, 10 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 | « dart/runtime/bin/eventhandler_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/bin/socket_patch.dart
diff --git a/dart/runtime/bin/socket_patch.dart b/dart/runtime/bin/socket_patch.dart
index c2cc58705509374020f048e7184231d4c045c3e2..3983f2428e3636f27e86e1a0c578630d5ba660cb 100644
--- a/dart/runtime/bin/socket_patch.dart
+++ b/dart/runtime/bin/socket_patch.dart
@@ -238,8 +238,9 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
// The lower bits of RETURN_TOKEN_COMMAND messages contains the number
// of tokens returned.
static const int RETURN_TOKEN_COMMAND = 11;
+ static const int SET_EVENT_MASK_COMMAND = 12;
static const int FIRST_COMMAND = CLOSE_COMMAND;
- static const int LAST_COMMAND = RETURN_TOKEN_COMMAND;
+ static const int LAST_COMMAND = SET_EVENT_MASK_COMMAND;
// Type flag send to the eventhandler providing additional
// information on the type of the file descriptor.
@@ -523,7 +524,9 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
_NativeSocket.normal() : typeFlags = TYPE_NORMAL_SOCKET | TYPE_TCP_SOCKET;
- _NativeSocket.listen() : typeFlags = TYPE_LISTENING_SOCKET | TYPE_TCP_SOCKET;
+ _NativeSocket.listen() : typeFlags = TYPE_LISTENING_SOCKET | TYPE_TCP_SOCKET {
+ isClosedWrite = true;
+ }
_NativeSocket.pipe() : typeFlags = TYPE_PIPE;
@@ -805,7 +808,7 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
if (write) issueWriteEvent();
if (!flagsSent && !isClosing) {
flagsSent = true;
- int flags = 0;
+ int flags = 1 << SET_EVENT_MASK_COMMAND;
if (!isClosedRead) flags |= 1 << READ_EVENT;
if (!isClosedWrite) flags |= 1 << WRITE_EVENT;
sendToEventHandler(flags);
« no previous file with comments | « dart/runtime/bin/eventhandler_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698