Bug 778382: Don't put anonymous sockets in the PipeMap because they can collide. r=bent
authorChris Jones <jones.chris.g@gmail.com>
Tue, 07 Aug 2012 16:29:32 -0700
changeset 101738 501ef57a8121ce78b578af8cdc7c83b4cf41772a
parent 101737 7047de4a90f25509943b6e903b4d10eda58e5eff
child 101739 ba6d6b6b58bcab5de52e73148fbdd6db84ecd226
push id23250
push useremorley@mozilla.com
push dateWed, 08 Aug 2012 16:23:03 +0000
treeherdermozilla-central@b99a81e70b06 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs778382
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 778382: Don't put anonymous sockets in the PipeMap because they can collide. r=bent
ipc/chromium/src/chrome/common/ipc_channel_posix.cc
--- a/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
+++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
@@ -331,17 +331,19 @@ bool Channel::ChannelImpl::CreatePipe(co
         HANDLE_EINTR(close(pipe_fds[0]));
         HANDLE_EINTR(close(pipe_fds[1]));
         return false;
       }
 
       pipe_ = pipe_fds[0];
       client_pipe_ = pipe_fds[1];
 
-      Singleton<PipeMap>()->Insert(pipe_name_, client_pipe_);
+      if (pipe_name_.length()) {
+        Singleton<PipeMap>()->Insert(pipe_name_, client_pipe_);
+      }
     } else {
       pipe_ = ChannelNameToClientFD(pipe_name_);
       DCHECK(pipe_ > 0);
       waiting_connect_ = false;
     }
   }
 
   // Create the Hello message to be sent when Connect is called