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

View File

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