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

Unified Diff: runtime/bin/eventhandler_macos.cc

Issue 12334036: Add asserts to kqueue filter/events on mac. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | tests/standalone/standalone.status » ('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 c884e587557fdf0e6b765b3b0bcc33bed2c108bd..fbced64683ed5af4894d8f780354962c58a50bcb 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -273,6 +273,8 @@ intptr_t EventHandlerImplementation::GetEvents(struct kevent* event,
}
}
if (event_mask == 0) event_mask |= (1 << kInEvent);
+ } else {
+ UNREACHABLE();
}
} else {
// Prioritize data events over close and error events.
@@ -287,9 +289,7 @@ intptr_t EventHandlerImplementation::GetEvents(struct kevent* event,
}
sd->MarkClosedRead();
}
- }
-
- if (event->filter == EVFILT_WRITE) {
+ } else if (event->filter == EVFILT_WRITE) {
if ((event->flags & EV_EOF) != 0) {
if (event->fflags != 0) {
event_mask |= (1 << kErrorEvent);
@@ -304,6 +304,8 @@ intptr_t EventHandlerImplementation::GetEvents(struct kevent* event,
} else {
event_mask |= (1 << kOutEvent);
}
+ } else {
+ UNREACHABLE();
}
}
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698