mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Backed out changeset e79ca6ca1173 (bug 1040905) for conflicting with the merge from mozilla-central CLOSED TREE
This commit is contained in:
parent
73c19b3d60
commit
8052eccfc5
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user