Bug 1363897 Switch legacy extensions handling to option() draft
authorAndrew Swan <aswan@mozilla.com>
Thu, 17 Aug 2017 11:48:44 -0700
changeset 648839 bcd98f9b881c5f47a0d0236d57489a6204990c93
parent 647355 9ab2470a3210324bc11320531b15d195aaf05051
child 726958 727d9780895fc5e649261b7c2ca268462bf51cf1
push id74901
push useraswan@mozilla.com
push dateFri, 18 Aug 2017 11:16:45 +0000
bugs1363897
milestone57.0a1
Bug 1363897 Switch legacy extensions handling to option() MozReview-Commit-ID: 2DquMSM1ECJ
toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -501,19 +501,27 @@ project_flag('MOZ_SERVICES_HEALTHREPORT'
 
 project_flag('MOZ_SERVICES_SYNC',
              help='Build Sync Services if required')
 
 project_flag('MOZ_ANDROID_HISTORY',
              help='Enable Android History instead of Places',
              set_as_define=True)
 
-project_flag('MOZ_ALLOW_LEGACY_EXTENSIONS',
-             help='Allow legacy browser extensions',
-             default=True, set_as_define=True)
+option('--enable-legacy-extensions',
+       default=milestone.is_nightly,
+       help='Allow legacy browser extensions')
+
+@depends('--enable-legacy-extensions')
+def legacy_extensions(value):
+    if bool(value):
+        return True
+
+set_config('MOZ_ALLOW_LEGACY_EXTENSIONS', legacy_extensions)
+set_define('MOZ_ALLOW_LEGACY_EXTENSIONS', legacy_extensions)
 
 @depends('MOZ_PLACES', 'MOZ_ANDROID_HISTORY')
 def check_places_and_android_history(places, android_history):
     if places and android_history:
         die('Cannot use MOZ_ANDROID_HISTORY alongside MOZ_PLACES.')
 
 # Permissions system
 # ==============================================================