Index: runtime/bin/eventhandler_fuchsia.cc |
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc |
index 043e95ee189326a86aad4228da8e354f53ea5246..6531ce5bc6b9485be6fb3b03e99c8080d4f81039 100644 |
--- a/runtime/bin/eventhandler_fuchsia.cc |
+++ b/runtime/bin/eventhandler_fuchsia.cc |
@@ -389,14 +389,12 @@ void EventHandlerImplementation::HandleEvents(struct epoll_event* events, |
DescriptorInfo* di = |
reinterpret_cast<DescriptorInfo*>(events[i].data.ptr); |
const intptr_t old_mask = di->Mask(); |
- intptr_t event_mask = GetPollEvents(events[i].events, di); |
+ const intptr_t event_mask = GetPollEvents(events[i].events, di); |
+ LOG_INFO("HandleEvents: fd=%ld events=%ld\n", di->fd(), event_mask); |
if ((event_mask & (1 << kErrorEvent)) != 0) { |
di->NotifyAllDartPorts(event_mask); |
- } |
- event_mask &= ~(1 << kErrorEvent); |
- |
- LOG_INFO("HandleEvents: fd=%ld events=%ld\n", di->fd(), event_mask); |
- if (event_mask != 0) { |
+ UpdateEpollInstance(old_mask, di); |
+ } else if (event_mask != 0) { |
Dart_Port port = di->NextNotifyDartPort(event_mask); |
ASSERT(port != 0); |
UpdateEpollInstance(old_mask, di); |