Implement a MessageLoopForIO::WatchMxHandle API under Fuchsia

Desktop / Chromium - Wez [] - 10 August 2017 02:29 EDT

WatchMxHandle() follows the design of the WatchFileDescriptor() API provided by MessageLoopForIO across the POSIX platforms, and now serves as the underlying implementation for watching file-descriptors under Fuchsia.

This will be used for asynchronous I/O on native Fuchsia primitives, e.g. in the Mojo IPC implementation, which will use Fuchsia "channels".

This CL also fixes the behaviour of StopWatchingFileDescriptor() from within an event callback, and an mxio leak arising from use of that API, and pulls in sergeyu's test for StopWatchingFileDescriptor(), from

Bug: 706592, 740791 Change-Id: I675c5cfe8a443d48863361028c0f9222fdde8182 Reviewed-on: Commit-Queue: Wez

9a7c727 Implement a MessageLoopForIO::WatchMxHandle API under Fuchsia.
base/message_loop/ | 12 ++
base/message_loop/message_loop.h | 16 +-
.../message_loop/ | 107 ++++++++++--
base/message_loop/ | 181 +++++++++++++++------
base/message_loop/message_pump_fuchsia.h | 116 ++++++++-----
5 files changed, 322 insertions(+), 110 deletions(-)


  • Share