Merge autoland to mozilla-central. a=merge
authorBogdan Tara <btara@mozilla.com>
Fri, 07 Aug 2020 12:31:21 +0300
changeset 543714 cc8993c8140a06f97b7f91208e608c01c350961b
parent 543685 24fc091bbbf6f2cf776618c1dc67f3d77cbb1feb (current diff)
parent 543713 9db16809627cb911758969a89e310121a3764ff3 (diff)
child 543724 1c709dae9c80e860f313301d9cf05faf184fa086
push id37679
push userbtara@mozilla.com
push dateFri, 07 Aug 2020 09:31:58 +0000
treeherdermozilla-central@cc8993c8140a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone81.0a1
first release with
nightly linux32
cc8993c8140a / 81.0a1 / 20200807093158 / files
nightly linux64
cc8993c8140a / 81.0a1 / 20200807093158 / files
nightly mac
cc8993c8140a / 81.0a1 / 20200807093158 / files
nightly win32
cc8993c8140a / 81.0a1 / 20200807093158 / files
nightly win64
cc8993c8140a / 81.0a1 / 20200807093158 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge autoland to mozilla-central. a=merge
--- a/accessible/interfaces/ia2/IA2Marshal.rc
+++ b/accessible/interfaces/ia2/IA2Marshal.rc
@@ -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/. */
 
 1 typelib IA2Typelib.tlb
-2 24 IA2Marshal.dll.manifest
--- a/accessible/interfaces/ia2/Makefile.in
+++ b/accessible/interfaces/ia2/Makefile.in
@@ -60,18 +60,16 @@ MIDL_GENERATED_FILES = \
 # a bunch of .h and .c files that we're not interested in.
 MIDL_UNUSED_GENERATED_FILES = \
   $(MIDL_LIBRARIES:%.idl=%_p.c) \
   $(MIDL_LIBRARIES:%.idl=%_i.c) \
   $(MIDL_LIBRARIES:%.idl=%.h) \
   $(MIDL_LIBRARIES:%.idl=%.c) \
   $(NULL)
 
-EMBED_MANIFEST_AT = 2
-
 INSTALL_TARGETS += midl
 midl_FILES := $(filter %.h %_i.c,$(MIDL_GENERATED_FILES))
 midl_DEST = $(DIST)/include
 midl_TARGET := midl
 
 export:: midl
 
 include $(topsrcdir)/config/rules.mk
--- a/accessible/interfaces/msaa/Makefile.in
+++ b/accessible/interfaces/msaa/Makefile.in
@@ -24,18 +24,16 @@ done_gen: $(srcdir)/ISimpleDOM.idl \
 	touch $@
 
 export:: done_gen
 
 # This marshall dll is also registered in the installer
 register::
 	regsvr32 -s $(DIST)/bin/$(SHARED_LIBRARY)
 
-EMBED_MANIFEST_AT = 2
-
 midl_exports := \
     ISimpleDOM.h \
     ISimpleDOM_i.c \
     $(NULL)
 
 INSTALL_TARGETS += midl_exports
 midl_exports_FILES := $(midl_exports)
 midl_exports_DEST = $(DIST)/include
--- a/accessible/tests/browser/shared-head.js
+++ b/accessible/tests/browser/shared-head.js
@@ -471,18 +471,19 @@ function accessibleTask(doc, task, optio
               gBrowser.removeTab(tab);
             }
           }
         });
 
         await SimpleTest.promiseFocus(browser);
         await loadContentScripts(browser, "Common.jsm");
 
-        ok(Services.appinfo.browserTabsRemoteAutostart, "e10s enabled");
-        ok(browser.isRemoteBrowser, "Actually remote browser");
+        if (Services.appinfo.browserTabsRemoteAutostart) {
+          ok(browser.isRemoteBrowser, "Actually remote browser");
+        }
 
         const { accessible: docAccessible } = await onContentDocLoad;
         let iframeDocAccessible;
         if (gIsIframe) {
           if (!options.skipFissionDocLoad) {
             await comparePIDs(browser, options.remoteIframe);
             iframeDocAccessible = onIframeDocLoad
               ? (await onIframeDocLoad).accessible
--- a/browser/app/splash.rc
+++ b/browser/app/splash.rc
@@ -1,18 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #include <windows.h>
 #include "nsNativeAppSupportWin.h"
 
-1 24 "firefox.exe.manifest"
-
 IDI_APPICON ICON FIREFOX_ICO
 IDI_DOCUMENT ICON DOCUMENT_ICO
 IDI_APPLICATION ICON FIREFOX_ICO
 IDI_NEWWINDOW ICON NEWWINDOW_ICO
 IDI_NEWTAB ICON NEWTAB_ICO
 IDI_PBMODE ICON PBMODE_ICO
 
 STRINGTABLE DISCARDABLE
--- a/build/moz.configure/windows.configure
+++ b/build/moz.configure/windows.configure
@@ -452,40 +452,16 @@ def sdk_bin_path(valid_windows_sdk_dir, 
         os.path.join(valid_windows_sdk_dir.path, versioned_bin, vc_host)
     ]
     if vc_host == 'x64':
         result.append(
             os.path.join(valid_windows_sdk_dir.path, versioned_bin, 'x86'))
     return result
 
 
-# allow_missing=True for mingw builds, until bug 1617793
-mt = check_prog('MT', ('mt.exe',), allow_missing=True, paths=sdk_bin_path)
-
-
-# Check that MT is not something unexpected like "magnetic tape manipulation
-# utility".
-@depends(mt, wine)
-@checking('whether MT is really Microsoft Manifest Tool', lambda x: bool(x))
-def valid_mt(path, wine):
-    if not path:
-        return None
-    if wine and path.lower().endswith('.exe'):
-        out = check_cmd_output(wine, path, onerror=lambda: '').splitlines()
-    else:
-        out = check_cmd_output(path, onerror=lambda: '').splitlines()
-    out = '\n'.join(l for l in out
-                    if 'Microsoft (R) Manifest Tool' in l)
-    if out:
-        return path
-    raise FatalCheckError('%s is not Microsoft Manifest Tool')
-
-
-set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x)))
-
 js_option(env='LINKER', nargs=1, when=target_is_windows, help='Path to the linker')
 
 link = check_prog('LINKER', ('lld-link',), input='LINKER',
                   when=target_is_windows, paths=toolchain_search_path)
 
 js_option(env='HOST_LINKER', nargs=1, when=host_is_windows, help='Path to the host linker')
 
 host_link = check_prog('HOST_LINKER', ('lld-link',), input='HOST_LINKER',
rename from config/version_win.py
rename to config/create_rc.py
--- a/config/version_win.py
+++ b/config/create_rc.py
@@ -11,16 +11,17 @@ from mozbuild.preprocessor import Prepro
 import buildconfig
 
 
 TEMPLATE = '''
 // 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/.
 
+#include<winuser.h>
 #include<winver.h>
 
 // Note: if you contain versioning information in an included
 // RC script, it will be discarded
 // Use module.ver to explicitly set these values
 
 // Do not edit this file. Changes won't affect the build.
 
@@ -106,16 +107,27 @@ def digits_only(s):
             return s[:l]
     return '0'
 
 
 def split_and_normalize_version(version, len):
     return ([digits_only(x) for x in version.split('.')] + ['0'] * len)[:len]
 
 
+def has_manifest(module_rc, manifest_id):
+    for line in module_rc.splitlines():
+        line = line.split(None, 2)
+        if len(line) < 2:
+            continue
+        id, what, *rest = line
+        if id == manifest_id and what in ('24', 'RT_MANIFEST'):
+            return True
+    return False
+
+
 def generate_module_rc(binary='', rcinclude=None):
     deps = set()
     buildid = get_buildid()
     milestone = buildconfig.substs['GRE_MILESTONE']
     app_version = buildconfig.substs.get('MOZ_APP_VERSION') or milestone
     app_winversion = ','.join(split_and_normalize_version(app_version, 4))
     milestone_winversion = ','.join(split_and_normalize_version(milestone, 3) +
                                     [str(days_from_2000_to_buildid(buildid))])
@@ -165,14 +177,22 @@ def generate_module_rc(binary='', rcincl
         mfversion=overrides.get('WIN32_MODULE_FILEVERSION_STRING', milestone_string),
         mpversion=overrides.get('WIN32_MODULE_PRODUCTVERSION_STRING', milestone_string),
         module=overrides.get('WIN32_MODULE_NAME', ''),
         trademarks=overrides.get('WIN32_MODULE_TRADEMARKS', 'Mozilla'),
         binary=overrides.get('WIN32_MODULE_ORIGINAL_FILENAME', binary),
         productname=overrides.get('WIN32_MODULE_PRODUCTNAME', display_name),
         buildid=buildid,
     )
-    with io.open('module.rc', 'w', encoding='latin1') as fh:
+
+    manifest_id = '2' if binary.lower().endswith('.dll') else '1'
+    if binary and not has_manifest(data, manifest_id):
+        manifest_path = os.path.join(srcdir, binary + '.manifest')
+        if os.path.exists(manifest_path):
+            manifest_path = manifest_path.replace('\\', '\\\\')
+            data += '\n{} RT_MANIFEST "{}"\n'.format(manifest_id, manifest_path)
+
+    with io.open('{}.rc'.format(binary or 'module'), 'w', encoding='latin1') as fh:
         fh.write(data)
 
 
 if __name__ == '__main__':
     generate_module_rc(*sys.argv[1:])
--- a/config/makefiles/rust.mk
+++ b/config/makefiles/rust.mk
@@ -358,19 +358,19 @@ else
 force-cargo-host-library-check:
 	@true
 endif # HOST_RUST_LIBRARY_FILE
 
 ifdef RUST_PROGRAMS
 
 GARBAGE_DIRS += $(RUST_TARGET)
 
-force-cargo-program-build: $(RESFILE)
+force-cargo-program-build: $(call resfile,module)
 	$(REPORT_BUILD)
-	$(call CARGO_BUILD) $(addprefix --bin ,$(RUST_CARGO_PROGRAMS)) $(cargo_target_flag) -- $(if $(RESFILE),-C link-arg=$(CURDIR)/$(RESFILE))
+	$(call CARGO_BUILD) $(addprefix --bin ,$(RUST_CARGO_PROGRAMS)) $(cargo_target_flag) -- $(addprefix -C link-arg=$(CURDIR)/,$(call resfile,module))
 
 $(RUST_PROGRAMS): force-cargo-program-build ;
 
 force-cargo-program-check:
 	$(call CARGO_CHECK) $(addprefix --bin ,$(RUST_CARGO_PROGRAMS)) $(cargo_target_flag)
 else
 force-cargo-program-check:
 	@true
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -15,20 +15,16 @@ ifdef INCLUDED_RULES_MK
 $(error Do not include rules.mk twice!)
 endif
 INCLUDED_RULES_MK = 1
 
 ifndef INCLUDED_CONFIG_MK
 include $(topsrcdir)/config/config.mk
 endif
 
-ifndef INCLUDED_VERSION_MK
-include $(MOZILLA_DIR)/config/version.mk
-endif
-
 USE_AUTOTARGETS_MK = 1
 include $(MOZILLA_DIR)/config/makefiles/makeutils.mk
 
 ifdef REBUILD_CHECK
 REPORT_BUILD = $(info $(shell $(PYTHON3) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^))
 REPORT_BUILD_VERBOSE = $(REPORT_BUILD)
 else
 REPORT_BUILD = $(info $(relativesrcdir)/$(notdir $@))
@@ -98,18 +94,16 @@ endif
 
 ifdef FORCE_SHARED_LIB
 ifdef MKSHLIB
 
 ifdef LIB_IS_C_ONLY
 MKSHLIB			= $(MKCSHLIB)
 endif
 
-EMBED_MANIFEST_AT=2
-
 endif # MKSHLIB
 endif # FORCE_SHARED_LIB
 
 ifeq ($(OS_ARCH),WINNT)
 
 #
 # This next line captures both the default (non-MOZ_COPY_PDBS)
 # case as well as the MOZ_COPY_PDBS-for-mingwclang case.
@@ -400,16 +394,27 @@ endif
 # Do everything from scratch
 everything::
 	$(MAKE) clean
 	$(MAKE) all
 
 # Dependencies which, if modified, should cause everything to rebuild
 GLOBAL_DEPS += Makefile $(addprefix $(DEPTH)/config/,$(INCLUDED_AUTOCONF_MK)) $(MOZILLA_DIR)/config/config.mk
 
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+# We always build .res files for programs and shared libraries
+resfile = $(notdir $1).res
+# We also build .res files for simple programs if a corresponding manifest
+# exists. We'll generate a .rc file that includes the manifest.
+resfile_for_manifest = $(if $(wildcard $(srcdir)/$(notdir $1).manifest),$(call resfile,$1))
+else
+resfile =
+resfile_for_manifest =
+endif
+
 ##############################################
 ifdef COMPILE_ENVIRONMENT
 compile:: host target
 
 host:: $(HOST_OBJS) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(HOST_RUST_PROGRAMS) $(HOST_RUST_LIBRARY_FILE) $(HOST_SHARED_LIBRARY)
 
 target:: $(filter-out $(MOZBUILD_NON_DEFAULT_TARGETS),$(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(RUST_LIBRARY_FILE) $(RUST_PROGRAMS) $(WASM_LIBRARY))
 
@@ -449,55 +454,36 @@ alltags:
 define EXPAND_CC_OR_CXX
 $(if $(PROG_IS_C_ONLY_$(1)),$(CC),$(CCC))
 endef
 
 #
 # PROGRAM = Foo
 # creates OBJS, links with LIBS to create Foo
 #
-$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
+$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(call resfile,$(PROGRAM)) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
 	$(REPORT_BUILD)
-	@$(RM) $@.manifest
 ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
-	$(LINKER) -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
-ifdef MSMANIFEST_TOOL
-	@if test -f $@.manifest; then \
-		echo "Manifest in objdir is not supported"; \
-		exit 1; \
-	elif test -f '$(srcdir)/$(notdir $@).manifest'; then \
-		echo 'Embedding manifest from $(srcdir_rel)/$(notdir $@).manifest'; \
-		$(call WINEWRAP,$(MT)) -NOLOGO -MANIFEST '$(srcdir_rel)/$(notdir $@).manifest' -OUTPUTRESOURCE:$@\;1; \
-	fi
-endif	# MSVC with manifest tool
+	$(LINKER) -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
 else # !WINNT || GNU_CC
-	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
+	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
 	$(call py_action,check_binary,--target $@)
 endif # WINNT && !GNU_CC
 
 ifdef ENABLE_STRIP
 	$(STRIP) $(STRIP_FLAGS) $@
 endif
 ifdef MOZ_POST_PROGRAM_COMMAND
 	$(MOZ_POST_PROGRAM_COMMAND) $@
 endif
 
 $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS) $(call mkdir_deps,$(DEPTH)/dist/host/bin)
 	$(REPORT_BUILD)
 ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
 	$(HOST_LINKER) -OUT:$@ -PDB:$(HOST_PDBFILE) $($(notdir $@)_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
-ifdef MSMANIFEST_TOOL
-	@if test -f $@.manifest; then \
-		echo "Manifest in objdir is not supported"; \
-		exit 1; \
-	elif test -f '$(srcdir)/$(notdir $@).manifest'; then \
-		echo 'Embedding manifest from $(srcdir_rel)/$(notdir $@).manifest'; \
-		$(call WINEWRAP,$(MT)) -NOLOGO -MANIFEST '$(srcdir_rel)/$(notdir $@).manifest' -OUTPUTRESOURCE:$@\;1; \
-	fi
-endif	# MSVC with manifest tool
 else
 ifeq ($(HOST_CPP_PROG_LINK),1)
 	$(HOST_CXX) -o $@ $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 else
 	$(HOST_CC) -o $@ $(HOST_C_LDFLAGS) $(HOST_LDFLAGS) $($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 endif # HOST_CPP_PROG_LINK
 endif
 ifndef CROSS_COMPILE
@@ -507,30 +493,27 @@ endif
 #
 # This is an attempt to support generation of multiple binaries
 # in one directory, it assumes everything to compile Foo is in
 # Foo.o (from either Foo.c or Foo.cpp).
 #
 # SIMPLE_PROGRAMS = Foo Bar
 # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
 #
-$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
+define simple_program_deps
+$1: $(1:$(BIN_SUFFIX)=.$(OBJ_SUFFIX)) $(STATIC_LIBS) $(EXTRA_DEPS) $(call resfile_for_manifest,$1) $(GLOBAL_DEPS)
+endef
+$(foreach p,$(SIMPLE_PROGRAMS),$(eval $(call simple_program_deps,$(p))))
+
+$(SIMPLE_PROGRAMS):
 	$(REPORT_BUILD)
 ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
-	$(LINKER) -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
-ifdef MSMANIFEST_TOOL
-	@if test -f $@.manifest; then \
-		echo "Manifest in objdir is not supported"; \
-		exit 1; \
-	elif test -f '$(srcdir)/$(notdir $@).manifest'; then \
-		$(call WINEWRAP,$(MT)) -NOLOGO -MANIFEST '$(srcdir_rel)/$(notdir $@).manifest' -OUTPUTRESOURCE:$@\;1; \
-	fi
-endif	# MSVC with manifest tool
+	$(LINKER) -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
 else
-	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
+	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
 	$(call py_action,check_binary,--target $@)
 endif # WINNT && !GNU_CC
 
 ifdef ENABLE_STRIP
 	$(STRIP) $(STRIP_FLAGS) $@
 endif
 ifdef MOZ_POST_PROGRAM_COMMAND
 	$(MOZ_POST_PROGRAM_COMMAND) $@
@@ -595,36 +578,25 @@ else
 	$(HOST_CXX) $(HOST_OUTOPTION)$@ $($(notdir $@)_OBJS) $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
 endif
 
 # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
 # so instead of deleting .o files after repacking them into a dylib, we make
 # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
 # so no need to conditionalize on OS version or debugging format.
 
-$(SHARED_LIBRARY): $(OBJS) $(RESFILE) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
+$(SHARED_LIBRARY): $(OBJS) $(call resfile,$(SHARED_LIBRARY)) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
 	$(REPORT_BUILD)
 ifndef INCREMENTAL_LINKER
 	$(RM) $@
 endif
-	$(MKSHLIB) $($@_OBJS) $(RESFILE) $(LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
+	$(MKSHLIB) $($@_OBJS) $(filter %.res,$^) $(LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
 	$(call py_action,check_binary,--target $@)
 
 ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
-ifdef MSMANIFEST_TOOL
-ifdef EMBED_MANIFEST_AT
-	@if test -f $@.manifest; then \
-		echo "Manifest in objdir is not supported"; \
-		exit 1; \
-	elif test -f '$(srcdir)/$@.manifest'; then \
-		echo 'Embedding manifest from $(srcdir_rel)/$@.manifest'; \
-		$(call WINEWRAP,$(MT)) -NOLOGO -MANIFEST '$(srcdir_rel)/$@.manifest' -OUTPUTRESOURCE:$@\;$(EMBED_MANIFEST_AT); \
-	fi
-endif   # EMBED_MANIFEST_AT
-endif	# MSVC with manifest tool
 endif	# WINNT && !GCC
 	chmod +x $@
 ifdef ENABLE_STRIP
 	$(STRIP) $(STRIP_FLAGS) $@
 endif
 
 # The object file is in the current directory, and the source file can be any
 # relative path. This macro adds the dependency obj: src for each source file.
@@ -858,25 +830,29 @@ else
 	@$(MAKE) PP_REINVOKE=1 $@ \
 	    $(foreach type,c cpp mm,$(UPPER_$(type))SRCS="$(all_$(type)_sources)")
 endif
 
 endif
 
 endif
 
-$(RESFILE): %.res: $(RCFILE)
+# EXTRA_DEPS contains manifests (manually added in Makefile.in ; bug 1498414)
+%.res: $(or $(RCFILE),%.rc) $(EXTRA_DEPS)
 	$(REPORT_BUILD)
 	@echo Creating Resource file: $@
 ifdef GNU_CC
 	$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) $(OUTOPTION)$@ $<
 else
 	$(call WINEWRAP,$(RC)) $(RCFLAGS) -r $(DEFINES) $(INCLUDES:-I%=-I$(call relativize,%)) $(OUTOPTION)$@ $(call relativize,$<)
 endif
 
+$(notdir $(addsuffix .rc,$(PROGRAM) $(SHARED_LIBRARY) $(SIMPLE_PROGRAMS) module)): %.rc: $(RCINCLUDE) $(MOZILLA_DIR)/config/create_rc.py
+	$(PYTHON3) $(MOZILLA_DIR)/config/create_rc.py '$(if $(filter module,$*),,$*)' '$(RCINCLUDE)'
+
 # Cancel GNU make built-in implicit rules
 MAKEFLAGS += -r
 
 ifneq (,$(filter WINNT,$(OS_ARCH)))
 SEP := ;
 else
 SEP := :
 endif
deleted file mode 100644
--- a/config/version.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# 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/.
-
-ifndef INCLUDED_VERSION_MK
-INCLUDED_VERSION_MK=1
-
-# Windows gmake build:
-# Build default .rc file if $(RESFILE) isn't defined.
-# TODO:
-# PBI      : Private build info.  Not used currently.
-#            Guessing the best way would be to set an env var.
-# BINARY   : Binary name.  Not used currently.
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-ifndef RESFILE
-RCFILE=./module.rc
-RESFILE=./module.res
-ifdef PROGRAM
-_RC_BINARY = $(notdir $(PROGRAM))
-else
-ifdef _PROGRAM
-_RC_BINARY = $(notdir $(_PROGRAM))
-else
-ifdef SHARED_LIBRARY
-_RC_BINARY = $(notdir $(SHARED_LIBRARY))
-endif
-endif
-endif
-
-GARBAGE += $(RESFILE) $(RCFILE)
-
-#dummy target so $(RCFILE) doesn't become the default =P
-all::
-
-$(RCFILE): $(RCINCLUDE) $(MOZILLA_DIR)/config/version_win.py
-	$(PYTHON3) $(MOZILLA_DIR)/config/version_win.py '$(_RC_BINARY)' '$(RCINCLUDE)'
-
-endif  # RESFILE
-endif  # Windows
-
-endif
--- a/devtools/client/fronts/inspector.js
+++ b/devtools/client/fronts/inspector.js
@@ -75,25 +75,18 @@ class InspectorFront extends FrontClassW
     return this._highlighters.has(type);
   }
 
   async _getPageStyle() {
     this.pageStyle = await super.getPageStyle();
   }
 
   async getCompatibilityFront() {
-    // DevTools supports a Compatibility actor from version FF79 and above.
-    // This check exists to maintain backwards compatibility with older
-    // backend. This check can be removed once FF79 hits the release channel.
-    if (this._compatibility === undefined) {
-      try {
-        this._compatibility = await super.getCompatibility();
-      } catch (error) {
-        this._compatibility = null;
-      }
+    if (!this._compatibility) {
+      this._compatibility = await super.getCompatibility();
     }
 
     return this._compatibility;
   }
 
   async _startChangesFront() {
     await this.targetFront.getFront("changes");
   }
--- a/devtools/client/inspector/compatibility/actions/compatibility.js
+++ b/devtools/client/inspector/compatibility/actions/compatibility.js
@@ -1,22 +1,16 @@
 /* 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/. */
 
 "use strict";
 
 const nodeConstants = require("devtools/shared/dom-node-constants");
 
-loader.lazyGetter(this, "mdnCompatibility", () => {
-  const MDNCompatibility = require("devtools/shared/compatibility/MDNCompatibility");
-  const cssPropertiesCompatData = require("devtools/shared/compatibility/dataset/css-properties.json");
-  return new MDNCompatibility(cssPropertiesCompatData);
-});
-
 const UserSettings = require("devtools/client/inspector/compatibility/UserSettings");
 
 const {
   COMPATIBILITY_APPEND_NODE_START,
   COMPATIBILITY_APPEND_NODE_SUCCESS,
   COMPATIBILITY_APPEND_NODE_FAILURE,
   COMPATIBILITY_APPEND_NODE_COMPLETE,
   COMPATIBILITY_CLEAR_DESTROYED_NODES,
@@ -246,54 +240,21 @@ function updateNode(node) {
       });
     }
 
     dispatch({ type: COMPATIBILITY_UPDATE_NODE_COMPLETE });
   };
 }
 
 async function _getNodeIssues(node, targetBrowsers) {
-  let declarationBlocksIssues = [];
   const compatibility = await node.inspectorFront.getCompatibilityFront();
-  // Starting with FF79, DevTools include a separate CompatibilityActor to
-  // fetch compatibility issues for the given DOM node. This check exists
-  // to maintain backwards compatibility with FF version < 79 and can be
-  // safely removed once FF79 hits the release channel.
-  if (compatibility) {
-    declarationBlocksIssues = await compatibility.getNodeCssIssues(
-      node,
-      targetBrowsers
-    );
-  } else {
-    const pageStyle = node.inspectorFront.pageStyle;
-    const styles = await pageStyle.getApplied(node, {
-      skipPseudo: false,
-    });
-
-    const declarationBlocks = styles
-      .map(({ rule }) => rule.declarations.filter(d => !d.commentOffsets))
-      .filter(declarations => declarations.length);
-
-    declarationBlocksIssues = declarationBlocks
-      .map(declarationBlock =>
-        mdnCompatibility.getCSSDeclarationBlockIssues(
-          declarationBlock,
-          targetBrowsers
-        )
-      )
-      .flat()
-      .reduce((issues, issue) => {
-        // Get rid of duplicate issue
-        return issues.find(
-          i => i.type === issue.type && i.property === issue.property
-        )
-          ? issues
-          : [...issues, issue];
-      }, []);
-  }
+  const declarationBlocksIssues = await compatibility.getNodeCssIssues(
+    node,
+    targetBrowsers
+  );
 
   return declarationBlocksIssues;
 }
 
 async function _inspectNode(node, targetBrowsers, walker, dispatch) {
   if (node.nodeType !== nodeConstants.ELEMENT_NODE) {
     return;
   }
--- a/devtools/shared/resources/tests/browser_resources_stylesheets.js
+++ b/devtools/shared/resources/tests/browser_resources_stylesheets.js
@@ -75,19 +75,22 @@ add_task(async function() {
     onAvailable: ({ resource }) => availableResources.push(resource),
   });
 
   is(
     availableResources.length,
     EXISTING_RESOURCES.length,
     "Length of existing resources is correct"
   );
-  for (let i = 0; i < EXISTING_RESOURCES.length; i++) {
+  for (let i = 0; i < availableResources.length; i++) {
     const availableResource = availableResources[i];
-    const expectedResource = EXISTING_RESOURCES[i];
+    // We can not expect the resources to always be forwarded in the same order.
+    // See intermittent Bug 1655016.
+    const expectedResource = findMatchingExpectedResource(availableResource);
+    ok(expectedResource, "Found a matching expected resource for the resource");
     await assertResource(availableResource, expectedResource);
   }
 
   info("Check whether ResourceWatcher gets additonal stylesheet");
   await ContentTask.spawn(
     tab.linkedBrowser,
     ADDITIONAL_RESOURCE.styleText,
     text => {
@@ -127,16 +130,24 @@ add_task(async function() {
     availableResources[0],
     Object.assign(EXISTING_RESOURCES[0], { styleText: "" })
   );
 
   await targetList.stopListening();
   await client.close();
 });
 
+function findMatchingExpectedResource(resource) {
+  return EXISTING_RESOURCES.find(
+    expected =>
+      resource.styleSheet.href === expected.href &&
+      resource.styleSheet.nodeHref === expected.nodeHref
+  );
+}
+
 async function assertResource(resource, expected) {
   const { resourceType, styleSheet, isNew } = resource;
   is(
     resourceType,
     ResourceWatcher.TYPES.STYLESHEET,
     "Resource type is correct"
   );
   ok(styleSheet, "Stylesheet object is in the resource");
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1443,36 +1443,33 @@ Promise* Navigator::Share(const ShareDat
 
   IPCWebShareData data(title, text, url);
   auto wgc = mWindow->GetWindowGlobalChild();
   if (!wgc) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
-  auto shareResolver = [self = RefPtr<Navigator>(this)](nsresult aResult) {
-    MOZ_ASSERT(self->mSharePromise);
-    if (NS_SUCCEEDED(aResult)) {
-      self->mSharePromise->MaybeResolveWithUndefined();
-    } else {
-      self->mSharePromise->MaybeReject(aResult);
-    }
-    self->mSharePromise = nullptr;
-  };
-
-  auto shareRejector = [self = RefPtr<Navigator>(this)](
-                           mozilla::ipc::ResponseRejectReason&& aReason) {
-    // IPC died or maybe page navigated...
-    if (self->mSharePromise) {
-      self->mSharePromise = nullptr;
-    }
-  };
-
   // Do the share
-  wgc->SendShare(data, shareResolver, shareRejector);
+  wgc->SendShare(data)->Then(
+      GetCurrentSerialEventTarget(), __func__,
+      [self = RefPtr{this}](
+          PWindowGlobalChild::SharePromise::ResolveOrRejectValue&& aResult) {
+        if (aResult.IsResolve()) {
+          if (NS_SUCCEEDED(aResult.ResolveValue())) {
+            self->mSharePromise->MaybeResolveWithUndefined();
+          } else {
+            self->mSharePromise->MaybeReject(aResult.ResolveValue());
+          }
+        } else if (self->mSharePromise) {
+          // IPC died
+          self->mSharePromise->MaybeReject(NS_BINDING_ABORTED);
+        }
+        self->mSharePromise = nullptr;
+      });
   return mSharePromise;
 }
 
 already_AddRefed<LegacyMozTCPSocket> Navigator::MozTCPSocket() {
   RefPtr<LegacyMozTCPSocket> socket = new LegacyMozTCPSocket(GetWindow());
   return socket.forget();
 }
 
@@ -1485,29 +1482,32 @@ void Navigator::GetGamepads(nsTArray<Ref
   NS_ENSURE_TRUE_VOID(mWindow->GetDocShell());
   nsGlobalWindowInner* win = nsGlobalWindowInner::Cast(mWindow);
 
   // As we are moving this API to secure contexts, we are going to temporarily
   // show a console warning to developers.
   if (!mGamepadSecureContextWarningShown && !win->IsSecureContext()) {
     mGamepadSecureContextWarningShown = true;
     auto msg =
-        u"The Gamepad API is only available in "
+        u"The Gamepad API will only be available in "
         "secure contexts (e.g., https). Please see "
         "https://hacks.mozilla.org/2020/07/securing-gamepad-api/ for more "
         "info."_ns;
     nsContentUtils::ReportToConsoleNonLocalized(
         msg, nsIScriptError::warningFlag, "DOM"_ns, win->GetExtantDoc());
   }
 
-#ifdef NIGHTLY_BUILD
+#ifdef EARLY_BETA_OR_EARLIER
   if (!win->IsSecureContext()) {
     return;
   }
+#endif
 
+#ifdef NIGHTLY_BUILD
+  // We will move this into Beta in Firefox 82
   if (!FeaturePolicyUtils::IsFeatureAllowed(win->GetExtantDoc(),
                                             u"gamepad"_ns)) {
     aRv.ThrowSecurityError(
         "Document's Permission Policy does not allow calling "
         "getGamepads() from this context.");
     return;
   }
 #endif
--- a/dom/plugins/test/testplugin/testplugin.mozbuild
+++ b/dom/plugins/test/testplugin/testplugin.mozbuild
@@ -36,17 +36,16 @@ USE_STATIC_LIBS = True
 
 # Don't use STL wrappers; nptest isn't Gecko code
 DisableStlWrapping()
 
 NO_PGO = True
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     RCFILE  = 'nptest.rc'
-    RESFILE = 'nptest.res'
     DEFFILE = 'nptest.def'
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' and CONFIG['TARGET_CPU'] == 'x86_64':
     OS_LIBS += ['-framework Carbon']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
     CXXFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
     CFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
--- a/gfx/wr/swgl/src/gl.cc
+++ b/gfx/wr/swgl/src/gl.cc
@@ -405,17 +405,17 @@ struct Program {
 // for GL defines to fully expand
 #define CONCAT_KEY(prefix, x, y, z, w, ...) prefix##x##y##z##w
 #define BLEND_KEY(...) CONCAT_KEY(BLEND_, __VA_ARGS__, 0, 0)
 #define FOR_EACH_BLEND_KEY(macro)                                              \
   macro(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)  \
   macro(GL_ONE, GL_ONE_MINUS_SRC_ALPHA, 0, 0)                                  \
   macro(GL_ZERO, GL_ONE_MINUS_SRC_COLOR, 0, 0)                                 \
   macro(GL_ZERO, GL_ONE_MINUS_SRC_COLOR, GL_ZERO, GL_ONE)                      \
-  macro(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA, 0, 0)                                 \ 
+  macro(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA, 0, 0)                                 \
   macro(GL_ZERO, GL_SRC_COLOR, 0, 0) macro(GL_ONE, GL_ONE, 0, 0)               \
   macro(GL_ONE, GL_ONE, GL_ONE, GL_ONE_MINUS_SRC_ALPHA)                        \
   macro(GL_ONE, GL_ZERO, 0, 0)                                                 \
   macro(GL_ONE_MINUS_DST_ALPHA, GL_ONE, GL_ZERO, GL_ONE)                       \
   macro(GL_CONSTANT_COLOR, GL_ONE_MINUS_SRC_COLOR, 0, 0)                       \
   macro(GL_ONE, GL_ONE_MINUS_SRC1_COLOR, 0, 0)
 // clang-format on
 
--- a/image/decoders/nsAVIFDecoder.cpp
+++ b/image/decoders/nsAVIFDecoder.cpp
@@ -190,25 +190,44 @@ bool nsAVIFDecoder::DecodeWithDav1d(cons
       aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT709;
       break;
     case DAV1D_MC_BT2020_NCL:
       aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT2020;
       break;
     case DAV1D_MC_BT2020_CL:
       aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT2020;
       break;
-    case DAV1D_MC_UNKNOWN:
-      aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::UNKNOWN;
+    case DAV1D_MC_CHROMAT_NCL:
+    case DAV1D_MC_CHROMAT_CL:
+    case DAV1D_MC_UNKNOWN:  // MIAF specific
+      switch (mDav1dPicture->seq_hdr->pri) {
+        case DAV1D_COLOR_PRI_BT601:
+          aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT601;
+          break;
+        case DAV1D_COLOR_PRI_BT709:
+          aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT709;
+          break;
+        case DAV1D_COLOR_PRI_BT2020:
+          aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT2020;
+          break;
+        default:
+          aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::UNKNOWN;
+          break;
+      }
       break;
     default:
       MOZ_LOG(sAVIFLog, LogLevel::Debug,
               ("[this=%p] unsupported color matrix value: %u", this,
                mDav1dPicture->seq_hdr->mtrx));
       aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::UNKNOWN;
   }
+  if (aDecodedData.mYUVColorSpace == gfx::YUVColorSpace::UNKNOWN) {
+    // MIAF specific: UNKNOWN color space should be treated as BT601
+    aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT601;
+  }
 
   aDecodedData.mColorRange = mDav1dPicture->seq_hdr->color_range
                                  ? gfx::ColorRange::FULL
                                  : gfx::ColorRange::LIMITED;
 
   return true;
 }
 
@@ -304,26 +323,46 @@ bool nsAVIFDecoder::DecodeWithAOM(const 
       aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT709;
       break;
     case AOM_CICP_MC_BT_2020_NCL:
       aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT2020;
       break;
     case AOM_CICP_MC_BT_2020_CL:
       aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT2020;
       break;
-    case AOM_CICP_MC_UNSPECIFIED:
-      aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::UNKNOWN;
+    case AOM_CICP_MC_CHROMAT_NCL:
+    case AOM_CICP_MC_CHROMAT_CL:
+    case AOM_CICP_MC_UNSPECIFIED:  // MIAF specific
+      switch (img->cp) {
+        case AOM_CICP_CP_BT_601:
+          aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT601;
+          break;
+        case AOM_CICP_CP_BT_709:
+          aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT709;
+          break;
+        case AOM_CICP_CP_BT_2020:
+          aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT2020;
+          break;
+        default:
+          aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::UNKNOWN;
+          break;
+      }
       break;
     default:
       MOZ_LOG(sAVIFLog, LogLevel::Debug,
               ("[this=%p] unsupported aom_matrix_coefficients value: %u", this,
                img->mc));
       aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::UNKNOWN;
   }
 
+  if (aDecodedData.mYUVColorSpace == gfx::YUVColorSpace::UNKNOWN) {
+    // MIAF specific: UNKNOWN color space should be treated as BT601
+    aDecodedData.mYUVColorSpace = gfx::YUVColorSpace::BT601;
+  }
+
   switch (img->range) {
     case AOM_CR_STUDIO_RANGE:
       aDecodedData.mColorRange = gfx::ColorRange::LIMITED;
       break;
     case AOM_CR_FULL_RANGE:
       aDecodedData.mColorRange = gfx::ColorRange::FULL;
       break;
     default:
--- a/js/xpconnect/shell/moz.build
+++ b/js/xpconnect/shell/moz.build
@@ -23,18 +23,16 @@ LOCAL_INCLUDES += [
 
 if CONFIG['CC_TYPE'] == 'clang-cl':
     # Always enter a Windows program through wmain, whether or not we're
     # a console application.
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 # DELAYLOAD_DLLS in this block ensure that the DLL blocklist initializes
 if CONFIG['OS_ARCH'] == 'WINNT':
-    RCINCLUDE = 'xpcshell.rc'
-
     if CONFIG['MOZ_SANDBOX']:
         # For sandbox includes and the include dependencies those have
         LOCAL_INCLUDES += [
             '/security/sandbox/chromium',
             '/security/sandbox/chromium-shim',
         ]
 
         OS_LIBS += [
deleted file mode 100644
--- a/js/xpconnect/shell/xpcshell.rc
+++ /dev/null
@@ -1,6 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-1 RT_MANIFEST "xpcshell.exe.manifest"
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -3338,16 +3338,17 @@ nsDocumentViewer::GetPrintPreviewCurrent
   if (!sf) {
     // No scrollable contents, returns 1 even if there are multiple pages.
     *aNumber = 1;
     return NS_OK;
   }
 
   // in PP mPrtPreview->mPrintObject->mSeqFrame is null
   auto [seqFrame, pageCount] = mPrintJob->GetSeqFrameAndCountPages();
+  Unused << pageCount;
   if (!seqFrame) {
     return NS_ERROR_FAILURE;
   }
 
   nsPoint currentScrollPosition = sf->GetScrollPosition();
   *aNumber = 0;
   float previewScale = seqFrame->GetPrintPreviewScale();
   for (const nsIFrame* sheetFrame : seqFrame->PrincipalChildList()) {
--- a/media/libdav1d/README_MOZILLA
+++ b/media/libdav1d/README_MOZILLA
@@ -26,22 +26,15 @@ The rough steps are:
   third_party/dav1d/src/meson.build as a guide (confirm with the diff) (note the
   empty .asm file in x86_64)
 - Clone the tag from the dav1d repo and build a stand-alone libdav1d following the steps here:
   https://code.videolan.org/videolan/dav1d#compile
 - Copy vcs_version.h from the local build/include/vcs_version.h
   to media/libdav1d/vcs_version.h
 - Copy version.h from local build/include/dav1d/version.h to
   media/libdav1d/version.h
-- Update dav1d.rc:
-  - update the API_VERSION_NUMBER, API_VERSION_NUMBER_STR, defines to
-    match the 'dav1d_soname_version' field in
-    third_party/dav1d/meson.build.
-  - update the PROJECT_VERSION_NUMBER, PROJECT_VERSION_NUMBER_STR
-    defines to match the new project versions from the git tag (or from
-    the project version found in third_party/dav1d/meson.build).
 - Add new options, if any, in moz.build or config.h
 
 Tips:
 - If you see build failures in build-linux64-base-toolchains (or
   similar jobs) dav1d may now require a higher minimum nasm version
   than our base toolchains currently support.  A bug updating the
   minimum nasm version will probably be necessary.
deleted file mode 100644
--- a/media/libdav1d/dav1d.rc
+++ /dev/null
@@ -1,32 +0,0 @@
-#define API_VERSION_NUMBER 4,0,2,0
-#define API_VERSION_NUMBER_STR "4.0.2"
-#define PROJECT_VERSION_NUMBER 0,7,1,0
-#define PROJECT_VERSION_NUMBER_STR "0.7.1"
-
-#include <windows.h>
-
-1 VERSIONINFO
-FILETYPE VFT_DLL
-FILEOS VOS_NT_WINDOWS32
-PRODUCTVERSION PROJECT_VERSION_NUMBER
-FILEVERSION API_VERSION_NUMBER
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904E4"
-    BEGIN
-      VALUE "CompanyName", "VideoLAN"
-      VALUE "ProductName", "dav1d"
-      VALUE "ProductVersion", PROJECT_VERSION_NUMBER_STR
-      VALUE "FileVersion", API_VERSION_NUMBER_STR
-      VALUE "FileDescription", "dav1d " PROJECT_VERSION_NUMBER_STR " - AV1 decoder"
-      VALUE "InternalName", "dav1d"
-      VALUE "OriginalFilename", "libdav1d.dll"
-      VALUE "LegalCopyright", "Copyright \251 @COPYRIGHT_YEARS@ VideoLAN and dav1d Authors"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x409, 1252
-  END
-END
--- a/media/libdav1d/moz.build
+++ b/media/libdav1d/moz.build
@@ -192,17 +192,16 @@ EXPORTS.dav1d += [
    '../../third_party/dav1d/include/dav1d/common.h',
    '../../third_party/dav1d/include/dav1d/data.h',
    '../../third_party/dav1d/include/dav1d/dav1d.h',
    '../../third_party/dav1d/include/dav1d/headers.h',
    '../../third_party/dav1d/include/dav1d/picture.h',
 ]
 
 if CONFIG['OS_TARGET'] == 'WINNT':
-    RCFILE = 'dav1d.rc'
     SOURCES += [
         '../../third_party/dav1d/src/win32/thread.c'
     ]
 
 if CONFIG['CC_TYPE'] == 'gcc':
     LOCAL_INCLUDES += ['../../third_party/dav1d/include/compat/gcc/']
     EXPORTS.dav1d += ['../../third_party/dav1d/include/compat/gcc/stdatomic.h']
 
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -40,17 +40,16 @@ if CONFIG['OS_TARGET'] == 'WINNT':
         DEFFILE = 'mozglue.def'
     # We'll break the DLL blocklist if we immediately load user32.dll.
     # For the same reason, we delayload winmm.dll which statically links
     # user32.dll.
     DELAYLOAD_DLLS += [
         'user32.dll',
         'winmm.dll',
     ]
-    RCINCLUDE = 'mozglue.rc'
 
 if CONFIG['MOZ_WIDGET_TOOLKIT']:
 
     if CONFIG['MOZ_MEMORY'] and FORCE_SHARED_LIB:
         pass
         # TODO: SHARED_LIBRARY_LIBS go here
     else:
         # Temporary, until bug 662814 lands
deleted file mode 100644
--- a/mozglue/build/mozglue.rc
+++ /dev/null
@@ -1,6 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-1 24 "mozglue.dll.manifest"
--- a/mozglue/tests/gtest/TestDllBlocklist_AllowByVersion/moz.build
+++ b/mozglue/tests/gtest/TestDllBlocklist_AllowByVersion/moz.build
@@ -7,12 +7,11 @@ DIST_INSTALL = False
 
 SharedLibrary('TestDllBlocklist_AllowByVersion')
 
 UNIFIED_SOURCES = [
     'TestDllBlocklist_AllowByVersion.cpp',
 ]
 
 RCFILE  = 'TestDllBlocklist_AllowByVersion.rc'
-RESFILE = 'TestDllBlocklist_AllowByVersion.res'
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     TEST_HARNESS_FILES.gtest += ['!TestDllBlocklist_AllowByVersion.dll']
--- a/mozglue/tests/gtest/TestDllBlocklist_MatchByVersion/moz.build
+++ b/mozglue/tests/gtest/TestDllBlocklist_MatchByVersion/moz.build
@@ -7,12 +7,11 @@ DIST_INSTALL = False
 
 SharedLibrary('TestDllBlocklist_MatchByVersion')
 
 UNIFIED_SOURCES = [
     'TestDllBlocklist_MatchByVersion.cpp',
 ]
 
 RCFILE  = 'TestDllBlocklist_MatchByVersion.rc'
-RESFILE = 'TestDllBlocklist_MatchByVersion.res'
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     TEST_HARNESS_FILES.gtest += ['!TestDllBlocklist_MatchByVersion.dll']
--- a/mozglue/tests/gtest/TestDllBlocklist_NoOpEntryPoint/moz.build
+++ b/mozglue/tests/gtest/TestDllBlocklist_NoOpEntryPoint/moz.build
@@ -7,12 +7,11 @@ DIST_INSTALL = False
 
 SharedLibrary('TestDllBlocklist_NoOpEntryPoint')
 
 UNIFIED_SOURCES = [
     'TestDllBlocklist_NoOpEntryPoint.cpp',
 ]
 
 RCFILE  = 'TestDllBlocklist_NoOpEntryPoint.rc'
-RESFILE = 'TestDllBlocklist_NoOpEntryPoint.res'
 
 if CONFIG['COMPILE_ENVIRONMENT']:
     TEST_HARNESS_FILES.gtest += ['!TestDllBlocklist_NoOpEntryPoint.dll']
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -1701,22 +1701,16 @@ VARIABLES = {
         This variable contains a list of system libaries to link against.
         """),
     'RCFILE': (Path, six.text_type,
                """The program .rc file.
 
         This variable can only be used on Windows.
         """),
 
-    'RESFILE': (six.text_type, six.text_type,
-                """The program .res file.
-
-        This variable can only be used on Windows.
-        """),
-
     'RCINCLUDE': (Path, six.text_type,
                   """The resource script file to be included in the default .res file.
 
         This variable can only be used on Windows.
         """),
 
     'DEFFILE': (Path, six.text_type,
                 """The program .def (module definition) file.
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1084,17 +1084,16 @@ class TreeMetadataEmitter(LoggingMixin):
 
         # Proxy some variables as-is until we have richer classes to represent
         # them. We should aim to keep this set small because it violates the
         # desired abstraction of the build definition away from makefiles.
         passthru = VariablePassthru(context)
         varlist = [
             'EXTRA_DSO_LDOPTS',
             'RCFILE',
-            'RESFILE',
             'RCINCLUDE',
             'WIN32_EXE_LDFLAGS',
             'USE_EXTENSION_MANIFEST',
         ]
         for v in varlist:
             if v in context and context[v]:
                 passthru.variables[v] = context[v]
 
--- a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
@@ -1,12 +1,11 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # Any copyright is dedicated to the Public Domain.
 # http://creativecommons.org/publicdomain/zero/1.0/
 
 DELAYLOAD_DLLS = ['foo.dll', 'bar.dll']
 
 RCFILE = 'foo.rc'
-RESFILE = 'bar.res'
 RCINCLUDE = 'bar.rc'
 DEFFILE = 'baz.def'
 
 WIN32_EXE_LDFLAGS += ['-subsystem:console']
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -317,19 +317,16 @@ class TestRecursiveMakeBackend(BackendTe
 
         backend_path = mozpath.join(env.topobjdir, 'backend.mk')
         lines = [l.strip() for l in open(backend_path, 'rt').readlines()[2:]]
 
         expected = {
             'RCFILE': [
                 'RCFILE := $(srcdir)/foo.rc',
             ],
-            'RESFILE': [
-                'RESFILE := bar.res',
-            ],
             'RCINCLUDE': [
                 'RCINCLUDE := $(srcdir)/bar.rc',
             ],
             'WIN32_EXE_LDFLAGS': [
                 'WIN32_EXE_LDFLAGS += -subsystem:console',
             ],
         }
 
--- a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
@@ -2,13 +2,12 @@
 # Any copyright is dedicated to the Public Domain.
 # http://creativecommons.org/publicdomain/zero/1.0/
 
 DIST_INSTALL = False
 
 DELAYLOAD_DLLS = ['foo.dll', 'bar.dll']
 
 RCFILE = 'foo.rc'
-RESFILE = 'bar.res'
 RCINCLUDE = 'bar.rc'
 DEFFILE = 'baz.def'
 
 WIN32_EXE_LDFLAGS += ['-subsystem:console']
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -183,17 +183,16 @@ class TestEmitterBasic(unittest.TestCase
         objs = self.read_topsrcdir(reader)
 
         self.assertEqual(len(objs), 1)
         self.assertIsInstance(objs[0], VariablePassthru)
 
         wanted = {
             'NO_DIST_INSTALL': True,
             'RCFILE': 'foo.rc',
-            'RESFILE': 'bar.res',
             'RCINCLUDE': 'bar.rc',
             'WIN32_EXE_LDFLAGS': ['-subsystem:console'],
         }
 
         variables = objs[0].variables
         maxDiff = self.maxDiff
         self.maxDiff = None
         self.assertEqual(wanted, variables)
--- a/taskcluster/ci/source-test/shadow-scheduler.yml
+++ b/taskcluster/ci/source-test/shadow-scheduler.yml
@@ -149,19 +149,8 @@ bugbug_reduced_high:
     treeherder:
         symbol: SS(bugbug_reduced_high)
     index:
         product: source
         job-name: shadow-scheduler-bugbug_reduced_high
     worker:
         env:
             TASKGRAPH_OPTIMIZE_STRATEGIES: taskgraph.optimize:experimental.bugbug_reduced_high
-
-seta:
-    description: Runs the SETA optimization strategy instead of the default.
-    treeherder:
-        symbol: SS(seta)
-    index:
-        product: source
-        job-name: shadow-scheduler-seta
-    worker:
-        env:
-            TASKGRAPH_OPTIMIZE_STRATEGIES: taskgraph.optimize:experimental.seta
--- a/taskcluster/docs/optimization-schedules.rst
+++ b/taskcluster/docs/optimization-schedules.rst
@@ -89,9 +89,9 @@ will set ``SCHEDULES.exclusive`` to ``hp
 Task Annotation
 :::::::::::::::
 
 Tasks are annotated with the components they belong to using the ``"skip-unless-schedules"`` optimization, which takes a list of components for this task::
 
     task['optimization'] = {'skip-unless-schedules': ['windows', 'gtest']}
 
 For tests, this value is set automatically by the test transform based on the suite name and the platform family, doing the correct thing for inclusive test suites.
-Tests also use SETA via ``"skip-unless-schedules-or-seta"``, which skips a task if it is not affected *or* if SETA deems it unimportant.
+Tests can also use a variety of other optimizers, such as ``relevant_tests``, ``bugbug`` (uses machine learning) or ``backstop`` (ensures regressions aren't missed).
--- a/taskcluster/taskgraph/optimize/__init__.py
+++ b/taskcluster/taskgraph/optimize/__init__.py
@@ -563,22 +563,16 @@ class experimental(object):
     """Use the reduced set of tasks (and no groups) chosen by bugbug, high
     confidence threshold."""
 
     relevant_tests = {
         'test': Any('skip-unless-schedules', 'skip-unless-has-relevant-tests'),
     }
     """Runs task containing tests in the same directories as modified files."""
 
-    seta = {
-        'test': Any('skip-unless-schedules', 'seta'),
-    }
-    """Provides a stable history of SETA's performance in the event we make it
-    non-default in the future. Only useful as a benchmark."""
-
 
 class ExperimentalOverride(object):
     """Overrides dictionaries that are stored in a container with new values.
 
     This can be used to modify all strategies in a collection the same way,
     presumably with strategies affecting kinds of tasks tangential to the
     current context.
 
--- a/taskcluster/taskgraph/optimize/bugbug.py
+++ b/taskcluster/taskgraph/optimize/bugbug.py
@@ -3,63 +3,65 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 from collections import defaultdict
 
 from six.moves.urllib.parse import urlsplit
 
-from taskgraph.optimize import register_strategy, OptimizationStrategy, seta
+from taskgraph.optimize import register_strategy, registry, OptimizationStrategy
 from taskgraph.util.bugbug import (
     BugbugTimeoutException,
     push_schedules,
     CT_HIGH,
     CT_MEDIUM,
     CT_LOW,
 )
 from taskgraph.util.hg import get_push_data
 
+FALLBACK = "skip-unless-has-relevant-tests"
+
 
 @register_strategy("bugbug-low", args=(CT_LOW,))
 @register_strategy("bugbug-medium", args=(CT_MEDIUM,))
 @register_strategy("bugbug-high", args=(CT_HIGH,))
 @register_strategy("bugbug-tasks-medium", args=(CT_MEDIUM, True))
 @register_strategy("bugbug-tasks-high", args=(CT_HIGH, True))
 @register_strategy("bugbug-reduced", args=(CT_MEDIUM, True, True))
-@register_strategy("bugbug-reduced-fallback", args=(CT_MEDIUM, True, True, True))
+@register_strategy("bugbug-reduced-fallback", args=(CT_MEDIUM, True, True, FALLBACK))
 @register_strategy("bugbug-reduced-high", args=(CT_HIGH, True, True))
 @register_strategy("bugbug-reduced-manifests", args=(CT_MEDIUM, False, True))
-@register_strategy("bugbug-reduced-manifests-fallback", args=(CT_MEDIUM, False, True, True))
+@register_strategy("bugbug-reduced-manifests-fallback", args=(CT_MEDIUM, False, True, FALLBACK))
 @register_strategy(
     "bugbug-reduced-manifests-fallback-last-10-pushes",
-    args=(0.3, False, True, True, 10),
+    args=(0.3, False, True, FALLBACK, 10),
 )
 class BugBugPushSchedules(OptimizationStrategy):
     """Query the 'bugbug' service to retrieve relevant tasks and manifests.
 
     Args:
         confidence_threshold (float): The minimum confidence threshold (in
             range [0, 1]) needed for a task to be scheduled.
         tasks_only (bool): Whether or not to only use tasks and no groups
             (default: False)
         use_reduced_tasks (bool): Whether or not to use the reduced set of tasks
             provided by the bugbug service (default: False).
-        fallback (bool): Whether or not to fallback to SETA if there was a failure
-            in bugbug (default: False)
+        fallback (str): The fallback strategy to use if there
+            was a failure in bugbug (default: None)
         num_pushes (int): The number of pushes to consider for the selection
             (default: 1).
     """
 
     def __init__(
         self,
         confidence_threshold,
         tasks_only=False,
         use_reduced_tasks=False,
-        fallback=False,
+        fallback=None,
         num_pushes=1,
     ):
         self.confidence_threshold = confidence_threshold
         self.use_reduced_tasks = use_reduced_tasks
         self.fallback = fallback
         self.tasks_only = tasks_only
         self.num_pushes = num_pushes
         self.timedout = False
@@ -71,17 +73,18 @@ class BugBugPushSchedules(OptimizationSt
             return False
 
         current_push_id = int(params['pushlog_id'])
 
         branch = urlsplit(params['head_repository']).path.strip('/')
         rev = params['head_rev']
 
         if self.timedout:
-            return seta.is_low_value_task(task.label, project)
+            return registry[self.fallback].should_remove_task(
+                    task, params, importance)
 
         data = {}
 
         start_push_id = current_push_id - self.num_pushes + 1
         if self.num_pushes != 1:
             push_data = get_push_data(
                 params["head_repository"], project, start_push_id, current_push_id - 1
             )
deleted file mode 100644
--- a/taskcluster/taskgraph/optimize/seta.py
+++ /dev/null
@@ -1,178 +0,0 @@
-# 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/.
-
-from __future__ import absolute_import, print_function, unicode_literals
-
-import logging
-
-import attr
-import requests
-import six
-from redo import retry
-from requests import exceptions
-from taskgraph.optimize import OptimizationStrategy, register_strategy
-
-logger = logging.getLogger(__name__)
-
-# It's a list of project name which SETA is useful on
-SETA_PROJECTS = ['autoland', 'try']
-SETA_HIGH_PRIORITY = 1
-SETA_LOW_PRIORITY = 5
-
-SETA_ENDPOINT = "https://treeherder.mozilla.org/api/project/%s/seta/" \
-                "job-priorities/?build_system_type=%s&priority=%s"
-
-
-@attr.s(frozen=True)
-class SETA(object):
-    """
-    Interface to the SETA service, which defines low-value tasks that can be optimized out
-    of the taskgraph.
-    """
-
-    # cached low value tasks, by project
-    low_value_tasks = attr.ib(factory=dict, init=False)
-    low_value_bb_tasks = attr.ib(factory=dict, init=False)
-
-    def _get_task_string(self, task_tuple):
-        # convert task tuple to single task string, so the task label sent in can match
-        # remove any empty parts of the tuple
-        task_tuple = [x for x in task_tuple if len(x) != 0]
-
-        if len(task_tuple) == 0:
-            return ''
-        if len(task_tuple) != 3:
-            return ' '.join(task_tuple)
-
-        return 'test-%s/%s-%s' % (task_tuple[0], task_tuple[1], task_tuple[2])
-
-    def query_low_value_tasks(self, project):
-        # Request the set of low value tasks from the SETA service.  Low value
-        # tasks will be optimized out of the task graph.
-        low_value_tasks = set()
-
-        # we want to get low priority taskcluster jobs
-        url_low = SETA_ENDPOINT % (project, 'taskcluster', SETA_LOW_PRIORITY)
-        url_high = SETA_ENDPOINT % (project, 'taskcluster', SETA_HIGH_PRIORITY)
-
-        # Try to fetch the SETA data twice, falling back to an empty list of low value tasks.
-        # There are 10 seconds between each try.
-        try:
-            logger.debug("Retrieving low-value jobs list from SETA")
-            response = retry(requests.get, attempts=2, sleeptime=10,
-                             args=(url_low, ),
-                             kwargs={'timeout': 60, 'headers': ''})
-            task_list = response.json().get('jobtypes', '')
-
-            if type(task_list) == dict and len(task_list) > 0:
-                task_list = list(task_list.values())[0]
-                if type(task_list) == list and len(task_list) > 0:
-                    low_value_tasks = set(task_list)
-
-            # hack seta tasks to run 'opt' jobs on 'pgo' builds - see Bug 1522111
-            logger.debug("Retrieving high-value jobs list from SETA")
-            response = retry(requests.get, attempts=2, sleeptime=10,
-                             args=(url_high, ),
-                             kwargs={'timeout': 60, 'headers': ''})
-            task_list = response.json().get('jobtypes', '')
-
-            high_value_tasks = set()
-            if type(task_list) == dict and len(task_list) > 0:
-                task_list = list(task_list.values())[0]
-                if type(task_list) == list and len(task_list) > 0:
-                    high_value_tasks = set(task_list)
-
-            # hack seta to treat all Android Raptor tasks as low value - see Bug 1535016
-            def only_android_raptor(task):
-                return task.startswith('test-android') and 'raptor' in task
-
-            high_value_android_tasks = set(filter(only_android_raptor, high_value_tasks))
-            low_value_tasks.update(high_value_android_tasks)
-
-            seta_conversions = {
-            }
-            # Now add new variants to the low-value set
-            for old, new in six.iteritems(seta_conversions):
-                if any(t.startswith(old) for t in low_value_tasks):
-                    low_value_tasks.update(
-                        [t.replace(old, new) for t in low_value_tasks]
-                    )
-
-            # ... and the high value list
-            for old, new in six.iteritems(seta_conversions):
-                if any(t.startswith(old) for t in high_value_tasks):
-                    high_value_tasks.update(
-                        [t.replace(old, new) for t in high_value_tasks]
-                    )
-
-            def new_as_old_is_high_value(label):
-                # This doesn't care if there are multiple old values for one new
-                # it will always check every old value.
-                for old, new in six.iteritems(seta_conversions):
-                    if label.startswith(new):
-                        old_label = label.replace(new, old)
-                        if old_label in high_value_tasks:
-                            return True
-                return False
-
-            # Now rip out from low value things that were high value in opt
-            low_value_tasks = {
-                x for x in low_value_tasks if not new_as_old_is_high_value(x)
-            }
-
-            # ensure no non-fuzzing build tasks slipped in, we never want to optimize out those
-            low_value_tasks = {
-                x for x in low_value_tasks if 'build' not in x or 'fuzzing' in x
-            }
-
-        # In the event of request times out, requests will raise a TimeoutError.
-        except exceptions.Timeout:
-            logger.warning("SETA timeout, we will treat all test tasks as high value.")
-
-        # In the event of a network problem (e.g. DNS failure, refused connection, etc),
-        # requests will raise a ConnectionError.
-        except exceptions.ConnectionError:
-            logger.warning("SETA connection error, we will treat all test tasks as high value.")
-
-        # In the event of the rare invalid HTTP response(e.g 404, 401),
-        # requests will raise an HTTPError exception
-        except exceptions.HTTPError:
-            logger.warning("We got bad Http response from ouija,"
-                           " we will treat all test tasks as high value.")
-
-        # We just print the error out as a debug message if we failed to catch the exception above
-        except exceptions.RequestException as error:
-            logger.warning(error)
-
-        # When we get invalid JSON (i.e. 500 error), it results in a ValueError (bug 1313426)
-        except ValueError as error:
-            logger.warning("Invalid JSON, possible server error: {}".format(error))
-
-        return low_value_tasks
-
-    def is_low_value_task(self, label, project):
-        # marking a task as low_value means it will be optimized out by tc
-        if project not in SETA_PROJECTS:
-            return False
-
-        # The SETA service has a superficial check preventing try, so spoof autoland
-        project = 'autoland'
-
-        # cache the low value tasks per project to avoid repeated SETA server queries
-        if project not in self.low_value_tasks:
-            self.low_value_tasks[project] = self.query_low_value_tasks(project)
-        return label in self.low_value_tasks[project]
-
-
-# create a single instance of this class, and expose its `is_low_value_task`
-# bound method as a module-level function
-is_low_value_task = SETA().is_low_value_task
-
-
-@register_strategy('seta')
-class SkipLowValue(OptimizationStrategy):
-
-    def should_remove_task(self, task, params, _):
-        # Return True to optimize a low value task.
-        return is_low_value_task(task.label, params['project'])
--- a/taskcluster/taskgraph/test/test_optimize_strategies.py
+++ b/taskcluster/taskgraph/test/test_optimize_strategies.py
@@ -5,21 +5,22 @@ from __future__ import absolute_import
 
 import time
 from datetime import datetime
 from time import mktime
 
 import pytest
 from mozunit import main
 
-from taskgraph.optimize import seta
+from taskgraph.optimize import registry
 from taskgraph.optimize.backstop import Backstop
 from taskgraph.optimize.bugbug import (
     BugBugPushSchedules,
     DisperseGroups,
+    FALLBACK,
     SkipUnlessDebug,
 )
 from taskgraph.task import Task
 from taskgraph.util.bugbug import (
     BUGBUG_BASE_URL,
     BugbugTimeoutException,
     push_schedules,
 )
@@ -285,22 +286,27 @@ def test_bugbug_fallback(monkeypatch, re
     url = BUGBUG_BASE_URL + query
     responses.add(
         responses.GET,
         url,
         json={"ready": False},
         status=202,
     )
 
+    opt = BugBugPushSchedules(0.5, fallback=FALLBACK)
+
     # Make sure the test runs fast.
     monkeypatch.setattr(time, 'sleep', lambda i: None)
 
-    monkeypatch.setattr(seta, 'is_low_value_task', lambda l, p: l == default_tasks[0].label)
+    def fake_should_remove_task(task, params, _):
+        return task.label == default_tasks[0].label
 
-    opt = BugBugPushSchedules(0.5, fallback=True)
+    monkeypatch.setattr(registry[FALLBACK], "should_remove_task",
+                        fake_should_remove_task)
+
     assert opt.should_remove_task(default_tasks[0], params, None)
 
     # Make sure we don't hit bugbug more than once.
     responses.reset()
 
     assert not opt.should_remove_task(default_tasks[1], params, None)
 
 
--- a/taskcluster/taskgraph/test/test_taskgraph.py
+++ b/taskcluster/taskgraph/test/test_taskgraph.py
@@ -20,17 +20,17 @@ class TestTaskGraph(unittest.TestCase):
         tasks = {
             'a': Task(kind='test', label='a',
                       description='Task A',
                       attributes={'attr': 'a-task'},
                       task={'taskdef': True}),
             'b': Task(kind='test', label='b',
                       attributes={},
                       task={'task': 'def'},
-                      optimization={'seta': None},
+                      optimization={'skip-unless-has-relevant-tests': None},
                       # note that this dep is ignored, superseded by that
                       # from the taskgraph's edges
                       dependencies={'first': 'a'}),
         }
         graph = Graph(nodes=set('ab'), edges={('a', 'b', 'edgelabel')})
         taskgraph = TaskGraph(tasks, graph)
 
         res = taskgraph.to_json()
@@ -49,56 +49,56 @@ class TestTaskGraph(unittest.TestCase):
             'b': {
                 'kind': 'test',
                 'label': 'b',
                 'description': '',
                 'attributes': {'kind': 'test'},
                 'task': {'task': 'def'},
                 'dependencies': {},
                 'soft_dependencies': [],
-                'optimization': {'seta': None},
+                'optimization': {'skip-unless-has-relevant-tests': None},
             }
         })
 
     def test_round_trip(self):
         graph = TaskGraph(tasks={
             'a': Task(
                 kind='fancy',
                 label='a',
                 description='Task A',
                 attributes={},
                 dependencies={'prereq': 'b'},  # must match edges, below
-                optimization={'seta': None},
+                optimization={'skip-unless-has-relevant-tests': None},
                 task={'task': 'def'}),
             'b': Task(
                 kind='pre',
                 label='b',
                 attributes={},
                 dependencies={},
-                optimization={'seta': None},
+                optimization={'skip-unless-has-relevant-tests': None},
                 task={'task': 'def2'}),
         }, graph=Graph(nodes={'a', 'b'}, edges={('a', 'b', 'prereq')}))
 
         tasks, new_graph = TaskGraph.from_json(graph.to_json())
         self.assertEqual(graph, new_graph)
 
     simple_graph = TaskGraph(tasks={
         'a': Task(
             kind='fancy',
             label='a',
             attributes={},
             dependencies={'prereq': 'b'},  # must match edges, below
-            optimization={'seta': None},
+            optimization={'skip-unless-has-relevant-tests': None},
             task={'task': 'def'}),
         'b': Task(
             kind='pre',
             label='b',
             attributes={},
             dependencies={},
-            optimization={'seta': None},
+            optimization={'skip-unless-has-relevant-tests': None},
             task={'task': 'def2'}),
     }, graph=Graph(nodes={'a', 'b'}, edges={('a', 'b', 'prereq')}))
 
     def test_contains(self):
         assert 'a' in self.simple_graph
         assert 'c' not in self.simple_graph
 
 
--- a/taskcluster/taskgraph/util/schema.py
+++ b/taskcluster/taskgraph/util/schema.py
@@ -210,18 +210,16 @@ OptimizationSchema = voluptuous.Any(
     # optimize strategy aliases for build kind
     {'build': list(schedules.ALL_COMPONENTS)},
     {'build-fuzzing': None},
     # search the index for the given index namespaces, and replace this task if found
     # the search occurs in order, with the first match winning
     {'index-search': [text_type]},
     {'push-interval-10': None},
     {'push-interval-25': None},
-    # consult SETA and skip this task if it is low-value
-    {'seta': None},
     # skip this task if none of the given file patterns match
     {'skip-unless-changed': [text_type]},
     # skip this task if unless the change files' SCHEDULES contains any of these components
     {'skip-unless-schedules': list(schedules.ALL_COMPONENTS)},
     # optimize strategy aliases for the test kind
     {'test': list(schedules.ALL_COMPONENTS)},
     {'test-inclusive': list(schedules.ALL_COMPONENTS)},
 )
--- a/taskcluster/test/data/bugbug-push-schedules.json
+++ b/taskcluster/test/data/bugbug-push-schedules.json
@@ -2459,17 +2459,16 @@
     "test-windows10-64-shippable/opt-raptor-tp6-firefox-cold-ebay-e10s",
     "test-linux1804-64/debug-xpcshell-spi-nw-e10s-1",
     "test-linux64-shippable/opt-raptor-tp6-firefox-cold-yandex-e10s",
     "test-windows10-64-shippable/opt-web-platform-tests-e10s-3",
     "test-windows7-32/debug-gtest-1proc",
     "test-windows7-32-shippable/opt-mochitest-browser-chrome-e10s-6",
     "test-android-em-7.0-x86_64/debug-geckoview-xpcshell-e10s-4",
     "test-windows10-64-qr/debug-mochitest-browser-chrome-e10s-5",
-    "source-test-shadow-scheduler-seta",
     "test-windows10-64-shippable-qr/opt-awsy-base-e10s",
     "test-vismet-android-hw-g5-7-0-arm7-api-16-shippable/opt-browsertime-tp6m-geckoview-cold-ebay-kleinanzeigen-search",
     "test-vismet-android-hw-p2-8-0-android-aarch64-shippable/opt-browsertime-tp6m-geckoview-cold-amazon-search",
     "test-linux64-shippable/opt-raptor-tp6-firefox-cold-instagram-e10s",
     "test-windows10-64-qr/debug-web-platform-tests-reftest-e10s-2",
     "test-macosx1014-64-shippable/opt-mochitest-a11y-1proc",
     "test-linux1804-64-shippable/opt-awsy-tp6-e10s",
     "test-windows10-64-shippable/opt-web-platform-tests-reftest-e10s-2",
--- a/toolkit/components/maintenanceservice/maintenanceservice.rc
+++ b/toolkit/components/maintenanceservice/maintenanceservice.rc
@@ -22,23 +22,16 @@
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
 #ifdef _WIN32
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 #pragma code_page(1252)
 #endif //_WIN32
 
 /////////////////////////////////////////////////////////////////////////////
 //
-// RT_MANIFEST
-//
-
-1                       RT_MANIFEST             "maintenanceservice.exe.manifest"
-
-/////////////////////////////////////////////////////////////////////////////
-//
 // DESIGNINFO
 //
 
 #ifdef APSTUDIO_INVOKED
 GUIDELINES DESIGNINFO 
 BEGIN
 END
 #endif    // APSTUDIO_INVOKED
--- a/toolkit/crashreporter/client/crashreporter.rc
+++ b/toolkit/crashreporter/client/crashreporter.rc
@@ -45,18 +45,16 @@ END
 3 TEXTINCLUDE 
 BEGIN
     "\r\n"
     "\0"
 END
 
 #endif    // APSTUDIO_INVOKED
 
-1 24 "crashreporter.exe.manifest"
-
 /////////////////////////////////////////////////////////////////////////////
 //
 // Icon
 //
 
 // Icon with lowest ID value placed first to ensure application icon
 // remains consistent on all systems.
 IDI_MAINICON            ICON                    "crashreporter.ico"
deleted file mode 100644
--- a/toolkit/mozapps/defaultagent/DefaultBrowserAgent.rc
+++ /dev/null
@@ -1,6 +0,0 @@
-/* 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/. */
-
-#include "winresrc.h"
-1 RT_MANIFEST "DefaultBrowserAgent.manifest"
--- a/toolkit/mozapps/defaultagent/Makefile.in
+++ b/toolkit/mozapps/defaultagent/Makefile.in
@@ -6,12 +6,11 @@
 # it's going to run in the background when the user may not expect it, and
 # we don't want a console window to just appear out of nowhere on them.
 # For debug builds though, it's okay to use the existing MOZ_WINCONSOLE value.
 ifndef MOZ_DEBUG
 MOZ_WINCONSOLE = 0
 endif
 
 # Rebuild if the resources or manifest change.
-EXTRA_DEPS += $(srcdir)/DefaultBrowserAgent.rc
-EXTRA_DEPS += $(srcdir)/DefaultBrowserAgent.manifest
+EXTRA_DEPS += $(srcdir)/default-browser-agent.manifest
 
 include $(topsrcdir)/config/rules.mk
rename from toolkit/mozapps/defaultagent/DefaultBrowserAgent.manifest
rename to toolkit/mozapps/defaultagent/default-browser-agent.manifest
--- a/toolkit/mozapps/defaultagent/moz.build
+++ b/toolkit/mozapps/defaultagent/moz.build
@@ -64,18 +64,16 @@ DEFINES["NS_NO_XPCOM"] = True
 DEFINES['IMPL_MFBT'] = True
 
 DEFINES['UNICODE'] = True
 DEFINES['_UNICODE'] = True
 
 for var in ("MOZ_APP_BASENAME", "MOZ_APP_DISPLAYNAME", "MOZ_APP_VENDOR"):
     DEFINES[var] = '"%s"' % CONFIG[var]
 
-RCINCLUDE = "DefaultBrowserAgent.rc"
-
 # We need STL headers that aren't allowed when wrapping is on (at least
 # <filesystem>, and possibly others).
 DisableStlWrapping()
 
 # We need this to be able to use wmain as the entry point on MinGW;
 # otherwise it will try to use WinMain.
 if CONFIG['CC_TYPE'] == 'clang-cl':
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
--- a/toolkit/mozapps/update/UpdateService.jsm
+++ b/toolkit/mozapps/update/UpdateService.jsm
@@ -4548,29 +4548,35 @@ Downloader.prototype = {
     // A promise that we can resolve at some point to time out the language pack
     // update process.
     let timeoutPromise = new Promise(resolve => {
       this._langPackTimeout = resolve;
     });
 
     let update = unwrap(this._update);
 
+    let existing = LangPackUpdates.get(update);
+    if (existing) {
+      // We have already started staging lang packs for this update, no need to
+      // do it again.
+      return;
+    }
+
     // Note that we don't care about success or failure here, either way we will
     // continue with the update process.
     let langPackPromise = AddonManager.stageLangpacksForAppUpdate(
       update.appVersion,
       update.appVersion
     )
       .catch(error => {
         LOG(
           `Add-ons manager threw exception while updating language packs: ${error}`
         );
       })
       .finally(() => {
-        LangPackUpdates.delete(update);
         this._langPackTimeout = null;
       });
 
     LangPackUpdates.set(
       update,
       Promise.race([langPackPromise, timeoutPromise])
     );
   },
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -4101,17 +4101,17 @@ function waitForUpdateDownload(aUpdates,
   if (state == STATE_NONE || state == STATE_FAILED) {
     do_throw("nsIApplicationUpdateService:downloadUpdate returned " + state);
   }
   return new Promise(resolve =>
     gAUS.addDownloadListener({
       onStartRequest: aRequest => {},
       onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {},
       onStatus: (aRequest, aStatus, aStatusText) => {},
-      onStopRequest: (request, status) => {
+      onStopRequest(request, status) {
         gAUS.removeDownloadListener(this);
         Assert.equal(
           aExpectedStatus,
           status,
           "the download status" + MSG_SHOULD_EQUAL
         );
         resolve(request, status);
       },
--- a/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js
@@ -176,11 +176,71 @@ add_task(async function testLangpackStag
     "Should see the right platform version"
   );
 
   resolve();
 
   await notified;
 });
 
+add_task(async function testRedownload() {
+  // When the download of a partial mar fails the same downloader is re-used to
+  // download the complete mar. We should only call the add-ons manager to stage
+  // language packs once in this case.
+  Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
+
+  let partialPatch = getRemotePatchString({
+    type: "partial",
+    url: gURLData + "missing.mar",
+    size: 28,
+  });
+  let completePatch = getRemotePatchString({});
+  let updateString = getRemoteUpdateString({}, partialPatch + completePatch);
+  gResponseBody = getRemoteUpdatesXMLString(updateString);
+
+  let { updates } = await waitForUpdateCheck(true);
+
+  initMockIncrementalDownload();
+  gIncrementalDownloadErrorType = 3;
+
+  let stageCount = 0;
+  XPIInstall.stageLangpacksForAppUpdate = () => {
+    stageCount++;
+    return Promise.resolve();
+  };
+
+  let downloadCount = 0;
+  let listener = {
+    onStartRequest: aRequest => {},
+    onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {},
+    onStatus: (aRequest, aStatus, aStatusText) => {},
+    onStopRequest: (request, status) => {
+      Assert.equal(
+        status,
+        downloadCount ? 0 : Cr.NS_ERROR_CORRUPTED_CONTENT,
+        "Should have seen the right status."
+      );
+      downloadCount++;
+
+      // Keep the same status.
+      gIncrementalDownloadErrorType = 3;
+    },
+    QueryInterface: ChromeUtils.generateQI([
+      "nsIRequestObserver",
+      "nsIProgressEventSink",
+    ]),
+  };
+  gAUS.addDownloadListener(listener);
+
+  let bestUpdate = gAUS.selectUpdate(updates);
+  gAUS.downloadUpdate(bestUpdate, false);
+
+  await waitForEvent("update-downloaded");
+
+  gAUS.removeDownloadListener(listener);
+
+  Assert.equal(downloadCount, 2, "Should have seen two downloads");
+  Assert.equal(stageCount, 1, "Should have only tried to stage langpacks once");
+});
+
 add_task(async function finish() {
   stop_httpserver(doTestFinish);
 });
--- a/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
+++ b/toolkit/mozapps/update/tests/unit_aus_update/xpcshell.ini
@@ -1,15 +1,17 @@
 # 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/.
 
 [DEFAULT]
 tags = appupdate
 head = head_update.js
+prefs =
+  app.update.staging.enabled=false
 support-files =
   ../data/shared.js
   ../data/sharedUpdateXML.js
   ../data/xpcshellUtilsAUS.js
 
 [ausReadStrings.js]
 [canCheckForAndCanApplyUpdates.js]
 [urlConstruction.js]
--- a/tools/lint/py2.yml
+++ b/tools/lint/py2.yml
@@ -26,18 +26,18 @@ py2:
         - testing/raptor
         - testing/tools
         - testing/web-platform
         - toolkit
         - tools/update-packaging
         - xpcom
 
         # These paths are intentionally excluded (Python 3 only)
+        - config/create_rc.py
         - config/printconfigsetting.py
-        - config/version_win.py
         - python/mozbuild/mozbuild/html_build_viewer.py
         - python/mozlint
         - python/mozperftest
         - tools/crashreporter/system-symbols/win/symsrv-fetch.py
         - tools/github-sync
         - tools/lint
         - tools/tryselect
         - testing/performance
--- a/tools/tryselect/test/test_auto.py
+++ b/tools/tryselect/test/test_auto.py
@@ -7,21 +7,21 @@ from __future__ import absolute_import, 
 import mozunit
 import pytest
 
 from tryselect.selectors.auto import AutoParser
 
 
 def test_strategy_validation():
     parser = AutoParser()
-    args = parser.parse_args(["--strategy", "seta"])
-    assert args.strategy == "taskgraph.optimize:tryselect.seta"
+    args = parser.parse_args(["--strategy", "relevant_tests"])
+    assert args.strategy == "taskgraph.optimize:tryselect.relevant_tests"
 
-    args = parser.parse_args(["--strategy", "taskgraph.optimize:experimental.seta"])
-    assert args.strategy == "taskgraph.optimize:experimental.seta"
+    args = parser.parse_args(["--strategy", "taskgraph.optimize:experimental.relevant_tests"])
+    assert args.strategy == "taskgraph.optimize:experimental.relevant_tests"
 
     with pytest.raises(SystemExit):
         parser.parse_args(["--strategy", "taskgraph.optimize:tryselect"])
 
     with pytest.raises(SystemExit):
         parser.parse_args(["--strategy", "foo"])
 
     with pytest.raises(SystemExit):
--- a/widget/windows/moz.build
+++ b/widget/windows/moz.build
@@ -162,18 +162,16 @@ LOCAL_INCLUDES += [
 ]
 
 DEFINES['MOZ_UNICODE'] = True
 
 for var in ('MOZ_ENABLE_D3D10_LAYER'):
     if CONFIG[var]:
         DEFINES[var] = True
 
-RESFILE = 'widget.res'
-
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 
 OS_LIBS += [
     'rpcrt4',
     'urlmon',
 ]
 
 if CONFIG['CC_TYPE'] == 'clang-cl':