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

Side by Side Diff: ipc/ipc_channel_posix.cc

Issue 462021: Add paranoid logging to ChannelImpl::ProcessOutgoingMessages() to help track down bug. (Closed)
Patch Set: Created 11 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/ipc_channel_posix.h" 5 #include "ipc/ipc_channel_posix.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 // On OSX writing to a pipe with no listener returns EPERM. 818 // On OSX writing to a pipe with no listener returns EPERM.
819 if (errno == EPERM) { 819 if (errno == EPERM) {
820 Close(); 820 Close();
821 return false; 821 return false;
822 } 822 }
823 #endif // OS_MACOSX 823 #endif // OS_MACOSX
824 if (errno == EPIPE) { 824 if (errno == EPIPE) {
825 Close(); 825 Close();
826 return false; 826 return false;
827 } 827 }
828 PLOG(ERROR) << "pipe error on " << fd_written; 828 PLOG(ERROR) << "pipe error on "
829 << fd_written
830 << " Currently writing message of size:"
831 << msg->size()
832 << " msgh.msg_iovlen:"
833 << msgh.msg_iovlen
834 << " amt_to_write: "
835 << amt_to_write
836 << " num FDs to send:"
837 << msg->file_descriptor_set()->size();
829 return false; 838 return false;
830 } 839 }
831 840
832 if (static_cast<size_t>(bytes_written) != amt_to_write) { 841 if (static_cast<size_t>(bytes_written) != amt_to_write) {
833 if (bytes_written > 0) { 842 if (bytes_written > 0) {
834 // If write() fails with EAGAIN then bytes_written will be -1. 843 // If write() fails with EAGAIN then bytes_written will be -1.
835 message_send_bytes_written_ += bytes_written; 844 message_send_bytes_written_ += bytes_written;
836 } 845 }
837 846
838 // Tell libevent to call us back once things are unblocked. 847 // Tell libevent to call us back once things are unblocked.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 1028
1020 bool Channel::Send(Message* message) { 1029 bool Channel::Send(Message* message) {
1021 return channel_impl_->Send(message); 1030 return channel_impl_->Send(message);
1022 } 1031 }
1023 1032
1024 int Channel::GetClientFileDescriptor() const { 1033 int Channel::GetClientFileDescriptor() const {
1025 return channel_impl_->GetClientFileDescriptor(); 1034 return channel_impl_->GetClientFileDescriptor();
1026 } 1035 }
1027 1036
1028 } // namespace IPC 1037 } // namespace IPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698