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

Unified Diff: runtime/bin/eventhandler_macos.cc

Issue 12316036: Merge IO v2 branch to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r18818 Created 7 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 | « runtime/bin/eventhandler_linux.cc ('k') | runtime/bin/eventhandler_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_macos.cc
diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
index fac8941cc34311934b2e56a04e82ddc22ca97946..c884e587557fdf0e6b765b3b0bcc33bed2c108bd 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -227,9 +227,13 @@ void EventHandlerImplementation::HandleInterruptFd() {
socket_map_.Remove(GetHashmapKeyFromFd(fd), GetHashmapHashFromFd(fd));
delete sd;
} else {
- // Setup events to wait for.
- sd->SetPortAndMask(msg.dart_port, msg.data);
- UpdateKqueue(kqueue_fd_, sd);
+ if ((msg.data & (1 << kInEvent)) != 0 && sd->IsClosedRead()) {
+ DartUtils::PostInt32(msg.dart_port, 1 << kCloseEvent);
+ } else {
+ // Setup events to wait for.
+ sd->SetPortAndMask(msg.dart_port, msg.data);
+ UpdateKqueue(kqueue_fd_, sd);
+ }
}
}
}
« no previous file with comments | « runtime/bin/eventhandler_linux.cc ('k') | runtime/bin/eventhandler_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698