Bug 778382: Don't put anonymous sockets in the PipeMap because they can collide. r=bent

This commit is contained in:
Chris Jones 2012-08-07 16:29:32 -07:00
parent b3755edbdc
commit 852ef27807

View File

@ -336,7 +336,9 @@ bool Channel::ChannelImpl::CreatePipe(const std::wstring& channel_id,
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);