From 00f126729b065d5d4f103dec1999de586c2d1119 Mon Sep 17 00:00:00 2001 From: daijro Date: Sat, 2 Nov 2024 02:59:39 -0500 Subject: [PATCH] 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. --- patches/backgroudtasks-bugfix.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 patches/backgroudtasks-bugfix.patch diff --git a/patches/backgroudtasks-bugfix.patch b/patches/backgroudtasks-bugfix.patch new file mode 100644 index 0000000..3cfd277 --- /dev/null +++ b/patches/backgroudtasks-bugfix.patch @@ -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