Bug 1476333 - Define the browser chrome URL as BROWSER_CHROME_URL so it can be accessed from AppConstants instead of a pref;r=gps
MozReview-Commit-ID: 7URKf3B0s9n
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -34,16 +34,19 @@ if test "$OS_ARCH" = "WINNT"; then
fi
fi
# Enable building ./signmar and running libmar signature tests
MOZ_ENABLE_SIGNMAR=1
MOZ_APP_VERSION=$FIREFOX_VERSION
MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
+
+BROWSER_CHROME_URL=chrome://browser/content/browser.xul
+
# 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".
MOZ_BRANDING_DIRECTORY=browser/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/official
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -4,16 +4,18 @@
MOZ_APP_BASENAME=Fennec
MOZ_APP_VENDOR=Mozilla
MOZ_APP_VERSION=$FIREFOX_VERSION
MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
MOZ_APP_UA_NAME=Firefox
+BROWSER_CHROME_URL=chrome://browser/content/browser.xul
+
MOZ_BRANDING_DIRECTORY=mobile/android/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/android/branding/official
# MOZ_APP_DISPLAYNAME is set by branding/configure.sh
# We support Android SDK version 16 and up by default.
# See the --enable-android-min-sdk and --enable-android-max-sdk arguments in configure.in.
#
# Warning: Before increasing the with-android-min-sdk value, please note several places in and out
--- 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(BROWSER_CHROME_URL, $BROWSER_CHROME_URL)
+AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL_QUOTED, "$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@",
+ BROWSER_CHROME_URL: "@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/xpfe/appshell/nsXULWindow.cpp
+++ b/xpfe/appshell/nsXULWindow.cpp
@@ -2148,22 +2148,18 @@ NS_IMETHODIMP nsXULWindow::CreateNewCont
NS_ENSURE_TRUE(appShell, NS_ERROR_FAILURE);
// 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(BROWSER_CHROME_URL_QUOTED);
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