Bug 1299694 - Ensure we don't enable Widevine unintentionally. r?glandium draft
authorChris Pearce <cpearce@mozilla.com>
Mon, 05 Sep 2016 13:54:37 +1200
changeset 410810 4f48c01680bac4b19ca3fde75cd296c39cb0f6a6
parent 409737 dbe4b47941c7b3d6298a0ead5e40dd828096c808
child 530602 3cf36d486a54ed2662d773377c33a51696635b3f
push id28761
push usercpearce@mozilla.com
push dateTue, 06 Sep 2016 22:43:15 +0000
reviewersglandium
bugs1299694
milestone51.0a1
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 '