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 315929 7f7c7197e8ea6311df402e2bf32506f530f59399
parent 315928 56055d850969c7ce96aeb988079c8685428172f5
child 315930 3caff20982f80d8649e8c399c3a392a0b623c813
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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 '