Bug 1299694 - Ensure we don't enable Widevine unintentionally. r?glandium
On FreeBSD the target.kernel etc checks in enable_eme are failing,
but we're still falling through to |return value|, and so Widevine
is being enabled. If we remove the |return value| from enable_eme
we at least make Widevine disabled where it's not supposed to be
enabled.
MozReview-Commit-ID: D1h0IUidxhv
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -361,17 +361,18 @@ def enable_eme(value, target):
# Widevine EME by default enabled on desktop Windows, MacOS and Linux,
# x86 and x64 builds.
if (target.kernel in ('Darwin', 'WINNT', 'Linux') and
target.os not in ('Android', 'iOS') and
target.cpu in ('x86', 'x86_64')):
return value
elif value and value.origin != 'default':
die('%s is not supported on %s' % (value.format('--enable-eme'), target.alias))
- return value
+ # Return the same type of OptionValue (Positive or Negative), with an empty tuple.
+ return value.__class__(())
@depends(enable_eme, fmp4)
def eme(value, fmp4):
enabled = bool(value)
if value.origin == 'default':
enabled = enabled or fmp4
if enabled and not fmp4:
die('Encrypted Media Extension support requires '