summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_posix.cc
diff options
context:
space:
mode:
authorhubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-18 17:42:20 +0000
committerhubbe@chromium.org <hubbe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-18 17:42:20 +0000
commit13ffc273c7279bf25c3428ca6e65b755018ddb9c (patch)
treeb6b6059b2e2b33f7a6a728de0ed68330314f10af /ipc/ipc_channel_posix.cc
parent46accd1f08351756b154330cd516f4182d33a0f1 (diff)
downloadchromium_src-13ffc273c7279bf25c3428ca6e65b755018ddb9c.zip
chromium_src-13ffc273c7279bf25c3428ca6e65b755018ddb9c.tar.gz
chromium_src-13ffc273c7279bf25c3428ca6e65b755018ddb9c.tar.bz2
Revert of Fix posix IPC channel hanging problem. (https://codereview.chromium.org/150893002/)
Reason for revert: https://crash.corp.google.com/samples?q=reportid=%2702eaaf63ed6fdda9%27 https://crash.corp.google.com/samples?q=reportid=%272ac5bc4dd7c49ced%27 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. > > This is cl/30133002 + a memory leak fix. > > BUG=338709 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250964 TBR=shess@chromium.org,cpu@chromium.org,hubbe@google.com NOTREECHECKS=true NOTRY=true BUG=338709 Review URL: https://codereview.chromium.org/170863002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_posix.cc')
-rw-r--r--ipc/ipc_channel_posix.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 09b72d5..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;
}
@@ -520,18 +519,10 @@ bool Channel::ChannelImpl::Send(Message* message) {
Logging::GetInstance()->OnSendMessage(message, "");
#endif // IPC_MESSAGE_LOG_ENABLED
- if (!waiting_connect_ && pipe_ == -1) {
- delete message;
- return false;
- }
-
message->TraceMessageBegin();
output_queue_.push(message);
if (!is_blocked_on_write_ && !waiting_connect_) {
- if (!ProcessOutgoingMessages()) {
- ClosePipeOnError();
- return false;
- }
+ return ProcessOutgoingMessages();
}
return true;
@@ -716,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;