Avoid using two-phase read with MOJO_READ_DATA_FLAG_ALL_OR_NONE.

The issue is that when we get close to the end of data pipe's buffer, the call may fail because the distance between the read cursor to the end of the buffer is smaller than the requested size. In that case, even if the buffer contains sufficient data (possible because it is circular), such a read request will never succeed.

Please see https://github.com/domokit/mojo/issues/366 for more details.

BUG=513789

Review URL: https://codereview.chromium.org/1281073003

Cr-Commit-Position: refs/heads/master@{#342626}


CrOS-Libchrome-Original-Commit: c40ee5271fa911b80341a93e318cb90df7354b51
2 files changed
tree: 3b5ef000bf1afc4a6d8b7b42e90e475e2080fba7
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/