Bug 1476333 - Create MOZ_BROWSER_CHROME_URL as chrome://browser/content/browser.xul draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Fri, 20 Jul 2018 14:03:01 -0700
changeset 821050 f6466988f51e0e0318ef0be883f0afb530a03701
parent 819867 1174739835690f7f4024a913794e5cf35d1524a2
child 821051 cb0f5357d625c4aa107c33c704a32749f47003b9
push id117000
push userbgrinstead@mozilla.com
push dateFri, 20 Jul 2018 21:03:22 +0000
bugs1476333
milestone63.0a1
Bug 1476333 - Create MOZ_BROWSER_CHROME_URL as chrome://browser/content/browser.xul MozReview-Commit-ID: Ajkw39rPRrZ
browser/confvars.sh
old-configure.in
toolkit/modules/AppConstants.jsm
toolkit/modules/moz.build
xpfe/appshell/nsXULWindow.cpp
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -32,16 +32,18 @@ if test "$OS_ARCH" = "WINNT"; then
       fi
     fi
   fi
 fi
 
 # Enable building ./signmar and running libmar signature tests
 MOZ_ENABLE_SIGNMAR=1
 
+MOZ_BROWSER_CHROME_URL=chrome://browser/content/browser.xul
+
 MOZ_APP_VERSION=$FIREFOX_VERSION
 MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
 # MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
 # MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
 # specified. It should never point to the "official" branding directory.
 # For mozilla-beta, mozilla-release, or mozilla-central repositories, use
 # "unofficial" branding.
 # For the mozilla-aurora repository, use "aurora".
--- a/old-configure.in
+++ b/old-configure.in
@@ -4290,16 +4290,19 @@ AC_SUBST(MOZ_MMA_GCM_SENDERID)
 AC_SUBST(MAR_CHANNEL_ID)
 AC_SUBST(ACCEPTED_MAR_CHANNEL_IDS)
 AC_SUBST(MOZ_PROFILE_MIGRATOR)
 AC_DEFINE_UNQUOTED(MOZ_APP_UA_NAME, "$MOZ_APP_UA_NAME")
 AC_SUBST(MOZ_APP_UA_NAME)
 AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")
 AC_SUBST(MOZ_APP_VERSION)
 AC_SUBST(MOZ_APP_VERSION_DISPLAY)
+AC_DEFINE_UNQUOTED(MOZ_BROWSER_CHROME_URL, "$MOZ_BROWSER_CHROME_URL")
+AC_SUBST(MOZ_BROWSER_CHROME_URL)
+
 AC_SUBST(MOZ_APP_MAXVERSION)
 AC_DEFINE_UNQUOTED(FIREFOX_VERSION,$FIREFOX_VERSION)
 AC_SUBST(FIREFOX_VERSION)
 AC_SUBST(MOZ_UA_OS_AGNOSTIC)
 if test -n "$MOZ_UA_OS_AGNOSTIC"; then
   AC_DEFINE(MOZ_UA_OS_AGNOSTIC)
 fi
 
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -293,16 +293,18 @@ this.AppConstants = Object.freeze({
 
   DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@",
 
   MOZ_BING_API_CLIENTID: "@MOZ_BING_API_CLIENTID@",
   MOZ_BING_API_KEY: "@MOZ_BING_API_KEY@",
   MOZ_GOOGLE_API_KEY: "@MOZ_GOOGLE_API_KEY@",
   MOZ_MOZILLA_API_KEY: "@MOZ_MOZILLA_API_KEY@",
 
+  MOZ_BROWSER_CHROME_URL: @MOZ_BROWSER_CHROME_URL@,
+
   // URL to the hg revision this was built from (e.g.
   // "https://hg.mozilla.org/mozilla-central/rev/6256ec9113c1")
   // On unofficial builds, this is an empty string.
 #ifndef MOZ_SOURCE_URL
 #define MOZ_SOURCE_URL
 #endif
   SOURCE_REVISION_URL: "@MOZ_SOURCE_URL@",
 
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -302,16 +302,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
     ]
 
 for var in ('ANDROID_PACKAGE_NAME',
             'MOZ_APP_NAME',
             'MOZ_APP_VERSION',
             'MOZ_APP_VERSION_DISPLAY',
             'MOZ_BING_API_CLIENTID',
             'MOZ_BING_API_KEY',
+            'MOZ_BROWSER_CHROME_URL',
             'MOZ_GOOGLE_API_KEY',
             'MOZ_MACBUNDLE_NAME',
             'MOZ_MOZILLA_API_KEY',
             'MOZ_WIDGET_TOOLKIT',
             'DLL_PREFIX',
             'DLL_SUFFIX',
             'DEBUG_JS_MODULES'):
             DEFINES[var] = CONFIG[var]
--- a/xpfe/appshell/nsXULWindow.cpp
+++ b/xpfe/appshell/nsXULWindow.cpp
@@ -2150,20 +2150,17 @@ NS_IMETHODIMP nsXULWindow::CreateNewCont
   // We need to create a new top level window and then enter a nested
   // loop. Eventually the new window will be told that it has loaded,
   // at which time we know it is safe to spin out of the nested loop
   // and allow the opening code to proceed.
 
   nsCOMPtr<nsIURI> uri;
 
   nsAutoCString urlStr;
-  Preferences::GetCString("browser.chromeURL", urlStr);
-  if (urlStr.IsEmpty()) {
-    urlStr.AssignLiteral("chrome://navigator/content/navigator.xul");
-  }
+  urlStr.AssignLiteral(MOZ_BROWSER_CHROME_URL);
 
   nsCOMPtr<nsIIOService> service(do_GetService(NS_IOSERVICE_CONTRACTID));
   if (service) {
     service->NewURI(urlStr, nullptr, nullptr, getter_AddRefs(uri));
   }
   NS_ENSURE_TRUE(uri, NS_ERROR_FAILURE);
 
   // We need to create a chrome window to contain the content window we're about