Bug 1523907 - Fix building the new "about:config" page on release channels. r=mak
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Sat, 02 Feb 2019 17:49:41 +0000
changeset 456695 6ac582b8f626a77e924d0465c12793a6945f09bf
parent 456694 6882b9791212ce241473249f4456c5b4f07fcba1
child 456696 042cfc69cb5f8d6ae309283d8c4a4b6686c0e4c5
push id111695
push userpaolo.mozmail@amadzone.org
push dateTue, 05 Feb 2019 12:54:32 +0000
treeherdermozilla-inbound@6ac582b8f626 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1523907
milestone67.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 1523907 - Fix building the new "about:config" page on release channels. r=mak Differential Revision: https://phabricator.services.mozilla.com/D18082
browser/app/profile/firefox.js
browser/components/moz.build
docshell/base/nsAboutRedirector.cpp
docshell/build/components.conf
docshell/moz.build
modules/libpref/init/all.js
modules/libpref/moz.build
python/mozbuild/mozbuild/mach_commands.py
testing/mozbase/mozprofile/tests/test_preferences.py
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -504,19 +504,16 @@ pref("browser.bookmarks.autoExportHTML",
 pref("browser.bookmarks.max_backups",             15);
 
 // Whether menu should close after Ctrl-click, middle-click, etc.
 pref("browser.bookmarks.openInTabClosesMenu", true);
 
 // Scripts & Windows prefs
 pref("dom.disable_open_during_load",              true);
 pref("javascript.options.showInConsole",          true);
-#ifdef DEBUG
-pref("general.warnOnAboutConfig",                 false);
-#endif
 
 // This is the pref to control the location bar, change this to true to
 // force this - this makes the origin of popup windows more obvious to avoid
 // spoofing. We would rather not do it by default because it affects UE for web
 // applications, but without it there isn't a really good way to prevent chrome
 // spoofing, see bug 337344
 pref("dom.disable_window_open_feature.location",  true);
 // allow JS to move and resize existing windows
@@ -1809,17 +1806,14 @@ pref("prio.enabled", true);
 
 // Discovery prefs
 pref("browser.discovery.enabled", true);
 pref("browser.discovery.containers.enabled", true);
 pref("browser.discovery.sites", "addons.mozilla.org");
 
 pref("browser.engagement.recent_visited_origins.expiry", 86400); // 24 * 60 * 60 (24 hours in seconds)
 
-// Show the warning page for the new about config. Will replace general.warnOnAboutConfig.
-#ifdef NIGHTLY_BUILD
 pref("browser.aboutConfig.showWarning", true);
-#endif
 
 #if defined(XP_WIN) && defined(MOZ_LAUNCHER_PROCESS)
 // Launcher process is disabled by default, will be selectively enabled via SHIELD
 pref("browser.launcherProcess.enabled", false);
 #endif // defined(XP_WIN) && defined(MOZ_LAUNCHER_PROCESS)
--- a/browser/components/moz.build
+++ b/browser/components/moz.build
@@ -26,16 +26,17 @@ with Files("safebrowsing/**"):
     BUG_COMPONENT = ("Toolkit", "Safe Browsing")
 
 with Files('controlcenter/**'):
     BUG_COMPONENT = ('Firefox', 'General')
 
 
 DIRS += [
     'about',
+    'aboutconfig',
     'attribution',
     'contextualidentity',
     'customizableui',
     'dirprovider',
     'downloads',
     'enterprisepolicies',
     'extensions',
     'library',
@@ -56,17 +57,16 @@ DIRS += [
     'urlbar',
     'translation',
 ]
 
 DIRS += ['build']
 
 if CONFIG['NIGHTLY_BUILD']:
     DIRS += [
-        'aboutconfig',
         'payments',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     DIRS += ['touchbar']
 
 XPIDL_SOURCES += [
     'nsIBrowserHandler.idl',
--- a/docshell/base/nsAboutRedirector.cpp
+++ b/docshell/base/nsAboutRedirector.cpp
@@ -67,17 +67,17 @@ static const RedirEntry kRedirMap[] = {
     {"about", "chrome://global/content/aboutAbout.xhtml", 0},
     {"addons", "chrome://mozapps/content/extensions/extensions.xul",
      nsIAboutModule::ALLOW_SCRIPT},
     {"buildconfig", "chrome://global/content/buildconfig.html",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
     {"checkerboard", "chrome://global/content/aboutCheckerboard.xhtml",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::ALLOW_SCRIPT},
-#if !defined(NIGHTLY_BUILD) || !defined(MOZ_BUILD_APP_IS_BROWSER)
+#ifndef MOZ_BUILD_APP_IS_BROWSER
     {"config", "chrome://global/content/config.xul", 0},
 #endif
 #ifdef MOZ_CRASHREPORTER
     {"crashes", "chrome://global/content/crashes.xhtml", 0},
 #endif
     {"credits", "https://www.mozilla.org/credits/",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT},
     {"license", "chrome://global/content/license.html",
--- a/docshell/build/components.conf
+++ b/docshell/build/components.conf
@@ -24,17 +24,17 @@ about_pages = [
     'serviceworkers',
     'srcdoc',
     'support',
     'telemetry',
     'url-classifier',
     'webrtc',
 ]
 
-if not defined('NIGHTLY_BUILD') or buildconfig.substs['MOZ_BUILD_APP'] != 'browser':
+if buildconfig.substs['MOZ_BUILD_APP'] != 'browser':
     about_pages.append('config')
 if defined('MOZ_CRASHREPORTER'):
     about_pages.append('crashes')
 if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android':
     about_pages.append('profiles')
 
 Headers = ['/docshell/build/nsDocShellModule.h']
 
--- a/docshell/moz.build
+++ b/docshell/moz.build
@@ -2,16 +2,19 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Document Navigation')
 
+if CONFIG['MOZ_BUILD_APP'] == 'browser':
+    DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
+
 DIRS += [
     'base',
     'shistory',
     'build',
     'resources/content',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += [
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -18,17 +18,19 @@ pref("keyword.enabled", false);
 pref("general.useragent.compatMode.firefox", false);
 
 // This pref exists only for testing purposes. In order to disable all
 // overrides by default, don't initialize UserAgentOverrides.jsm.
 pref("general.useragent.site_specific_overrides", true);
 
 pref("general.config.obscure_value", 13); // for MCD .cfg files
 
+#ifndef MOZ_BUILD_APP_IS_BROWSER
 pref("general.warnOnAboutConfig", true);
+#endif
 
 // maximum number of dated backups to keep at any time
 pref("browser.bookmarks.max_backups",       5);
 
 pref("browser.cache.disk.enable",           true);
 // Does the user want smart-sizing?
 pref("browser.cache.disk.smart_size.enabled", true);
 // Size (in KB) explicitly set by the user. Used when smart_size.enabled == false
--- a/modules/libpref/moz.build
+++ b/modules/libpref/moz.build
@@ -44,11 +44,14 @@ DEFINES['OS_ARCH'] = CONFIG['OS_ARCH']
 DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
 if CONFIG['MOZ_ENABLE_WEBRENDER']:
     DEFINES['MOZ_ENABLE_WEBRENDER'] = True
 
 if CONFIG['NIGHTLY_BUILD']:
     DEFINES['ENABLE_WASM_REFTYPES'] = True
     DEFINES['ENABLE_WASM_GC'] = True
 
+if CONFIG['MOZ_BUILD_APP'] == 'browser':
+    DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
+
 FINAL_TARGET_PP_FILES += [
     'greprefs.js',
 ]
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -933,16 +933,17 @@ class RunProgram(MachCommandBase):
             if sys.platform.startswith('win') and \
                'MOZ_LAUNCHER_PROCESS' in self.defines:
                 args.append('-wait-for-browser')
 
             no_profile_option_given = \
                 all(p not in params for p in ['-profile', '--profile', '-P'])
             if no_profile_option_given and not noprofile:
                 prefs = {
+                   'browser.aboutConfig.showWarning': False,
                    'browser.shell.checkDefaultBrowser': False,
                    'general.warnOnAboutConfig': False,
                 }
                 prefs.update(self._mach_context.settings.runprefs)
                 prefs.update([p.split('=', 1) for p in setpref])
                 for pref in prefs:
                     prefs[pref] = Preferences.cast(prefs[pref])
 
--- a/testing/mozbase/mozprofile/tests/test_preferences.py
+++ b/testing/mozbase/mozprofile/tests/test_preferences.py
@@ -120,26 +120,26 @@ browser.startup.homepage = http://github
 
 def test_ini_keep_case(compare_generated):
     """
     Read a preferences config file with a preference in camel-case style.
     Check that the read preference name has not been lower-cased
     """
     # write the .ini file
     _ini = """[DEFAULT]
-general.warnOnAboutConfig = False
+network.dns.disableIPv6 = True
 """
     try:
         fd, name = tempfile.mkstemp(suffix='.ini', text=True)
         os.write(fd, _ini.encode())
         os.close(fd)
         commandline = ["--preferences", name]
 
         # test the [DEFAULT] section
-        _prefs = {'general.warnOnAboutConfig': 'False'}
+        _prefs = {'network.dns.disableIPv6': 'True'}
         compare_generated(_prefs, commandline)
 
     finally:
         # cleanup
         os.remove(name)
 
 
 def test_reset_should_remove_added_prefs():