Bug 1299694 - Ensure we don't enable Widevine unintentionally. r=glandium
authorChris Pearce <cpearce@mozilla.com>
Mon, 05 Sep 2016 13:54:37 +1200
changeset 315843 7f7c7197e8ea6311df402e2bf32506f530f59399
parent 315842 56055d850969c7ce96aeb988079c8685428172f5
child 315844 3caff20982f80d8649e8c399c3a392a0b623c813
push id82292
push usercpearce@mozilla.com
push dateThu, 29 Sep 2016 21:47:31 +0000
treeherdermozilla-inbound@7f7c7197e8ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1299694
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
toolkit/moz.configure
--- 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 '