diff options
author | hubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-30 23:00:38 +0000 |
---|---|---|
committer | hubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-30 23:00:38 +0000 |
commit | 891ccf8ab73ea3f68852b9544d2db90ad70a9d65 (patch) | |
tree | 9bbf8eb7ce7ebef34a28e72909f07c87c9e7a2db /ipc/ipc_channel_posix.cc | |
parent | 1ad2709b515a805ca6dc3a8363bd3ae3cc7432f8 (diff) | |
download | chromium_src-891ccf8ab73ea3f68852b9544d2db90ad70a9d65.zip chromium_src-891ccf8ab73ea3f68852b9544d2db90ad70a9d65.tar.gz chromium_src-891ccf8ab73ea3f68852b9544d2db90ad70a9d65.tar.bz2 |
Revert of Fix posix IPC channel hanging problem. (https://codereview.chromium.org/30133002/)
Reason for revert:
Seems to cause some leaks.
Reverting while I investigate.
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASAN%20Tests%20%282%29/builds/22398
Original issue's description:
> Fix posix IPC channel hanging problem.
>
> If a channel closes right before a send call, listeners might not be notified of
> the problem, which can cause hangs. This CL fixes that and adds a test that makes
> sure that this does not happen in the future.
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=248060
TBR=cpu@chromium.org,shess@chromium.org,hubbe@google.com
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/150883002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_posix.cc')
-rw-r--r-- | ipc/ipc_channel_posix.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc index e539d4f..8788532 100644 --- a/ipc/ipc_channel_posix.cc +++ b/ipc/ipc_channel_posix.cc @@ -31,7 +31,6 @@ #include "base/posix/global_descriptors.h" #include "base/process/process_handle.h" #include "base/rand_util.h" -#include "base/run_loop.h" #include "base/stl_util.h" #include "base/strings/string_util.h" #include "base/synchronization/lock.h" @@ -328,7 +327,7 @@ bool Channel::ChannelImpl::CreatePipe( bool Channel::ChannelImpl::Connect() { if (server_listen_pipe_ == -1 && pipe_ == -1) { - DLOG(WARNING) << "Channel creation failed: " << pipe_name_; + DLOG(INFO) << "Channel creation failed: " << pipe_name_; return false; } @@ -516,9 +515,6 @@ bool Channel::ChannelImpl::Send(Message* message) { << " with type " << message->type() << " (" << output_queue_.size() << " in queue)"; - if (!waiting_connect_ && pipe_ == -1) - return false; - #ifdef IPC_MESSAGE_LOG_ENABLED Logging::GetInstance()->OnSendMessage(message, ""); #endif // IPC_MESSAGE_LOG_ENABLED @@ -526,10 +522,7 @@ bool Channel::ChannelImpl::Send(Message* message) { message->TraceMessageBegin(); output_queue_.push(message); if (!is_blocked_on_write_ && !waiting_connect_) { - if (!ProcessOutgoingMessages()) { - ClosePipeOnError(); - return false; - } + return ProcessOutgoingMessages(); } return true; @@ -714,11 +707,7 @@ bool Channel::ChannelImpl::AcceptConnection() { // In server mode we will send a hello message when we receive one from a // client. waiting_connect_ = false; - if (!ProcessOutgoingMessages()) { - ClosePipeOnError(); - return false; - } - return true; + return ProcessOutgoingMessages(); } else if (mode_ & MODE_SERVER_FLAG) { waiting_connect_ = true; return true; |