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

Unified Diff: runtime/bin/eventhandler_android.cc

Issue 2655893002: VM eventhandler: Update epoll/kqueue even if the only event is an error (Closed)
Patch Set: No notifications on empty event mask Created 3 years, 11 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_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_android.cc
diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc
index 195d70d36b5db7792cf23158b8203b2ec7e84f2d..8ab91cd8a479644213983d53e49253bc0785f013 100644
--- a/runtime/bin/eventhandler_android.cc
+++ b/runtime/bin/eventhandler_android.cc
@@ -337,13 +337,11 @@ 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);
if ((event_mask & (1 << kErrorEvent)) != 0) {
di->NotifyAllDartPorts(event_mask);
- }
- event_mask &= ~(1 << kErrorEvent);
-
- 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);
« no previous file with comments | « no previous file | runtime/bin/eventhandler_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698