Bug 1299694 - Ensure we don't enable Widevine unintentionally. r=glandium, a=ritu
authorChris Pearce <cpearce@mozilla.com>
Mon, 05 Sep 2016 13:54:37 +1200
changeset 358163 ab649b462ad8552105bd0d43772da246b020996e
parent 358162 4631a67ac6115395aa4c2d72132b87c351e76131
child 358164 6a7bac1a09cc3208aab7c0fc0dcedb7e84cc5ffc
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, ritu
bugs1299694
milestone51.0a2
Bug 1299694 - Ensure we don't enable Widevine unintentionally. r=glandium, a=ritu 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 '