Bug 1264566 - Part 2: Refactor all usage of FileDescriptor. r=valentin

Callers should use a UniquePtr to hold the platform handle.

MozReview-Commit-ID: 6BWnyAf4b3a
This commit is contained in:
Wei-Cheng Pan
2016-05-27 16:12:51 +08:00
parent ef8b9aa141
commit a87ccbfa5e
13 changed files with 29 additions and 36 deletions

View File

@@ -1914,9 +1914,9 @@ PluginModuleParent::RecvBackUpXResources(const FileDescriptor& aXSocketFd)
#else
MOZ_ASSERT(0 > mPluginXSocketFdDup.get(),
"Already backed up X resources??");
mPluginXSocketFdDup.forget();
if (aXSocketFd.IsValid()) {
mPluginXSocketFdDup.reset(aXSocketFd.PlatformHandle());
auto rawFD = aXSocketFd.ClonePlatformHandle();
mPluginXSocketFdDup.reset(rawFD.release());
}
#endif
return true;