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

Unified Diff: mojo/system/raw_channel_posix.cc

Issue 257623003: Mojo: Add RawChannel tests for calling Shutdown() from OnReadMessage()/OnFatalError(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 6 years, 8 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 | « mojo/system/raw_channel.cc ('k') | mojo/system/raw_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/raw_channel_posix.cc
diff --git a/mojo/system/raw_channel_posix.cc b/mojo/system/raw_channel_posix.cc
index 2b1a3582f86e439979635ff64fc9e3f30701daab..cebbc9d495642ce48ab1e6abe03be0d7ce8834fb 100644
--- a/mojo/system/raw_channel_posix.cc
+++ b/mojo/system/raw_channel_posix.cc
@@ -111,8 +111,7 @@ RawChannel::IOResult RawChannelPosix::Read(size_t* bytes_read) {
// |read_result == 0| means "end of file".
if (read_result == 0 || (errno != EAGAIN && errno != EWOULDBLOCK)) {
- if (read_result != 0)
- PLOG(ERROR) << "read";
+ PLOG_IF(ERROR, read_result != 0) << "read";
// Make sure that |OnFileCanReadWithoutBlocking()| won't be called again.
read_watcher_.reset();
@@ -174,8 +173,7 @@ RawChannel::IOResult RawChannelPosix::WriteNoLock(size_t* bytes_written) {
}
if (errno != EAGAIN && errno != EWOULDBLOCK) {
- PLOG(ERROR) << "write of size "
- << write_buffer_no_lock()->GetTotalBytesToWrite();
+ PLOG(ERROR) << "write";
return IO_FAILED;
}
« no previous file with comments | « mojo/system/raw_channel.cc ('k') | mojo/system/raw_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698