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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 170863002: Revert of Fix posix IPC channel hanging problem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 | ipc/ipc_channel_posix_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.cc
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 09b72d5e1ef4e2fdc6eaaacfdc399fb3e8a27902..878853290016620a1276ce2707ed52b8a7fa7f9b 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::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 @@
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 @@
// 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;
« no previous file with comments | « no previous file | ipc/ipc_channel_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698