Bug 1332530 - Don't require a SandboxStarter if MOZ_GMP_SANDBOX is not defined. r=jld

GMP gtests fail on ASAN builds now since the GMPLoader requires a sandbox
starter, and ASAN doesn't run with a GMP sandbox. So only enforce that we
need a sandbox starter if we've built with sandboxing enabled.

MozReview-Commit-ID: GptxIZ7TFIy

--HG--
extra : rebase_source : 6265f91a9c80555b63f71ac5da116450d4728df1
This commit is contained in:
Chris Pearce 2017-01-25 10:30:37 +13:00
Родитель a4fe4d518f
Коммит 21ca915169
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -350,11 +350,13 @@ GMPChild::AnswerStartPlugin(const nsString& aAdapter)
InitPlatformAPI(*platformAPI, this);
mGMPLoader = MakeUnique<GMPLoader>();
#if defined(MOZ_GMP_SANDBOX)
if (!mGMPLoader->CanSandbox()) {
LOGD("%s Can't sandbox GMP, failing", __FUNCTION__);
delete platformAPI;
return IPC_FAIL_NO_REASON(this);
}
#endif
bool isWidevine = aAdapter.EqualsLiteral("widevine");
#if defined(MOZ_GMP_SANDBOX) && defined(XP_MACOSX)