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

Unified Diff: runtime/bin/eventhandler_macos.cc

Issue 82903003: Correctly revert eventhandler_macos. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | no next file » | 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 964328203c3ec91a63b818812b70aa4bdccbaee3..67f5c46a1b77d5046b3a2f0ef5e5f32a2b8980be 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -339,9 +339,12 @@ void EventHandlerImplementation::HandleEvents(struct kevent* events,
interrupt_seen = true;
} else {
SocketData* sd = reinterpret_cast<SocketData*>(events[i].udata);
- RemoveFromKqueue(kqueue_fd_, sd);
intptr_t event_mask = GetEvents(events + i, sd);
if (event_mask != 0) {
+ // Unregister events for the file descriptor. Events will be
+ // registered again when the current event has been handled in
+ // Dart code.
+ RemoveFromKqueue(kqueue_fd_, sd);
Dart_Port port = sd->port();
ASSERT(port != 0);
DartUtils::PostInt32(port, event_mask);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698