Bug 1431342 - Move channel-prefs.js processing back to Makefile.in to avoid changing its content. r=rstrong
MozReview-Commit-ID: A7kR8WPB4TQ
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -48,16 +48,23 @@ ifdef COMPILE_ENVIRONMENT
libs::
cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
endif
GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, firefox.js)
endif
+# channel-prefs.js is handled separate from other prefs due to bug 756325
+# DO NOT change the content of channel-prefs.js without taking the appropriate
+# steps. See bug 1431342.
+libs:: $(srcdir)/profile/channel-prefs.js
+ $(NSINSTALL) -D $(DIST)/bin/defaults/pref
+ $(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
+
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
MAC_APP_NAME = $(MOZ_APP_DISPLAYNAME)
ifdef MOZ_DEBUG
MAC_APP_NAME := $(MAC_APP_NAME)Debug
endif
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -38,19 +38,16 @@ GeckoProgram(CONFIG['MOZ_APP_NAME'])
SOURCES += [
'nsBrowserApp.cpp',
]
# Neither channel-prefs.js nor firefox.exe want to end up in dist/bin/browser.
DIST_SUBDIR = ""
-# channel-prefs.js is handled separate from other prefs due to bug 756325
-JS_PREFERENCE_PP_FILES += ['profile/channel-prefs.js']
-
LOCAL_INCLUDES += [
'!/build',
'/toolkit/xre',
'/xpcom/base',
'/xpcom/build',
]
if CONFIG['LIBFUZZER']:
--- a/browser/app/profile/channel-prefs.js
+++ b/browser/app/profile/channel-prefs.js
@@ -1,6 +1,5 @@
/* 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/. */
-#filter substitution
pref("app.update.channel", "@MOZ_UPDATE_CHANNEL@");