Bug 835038 - Ensure IPC TCP sockets always have permission checks applied. r=jduell

This commit is contained in:
Josh Matthews 2013-01-29 16:53:37 +00:00
parent e3c696fc3e
commit 9c972f6ba2

View File

@ -268,6 +268,11 @@ NeckoParent::AllocPTCPSocket(const nsString& aHost,
const nsString& aBinaryType,
PBrowserParent* aBrowser)
{
if (UsingNeckoIPCSecurity() && !aBrowser) {
printf_stderr("NeckoParent::AllocPTCPSocket: FATAL error: no browser present \
KILLING CHILD PROCESS\n");
return nullptr;
}
TCPSocketParent* p = new TCPSocketParent();
p->AddRef();
return p;