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

Unified Diff: runtime/bin/eventhandler_fuchsia.cc

Issue 2635253002: VM eventhandler: Read "old" event mask before it can be modified. (Closed)
Patch Set: Revert previous changes. Read correct old_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 | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/eventhandler_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_fuchsia.cc
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc
index 667e9b05f3cdacb1db2a435e3c93f7e67fabd93c..043e95ee189326a86aad4228da8e354f53ea5246 100644
--- a/runtime/bin/eventhandler_fuchsia.cc
+++ b/runtime/bin/eventhandler_fuchsia.cc
@@ -388,8 +388,8 @@ void EventHandlerImplementation::HandleEvents(struct epoll_event* events,
} else {
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);
-
if ((event_mask & (1 << kErrorEvent)) != 0) {
di->NotifyAllDartPorts(event_mask);
}
@@ -397,7 +397,6 @@ void EventHandlerImplementation::HandleEvents(struct epoll_event* events,
LOG_INFO("HandleEvents: fd=%ld events=%ld\n", di->fd(), event_mask);
if (event_mask != 0) {
- intptr_t old_mask = di->Mask();
Dart_Port port = di->NextNotifyDartPort(event_mask);
ASSERT(port != 0);
UpdateEpollInstance(old_mask, di);
« no previous file with comments | « runtime/bin/eventhandler_android.cc ('k') | runtime/bin/eventhandler_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698