diff --git a/browser/installer/Makefile.in b/browser/installer/Makefile.in index 5d365bd6a4c8..e8619ca0a33b 100644 --- a/browser/installer/Makefile.in +++ b/browser/installer/Makefile.in @@ -102,10 +102,6 @@ ifdef MOZ_NOTIFICATION_SERVER DEFINES += -DMOZ_NOTIFICATION_SERVER=1 endif -ifdef MOZ_BACKGROUNDTASKS -DEFINES += -DMOZ_BACKGROUNDTASKS=1 -endif - ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) MOZ_PKG_MAC_DSSTORE=$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/dsstore MOZ_PKG_MAC_BACKGROUND=$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/background.png diff --git a/browser/moz.build b/browser/moz.build index 9dfb4271d4c2..6e1665037457 100644 --- a/browser/moz.build +++ b/browser/moz.build @@ -48,9 +48,6 @@ for cdm in CONFIG["MOZ_EME_MODULES"]: if CONFIG["MOZ_GPSD"]: DEFINES["MOZ_GPSD"] = True -if CONFIG["MOZ_BACKGROUNDTASKS"]: - DEFINES["MOZ_BACKGROUNDTASKS"] = True - if CONFIG["MOZ_UPDATE_AGENT"]: DEFINES["MOZ_UPDATE_AGENT"] = True diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build index 8ed2ca5db2d1..abd65be41b47 100644 --- a/modules/libpref/moz.build +++ b/modules/libpref/moz.build @@ -175,7 +175,4 @@ else: "greprefs.js", ] -if CONFIG["MOZ_BACKGROUNDTASKS"]: - DEFINES["MOZ_BACKGROUNDTASKS"] = True - REQUIRES_UNIFIED_BUILD = True diff --git a/netwerk/cache2/moz.build b/netwerk/cache2/moz.build index e2de180eaede..9d999597e3d4 100644 --- a/netwerk/cache2/moz.build +++ b/netwerk/cache2/moz.build @@ -68,4 +68,3 @@ if CONFIG["MOZ_BACKGROUNDTASKS"]: EXTRA_JS_MODULES.backgroundtasks += [ "BackgroundTask_purgeHTTPCache.sys.mjs", ] - DEFINES["MOZ_BACKGROUNDTASKS"] = True diff --git a/startupcache/moz.build b/startupcache/moz.build index c7f189ec2d8b..4ee94be455ee 100644 --- a/startupcache/moz.build +++ b/startupcache/moz.build @@ -31,9 +31,6 @@ XPIDL_SOURCES += [ "nsIStartupCacheInfo.idl", ] -if CONFIG["MOZ_BACKGROUNDTASKS"]: - DEFINES["MOZ_BACKGROUNDTASKS"] = True - FINAL_LIBRARY = "xul" REQUIRES_UNIFIED_BUILD = True diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemetry/moz.build index 0a7e5b59d1fd..078d789340ae 100644 --- a/toolkit/components/telemetry/moz.build +++ b/toolkit/components/telemetry/moz.build @@ -19,10 +19,6 @@ if CONFIG["COMPILE_ENVIRONMENT"]: DEFINES["MOZ_APP_VERSION"] = '"%s"' % CONFIG["MOZ_APP_VERSION"] -for var in ("MOZ_BACKGROUNDTASKS",): - if CONFIG[var]: - DEFINES[var] = True - LOCAL_INCLUDES += [ "/xpcom/build", "/xpcom/threads", diff --git a/toolkit/modules/moz.build b/toolkit/modules/moz.build index 17dee611f315..21d5b07b3f89 100644 --- a/toolkit/modules/moz.build +++ b/toolkit/modules/moz.build @@ -286,7 +286,6 @@ for var in ( for var in ( "MOZ_ALLOW_ADDON_SIDELOAD", - "MOZ_BACKGROUNDTASKS", "MOZ_SYSTEM_NSS", "MOZ_SYSTEM_POLICIES", "MOZ_UNSIGNED_APP_SCOPE", diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 8a73289bbf7e..6b7e181879c4 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -2656,9 +2656,13 @@ option( ) -set_config( - "MOZ_BACKGROUNDTASKS", depends_if("--enable-backgroundtasks")(lambda _: True) -) +@depends("--enable-backgroundtasks") +def background_tasks(value): + return bool(value) + + +set_config("MOZ_BACKGROUNDTASKS", background_tasks) +set_define("MOZ_BACKGROUNDTASKS", background_tasks) # Update-related programs: updater, maintenance service, update agent, diff --git a/toolkit/mozapps/update/updater/updater-common.build b/toolkit/mozapps/update/updater/updater-common.build index 7c58d374bbc2..16c2d1500392 100644 --- a/toolkit/mozapps/update/updater/updater-common.build +++ b/toolkit/mozapps/update/updater/updater-common.build @@ -92,7 +92,7 @@ if CONFIG["MOZ_TSAN"]: DEFINES["SPRINTF_H_USES_VSNPRINTF"] = True DEFINES["NS_NO_XPCOM"] = True DisableStlWrapping() -for var in ("MAR_CHANNEL_ID", "MOZ_APP_VERSION", "MOZ_BACKGROUNDTASKS"): +for var in ("MAR_CHANNEL_ID", "MOZ_APP_VERSION"): DEFINES[var] = '"%s"' % CONFIG[var] LOCAL_INCLUDES += [ diff --git a/toolkit/profile/moz.build b/toolkit/profile/moz.build index 2581f4b5eb5f..5eb7a3053d5d 100644 --- a/toolkit/profile/moz.build +++ b/toolkit/profile/moz.build @@ -28,9 +28,6 @@ if CONFIG["OS_ARCH"] == "WINNT": if CONFIG["OS_TARGET"] == "Android": UNIFIED_SOURCES += ["ProfileUnlockerAndroid.cpp"] -if CONFIG["MOZ_BACKGROUNDTASKS"]: - DEFINES["MOZ_BACKGROUNDTASKS"] = True - UNIFIED_SOURCES += ["nsToolkitProfileService.cpp"] LOCAL_INCLUDES += [ diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build index a3ea40edf0a3..970c10d243b8 100644 --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build @@ -288,7 +288,4 @@ FINAL_TARGET_PP_FILES += ["platform.ini"] if CONFIG["ENABLE_TESTS"]: DIRS += ["test/gtest"] -if CONFIG["MOZ_BACKGROUNDTASKS"]: - DEFINES["MOZ_BACKGROUNDTASKS"] = True - REQUIRES_UNIFIED_BUILD = True diff --git a/widget/windows/moz.build b/widget/windows/moz.build index eb3ad2db2280..ac2000d0939f 100644 --- a/widget/windows/moz.build +++ b/widget/windows/moz.build @@ -182,7 +182,7 @@ DEFINES["MOZ_APP_NAME"] = '"%s"' % CONFIG["MOZ_APP_NAME"] # Turn `firefox` into `Firefox`. DEFINES["MOZ_TOAST_APP_NAME"] = '"%s"' % CONFIG["MOZ_APP_NAME"].title() -for var in ("MOZ_ENABLE_D3D10_LAYER", "MOZ_BACKGROUNDTASKS"): +for var in ("MOZ_ENABLE_D3D10_LAYER",): if CONFIG[var]: DEFINES[var] = True diff --git a/xpcom/base/moz.build b/xpcom/base/moz.build index e0ec7fd20ab0..5bcedee909c0 100644 --- a/xpcom/base/moz.build +++ b/xpcom/base/moz.build @@ -257,6 +257,3 @@ LOCAL_INCLUDES += [ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] - -if CONFIG["MOZ_BACKGROUNDTASKS"]: - DEFINES["MOZ_BACKGROUNDTASKS"] = True diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build index 779b75dbc495..95ee64e985ac 100644 --- a/xpcom/components/moz.build +++ b/xpcom/components/moz.build @@ -78,9 +78,6 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": if CONFIG["MOZ_ENABLE_DBUS"]: CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"] -if CONFIG["MOZ_BACKGROUNDTASKS"]: - DEFINES["MOZ_BACKGROUNDTASKS"] = True - include("/ipc/chromium/chromium-config.mozbuild") PYTHON_UNITTEST_MANIFESTS += [