commit 9d1b72f436513c8f607bb19c78cc948c162ca45f
parent 270117e72392782392ac41dd385d34f94ec23078
Author: Henry Wilkes <henry@torproject.org>
Date: Fri, 30 Sep 2022 15:04:37 +0100
TB 41340: Enable TOR_BROWSER_NIGHTLY_BUILD features for dev and nightly builds
tor-browser#41285: Enable fluent warnings.
Diffstat:
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
@@ -1223,6 +1223,17 @@ set_config("MOZ_UPDATE_CHANNEL", update_channel)
set_define("MOZ_UPDATE_CHANNEL", update_channel)
+# Add a TOR_BROWSER_NIGHTLY_BUILD flag to use when MOZ_UPDATE_CHANNEL cannot be
+# used. For example, for the C++ preprocessor. See tor-browser#41340
+@depends("--enable-update-channel")
+def tor_browser_nightly_build(channel):
+ if channel and channel[0] in ["default", "nightly"]:
+ return True
+
+
+set_define("TOR_BROWSER_NIGHTLY_BUILD", tor_browser_nightly_build)
+
+
option(
env="MOZBUILD_STATE_PATH",
nargs=1,
diff --git a/intl/l10n/Localization.h b/intl/l10n/Localization.h
@@ -46,7 +46,9 @@ namespace intl {
const nsTArray<nsCString>& aErrors, ErrorResult& aRv,
nsIGlobalObject* aGlobal) {
if (!aErrors.IsEmpty()) {
-#if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION) || defined(DEBUG)
+ // See tor-browser#41285
+#if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION) || defined(DEBUG) || \
+ defined(TOR_BROWSER_NIGHTLY_BUILD)
dom::Document* doc = nullptr;
if (aGlobal) {
nsPIDOMWindowInner* innerWindow = aGlobal->GetAsInnerWindow();
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
@@ -3953,7 +3953,7 @@ pref("devtools.policy.disabled", false);
// Enable deprecation warnings.
pref("devtools.errorconsole.deprecation_warnings", true);
-#ifdef NIGHTLY_BUILD
+#if defined(NIGHTLY_BUILD) || defined(TOR_BROWSER_NIGHTLY_BUILD)
// Don't show the Browser Toolbox prompt on local builds / nightly.
pref("devtools.debugger.prompt-connection", false, sticky);
#else