Index: runtime/bin/eventhandler.cc |
diff --git a/runtime/bin/eventhandler.cc b/runtime/bin/eventhandler.cc |
index 8de036eb8bf0acb18526cf6b6ebe847c450b67e2..3a86b2fd7c95e3b30e7d8e87ad535dbb029a4cd3 100644 |
--- a/runtime/bin/eventhandler.cc |
+++ b/runtime/bin/eventhandler.cc |
@@ -96,7 +96,12 @@ void FUNCTION_NAME(EventHandler_SendData)(Dart_NativeArguments args) { |
Dart_Port dart_port = |
DartUtils::GetIntegerField(handle, DartUtils::kIdFieldName); |
int64_t data = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2)); |
- event_handler->SendData(id, dart_port, data); |
+ if (id == kTimerId && data == 0) { |
+ // This is a 0-timer. Simply queue a 'null' on the port. |
+ DartUtils::PostNull(dart_port); |
+ } else { |
+ event_handler->SendData(id, dart_port, data); |
+ } |
} |
} // namespace bin |