Bug 1524049 - pref on Vorbis decoding on RDD for Windows. r=drno

Also, make sure it is disabled for MinGW builds because of Bug
1597408.

Differential Revision: https://phabricator.services.mozilla.com/D53286

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Michael Froman 2019-11-22 20:49:14 +00:00
Родитель 27eb092aff
Коммит 842fad844f
3 изменённых файлов: 21 добавлений и 0 удалений

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

@ -44,9 +44,17 @@ bool RemoteDecoderModule::SupportsMimeType(
supports |= AOMDecoder::IsAV1(aMimeType);
}
#endif
#if !defined(__MINGW32__)
// We can't let RDD handle the decision to support Vorbis decoding on
// MinGW builds because of Bug 1597408 (Vorbis decoding on RDD causing
// sandboxing failure on MinGW-clang). Typically this would be dealt
// with using defines in StaticPrefList.yaml, but we must handle it
// here because of Bug 1598426 (the __MINGW32__ define isn't supported
// in StaticPrefList.yaml).
if (StaticPrefs::media_rdd_vorbis_enabled()) {
supports |= VorbisDataDecoder::IsVorbis(aMimeType);
}
#endif
if (StaticPrefs::media_rdd_wav_enabled()) {
supports |= WaveDataDecoder::IsWave(aMimeType);
}

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

@ -24,11 +24,22 @@ bool AgnosticDecoderModule::SupportsMimeType(
const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics) const {
bool supports =
VPXDecoder::IsVPX(aMimeType) || TheoraDecoder::IsTheora(aMimeType);
#if defined(__MINGW32__)
// If this is a MinGW build we need to force AgnosticDecoderModule to
// handle the decision to support Vorbis decoding (instead of
// RDD/RemoteDecoderModule) because of Bug 1597408 (Vorbis decoding on
// RDD causing sandboxing failure on MinGW-clang). Typically this
// would be dealt with using defines in StaticPrefList.yaml, but we
// must handle it here because of Bug 1598426 (the __MINGW32__ define
// isn't supported in StaticPrefList.yaml).
supports |= VorbisDataDecoder::IsVorbis(aMimeType);
#else
if (!StaticPrefs::media_rdd_vorbis_enabled() ||
!StaticPrefs::media_rdd_process_enabled() ||
!BrowserTabsRemoteAutostart()) {
supports |= VorbisDataDecoder::IsVorbis(aMimeType);
}
#endif
if (!StaticPrefs::media_rdd_wav_enabled() ||
!StaticPrefs::media_rdd_process_enabled() ||
!BrowserTabsRemoteAutostart()) {

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

@ -5811,6 +5811,8 @@
value: true
#elif defined(XP_MACOSX)
value: true
#elif defined(XP_WIN) && !defined(_ARM64_)
value: true
#else
value: false
#endif