Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: mojo/system/local_data_pipe.cc

Issue 126663003: Mojo: DataPipe: Test "all or nothing" mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/system/local_data_pipe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/local_data_pipe.cc
diff --git a/mojo/system/local_data_pipe.cc b/mojo/system/local_data_pipe.cc
index 334f597f23e0db58057f3af94fc61655e01b196d..2e2395a8e7348fe3f51ed0fbc23d492c76ec20bf 100644
--- a/mojo/system/local_data_pipe.cc
+++ b/mojo/system/local_data_pipe.cc
@@ -270,7 +270,8 @@ MojoResult LocalDataPipe::ConsumerBeginReadDataImplNoLock(
if (all_or_none && *buffer_num_bytes > max_num_bytes_to_read) {
// Don't return "should wait" since you can't wait for a specified amount of
// data.
- return MOJO_RESULT_OUT_OF_RANGE;
+ return producer_open_no_lock() ? MOJO_RESULT_OUT_OF_RANGE :
+ MOJO_RESULT_FAILED_PRECONDITION;
}
// Don't go into a two-phase read if there's no data.
« no previous file with comments | « no previous file | mojo/system/local_data_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698