Bug 781256 - 'Share FileDescriptors across processes in preparation for OS-level sandbox'. r=khuey+cjones.

This commit is contained in:
Ben Turner
2012-08-16 00:02:32 -04:00
parent 90da3f7952
commit c8df603ac2
40 changed files with 1102 additions and 125 deletions

View File

@@ -689,9 +689,8 @@ PluginModuleParent::RecvBackUpXResources(const FileDescriptor& aXSocketFd)
#else
NS_ABORT_IF_FALSE(0 > mPluginXSocketFdDup.get(),
"Already backed up X resources??");
int fd = aXSocketFd.fd; // Copy to discard |const| qualifier
mPluginXSocketFdDup.forget();
mPluginXSocketFdDup.reset(fd);
mPluginXSocketFdDup.reset(aXSocketFd.PlatformHandle());
#endif
return true;
}