Bug 1417005 - [Mac] Respect MOZ_DISABLE_GMP_SANDBOX r?cpearce r?alex_gaynor
Respect MOZ_DISABLE_GMP_SANDBOX so that the GMP sandbox
can be disabled from the command line.
MozReview-Commit-ID: HLHQ6ImrzGe
--- a/dom/media/gmp/GMPLoader.cpp
+++ b/dom/media/gmp/GMPLoader.cpp
@@ -84,17 +84,18 @@ private:
};
bool
GMPLoader::Load(const char* aUTF8LibPath,
uint32_t aUTF8LibPathLen,
const GMPPlatformAPI* aPlatformAPI,
GMPAdapter* aAdapter)
{
- if (mSandboxStarter && !mSandboxStarter->Start(aUTF8LibPath)) {
+ if (!getenv("MOZ_DISABLE_GMP_SANDBOX") && mSandboxStarter &&
+ !mSandboxStarter->Start(aUTF8LibPath)) {
return false;
}
// Load the GMP.
PRLibSpec libSpec;
#ifdef XP_WIN
int pathLen = MultiByteToWideChar(CP_UTF8, 0, aUTF8LibPath, -1, nullptr, 0);
if (pathLen == 0) {