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());
|
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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user