Backed out changeset e79ca6ca1173 (bug 1040905) for conflicting with the merge from mozilla-central CLOSED TREE

This commit is contained in:
Wes Kocher 2014-08-08 14:14:36 -07:00
parent 73c19b3d60
commit 8052eccfc5
2 changed files with 6 additions and 7 deletions

View File

@ -77,8 +77,7 @@ GMPChild::LoadPluginLibrary(const std::string& aPluginPath)
nsDependentCString pluginPath(aPluginPath.c_str());
nsCOMPtr<nsIFile> libFile;
nsresult rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(pluginPath),
true, getter_AddRefs(libFile));
nsresult rv = NS_NewNativeLocalFile(pluginPath, true, getter_AddRefs(libFile));
if (NS_FAILED(rv)) {
return false;
}
@ -100,16 +99,16 @@ GMPChild::LoadPluginLibrary(const std::string& aPluginPath)
#endif
libFile->AppendRelativePath(binaryName);
#if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
nsAutoCString nativePath;
libFile->GetNativePath(nativePath);
#if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
// Enable sandboxing here -- we know the plugin file's path, but
// this process's execution hasn't been affected by its content yet.
mozilla::SetMediaPluginSandbox(nativePath.get());
#endif
libFile->Load(&mLib);
mLib = PR_LoadLibrary(nativePath.get());
if (!mLib) {
return false;
}

View File

@ -117,14 +117,14 @@ GMPParent::LoadProcess()
MOZ_ASSERT(GMPThread() == NS_GetCurrentThread());
MOZ_ASSERT(mState == GMPStateNotLoaded);
nsAutoString path;
if (NS_FAILED(mDirectory->GetPath(path))) {
nsAutoCString path;
if (NS_FAILED(mDirectory->GetNativePath(path))) {
return NS_ERROR_FAILURE;
}
LOGD(("%s::%s: %p for %s", __CLASS__, __FUNCTION__, this, path.get()));
if (!mProcess) {
mProcess = new GMPProcessParent(NS_ConvertUTF16toUTF8(path).get());
mProcess = new GMPProcessParent(path.get());
if (!mProcess->Launch(30 * 1000)) {
mProcess->Delete();
mProcess = nullptr;