Bug 1417005 - [Mac] Respect MOZ_DISABLE_GMP_SANDBOX r?cpearce r?alex_gaynor draft
authorHaik Aftandilian <haftandilian@mozilla.com>
Wed, 24 Jan 2018 16:11:21 -0800
changeset 724466 93559c3896e8c6e2db1997ea9a0b53184d2f5876
parent 724334 b757480398e3f0d9720ab845e9f10fb70a794d77
child 747155 e263528cc79e196e0ebbe983e5c4c0b5ac085f0b
push id96751
push userhaftandilian@mozilla.com
push dateThu, 25 Jan 2018 00:15:27 +0000
reviewerscpearce, alex_gaynor
bugs1417005
milestone60.0a1
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
dom/media/gmp/GMPLoader.cpp
--- 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) {