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