Fix bug in FF132 that causes MacOS builds to fail

Without --enable-backgroundtasks, macOS fails seem to fail after this change:
https://phabricator.services.mozilla.com/D219834

This commit patches the broken code in nsAppRunner.
This commit is contained in:
daijro 2024-11-02 02:59:39 -05:00
parent b5b00d650c
commit 00f126729b

View file

@ -0,0 +1,21 @@
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index 318ee7e293..8430bb4e82 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -5640,10 +5640,14 @@ nsresult XREMain::XRE_mainRun() {
if (!AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownConfirmed)) {
#ifdef XP_MACOSX
- if (!BackgroundTasks::IsBackgroundTaskMode()) {
+#ifdef MOZ_BACKGROUNDTASKS
+ if (!BackgroundTasks::IsBackgroundTaskMode()) {
+#endif
rv = appStartup->CreateHiddenWindow();
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
- }
+#ifdef MOZ_BACKGROUNDTASKS
+ }
+#endif
#endif
#ifdef XP_WIN