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

Unified Diff: runtime/bin/eventhandler_android.cc

Issue 22901017: Always initialize the EventHandler in the standalone. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify impl and don't call Stop (other isolates may still be running). Created 7 years, 4 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
Index: runtime/bin/eventhandler_android.cc
diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc
index 90f94b41be3fd8c69a3a82ffa70e3beafa0daf9e..975a6d1f5290739888a0a41e3a96c11d95dfd51e 100644
--- a/runtime/bin/eventhandler_android.cc
+++ b/runtime/bin/eventhandler_android.cc
@@ -160,6 +160,9 @@ void EventHandlerImplementation::WakeupHandler(intptr_t id,
msg.id = id;
msg.dart_port = dart_port;
msg.data = data;
+ // WriteToBlocking will write up to 512 bytes atomically, and since our msg
+ // is smaller than 512, we don't need a thread lock.
+ // See: http://linux.die.net/man/7/pipe, section 'Pipe_buf'.
intptr_t result =
FDUtils::WriteToBlocking(interrupt_fds_[1], &msg, kInterruptMessageSize);
if (result != kInterruptMessageSize) {

Powered by Google App Engine
This is Rietveld 408576698