| Index: mojo/edk/system/local_data_pipe_impl.cc
|
| diff --git a/mojo/edk/system/local_data_pipe_impl.cc b/mojo/edk/system/local_data_pipe_impl.cc
|
| index 3d2e9e5f09d1fccd78cf2814eaeb48400b407322..8f878d56a4aef413e50328beb25acbc8ac21794e 100644
|
| --- a/mojo/edk/system/local_data_pipe_impl.cc
|
| +++ b/mojo/edk/system/local_data_pipe_impl.cc
|
| @@ -107,8 +107,7 @@ MojoResult LocalDataPipeImpl::ProducerWriteData(
|
|
|
| MojoResult LocalDataPipeImpl::ProducerBeginWriteData(
|
| UserPointer<void*> buffer,
|
| - UserPointer<uint32_t> buffer_num_bytes,
|
| - uint32_t min_num_bytes_to_write) {
|
| + UserPointer<uint32_t> buffer_num_bytes) {
|
| DCHECK(consumer_open());
|
|
|
| // The index we need to start writing at.
|
| @@ -116,12 +115,6 @@ MojoResult LocalDataPipeImpl::ProducerBeginWriteData(
|
| (start_index_ + current_num_bytes_) % capacity_num_bytes();
|
|
|
| size_t max_num_bytes_to_write = GetMaxNumBytesToWrite();
|
| - if (min_num_bytes_to_write > max_num_bytes_to_write) {
|
| - // Don't return "should wait" since you can't wait for a specified amount
|
| - // of data.
|
| - return MOJO_RESULT_OUT_OF_RANGE;
|
| - }
|
| -
|
| // Don't go into a two-phase write if there's no room.
|
| if (max_num_bytes_to_write == 0)
|
| return MOJO_RESULT_SHOULD_WAIT;
|
| @@ -289,16 +282,8 @@ MojoResult LocalDataPipeImpl::ConsumerQueryData(
|
|
|
| MojoResult LocalDataPipeImpl::ConsumerBeginReadData(
|
| UserPointer<const void*> buffer,
|
| - UserPointer<uint32_t> buffer_num_bytes,
|
| - uint32_t min_num_bytes_to_read) {
|
| + UserPointer<uint32_t> buffer_num_bytes) {
|
| size_t max_num_bytes_to_read = GetMaxNumBytesToRead();
|
| - if (min_num_bytes_to_read > max_num_bytes_to_read) {
|
| - // Don't return "should wait" since you can't wait for a specified amount of
|
| - // data.
|
| - return producer_open() ? MOJO_RESULT_OUT_OF_RANGE
|
| - : MOJO_RESULT_FAILED_PRECONDITION;
|
| - }
|
| -
|
| // Don't go into a two-phase read if there's no data.
|
| if (max_num_bytes_to_read == 0) {
|
| return producer_open() ? MOJO_RESULT_SHOULD_WAIT
|
|
|