Browse Source

Build and installer backports

Ian Neal 2 months ago
parent
commit
52210aae7f

+ 1262 - 0
comm-release/patches/1488138-64a1.patch

@@ -0,0 +1,1262 @@
+# HG changeset patch
+# User Jorg K <jorgk@jorgk.com>
+# Date 1536135347 -7200
+# Node ID cf4b74f3b01fb3b917e10bc4015771dfc75537d9
+# Parent  f2d364a1f0946cf6269ae307fbd9d865cc133d75
+Bug 1488138 - empty out Thuderbird's removed-files.in (following bug 1392913). r=tomprince
+
+diff --git a/mail/installer/removed-files.in b/mail/installer/removed-files.in
+--- a/mail/installer/removed-files.in
++++ b/mail/installer/removed-files.in
+@@ -1,1192 +1,81 @@
++# 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/.
++
++# The removed-files.in file specifies files and directories to be removed during
++# an application update that are not automatically removed by the application
++# update process. The application update process handles the vast majority of
++# file and directory removals automatically so this file should not be used in
++# the vast majority of cases.
++
++# When to use removed-files.in file to remove files and directories:
++# * Files and directories located in the installation's "distribution/" and
++#   "extensions/" directories that were added before Thunderbird 27. Files and
++#   directories located in these directories were not included in the
++#   application update file removals for a complete update prior to Thunderbird 27.
++# * Empty directories that were accidentally added to the installation
++#   directory.
++# * Third party files and directories that were added to the installation
++#   directory. Under normal circumstances this should only be done after release
++#   drivers have approved the removal of these third party files.
++
++# If you are not sure whether a file or directory should be removed using the
++# removed-files.in file please contact one of the developers that work on
++# application update.
++
++# Note: the "distribution/" and "browser/extensions/" directories should never
++# be removed recursively since these directories are used by Partner builds and
++# custom installations.
++
++# To specify a file to be removed add the path to the file.
++# * If the file doesn't exist the update will succeed.
++# * If the file exists and can't be removed (e.g. the file is locked) the
++#   update will fail.
++#
++# Example: path/to/file
++
++# To specify a directory to be removed only if it is empty add the path to the
++# directory with a trailing forward slash.
++# * If the directory doesn't exist the update will succeed.
++# * If the directory can't be removed (e.g. the directory is locked, contains
++#   files, etc.) the update will succeed.
++#
++# Example: path/to/dir/
++
++# To specify a directory that should be recursively removed add the path to the
++# directory with a trailing forward slash and "*".
++# * If the directory doesn't exist the update will succeed.
++# * If all of the files the directory contains can be removed but the directory
++#   or a subdirectory can't be removed (e.g. the directory is locked) the update
++#   will succeed.
++# * If a file within the directory can't be removed the update will fail.
++#
++# Example: path/to/dir/*
++
+ # Due to Apple Mac OS X packaging requirements files that are in the same
+ # directory on other platforms must be located in different directories on
+ # Mac OS X. The following defines allow specifying the Mac OS X bundle
+-# location which also work on other platforms.
++# location which will also work on other platforms.
+ #
+ # @DIR_MACOS@
+ # Equals Contents/MacOS/ on Mac OX X and is an empty string on other platforms.
+ #
+ # @DIR_RESOURCES@
+ # Equals Contents/Resources/ on Mac OX X and is an empty string on other
+ # platforms.
+ 
+-#ifdef XP_UNIX
+-  #ifndef XP_MACOSX
+-    #define UNIX_BUT_NOT_MAC
+-  #endif
+-#endif
++# An update watershed was required to update to Thunderbird 56 for LZMA and SHA384
++# support. This made it possible to delete all of the removal instructions in
++# this file.
+ 
+-# ****************************************************************************
+-# * Generic removals section: this is almost certainly where you want to add *
+-# * anything that isn't a connected chunk of files with related and shared   *
+-# * ifdef conditions.                                                        *
+-# ****************************************************************************
+-@DIR_MACOS@chrome/app-chrome.manifest
+-@DIR_MACOS@chrome/chrome.rdf
+-@DIR_MACOS@chrome/en-US-mail.jar
+-#ifdef XP_WIN
+-  chrome/en-win.jar
+-#endif
+-@DIR_MACOS@chrome/installed-chrome.txt
+-@DIR_MACOS@chrome/mail.jar
+-@DIR_MACOS@chrome/offline.jar
+-@DIR_MACOS@chrome/offline.manifest
+-@DIR_MACOS@chrome/overlayinfo/
+-@DIR_MACOS@chrome/qute.jar
+-@DIR_MACOS@chrome/US.jar
+-#ifdef XP_MACOSX
+-  #ifndef ACCESSIBILITY
+-    @DIR_MACOS@components/accessibility.xpt
+-  #endif
+-#endif
+-@DIR_MACOS@components/accessibility-atk.xpt
+-@DIR_MACOS@components/airbag.xpt
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@components/libalerts.dylib
+-  @DIR_MACOS@components/libalerts_s.dylib
+-#endif
+-@DIR_MACOS@components/bookmarks.xpt
+-@DIR_MACOS@components/chardet.xpt
+-@DIR_MACOS@components/downloadmanager.xpt
+-@DIR_MACOS@components/compreg.dat
+-@DIR_MACOS@components/components.list
+-@DIR_MACOS@components/dom_loadsave.xpt
+-@DIR_MACOS@components/history.xpt
+-@DIR_MACOS@components/jsconsole.xpt
+-@DIR_MACOS@components/layout.xpt
+-@DIR_MACOS@components/mailnews.xpt
+-@DIR_MACOS@components/mozgnome.xpt
+-@DIR_MACOS@components/@DLL_PREFIX@myspell@DLL_SUFFIX@
+-@DIR_MACOS@components/necko_data.xpt
+-@DIR_MACOS@components/aboutRights.js
+-@DIR_MACOS@components/nsAddonRepository.js
+-@DIR_MACOS@components/nsBackgroundUpdateService.js
+-@DIR_MACOS@components/nsCloseAllWindows.js
+-@DIR_MACOS@components/nsComposerCmdLineHandler.js
+-@DIR_MACOS@components/nsDownloadProgressListener.js
+-@DIR_MACOS@components/nsDropbox.js
+-@DIR_MACOS@components/nsExtensionManager.js
+-@DIR_MACOS@components/nsInterfaceInfoToIDL.js
+-@DIR_MACOS@components/nsLDAPPrefsService.js
+-#ifdef XP_WIN
+-  components/nsPostUpdateWin.js
+-#endif
+-@DIR_MACOS@components/nsProgressDialog.js
+-@DIR_MACOS@components/nsProxyAutoConfig.js
+-@DIR_MACOS@components/nsProxyAutoConfig.manifest
+-@DIR_MACOS@components/nsScriptableIO.js
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@components/nsSpotlightIntegration.js
+-#endif
+-@DIR_MACOS@components/nsUnsetDefaultMail.js
+-#ifndef MOZ_UPDATER
+-  @DIR_MACOS@components/nsUpdateService.js
+-  @DIR_MACOS@components/nsUpdateServiceStub.js
+-#endif
+-@DIR_MACOS@components/nsUrlClassifierTable.js
+-#ifdef XP_WIN
+-  components/nsWinSearchIntegration.js
+-#endif
+-@DIR_MACOS@components/pluginGlue.js
+-@DIR_MACOS@components/progressDlg.xpt
+-@DIR_MACOS@components/sidebar.xpt
+-@DIR_MACOS@components/signonviewer.xpt
+-@DIR_MACOS@components/thunderbird.xpt
+-@DIR_MACOS@components/@DLL_PREFIX@spellchecker@DLL_SUFFIX@
+-@DIR_MACOS@components/spellchk.dll
+-@DIR_MACOS@components/uconvd.dll
+-@DIR_MACOS@components/@DLL_PREFIX@wallet@DLL_SUFFIX@
+-@DIR_MACOS@components/wallet.xpt
+-@DIR_MACOS@components/walleteditor.xpt
+-@DIR_MACOS@components/walletpreview.xpt
+-@DIR_MACOS@components/@DLL_PREFIX@walletviewers@DLL_SUFFIX@
+-@DIR_MACOS@components/websrvcs.xpt
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@components/widget_mac.xpt
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@xpcom_compat_c@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@xpcom_core@DLL_SUFFIX@
+-@DIR_MACOS@components/xpcom_obsolete.xpt
+-@DIR_MACOS@components/xpinstall.xpt
+-@DIR_MACOS@components/@DLL_PREFIX@xpinstal@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@xpinstall@DLL_SUFFIX@
+-@DIR_MACOS@components/xpti.dat
+-@DIR_MACOS@components/xptitemp.dat
+-@DIR_MACOS@components/myspell/en-US.dic
+-@DIR_MACOS@components/myspell/en-US.aff
+-@DIR_MACOS@components/myspell/
+-@DIR_MACOS@D3DCompiler_42.dll
+-@DIR_MACOS@d3dx9_42.dll
+-@DIR_MACOS@d3dx9_43.dll
+-@DIR_MACOS@defaults/isp/dotmac.rdf
+-@DIR_MACOS@defaults/isp/movemail.rdf
+-@DIR_MACOS@defaults/isp/rss.rdf
+-@DIR_MACOS@defaults/isp/en-US/dotmac.rdf
+-@DIR_MACOS@defaults/isp/en-US/movemail.rdf
+-@DIR_MACOS@defaults/isp/en-US/rss.rdf
+-@DIR_MACOS@defaults/isp/en-US/
+-@DIR_MACOS@defaults/isp/US/movemail.rdf
+-@DIR_MACOS@defaults/isp/US/rss.rdf
+-@DIR_MACOS@defaults/isp/US/
+-@DIR_MACOS@defaults/isp/
+-@DIR_MACOS@defaults/messenger/SpamAssassin.sfd
+-@DIR_MACOS@defaults/messenger/SpamPal.sfd
+-@DIR_MACOS@defaults/messenger/en-US/mailViews.dat
+-@DIR_MACOS@defaults/messenger/US/mailViews.dat
+-@DIR_MACOS@defaults/pref/all.js
+-@DIR_MACOS@defaults/pref/editor.js
+-@DIR_MACOS@defaults/pref/inspector.js
+-@DIR_MACOS@defaults/pref/non-shared.txt
+-@DIR_MACOS@defaults/pref/security-prefs.js
+-@DIR_MACOS@defaults/pref/thunderbird.js
+-@DIR_MACOS@defaults/pref/winpref.js
+-@DIR_MACOS@defaults/pref/xpinstall.js
+-@DIR_MACOS@defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
+-@DIR_MACOS@defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/
+-@DIR_MACOS@defaults/profile/extensions/Extensions.rdf
+-@DIR_MACOS@defaults/profile/extensions/installed-extensions.txt
+-@DIR_MACOS@defaults/profile/extensions/
+-@DIR_MACOS@defaults/profile/US/localstore.rdf
+-@DIR_MACOS@defaults/profile/US/mimeTypes.rdf
+-@DIR_MACOS@defaults/profile/US/
+-#ifdef XP_WIN
+-  defaults/shortcuts/Mozilla Thunderbird.lnk
+-  defaults/shortcuts/Mozilla Thunderbird (No Extensions).lnk
+-  defaults/shortcuts/
+-#endif
+-@DIR_MACOS@defaults/wallet/VcardSchema.tbl
+-@DIR_MACOS@defaults/wallet/FieldSchema.tbl
+-@DIR_MACOS@defaults/wallet/SchemaConcat.tbl
+-@DIR_MACOS@defaults/wallet/DistinguishedSchema.tbl
+-@DIR_MACOS@defaults/wallet/SchemaStrings.tbl
+-@DIR_MACOS@defaults/wallet/PositionalSchema.tbl
+-@DIR_MACOS@defaults/wallet/StateSchema.tbl
+-#ifdef MOZ_FOLD_LIBS
+-@DIR_MACOS@@DLL_PREFIX@nspr4@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@plds4@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@plc4@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@ssl3@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@smime3@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@nssutil3@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
+-#endif
+-
+-# Remove obsolete bundled thunderbird test pilot.
+-# In the average case, this directory is only used by Test Pilot, and will get
+-# removed by the updater. In some cases (eg, partner builds), distribution/
+-# will have other files and/or directories in it. In these cases, the updater
+-# will print a non-fatal error and continue on, because we're not appending
+-# '*' to force a recursive removal.
+-@DIR_MACOS@distribution/
+-@DIR_MACOS@distribution/extensions/
+-@DIR_MACOS@distribution/extensions/tbtestpilot@labs.mozilla.com.xpi
++# Since then, the following were added:
+ 
+ # Remove unpacked lightning extension.
+ #ifdef NIGHTLY_BUILD
+ @DIR_RESOURCES@extensions/
+ @DIR_RESOURCES@extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/*
+ #else
+ @DIR_RESOURCES@distribution/
+ @DIR_RESOURCES@distribution/extensions/
+ @DIR_RESOURCES@distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/*
+ #endif
+-
+-@DIR_MACOS@greprefs/all.js
+-@DIR_MACOS@greprefs/security-prefs.js
+-@DIR_MACOS@greprefs/xpinstall.js
+-@DIR_MACOS@greprefs/
+-@DIR_MACOS@hyphenation/
+-@DIR_MACOS@hyphenation/hyph_af.dic
+-@DIR_MACOS@hyphenation/hyph_bg.dic
+-@DIR_MACOS@hyphenation/hyph_ca.dic
+-@DIR_MACOS@hyphenation/hyph_cy.dic
+-@DIR_MACOS@hyphenation/hyph_da.dic
+-@DIR_MACOS@hyphenation/hyph_de-1901.dic
+-@DIR_MACOS@hyphenation/hyph_de-1996.dic
+-@DIR_MACOS@hyphenation/hyph_de-CH.dic
+-@DIR_MACOS@hyphenation/hyph_en_US.dic
+-@DIR_MACOS@hyphenation/hyph_eo.dic
+-@DIR_MACOS@hyphenation/hyph_es.dic
+-@DIR_MACOS@hyphenation/hyph_et.dic
+-@DIR_MACOS@hyphenation/hyph_fi.dic
+-@DIR_MACOS@hyphenation/hyph_fr.dic
+-@DIR_MACOS@hyphenation/hyph_gl.dic
+-@DIR_MACOS@hyphenation/hyph_hr.dic
+-@DIR_MACOS@hyphenation/hyph_hsb.dic
+-@DIR_MACOS@hyphenation/hyph_hu.dic
+-@DIR_MACOS@hyphenation/hyph_ia.dic
+-@DIR_MACOS@hyphenation/hyph_is.dic
+-@DIR_MACOS@hyphenation/hyph_it.dic
+-@DIR_MACOS@hyphenation/hyph_kmr.dic
+-@DIR_MACOS@hyphenation/hyph_la.dic
+-@DIR_MACOS@hyphenation/hyph_lt.dic
+-@DIR_MACOS@hyphenation/hyph_mn.dic
+-@DIR_MACOS@hyphenation/hyph_nb.dic
+-@DIR_MACOS@hyphenation/hyph_nl.dic
+-@DIR_MACOS@hyphenation/hyph_nn.dic
+-@DIR_MACOS@hyphenation/hyph_pt.dic
+-@DIR_MACOS@hyphenation/hyph_ru.dic
+-@DIR_MACOS@hyphenation/hyph_sh.dic
+-@DIR_MACOS@hyphenation/hyph_sl.dic
+-@DIR_MACOS@hyphenation/hyph_sv.dic
+-@DIR_MACOS@hyphenation/hyph_tr.dic
+-@DIR_MACOS@hyphenation/hyph_uk.dic
+-
+-#ifdef MOZ_WIDGET_GTK
+-  icons/mozicon128.png
+-  icons/mozicon16.xpm
+-  icons/mozicon50.xpm
+-#endif
+-@DIR_MACOS@init.d/README
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@isp/dotmac.rdf
+-#endif
+-@DIR_MACOS@isp/gmail.rdf
+-@DIR_MACOS@isp/af/gmail.rdf
+-@DIR_MACOS@isp/be/gmail.rdf
+-@DIR_MACOS@isp/bg/gmail.rdf
+-@DIR_MACOS@isp/ca/gmail.rdf
+-@DIR_MACOS@isp/cs/gmail.rdf
+-@DIR_MACOS@isp/da/gmail.rdf
+-@DIR_MACOS@isp/de/googlemail.rdf
+-@DIR_MACOS@isp/el/gmail.rdf
+-@DIR_MACOS@isp/en-US/gmail.rdf
+-@DIR_MACOS@isp/en-GB/googlemail.rdf
+-@DIR_MACOS@isp/es-ES/gmail.rdf
+-@DIR_MACOS@isp/es-AR/gmail.rdf
+-@DIR_MACOS@isp/eu/gmail.rdf
+-@DIR_MACOS@isp/fi/gmail.rdf
+-@DIR_MACOS@isp/fr/gmail.rdf
+-@DIR_MACOS@isp/fy-NL/gmail.rdf
+-@DIR_MACOS@isp/ga-IE/gmail.rdf
+-@DIR_MACOS@isp/gu-IN/gmail.rdf
+-@DIR_MACOS@isp/he/gmail.rdf
+-@DIR_MACOS@isp/hu/gmail.rdf
+-@DIR_MACOS@isp/it/gmail.rdf
+-@DIR_MACOS@isp/ja/gmail.rdf
+-@DIR_MACOS@isp/ja-JP/gmail.rdf
+-@DIR_MACOS@isp/ka/gmail.rdf
+-@DIR_MACOS@isp/ko/gmail.rdf
+-@DIR_MACOS@isp/lt/gmail.rdf
+-@DIR_MACOS@isp/mk/gmail.rdf
+-@DIR_MACOS@isp/mn/gmail.rdf
+-@DIR_MACOS@isp/nb-NO/gmail.rdf
+-@DIR_MACOS@isp/ne-NP/gmail.rdf
+-@DIR_MACOS@isp/nl/gmail.rdf
+-@DIR_MACOS@isp/nn-NO/gmail.rdf
+-@DIR_MACOS@isp/pa-IN/gmail.rdf
+-@DIR_MACOS@isp/pl/gmail.rdf
+-@DIR_MACOS@isp/pt-BR/gmail.rdf
+-@DIR_MACOS@isp/pt-PT/gmail.rdf
+-@DIR_MACOS@isp/ro/gmail.rdf
+-@DIR_MACOS@isp/ru/gmail.rdf
+-@DIR_MACOS@isp/sk/gmail.rdf
+-@DIR_MACOS@isp/sl/gmail.rdf
+-@DIR_MACOS@isp/sv-SE/gmail.rdf
+-@DIR_MACOS@isp/tr/gmail.rdf
+-@DIR_MACOS@isp/uk/gmail.rdf
+-@DIR_MACOS@isp/zh-CN/gmail.rdf
+-@DIR_MACOS@isp/zh-TW/gmail.rdf
+-@DIR_MACOS@license.html
+-@DIR_MACOS@LICENSE.txt
+-@DIR_MACOS@modules/JSON.jsm
+-@DIR_MACOS@modules/quickSearchManager.js
+-@DIR_MACOS@mozilla-runtime@BIN_SUFFIX@
+-#ifdef XP_MACOSX
+-  Contents/Plug-Ins/PrintPDE.plugin/Contents/Info.plist
+-  Contents/Plug-Ins/PrintPDE.plugin/Contents/MacOS/PrintPDE
+-  Contents/Plug-Ins/PrintPDE.plugin/Contents/Resources/English.lproj/Localizable.strings
+-  Contents/Plug-Ins/PrintPDE.plugin/Contents/Resources/English.lproj/PrintPDE.nib/classes.nib
+-  Contents/Plug-Ins/PrintPDE.plugin/Contents/Resources/English.lproj/PrintPDE.nib/info.nib
+-  Contents/Plug-Ins/PrintPDE.plugin/Contents/Resources/English.lproj/PrintPDE.nib/objects.xib
+-#endif
+-@DIR_MACOS@plugins/
+-@DIR_MACOS@README.txt
+-@DIR_MACOS@res/bloatcycle.html
+-@DIR_MACOS@res/broken-image.gif
+-@DIR_MACOS@res/cmessage.txt
+-@DIR_MACOS@res/arrow.gif
+-@DIR_MACOS@res/arrowd.gif
+-@DIR_MACOS@res/charsetData.properties
+-@DIR_MACOS@res/charsetalias.properties
+-@DIR_MACOS@res/forms.css
+-@DIR_MACOS@res/hiddenWindow.html
+-@DIR_MACOS@res/html.css
+-@DIR_MACOS@res/maccharset.properties
+-@DIR_MACOS@res/mathml.css
+-@DIR_MACOS@res/os2charset.properties
+-@DIR_MACOS@res/quirk.css
+-@DIR_MACOS@res/ua.css
+-@DIR_MACOS@res/viewsource.css
+-@DIR_MACOS@res/unixcharset.properties
+-@DIR_MACOS@res/wincharset.properties
+-@DIR_MACOS@res/loading-image.gif
+-@DIR_MACOS@res/platform-forms.css
+-@DIR_MACOS@res/sample.unixpsfonts.properties
+-@DIR_MACOS@res/builtin/htmlBindings.xml
+-@DIR_MACOS@res/builtin/platformHTMLBindings.xml
+-@DIR_MACOS@res/builtin/
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@res/cursors/CVS/Entries
+-  @DIR_MACOS@res/cursors/CVS/Repository
+-  @DIR_MACOS@res/cursors/CVS/Root
+-  @DIR_MACOS@res/cursors/CVS/Tag
+-#endif
+-@DIR_MACOS@res/fonts/fontEncoding.properties
+-@DIR_MACOS@res/fonts/pangoFontEncoding.properties
+-@DIR_MACOS@res/html/gopher-audio.gif
+-@DIR_MACOS@res/html/gopher-binary.gif
+-@DIR_MACOS@res/html/gopher-find.gif
+-@DIR_MACOS@res/html/gopher-image.gif
+-@DIR_MACOS@res/html/gopher-menu.gif
+-@DIR_MACOS@res/html/gopher-movie.gif
+-@DIR_MACOS@res/html/gopher-sound.gif
+-@DIR_MACOS@res/html/gopher-telnet.gif
+-@DIR_MACOS@res/html/gopher-text.gif
+-@DIR_MACOS@res/html/gopher-unknown.gif
+-@DIR_MACOS@@DLL_PREFIX@sqlite3@DLL_SUFFIX@
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@Thunderbird.app/Contents/Library/Spotlight/Thunderbird.mdimporter/Contents/Info.plist
+-  @DIR_MACOS@Thunderbird.app/Contents/Library/Spotlight/Thunderbird.mdimporter/Contents/MacOS/Thunderbird
+-  @DIR_MACOS@Thunderbird.app/Contents/Library/Spotlight/Thunderbird.mdimporter/Contents/Resources/schema.xml
+-  @DIR_MACOS@Thunderbird.app/Contents/Library/Spotlight/Thunderbird.mdimporter/Contents/Resources/English.lproj/InfoPlist.strings
+-  @DIR_MACOS@Thunderbird.app/Contents/Library/Spotlight/Thunderbird.mdimporter/Contents/Resources/English.lproj/schema.strings
+-#endif
+-#ifdef XP_WIN
+-uninstall/UninstallThunderbird.exe
+-uninstall/uninst.exe
+-uninstall/uninstall.exe
+-#endif
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@updater.app/Contents/MacOS/updater.ini
+-#endif
+-@DIR_MACOS@.autoreg
+-@DIR_MACOS@component.reg
+-@DIR_MACOS@@DLL_PREFIX@jemalloc@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@mozutils@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  mozcrt19.dll
+-  mozcpp19.dll
+-#endif
+-#ifdef MOZ_STATIC_JS
+-@DIR_MACOS@@DLL_PREFIX@mozjs@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@mozilla-installer-bin
+-@DIR_MACOS@nsldap32v50.dll
+-@DIR_MACOS@@DLL_PREFIX@ldap50@DLL_SUFFIX@
+-@DIR_MACOS@nsldappr32v50.dll
+-@DIR_MACOS@@DLL_PREFIX@prldap50@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  nsldap32v60.dll
+-  nsldappr32v60.dll
+-  nsldif32v60.dll
+-#endif
+-@DIR_MACOS@redo-prebinding.sh
+-@DIR_MACOS@regxpcom.exe
+-#ifdef XP_WIN
+-  xpicleanup.exe
+-#else
+-  @DIR_MACOS@xpicleanup
+-#endif
+-@DIR_MACOS@@DLL_PREFIX@xpcom@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@xpcom_compat@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@xpistub@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@zlib@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  js3250.dll
+-#endif
+-# ****************************************************************************
+-# * End generic removals section.                                            *
+-# ****************************************************************************
+-
+-# ****************************************************************************
+-# * Remove the files that were included in the omnijar at the time of the    *
+-# * switch to omnijar. If a file is removed from the build later, it should  *
+-# * be moved up to the generic removals section, but new files need not be   *
+-# * added to this section.                                                   *
+-# ****************************************************************************
+-
+-#ifdef MOZ_OMNIJAR
+-  @DIR_MACOS@omni.jar
+-  @DIR_MACOS@chrome/@AB_CD@.jar
+-  @DIR_MACOS@chrome/@AB_CD@.manifest
+-  @DIR_MACOS@chrome/classic.jar
+-  @DIR_MACOS@chrome/classic.manifest
+-  @DIR_MACOS@chrome/comm.jar
+-  @DIR_MACOS@chrome/comm.manifest
+-  @DIR_MACOS@chrome/gloda.jar
+-  @DIR_MACOS@chrome/gloda.manifest
+-  @DIR_MACOS@chrome/localized.manifest
+-  @DIR_MACOS@chrome/messenger.jar
+-  @DIR_MACOS@chrome/messenger.manifest
+-  @DIR_MACOS@chrome/newsblog.jar
+-  @DIR_MACOS@chrome/newsblog.manifest
+-  @DIR_MACOS@chrome/nonlocalized.manifest
+-  @DIR_MACOS@chrome/pippki.jar
+-  @DIR_MACOS@chrome/pippki.manifest
+-  @DIR_MACOS@chrome/toolkit.jar
+-  @DIR_MACOS@chrome/toolkit.manifest
+-  @DIR_MACOS@components/addonManager.js
+-  @DIR_MACOS@components/amContentHandler.js
+-  @DIR_MACOS@components/amWebInstallListener.js
+-  @DIR_MACOS@components/binary.manifest
+-  @DIR_MACOS@components/ConsoleAPI.js
+-  @DIR_MACOS@components/contentAreaDropListener.js
+-  @DIR_MACOS@components/contentSecurityPolicy.js
+-  @DIR_MACOS@components/crypto-SDR.js
+-  @DIR_MACOS@components/FeedProcessor.js
+-  @DIR_MACOS@components/glautocomp.js
+-  @DIR_MACOS@components/GPSDGeolocationProvider.js
+-  @DIR_MACOS@components/interfaces.manifest
+-  @DIR_MACOS@components/jsconsole-clhandler.js
+-  @DIR_MACOS@components/jsmimeemitter.js
+-  @DIR_MACOS@components/mail.xpt
+-  @DIR_MACOS@components/mailContentHandler.js
+-  @DIR_MACOS@components/mdn-service.js
+-  @DIR_MACOS@components/msgAsyncPrompter.js
+-  @DIR_MACOS@components/NetworkGeolocationProvider.js
+-  @DIR_MACOS@components/newsblog.js
+-  @DIR_MACOS@components/newsblog.manifest
+-  @DIR_MACOS@components/nsAbAutoCompleteMyDomain.js
+-  @DIR_MACOS@components/nsAbAutoCompleteSearch.js
+-  @DIR_MACOS@components/nsAbLDAPAttributeMap.js
+-  @DIR_MACOS@components/nsActivity.js
+-  @DIR_MACOS@components/nsActivityManager.js
+-  @DIR_MACOS@components/nsActivityManagerUI.js
+-  @DIR_MACOS@components/nsBadCertHandler.js
+-  @DIR_MACOS@components/nsBlocklistService.js
+-  @DIR_MACOS@components/nsContentDispatchChooser.js
+-  @DIR_MACOS@components/nsDefaultCLH.js
+-  @DIR_MACOS@components/nsDownloadManagerUI.js
+-  #ifdef XP_UNIX
+-    #ifndef XP_MACOSX
+-      components/nsFilePicker.js
+-    #endif
+-  #endif
+-  @DIR_MACOS@components/nsFormAutoComplete.js
+-  @DIR_MACOS@components/nsFormHistory.js
+-  @DIR_MACOS@components/nsHandlerService.js
+-  @DIR_MACOS@components/nsHelperAppDlg.js
+-  @DIR_MACOS@components/nsINIProcessor.js
+-  @DIR_MACOS@components/nsInputListAutoComplete.js
+-  @DIR_MACOS@components/nsLDAPProtocolHandler.js
+-  @DIR_MACOS@components/nsLivemarkService.js
+-  @DIR_MACOS@components/nsLoginInfo.js
+-  @DIR_MACOS@components/nsLoginManager.js
+-  @DIR_MACOS@components/nsLoginManagerPrompter.js
+-  @DIR_MACOS@components/nsMailDefaultHandler.js
+-  @DIR_MACOS@components/nsMailNewsCommandLineHandler.js
+-  @DIR_MACOS@components/nsMicrosummaryService.js
+-  @DIR_MACOS@components/nsMsgTraitService.js
+-  @DIR_MACOS@components/nsPhishingProtectionApplication.js
+-  @DIR_MACOS@components/nsPlacesAutoComplete.js
+-  @DIR_MACOS@components/nsPlacesDBFlush.js
+-  @DIR_MACOS@components/nsPlacesExpiration.js
+-  @DIR_MACOS@components/nsPrompter.js
+-  @DIR_MACOS@components/nsSMTPProtocolHandler.js
+-  @DIR_MACOS@components/nsSetDefaultMail.js
+-  @DIR_MACOS@components/nsTaggingService.js
+-  @DIR_MACOS@components/nsTryToClose.js
+-  @DIR_MACOS@components/nsURLFormatter.js
+-  @DIR_MACOS@components/nsUpdateService.js
+-  @DIR_MACOS@components/nsUpdateServiceStub.js
+-  @DIR_MACOS@components/nsUpdateTimerManager.js
+-  @DIR_MACOS@components/nsUrlClassifierLib.js
+-  @DIR_MACOS@components/nsUrlClassifierListManager.js
+-  @DIR_MACOS@components/nsWebHandlerApp.js
+-  @DIR_MACOS@components/offlineStartup.js
+-  @DIR_MACOS@components/PlacesCategoriesStarter.js
+-  @DIR_MACOS@components/smime-service.js
+-  @DIR_MACOS@components/steelApplication.js
+-  @DIR_MACOS@components/storage-Legacy.js
+-  @DIR_MACOS@components/storage-mozStorage.js
+-  @DIR_MACOS@components/txEXSLTRegExFunctions.js
+-  @DIR_MACOS@defaults/autoconfig/platform.js
+-  @DIR_MACOS@defaults/autoconfig/prefcalls.js
+-  @DIR_MACOS@defaults/pref/all-l10n.js
+-  @DIR_MACOS@defaults/pref/all-thunderbird.js
+-  @DIR_MACOS@defaults/pref/composer.js
+-  @DIR_MACOS@defaults/pref/mailnews.js
+-  @DIR_MACOS@defaults/pref/mdn.js
+-  @DIR_MACOS@defaults/pref/smime.js
+-  @DIR_MACOS@defaults/pref/thunderbird-branding.js
+-  @DIR_MACOS@defaults/profile/localstore.rdf
+-  @DIR_MACOS@defaults/profile/mimeTypes.rdf
+-  @DIR_MACOS@defaults/profile/prefs.js
+-  @DIR_MACOS@defaults/greprefs.js
+-  @DIR_MACOS@modules/AddonLogging.jsm
+-  @DIR_MACOS@modules/AddonManager.jsm
+-  @DIR_MACOS@modules/AddonRepository.jsm
+-  @DIR_MACOS@modules/AddonUpdateChecker.jsm
+-  @DIR_MACOS@modules/CSPUtils.jsm
+-  @DIR_MACOS@modules/CertUtils.jsm
+-  @DIR_MACOS@modules/CommonDialog.jsm
+-  @DIR_MACOS@modules/CrashSubmit.jsm
+-  @DIR_MACOS@modules/DownloadLastDir.jsm
+-  @DIR_MACOS@modules/DownloadPaths.jsm
+-  #ifdef XP_WIN
+-    modules/DownloadTaskbarProgress.jsm
+-  #endif
+-  @DIR_MACOS@modules/DownloadUtils.jsm
+-  @DIR_MACOS@modules/FileUtils.jsm
+-  @DIR_MACOS@modules/Geometry.jsm
+-  @DIR_MACOS@modules/IOUtils.js
+-  @DIR_MACOS@modules/ISO8601DateUtils.jsm
+-  @DIR_MACOS@modules/InlineSpellChecker.jsm
+-  @DIR_MACOS@modules/LightweightThemeConsumer.jsm
+-  @DIR_MACOS@modules/LightweightThemeManager.jsm
+-  @DIR_MACOS@modules/MailConsts.js
+-  @DIR_MACOS@modules/MailUtils.js
+-  @DIR_MACOS@modules/Microformats.js
+-  @DIR_MACOS@modules/MsgHdrSyntheticView.js
+-  @DIR_MACOS@modules/NetUtil.jsm
+-  @DIR_MACOS@modules/PerfMeasurement.jsm
+-  @DIR_MACOS@modules/PlacesDBUtils.jsm
+-  @DIR_MACOS@modules/PlacesUtils.jsm
+-  @DIR_MACOS@modules/PluginProvider.jsm
+-  @DIR_MACOS@modules/PluralForm.jsm
+-  @DIR_MACOS@modules/PopupNotifications.jsm
+-  @DIR_MACOS@modules/SearchIntegration.js
+-  @DIR_MACOS@modules/Services.jsm
+-  @DIR_MACOS@modules/SpatialNavigation.js
+-  #ifdef XP_MACOSX
+-    @DIR_MACOS@modules/SpotlightIntegration.js
+-  #endif
+-  @DIR_MACOS@modules/StringBundle.js
+-  #ifdef XP_WIN
+-    modules/WinSearchIntegration.js
+-  #endif
+-  @DIR_MACOS@modules/WindowDraggingUtils.jsm
+-  @DIR_MACOS@modules/XPCOMUtils.jsm
+-  @DIR_MACOS@modules/XPIProvider.jsm
+-  @DIR_MACOS@modules/activity/activityModules.js
+-  @DIR_MACOS@modules/activity/alertHook.js
+-  @DIR_MACOS@modules/activity/autosync.js
+-  @DIR_MACOS@modules/activity/glodaIndexer.js
+-  @DIR_MACOS@modules/activity/moveCopy.js
+-  @DIR_MACOS@modules/activity/pop3Download.js
+-  @DIR_MACOS@modules/activity/sendLater.js
+-  @DIR_MACOS@modules/appIdleManager.js
+-  @DIR_MACOS@modules/attachmentChecker.js
+-  @DIR_MACOS@modules/ctypes.jsm
+-  @DIR_MACOS@modules/dbViewWrapper.js
+-  @DIR_MACOS@modules/displayNameutils.js
+-  @DIR_MACOS@modules/debug.js
+-  @DIR_MACOS@modules/errUtils.js
+-  @DIR_MACOS@modules/folderUtils.jsm
+-  @DIR_MACOS@modules/gloda/collection.js
+-  @DIR_MACOS@modules/gloda/connotent.js
+-  @DIR_MACOS@modules/gloda/databind.js
+-  @DIR_MACOS@modules/gloda/datamodel.js
+-  @DIR_MACOS@modules/gloda/datastore.js
+-  @DIR_MACOS@modules/gloda/dbview.js
+-  @DIR_MACOS@modules/gloda/everybody.js
+-  @DIR_MACOS@modules/gloda/explattr.js
+-  @DIR_MACOS@modules/gloda/facet.js
+-  @DIR_MACOS@modules/gloda/fundattr.js
+-  @DIR_MACOS@modules/gloda/gloda.js
+-  @DIR_MACOS@modules/gloda/index_ab.js
+-  @DIR_MACOS@modules/gloda/index_msg.js
+-  @DIR_MACOS@modules/gloda/indexer.js
+-  @DIR_MACOS@modules/gloda/log4moz.js
+-  @DIR_MACOS@modules/gloda/mimeTypeCategories.js
+-  @DIR_MACOS@modules/gloda/mimemsg.js
+-  @DIR_MACOS@modules/gloda/msg_search.js
+-  @DIR_MACOS@modules/gloda/noun_freetag.js
+-  @DIR_MACOS@modules/gloda/noun_mimetype.js
+-  @DIR_MACOS@modules/gloda/noun_tag.js
+-  @DIR_MACOS@modules/gloda/public.js
+-  @DIR_MACOS@modules/gloda/query.js
+-  @DIR_MACOS@modules/gloda/suffixtree.js
+-  @DIR_MACOS@modules/gloda/utils.js
+-  @DIR_MACOS@modules/iteratorUtils.jsm
+-  @DIR_MACOS@modules/jsTreeSelection.js
+-  @DIR_MACOS@modules/mailMigrator.js
+-  @DIR_MACOS@modules/mailViewManager.js
+-  @DIR_MACOS@modules/mailnewsMigrator.js
+-  @DIR_MACOS@modules/nsFormAutoCompleteResult.jsm
+-  @DIR_MACOS@modules/quickFilterManager.js
+-  @DIR_MACOS@modules/searchSpec.js
+-  @DIR_MACOS@modules/sessionStoreManager.js
+-  @DIR_MACOS@modules/summaryFrameManager.js
+-  @DIR_MACOS@modules/templateUtils.js
+-  @DIR_MACOS@modules/traceHelper.js
+-  @DIR_MACOS@modules/utils.js
+-  @DIR_MACOS@modules/virtualFolderWrapper.js
+-  @DIR_MACOS@res/EditorOverride.css
+-  @DIR_MACOS@res/contenteditable.css
+-  @DIR_MACOS@res/designmode.css
+-  @DIR_MACOS@res/dtd/mathml.dtd
+-  @DIR_MACOS@res/dtd/xhtml11.dtd
+-  @DIR_MACOS@res/entityTables/html40Latin1.properties
+-  @DIR_MACOS@res/entityTables/html40Special.properties
+-  @DIR_MACOS@res/entityTables/html40Symbols.properties
+-  @DIR_MACOS@res/entityTables/htmlEntityVersions.properties
+-  @DIR_MACOS@res/entityTables/mathml20.properties
+-  @DIR_MACOS@res/entityTables/transliterate.properties
+-  @DIR_MACOS@res/fonts/mathfont.properties
+-  @DIR_MACOS@res/fonts/mathfontSTIXNonUnicode.properties
+-  @DIR_MACOS@res/fonts/mathfontSTIXSize1.properties
+-  @DIR_MACOS@res/fonts/mathfontSTIXSizeOneSym.properties
+-  @DIR_MACOS@res/fonts/mathfontStandardSymbolsL.properties
+-  #ifdef XP_WIN
+-    res/fonts/mathfontSymbol.properties
+-  #endif
+-  @DIR_MACOS@res/fonts/mathfontUnicode.properties
+-  @DIR_MACOS@res/grabber.gif
+-  @DIR_MACOS@res/html/folder.png
+-  @DIR_MACOS@res/langGroups.properties
+-  @DIR_MACOS@res/language.properties
+-  @DIR_MACOS@res/svg.css
+-  @DIR_MACOS@res/table-add-column-after-active.gif
+-  @DIR_MACOS@res/table-add-column-after-hover.gif
+-  @DIR_MACOS@res/table-add-column-after.gif
+-  @DIR_MACOS@res/table-add-column-before-active.gif
+-  @DIR_MACOS@res/table-add-column-before-hover.gif
+-  @DIR_MACOS@res/table-add-column-before.gif
+-  @DIR_MACOS@res/table-add-row-after-active.gif
+-  @DIR_MACOS@res/table-add-row-after-hover.gif
+-  @DIR_MACOS@res/table-add-row-after.gif
+-  @DIR_MACOS@res/table-add-row-before-active.gif
+-  @DIR_MACOS@res/table-add-row-before-hover.gif
+-  @DIR_MACOS@res/table-add-row-before.gif
+-  @DIR_MACOS@res/table-remove-column-active.gif
+-  @DIR_MACOS@res/table-remove-column-hover.gif
+-  @DIR_MACOS@res/table-remove-column.gif
+-  @DIR_MACOS@res/table-remove-row-active.gif
+-  @DIR_MACOS@res/table-remove-row-hover.gif
+-  @DIR_MACOS@res/table-remove-row.gif
+-#else
+-  @DIR_MACOS@components/binary.manifest
+-  @DIR_MACOS@omni.jar
+-  @DIR_MACOS@omni.ja
+-#endif
+-
+-# ****************************************************************************
+-# * Remove Talkback files from old location, where they were in 1.0.x        *
+-# ****************************************************************************
+-@DIR_MACOS@components/BrandRes.dll
+-@DIR_MACOS@components/fullsoft.dll
+-@DIR_MACOS@components/master.ini
+-@DIR_MACOS@components/qfaservices.dll
+-@DIR_MACOS@components/qfaservices.xpt
+-@DIR_MACOS@components/talkback-l10n.ini
+-@DIR_MACOS@components/talkback.cnt
+-@DIR_MACOS@components/talkback.exe
+-@DIR_MACOS@components/talkback.hlp
+-@DIR_MACOS@components/libqfaservices.so
+-@DIR_MACOS@components/talkback/master.ini
+-@DIR_MACOS@components/talkback/talkback
+-@DIR_MACOS@components/talkback/talkback.so
+-@DIR_MACOS@components/talkback/XTalkback.ad
+-# **************************************************************************##
+-# * Remove Talkback files from new location, where they were in 1.5.x and    *
+-# * 2.0.x.                                                                   *
+-# ****************************************************************************
+-@DIR_MACOS@extensions/talkback@mozilla.org/
+-@DIR_MACOS@extensions/talkback@mozilla.org/install.rdf
+-@DIR_MACOS@extensions/talkback@mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/talkback@mozilla.org/components/qfaservices.xpt
+-@DIR_MACOS@extensions/talkback@mozilla.org/components/@DLL_PREFIX@qfaservices@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  extensions/talkback@mozilla.org/components/BrandRes.dll
+-  extensions/talkback@mozilla.org/components/fullsoft.dll
+-  extensions/talkback@mozilla.org/components/master.ini
+-  extensions/talkback@mozilla.org/components/talkback-l10n.ini
+-  extensions/talkback@mozilla.org/components/talkback.cnt
+-  extensions/talkback@mozilla.org/components/talkback.exe
+-  extensions/talkback@mozilla.org/components/talkback.hlp
+-  extensions/talkback@mozilla.org/InstallDisabled
+-#else
+-  #ifdef XP_MACOSX
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/master.ini
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/talkback@DLL_SUFFIX@
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Info.plist
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/MacOS/Talkback
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/pbdevelopment.plist
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/PkgInfo
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/delete.tiff
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/disable.tiff
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/enable.tiff
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/classes.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/info.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ArchivingSettings.nib/objects.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/InfoPlist.strings
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/classes.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/info.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/IntroWizard.nib/objects.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/Localizable.strings
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/MainMenu.nib/objects.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/classes.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/info.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/ProxySettings.nib/objects.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/classes.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/info.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/English.lproj/SendingSettings.nib/objects.nib
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/KeyInfoKeys.plist
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/KeyInfoSections.plist
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/send.tiff
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/sort_ascending.tiff
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/sort_descending.tiff
+-    @DIR_MACOS@extensions/talkback@mozilla.org/components/talkback/Talkback.app/Contents/Resources/Talkback.icns
+-  #else
+-    extensions/talkback@mozilla.org/components/talkback/talkback
+-    extensions/talkback@mozilla.org/components/talkback/XTalkback.ad
+-    extensions/talkback@mozilla.org/components/talkback/master.ini
+-    extensions/talkback@mozilla.org/components/talkback/talkback.so
+-  #endif
+-#endif
+-# ****************************************************************************
+-# * End removing Talkback.                                                   *
+-# ****************************************************************************
+-
+-# ****************************************************************************
+-# * Remove pre-extension PalmSync files.                                     *
+-# ****************************************************************************
+-@DIR_MACOS@HSAPI.dll
+-@DIR_MACOS@CondMgr.dll
+-@DIR_MACOS@mozABConduit.dll
+-@DIR_MACOS@components/palmsync.dll
+-@DIR_MACOS@components/palmSync.xpt
+-# ****************************************************************************
+-# * End pre-extensions PalmSync files.                                       *
+-# ****************************************************************************
+-
+-# ****************************************************************************
+-# * The first of two chunks of removing shared libraries: this removes the   *
+-# * shared libraries if we are going from a current shared build to a static *
+-# * build, although unlikely, we'll keep them in here anyway.                *
+-# * The next removes the Windows dlls that were present when                 *
+-# * we switched to static builds by default, in 2004-05. If a new library is *
+-# * added, it should be added here, if a library is removed, the dll should  *
+-# * be added below if it was present in 2004.                                *
+-# ****************************************************************************
+-@DIR_MACOS@components/@DLL_PREFIX@accessibility@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@appshell@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@auth@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@autoconfig@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@caps@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@chardet@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@chrome@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  components/@DLL_PREFIX@cmdlines@DLL_SUFFIX@
+-#else
+-  @DIR_MACOS@components/@DLL_PREFIX@commandlines@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@composer@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@cookie@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@docshell@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@embedcomponents@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@fileview@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@gkgfxthebes@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@gklayout@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@gkplugin@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@gkwidget@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  components/@DLL_PREFIX@gkparser@DLL_SUFFIX@
+-#else
+-  @DIR_MACOS@components/@DLL_PREFIX@htmlpars@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@i18n@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@imgicon@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@imglib2@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@import@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@intlapp@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@jar50@DLL_SUFFIX@
+-#ifndef XP_WIN
+-  @DIR_MACOS@components/@DLL_PREFIX@jsd@DLL_SUFFIX@
+-#else
+-  components/@DLL_PREFIX@jsd3250@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@mail@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  components/@DLL_PREFIX@mailcmp@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@mailcomps@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@mork@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@mozfind@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@mozldap@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@msgMapi@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@msgsmime@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@necko@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  components/@DLL_PREFIX@appshell@DLL_SUFFIX@
+-  components/@DLL_PREFIX@perms@DLL_SUFFIX@
+-#else
+-  @DIR_MACOS@components/@DLL_PREFIX@nsappshell@DLL_SUFFIX@
+-  @DIR_MACOS@components/@DLL_PREFIX@permissions@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@pipboot@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@pipnss@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@pippki@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  components/@DLL_PREFIX@xppref32@DLL_SUFFIX@
+-#else
+-  @DIR_MACOS@components/@DLL_PREFIX@pref@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@rdf@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@remoteservice@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  components/@DLL_PREFIX@spellchk@DLL_SUFFIX@
+-  components/@DLL_PREFIX@strgcmps@DLL_SUFFIX@
+-#else
+-  @DIR_MACOS@components/@DLL_PREFIX@spellchecker@DLL_SUFFIX@
+-  @DIR_MACOS@components/@DLL_PREFIX@storagecomps@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@system-pref@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  components/@DLL_PREFIX@tkautoc@DLL_SUFFIX@
+-  components/@DLL_PREFIX@tkitcmps@DLL_SUFFIX@
+-#else
+-  @DIR_MACOS@components/@DLL_PREFIX@tkautocomplete@DLL_SUFFIX@
+-  @DIR_MACOS@components/@DLL_PREFIX@toolkitcomps@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@txmgr@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@uconv@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@ucvmath@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@universalchardet@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@unixproxy@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@osxproxy@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@webbrwsr@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@widget_mac@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@gkwidget@DLL_SUFFIX@
+-@DIR_MACOS@components/@DLL_PREFIX@windowds@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  components/@DLL_PREFIX@xpautoc@DLL_SUFFIX@
+-  components/@DLL_PREFIX@xpc3250@DLL_SUFFIX@
+-#else
+-  @DIR_MACOS@components/@DLL_PREFIX@xpautocomplete@DLL_SUFFIX@
+-  @DIR_MACOS@components/@DLL_PREFIX@xpconnect@DLL_SUFFIX@
+-#endif
+-@DIR_MACOS@components/@DLL_PREFIX@zipwriter@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@gfxpsshar@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@gkgfx@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@gtkxtbin@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@mozz@DLL_SUFFIX@
+-@DIR_MACOS@@DLL_PREFIX@thebes@DLL_SUFFIX@
+-#ifdef XP_WIN
+-  xpcshell.exe
+-#else
+-  @DIR_MACOS@xpcshell
+-#endif
+-# ****************************************************************************
+-# * End removing current shared libraries                                    *
+-# ****************************************************************************
+-
+-# ****************************************************************************
+-# * Remove the DLLs that were present at the time (2004-05) when we started  *
+-# * shipping static builds on Windows, except for current shared libraries,  *
+-# * which are removed above.                                                 *
+-# ****************************************************************************
+-@DIR_MACOS@components/appcomps.dll
+-@DIR_MACOS@components/editor.dll
+-@DIR_MACOS@components/gkgfxwin.dll
+-@DIR_MACOS@components/jsdom.dll
+-@DIR_MACOS@components/necko2.dll
+-@DIR_MACOS@components/nsprefm.dll
+-@DIR_MACOS@components/profile.dll
+-@DIR_MACOS@components/profilemigration.dll
+-@DIR_MACOS@components/wlltvwrs.dll
+-@DIR_MACOS@components/xmlextras.dll
+-@DIR_MACOS@components/xmlextras.xpt
+-# ****************************************************************************
+-# * End removing old shared dlls.                                            *
+-# ****************************************************************************
+-
+-# ****************************************************************************
+-# * Remove the XPTs that were present at the time (2004-09) when we started  *
+-# * linking XPTs on Windows. You almost certainly don't want to add anything *
+-# * to this section.                                                         *
+-# ****************************************************************************
+-#ifdef XP_WIN
+-  components/accessibility-msaa.xpt
+-  components/accessibility.xpt
+-  components/addrbook.xpt
+-  components/alerts.xpt
+-  components/appshell.xpt
+-  components/autocomplete.xpt
+-  components/caps.xpt
+-  components/chrome.xpt
+-  components/commandhandler.xpt
+-  components/composer.xpt
+-  components/content_base.xpt
+-  components/content_html.xpt
+-  components/content_htmldoc.xpt
+-  components/content_xmldoc.xpt
+-  components/content_xslt.xpt
+-  components/crashreporter.xpt
+-  components/docshell_base.xpt
+-  components/dom.xpt
+-  components/dom_base.xpt
+-  components/dom_core.xpt
+-  components/dom_css.xpt
+-  components/dom_events.xpt
+-  components/dom_html.xpt
+-  components/dom_offline.xpt
+-  components/dom_range.xpt
+-  components/dom_stylesheets.xpt
+-  components/dom_traversal.xpt
+-  components/dom_views.xpt
+-  components/dom_xbl.xpt
+-  components/dom_xpath.xpt
+-  components/dom_xul.xpt
+-  components/editor.xpt
+-  components/embed_base.xpt
+-  components/extensions.xpt
+-  components/exthandler.xpt
+-  components/find.xpt
+-  components/gfx.xpt
+-  components/helperAppDlg.xpt
+-  components/htmlparser.xpt
+-  components/imgicon.xpt
+-  components/imglib2.xpt
+-  components/impComm4xMail.xpt
+-  components/import.xpt
+-  components/intl.xpt
+-  components/jar.xpt
+-  components/jsdservice.xpt
+-  components/jsurl.xpt
+-  components/layout_base.xpt
+-  components/layout_printing.xpt
+-  components/layout_xul.xpt
+-  components/layout_xul_tree.xpt
+-  components/locale.xpt
+-  components/lwbrk.xpt
+-  components/mailview.xpt
+-  components/mapihook.xpt
+-  components/mime.xpt
+-  components/mimetype.xpt
+-  components/mozbrwsr.xpt
+-  components/mozfind.xpt
+-  components/mozldap.xpt
+-  components/msgbase.xpt
+-  components/msgcompo.xpt
+-  components/msgdb.xpt
+-  components/msgimap.xpt
+-  components/msglocal.xpt
+-  components/msgnews.xpt
+-  components/msgsearch.xpt
+-  components/msgsmime.xpt
+-  components/necko.xpt
+-  components/necko_about.xpt
+-  components/necko_cache.xpt
+-  components/necko_cookie.xpt
+-  components/necko_dns.xpt
+-  components/necko_file.xpt
+-  components/necko_ftp.xpt
+-  components/necko_http.xpt
+-  components/necko_jar.xpt
+-  components/necko_res.xpt
+-  components/necko_strconv.xpt
+-  components/pipboot.xpt
+-  components/pipnss.xpt
+-  components/pippki.xpt
+-  components/pref.xpt
+-  components/prefmigr.xpt
+-  components/profile.xpt
+-  components/proxyObject.xpt
+-  components/rdf.xpt
+-  components/spellchecker.xpt
+-  components/toolkitprofile.xpt
+-  components/txmgr.xpt
+-  components/txtsvc.xpt
+-  components/uconv.xpt
+-  components/ucnative.xpt
+-  components/unicharutil.xpt
+-  components/update.xpt
+-  components/uriloader.xpt
+-  components/util.xpt
+-  components/webbrowserpersist.xpt
+-  components/webBrowser_core.xpt
+-  components/webshell_idls.xpt
+-  components/widget.xpt
+-  components/windowds.xpt
+-  components/windowwatcher.xpt
+-  components/winhooks.xpt
+-  components/xmlextras.xpt
+-  components/xpcom_base.xpt
+-  components/xpcom_components.xpt
+-  components/xpcom_ds.xpt
+-  components/xpcom_io.xpt
+-  components/xpcom_thread.xpt
+-  components/xpcom_xpti.xpt
+-  components/xpcom.xpt
+-  components/xpconnect.xpt
+-  components/xpinstall.xpt
+-  components/xuldoc.xpt
+-  components/xultmpl.xpt
+-#endif
+-# ****************************************************************************
+-# * End of XPTs at the time we started linking them on Windows.              *
+-# ****************************************************************************
+-
+-# ****************************************************************************
+-# * Remove the XPTs that were present at the time (2009-04) when we started  *
+-# * linking XPTs on Linux, and present at the time (2009-08) when we started *
+-# * linking XPTs on Mac, plus XPTs that shipped with 3.0 (which didn't link  *
+-# * XPTs). You almost certainly don't want to add anything to this section.  *
+-# ****************************************************************************
+-#ifdef XP_UNIX
+-  @DIR_MACOS@components/activity.xpt
+-  @DIR_MACOS@components/addrbook.xpt
+-  @DIR_MACOS@components/alerts.xpt
+-  @DIR_MACOS@components/appshell.xpt
+-  @DIR_MACOS@components/appstartup.xpt
+-  @DIR_MACOS@components/autocomplete.xpt
+-  @DIR_MACOS@components/autoconfig.xpt
+-  @DIR_MACOS@components/caps.xpt
+-  @DIR_MACOS@components/chrome.xpt
+-  @DIR_MACOS@components/commandhandler.xpt
+-  @DIR_MACOS@components/commandlines.xpt
+-  @DIR_MACOS@components/composer.xpt
+-  @DIR_MACOS@components/content_base.xpt
+-  @DIR_MACOS@components/content_html.xpt
+-  @DIR_MACOS@components/content_htmldoc.xpt
+-  @DIR_MACOS@components/content_xmldoc.xpt
+-  @DIR_MACOS@components/content_xslt.xpt
+-  @DIR_MACOS@components/content_xtf.xpt
+-  @DIR_MACOS@components/contentprefs.xpt
+-  @DIR_MACOS@components/cookie.xpt
+-  @DIR_MACOS@components/docshell.xpt
+-  @DIR_MACOS@components/dom.xpt
+-  @DIR_MACOS@components/dom_base.xpt
+-  @DIR_MACOS@components/dom_core.xpt
+-  @DIR_MACOS@components/dom_css.xpt
+-  @DIR_MACOS@components/dom_events.xpt
+-  @DIR_MACOS@components/dom_geolocation.xpt
+-  @DIR_MACOS@components/dom_html.xpt
+-  @DIR_MACOS@components/dom_json.xpt
+-  @DIR_MACOS@components/dom_offline.xpt
+-  @DIR_MACOS@components/dom_range.xpt
+-  @DIR_MACOS@components/dom_sidebar.xpt
+-  @DIR_MACOS@components/dom_smil.xpt
+-  @DIR_MACOS@components/dom_storage.xpt
+-  @DIR_MACOS@components/dom_stylesheets.xpt
+-  @DIR_MACOS@components/dom_svg.xpt
+-  @DIR_MACOS@components/dom_threads.xpt
+-  @DIR_MACOS@components/dom_traversal.xpt
+-  @DIR_MACOS@components/dom_views.xpt
+-  @DIR_MACOS@components/dom_xbl.xpt
+-  @DIR_MACOS@components/dom_xpath.xpt
+-  @DIR_MACOS@components/dom_xul.xpt
+-  @DIR_MACOS@components/downloads.xpt
+-  @DIR_MACOS@components/editor.xpt
+-  @DIR_MACOS@components/embed_base.xpt
+-  @DIR_MACOS@components/extensions.xpt
+-  @DIR_MACOS@components/exthandler.xpt
+-  @DIR_MACOS@components/exthelper.xpt
+-  @DIR_MACOS@components/fastfind.xpt
+-  @DIR_MACOS@components/feeds.xpt
+-  @DIR_MACOS@components/find.xpt
+-  @DIR_MACOS@components/fts3tok.xpt
+-  @DIR_MACOS@components/gfx.xpt
+-  @DIR_MACOS@components/htmlparser.xpt
+-  @DIR_MACOS@components/imgicon.xpt
+-  @DIR_MACOS@components/imglib2.xpt
+-  @DIR_MACOS@components/impComm4xMail.xpt
+-  @DIR_MACOS@components/import.xpt
+-  @DIR_MACOS@components/inspector.xpt
+-  @DIR_MACOS@components/intl.xpt
+-  @DIR_MACOS@components/jar.xpt
+-  @DIR_MACOS@components/jsdservice.xpt
+-  @DIR_MACOS@components/layout_base.xpt
+-  @DIR_MACOS@components/layout_printing.xpt
+-  @DIR_MACOS@components/layout_xul.xpt
+-  @DIR_MACOS@components/layout_xul_tree.xpt
+-  @DIR_MACOS@components/locale.xpt
+-  @DIR_MACOS@components/loginmgr.xpt
+-  @DIR_MACOS@components/lwbrk.xpt
+-  @DIR_MACOS@components/mailprofilemigration.xpt
+-  @DIR_MACOS@components/mailview.xpt
+-  @DIR_MACOS@components/mime.xpt
+-  @DIR_MACOS@components/mimetype.xpt
+-  @DIR_MACOS@components/mozbrwsr.xpt
+-  @DIR_MACOS@components/mozfind.xpt
+-  @DIR_MACOS@components/mozldap.xpt
+-  @DIR_MACOS@components/msgbase.xpt
+-  @DIR_MACOS@components/msgcompose.xpt
+-  @DIR_MACOS@components/msgdb.xpt
+-  @DIR_MACOS@components/msgimap.xpt
+-  @DIR_MACOS@components/msglocal.xpt
+-  @DIR_MACOS@components/msgnews.xpt
+-  @DIR_MACOS@components/msgsearch.xpt
+-  @DIR_MACOS@components/msgsmime.xpt
+-  @DIR_MACOS@components/necko.xpt
+-  @DIR_MACOS@components/necko_about.xpt
+-  @DIR_MACOS@components/necko_cache.xpt
+-  @DIR_MACOS@components/necko_cookie.xpt
+-  @DIR_MACOS@components/necko_dns.xpt
+-  @DIR_MACOS@components/necko_file.xpt
+-  @DIR_MACOS@components/necko_ftp.xpt
+-  @DIR_MACOS@components/necko_http.xpt
+-  @DIR_MACOS@components/necko_res.xpt
+-  @DIR_MACOS@components/necko_socket.xpt
+-  @DIR_MACOS@components/necko_strconv.xpt
+-  @DIR_MACOS@components/necko_viewsource.xpt
+-  @DIR_MACOS@components/necko_wifi.xpt
+-  @DIR_MACOS@components/parentalcontrols.xpt
+-  @DIR_MACOS@components/pipboot.xpt
+-  @DIR_MACOS@components/pipnss.xpt
+-  @DIR_MACOS@components/pippki.xpt
+-  @DIR_MACOS@components/places.xpt
+-  @DIR_MACOS@components/plugin.xpt
+-  @DIR_MACOS@components/prefetch.xpt
+-  @DIR_MACOS@components/pref.xpt
+-  @DIR_MACOS@components/profile.xpt
+-  @DIR_MACOS@components/proxyObjInst.xpt
+-  @DIR_MACOS@components/rdf.xpt
+-  @DIR_MACOS@components/satchel.xpt
+-  @DIR_MACOS@components/saxparser.xpt
+-  @DIR_MACOS@components/shellservice.xpt
+-  @DIR_MACOS@components/shistory.xpt
+-  @DIR_MACOS@components/spellchecker.xpt
+-  @DIR_MACOS@components/steel.xpt
+-  @DIR_MACOS@components/storage.xpt
+-  @DIR_MACOS@components/toolkitprofile.xpt
+-  @DIR_MACOS@components/txmgr.xpt
+-  @DIR_MACOS@components/txtsvc.xpt
+-  @DIR_MACOS@components/uconv.xpt
+-  @DIR_MACOS@components/unicharutil.xpt
+-  @DIR_MACOS@components/update.xpt
+-  @DIR_MACOS@components/uriloader.xpt
+-  @DIR_MACOS@components/url-classifier.xpt
+-  @DIR_MACOS@components/urlformatter.xpt
+-  @DIR_MACOS@components/webBrowser_core.xpt
+-  @DIR_MACOS@components/webbrowserpersist.xpt
+-  @DIR_MACOS@components/webshell_idls.xpt
+-  @DIR_MACOS@components/widget.xpt
+-  @DIR_MACOS@components/windowwatcher.xpt
+-  @DIR_MACOS@components/xpautocomplete.xpt
+-  @DIR_MACOS@components/xpcom_base.xpt
+-  @DIR_MACOS@components/xpcom_components.xpt
+-  @DIR_MACOS@components/xpcom_ds.xpt
+-  @DIR_MACOS@components/xpcom_io.xpt
+-  @DIR_MACOS@components/xpcom_system.xpt
+-  @DIR_MACOS@components/xpcom_threads.xpt
+-  @DIR_MACOS@components/xpcom_xpti.xpt
+-  @DIR_MACOS@components/xpconnect.xpt
+-  @DIR_MACOS@components/xpinstall.xpt
+-  @DIR_MACOS@components/xulapp.xpt
+-  @DIR_MACOS@components/xuldoc.xpt
+-  @DIR_MACOS@components/xultmpl.xpt
+-  @DIR_MACOS@components/zipwriter.xpt
+-  #ifdef XP_MACOSX
+-    @DIR_MACOS@components/steel.xpt
+-    @DIR_MACOS@components/necko_wifi.xpt
+-    @DIR_MACOS@components/widget_cocoa.xpt
+-  #else
+-    components/accessibility.xpt
+-    components/filepicker.xpt
+-    components/toolkitremote.xpt
+-    components/websrvcs.xpt
+-  #endif
+-#endif
+-# ****************************************************************************
+-# * End of XPTs at the time we started linking them on Linux and Mac.        *
+-# ****************************************************************************
+-#ifndef MOZ_MAINTENANCE_SERVICE
+-@DIR_MACOS@maintenanceservice.exe
+-@DIR_MACOS@maintenanceservice_installer.exe
+-#endif

+ 360 - 0
comm-release/patches/1913579-removed-files-25320.patch

@@ -0,0 +1,360 @@
+# HG changeset patch
+# User Ian Neal <iann_cvs@blueyonder.co.uk>
+# Date 1723927604 -3600
+# Parent  c40d9cecb1755c610e5d090ff3e49f2e8ddde085
+Bug 1913579 - Empty out SeaMonkey's removed-files.in (port bug 1392913). r=frg a=frg
+
+diff --git a/suite/installer/removed-files.in b/suite/installer/removed-files.in
+--- a/suite/installer/removed-files.in
++++ b/suite/installer/removed-files.in
+@@ -1,290 +1,86 @@
++# 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/.
++
++# The removed-files.in file specifies files and directories to be removed during
++# an application update that are not automatically removed by the application
++# update process. The application update process handles the vast majority of
++# file and directory removals automatically so this file should not be used in
++# the vast majority of cases.
++
++# When to use removed-files.in file to remove files and directories:
++# * Files and directories located in the installation's "distribution/" and
++#   "extensions/" directories that were added before Thunderbird 27. Files and
++#   directories located in these directories were not included in the
++#   application update file removals for a complete update prior to Thunderbird 27.
++# * Empty directories that were accidentally added to the installation
++#   directory.
++# * Third party files and directories that were added to the installation
++#   directory. Under normal circumstances this should only be done after release
++#   drivers have approved the removal of these third party files.
++
++# If you are not sure whether a file or directory should be removed using the
++# removed-files.in file please contact one of the developers that work on
++# application update.
++
++# Note: the "distribution/" and "browser/extensions/" directories should never
++# be removed recursively since these directories are used by Partner builds and
++# custom installations.
++
++# To specify a file to be removed add the path to the file.
++# * If the file doesn't exist the update will succeed.
++# * If the file exists and can't be removed (e.g. the file is locked) the
++#   update will fail.
++#
++# Example: path/to/file
++
++# To specify a directory to be removed only if it is empty add the path to the
++# directory with a trailing forward slash.
++# * If the directory doesn't exist the update will succeed.
++# * If the directory can't be removed (e.g. the directory is locked, contains
++#   files, etc.) the update will succeed.
++#
++# Example: path/to/dir/
++
++# To specify a directory that should be recursively removed add the path to the
++# directory with a trailing forward slash and "*".
++# * If the directory doesn't exist the update will succeed.
++# * If all of the files the directory contains can be removed but the directory
++#   or a subdirectory can't be removed (e.g. the directory is locked) the update
++#   will succeed.
++# * If a file within the directory can't be removed the update will fail.
++#
++# Example: path/to/dir/*
++
+ # Due to Apple macOS packaging requirements files that are in the same
+ # directory on other platforms must be located in different directories on
+ # macOS. The following defines allow specifying the macOS bundle
+-# location which also work on other platforms.
++# location which will also work on other platforms.
+ #
+ # @DIR_MACOS@
+ # Equals Contents/MacOS/ on Mac OX X and is an empty string on other platforms.
+ #
+ # @DIR_RESOURCES@
+ # Equals Contents/Resources/ on Mac OX X and is an empty string on other
+ # platforms.
+ 
+-#ifdef XP_UNIX
+-#ifndef XP_MACOSX
+-#define UNIX_BUT_NOT_MAC
+-#endif
+-#endif
+-@DIR_MACOS@.autoreg
+-@DIR_MACOS@chrome/icons/default/abcardWindow.xpm
+-@DIR_MACOS@chrome/icons/default/abcardWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/ablistWindow.xpm
+-@DIR_MACOS@chrome/icons/default/addressbookWindow.xpm
+-@DIR_MACOS@chrome/icons/default/addressbookWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/bmPropsWindow.ico
+-@DIR_MACOS@chrome/icons/default/bmPropsWindow.png
+-@DIR_MACOS@chrome/icons/default/bmPropsWindow16.png
+-@DIR_MACOS@chrome/icons/default/bmPropsWindow48.png
+-@DIR_MACOS@chrome/icons/default/bmPropsWindow.xpm
+-@DIR_MACOS@chrome/icons/default/bmPropsWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/bookmark-window.ico
+-@DIR_MACOS@chrome/icons/default/bookmark-window.png
+-@DIR_MACOS@chrome/icons/default/bookmark-window16.png
+-@DIR_MACOS@chrome/icons/default/bookmark-window48.png
+-@DIR_MACOS@chrome/icons/default/bookmark-window.xpm
+-@DIR_MACOS@chrome/icons/default/bookmark-window16.xpm
+-@DIR_MACOS@chrome/icons/default/calendar-window.xpm
+-@DIR_MACOS@chrome/icons/default/calendar-window16.xpm
+-@DIR_MACOS@chrome/icons/default/chatzilla-window.xpm
+-@DIR_MACOS@chrome/icons/default/chatzilla-window16.xpm
+-@DIR_MACOS@chrome/icons/default/default.xpm
+-@DIR_MACOS@chrome/icons/default/default16.xpm
+-@DIR_MACOS@chrome/icons/default/downloadManager.xpm
+-@DIR_MACOS@chrome/icons/default/downloadManager16.xpm
+-@DIR_MACOS@chrome/icons/default/editorWindow.xpm
+-@DIR_MACOS@chrome/icons/default/editorWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/findBookmarkWindow.xpm
+-@DIR_MACOS@chrome/icons/default/findBookmarkWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/findHistoryWindow.xpm
+-@DIR_MACOS@chrome/icons/default/findHistoryWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/history-window.xpm
+-@DIR_MACOS@chrome/icons/default/history-window16.xpm
+-@DIR_MACOS@chrome/icons/default/JSConsoleWindow.xpm
+-@DIR_MACOS@chrome/icons/default/jsconsoleWindow.xpm
+-@DIR_MACOS@chrome/icons/default/jsconsoleWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/main-window.xpm
+-@DIR_MACOS@chrome/icons/default/main-window16.xpm
+-@DIR_MACOS@chrome/icons/default/messengerWindow.xpm
+-@DIR_MACOS@chrome/icons/default/messengerWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/msgcomposeWindow.xpm
+-@DIR_MACOS@chrome/icons/default/msgcomposeWindow16.xpm
+-@DIR_MACOS@chrome/icons/default/venkman-window.xpm
+-@DIR_MACOS@chrome/icons/default/venkman-window16.xpm
+-#ifndef MOZ_CRASHREPORTER
+-#ifdef XP_MACOSX
+-@DIR_MACOS@crashreporter.app/
+-#else
+-@DIR_MACOS@crashreporter@BIN_SUFFIX@
+-@DIR_MACOS@crashreporter.ini
+-#endif
+-#endif
+-@DIR_MACOS@defaults/profile/localstore.rdf
+-@DIR_MACOS@defaults/profile/search.rdf
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/components/components.list
+-@DIR_MACOS@extensions/inspector@mozilla.org/components/components.list
++# An update watershed was required to update to SeaMonkey 2.53.x for LZMA and
++# SHA384 support. This made it possible to delete all of the removal
++# instructions in this file.
++
++# Since then, the following were added:
+ 
+ # Remove unpacked lightning extension.
+ # Depending on the previous installed version it might reside in one of two
+ # different places.
+ @DIR_RESOURCES@extensions/
+ @DIR_RESOURCES@extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/*
+ @DIR_RESOURCES@distribution/
+ @DIR_RESOURCES@distribution/extensions/
+ @DIR_RESOURCES@distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/*
+ 
+ # Remove old extensions in distribution.
+ @DIR_RESOURCES@distribution/extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}.xpi
+ @DIR_RESOURCES@distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}.xpi
+ @DIR_RESOURCES@distribution/extensions/debugQA@mozilla.org.xpi
+ @DIR_RESOURCES@distribution/extensions/inspector@mozilla.org.xpi
+-
+-@DIR_MACOS@hyphenation/
+-@DIR_MACOS@hyphenation/hyph_af.dic
+-@DIR_MACOS@hyphenation/hyph_bg.dic
+-@DIR_MACOS@hyphenation/hyph_ca.dic
+-@DIR_MACOS@hyphenation/hyph_cy.dic
+-@DIR_MACOS@hyphenation/hyph_da.dic
+-@DIR_MACOS@hyphenation/hyph_de-1901.dic
+-@DIR_MACOS@hyphenation/hyph_de-1996.dic
+-@DIR_MACOS@hyphenation/hyph_de-CH.dic
+-@DIR_MACOS@hyphenation/hyph_en_US.dic
+-@DIR_MACOS@hyphenation/hyph_eo.dic
+-@DIR_MACOS@hyphenation/hyph_es.dic
+-@DIR_MACOS@hyphenation/hyph_et.dic
+-@DIR_MACOS@hyphenation/hyph_fi.dic
+-@DIR_MACOS@hyphenation/hyph_fr.dic
+-@DIR_MACOS@hyphenation/hyph_gl.dic
+-@DIR_MACOS@hyphenation/hyph_hr.dic
+-@DIR_MACOS@hyphenation/hyph_hsb.dic
+-@DIR_MACOS@hyphenation/hyph_hu.dic
+-@DIR_MACOS@hyphenation/hyph_ia.dic
+-@DIR_MACOS@hyphenation/hyph_is.dic
+-@DIR_MACOS@hyphenation/hyph_it.dic
+-@DIR_MACOS@hyphenation/hyph_kmr.dic
+-@DIR_MACOS@hyphenation/hyph_la.dic
+-@DIR_MACOS@hyphenation/hyph_lt.dic
+-@DIR_MACOS@hyphenation/hyph_mn.dic
+-@DIR_MACOS@hyphenation/hyph_nb.dic
+-@DIR_MACOS@hyphenation/hyph_nl.dic
+-@DIR_MACOS@hyphenation/hyph_nn.dic
+-@DIR_MACOS@hyphenation/hyph_pt.dic
+-@DIR_MACOS@hyphenation/hyph_ru.dic
+-@DIR_MACOS@hyphenation/hyph_sh.dic
+-@DIR_MACOS@hyphenation/hyph_sl.dic
+-@DIR_MACOS@hyphenation/hyph_sv.dic
+-@DIR_MACOS@hyphenation/hyph_tr.dic
+-@DIR_MACOS@hyphenation/hyph_uk.dic
+-@DIR_MACOS@LICENSE
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@run-mozilla.sh
+-  @DIR_MACOS@updater.app/Contents/MacOS/updater.ini
+-#endif
+-@DIR_MACOS@res/arrow.gif
+-@DIR_MACOS@res/arrowd.gif
+-@DIR_MACOS@res/broken-image.gif
+-@DIR_MACOS@res/broken-image.png
+-@DIR_MACOS@res/loading-image.gif
+-@DIR_MACOS@res/loading-image.png
+-@DIR_MACOS@searchplugins/
+-#ifndef MOZ_CRASHREPORTER
+-#ifdef UNIX_BUT_NOT_MAC
+-@DIR_MACOS@res/Throbber-small.gif
+-#endif
+-#endif
+-#ifndef MOZ_UPDATER
+-  @DIR_MACOS@update-settings.ini
+-  #ifdef XP_MACOSX
+-    @DIR_MACOS@updater.app/
+-  #else
+-    @DIR_MACOS@updater@BIN_SUFFIX@
+-  #endif
+-  @DIR_MACOS@updater.ini
+-#endif
+-@DIR_MACOS@update.locale
+-
+-@DIR_MACOS@defaults/profile/bookmarks.html
+-@DIR_MACOS@defaults/pref/browser-prefs.js
+-@DIR_MACOS@defaults/pref/composer.js
+-@DIR_MACOS@defaults/pref/mailnews.js
+-@DIR_MACOS@defaults/pref/mdn.js
+-@DIR_MACOS@defaults/pref/services-aitc.js
+-@DIR_MACOS@defaults/pref/services-notifications.js
+-@DIR_MACOS@defaults/pref/smime.js
+-@DIR_MACOS@defaults/autoconfig/
+-@DIR_MACOS@defaults/autoconfig/platform.js
+-@DIR_MACOS@defaults/autoconfig/prefcalls.js
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/chrome/
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/chrome/icons/
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/chrome/icons/default/
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/chrome/icons/default/chatzilla-window.xpm
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/chrome/icons/default/chatzilla-window16.xpm
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/chrome/icons/default/chatzilla-window.ico
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/chrome.manifest
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/components/
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/components/chatzilla-service.js
+-@DIR_MACOS@extensions/{59c81df5-4b7a-477b-912d-4e0fdf64e5f2}/install.rdf
+-@DIR_MACOS@extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/
+-@DIR_MACOS@extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/chrome.manifest
+-@DIR_MACOS@extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
+-@DIR_MACOS@extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
+-@DIR_MACOS@extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png
+-@DIR_MACOS@extensions/debugQA@mozilla.org/
+-@DIR_MACOS@extensions/debugQA@mozilla.org/install.rdf
+-@DIR_MACOS@extensions/debugQA@mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/debugQA@mozilla.org/chrome/
+-@DIR_MACOS@extensions/debugQA@mozilla.org/chrome/debugqa.jar
+-@DIR_MACOS@extensions/inspector@mozilla.org/
+-@DIR_MACOS@extensions/inspector@mozilla.org/install.rdf
+-@DIR_MACOS@extensions/inspector@mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/inspector@mozilla.org/chrome/
+-@DIR_MACOS@extensions/inspector@mozilla.org/chrome/inspector.jar
+-@DIR_MACOS@extensions/inspector@mozilla.org/platform/
+-@DIR_MACOS@extensions/inspector@mozilla.org/platform/Linux/
+-@DIR_MACOS@extensions/inspector@mozilla.org/platform/Linux/chrome/
+-@DIR_MACOS@extensions/inspector@mozilla.org/platform/Linux/chrome/icons/
+-@DIR_MACOS@extensions/inspector@mozilla.org/platform/Linux/chrome/icons/default/
+-@DIR_MACOS@extensions/inspector@mozilla.org/platform/Linux/chrome/icons/default/winInspectorMain16.xpm
+-@DIR_MACOS@extensions/inspector@mozilla.org/platform/Linux/chrome/icons/default/winInspectorMain.xpm
+-@DIR_MACOS@extensions/inspector@mozilla.org/platform/WINNT/chrome/icons/default/winInspectorMain.ico
+-@DIR_MACOS@extensions/inspector@mozilla.org/components/
+-@DIR_MACOS@extensions/inspector@mozilla.org/components/inspector-cmdline.js
+-@DIR_MACOS@extensions/inspector@mozilla.org/defaults/
+-@DIR_MACOS@extensions/inspector@mozilla.org/defaults/preferences/
+-@DIR_MACOS@extensions/inspector@mozilla.org/defaults/preferences/inspector.js
+-@DIR_MACOS@extensions/langpack-ca@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-ca@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-ca@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-ca@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-ca@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-cs@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-cs@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-cs@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-cs@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-cs@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-de@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-de@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-de@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-de@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-de@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-es-ES@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-es-ES@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-es-ES@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-es-ES@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-es-ES@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-fi@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-fi@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-fi@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-fi@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-fi@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-fr@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-fr@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-fr@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-fr@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-fr@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-it@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-it@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-it@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-it@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-it@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-ja@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-ja@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-ja@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-ja@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-ja@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-ja-JP-mac@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-ja-JP-mac@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-ja-JP-mac@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-ja-JP-mac@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-ja-JP-mac@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-nb-NO@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-nb-NO@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-nb-NO@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-nb-NO@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-nb-NO@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-pl@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-pl@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-pl@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-pl@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-pl@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-pt-BR@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-pt-BR@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-pt-BR@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-pt-BR@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-pt-BR@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-pt-PT@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-pt-PT@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-pt-PT@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-pt-PT@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-pt-PT@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-ru@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-ru@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-ru@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-ru@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-ru@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-si@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-si@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-si@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-si@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-si@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-sk@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-sk@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-sk@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-sk@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-sk@chatzilla.mozilla.org/install.rdf
+-@DIR_MACOS@extensions/langpack-sv-SE@chatzilla.mozilla.org/chrome/chatzilla.jar
+-@DIR_MACOS@extensions/langpack-sv-SE@chatzilla.mozilla.org/chrome/chatzilla.manifest
+-@DIR_MACOS@extensions/langpack-sv-SE@chatzilla.mozilla.org/chrome.manifest
+-@DIR_MACOS@extensions/langpack-sv-SE@chatzilla.mozilla.org/install.js
+-@DIR_MACOS@extensions/langpack-sv-SE@chatzilla.mozilla.org/install.rdf

+ 2 - 0
comm-release/patches/series

@@ -2184,3 +2184,5 @@ TOP-1906540-mozdevice-removal-comm-25320.patch
 1911847-tabbrowser-boxObject-25320.patch
 1911848-tabbrowser-tabDrop-25320.patch
 1912354-domiselect-25320.patch
+1488138-64a1.patch
+1913579-removed-files-25320.patch

+ 169 - 0
mozilla-release/patches/1363897-2-57a1.patch

@@ -0,0 +1,169 @@
+# HG changeset patch
+# User Andrei Obreja <aobreja@mozilla.com>
+# Date 1504163908 -10800
+# Node ID a2723b65046096e587b968a3b6b1cb056c914b78
+# Parent  d0696085e3e97983a567ce38e0422efa44ff9f0a
+Bug 1363897 - enable MOZ_ALLOW_LEGACY_EXTENSIONS for devedition configs. r=glandium
+
+MozReview-Commit-ID: K1dl96sq13y
+
+diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozconfigs/linux32/devedition
+--- a/browser/config/mozconfigs/linux32/devedition
++++ b/browser/config/mozconfigs/linux32/devedition
+@@ -9,9 +9,12 @@ ac_add_options --enable-verify-mar
+ 
+ # This will overwrite the default of stripping everything and keep the symbol table.
+ # This is useful for profiling and debugging and only increases the package size
+ # by 2 MBs.
+ STRIP_FLAGS="--strip-debug"
+ 
+ ac_add_options --with-branding=browser/branding/aurora
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition b/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
+--- a/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
++++ b/browser/config/mozconfigs/linux32/l10n-mozconfig-devedition
+@@ -9,10 +9,12 @@ if test `uname -m` = "x86_64"; then
+   ac_add_options --host=i686-pc-linux
+ fi
+ 
+ export MOZILLA_OFFICIAL=1
+ 
+ # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
+ # Bug 1283438
+ mk_add_options AUTOCLOBBER=
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozconfigs/linux64/devedition
+--- a/browser/config/mozconfigs/linux64/devedition
++++ b/browser/config/mozconfigs/linux64/devedition
+@@ -9,9 +9,12 @@ ac_add_options --enable-verify-mar
+ 
+ # This will overwrite the default of stripping everything and keep the symbol table.
+ # This is useful for profiling and debugging and only increases the package size
+ # by 2 MBs.
+ STRIP_FLAGS="--strip-debug"
+ 
+ ac_add_options --with-branding=browser/branding/aurora
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition b/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
+--- a/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
++++ b/browser/config/mozconfigs/linux64/l10n-mozconfig-devedition
+@@ -5,9 +5,12 @@ ac_add_options --with-branding=browser/b
+ . "$topsrcdir/build/mozconfig.no-compile"
+ 
+ export MOZILLA_OFFICIAL=1
+ 
+ # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
+ # Bug 1283438
+ mk_add_options AUTOCLOBBER=
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/devedition b/browser/config/mozconfigs/macosx64/devedition
+--- a/browser/config/mozconfigs/macosx64/devedition
++++ b/browser/config/mozconfigs/macosx64/devedition
+@@ -14,9 +14,12 @@ if test `uname -s` != Linux; then
+ fi
+ 
+ if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
+ ac_add_options --with-macbundlename-prefix=Firefox
+ fi
+ 
+ ac_add_options --with-branding=browser/branding/aurora
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition b/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition
+--- a/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition
++++ b/browser/config/mozconfigs/macosx64/l10n-mozconfig-devedition
+@@ -18,9 +18,12 @@ ac_add_options --with-macbundlename-pref
+ fi
+ 
+ export MOZILLA_OFFICIAL=1
+ 
+ # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
+ # Bug 1283438
+ mk_add_options AUTOCLOBBER=
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/win32/devedition b/browser/config/mozconfigs/win32/devedition
+--- a/browser/config/mozconfigs/win32/devedition
++++ b/browser/config/mozconfigs/win32/devedition
+@@ -5,9 +5,12 @@ export MOZ_PGO=1
+ 
+ # Add-on signing is not required for DevEdition
+ MOZ_REQUIRE_SIGNING=0
+ 
+ ac_add_options --enable-verify-mar
+ 
+ ac_add_options --with-branding=browser/branding/aurora
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/win32/l10n-mozconfig-devedition b/browser/config/mozconfigs/win32/l10n-mozconfig-devedition
+--- a/browser/config/mozconfigs/win32/l10n-mozconfig-devedition
++++ b/browser/config/mozconfigs/win32/l10n-mozconfig-devedition
+@@ -6,9 +6,12 @@ ac_add_options --with-l10n-base=../../l1
+ ac_add_options --with-branding=browser/branding/aurora
+ 
+ export MOZILLA_OFFICIAL=1
+ 
+ # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
+ # Bug 1283438
+ mk_add_options AUTOCLOBBER=
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/win64/devedition b/browser/config/mozconfigs/win64/devedition
+--- a/browser/config/mozconfigs/win64/devedition
++++ b/browser/config/mozconfigs/win64/devedition
+@@ -6,9 +6,12 @@ export MOZ_PGO=1
+ 
+ # Add-on signing is not required for DevEdition
+ MOZ_REQUIRE_SIGNING=0
+ 
+ ac_add_options --enable-verify-mar
+ 
+ ac_add_options --with-branding=browser/branding/aurora
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/win64/l10n-mozconfig-devedition b/browser/config/mozconfigs/win64/l10n-mozconfig-devedition
+--- a/browser/config/mozconfigs/win64/l10n-mozconfig-devedition
++++ b/browser/config/mozconfigs/win64/l10n-mozconfig-devedition
+@@ -7,9 +7,12 @@ ac_add_options --with-l10n-base=../../l1
+ ac_add_options --with-branding=browser/branding/aurora
+ 
+ export MOZILLA_OFFICIAL=1
+ 
+ # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
+ # Bug 1283438
+ mk_add_options AUTOCLOBBER=
+ 
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ . "$topsrcdir/build/mozconfig.common.override"

+ 39 - 0
mozilla-release/patches/1391079-2-57a1.patch

@@ -0,0 +1,39 @@
+# HG changeset patch
+# User Aki Sasaki <asasaki@mozilla.com>
+# Date 1503683968 25200
+# Node ID c5fbc59c3404b219f5827f3ed2c9c9892a19bacd
+# Parent  d0696085e3e97983a567ce38e0422efa44ff9f0a
+bug 1391079 - back out 929d3ef69803 after baking for a week. r=backout
+
+diff --git a/browser/installer/removed-files.in b/browser/installer/removed-files.in
+--- a/browser/installer/removed-files.in
++++ b/browser/installer/removed-files.in
+@@ -73,28 +73,16 @@
+ #ifdef XP_MACOSX
+   @DIR_MACOS@active-update.xml
+   @DIR_MACOS@update-settings.ini
+   @DIR_MACOS@updates.xml
+   @DIR_MACOS@defaults/*
+   @DIR_MACOS@updates/*
+ #endif
+ 
+-# bug 1391079 - remove this block before 57 uplift to beta
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@._firefox-bin.sig
+-  @DIR_MACOS@._firefox.sig
+-  @DIR_MACOS@._XUL.sig
+-  @DIR_MACOS@firefox-bin.sig
+-  @DIR_MACOS@firefox.sig
+-  @DIR_MACOS@plugin-container.app/Contents/MacOS/._plugin-container.sig
+-  @DIR_MACOS@plugin-container.app/Contents/MacOS/plugin-container.sig
+-  @DIR_MACOS@XUL.sig
+-#endif
+-
+ # Common Directory removals
+ @DIR_MACOS@chrome/
+ #ifdef XP_UNIX
+   #ifndef XP_MACOSX
+     chrome/icons/
+     chrome/icons/default/
+   #endif
+ #endif

+ 937 - 0
mozilla-release/patches/1392913-58a1.patch

@@ -0,0 +1,937 @@
+# HG changeset patch
+# User Robert Strong <robert.bugzilla@gmail.com>
+# Date 1506545838 25200
+# Node ID 255fcb2c262214280ded264943716d0ffe2c20e5
+# Parent  a8cc8c03978f6053586ee1d72f306cc53a5c3881
+Bug 1392913 - Remove updatev2.manifest support and other code that is no longer necessary for backwards compatibility after the next watershed. r=mhowell
+Removes code to fallback to the updatev2.manifest file when the updatev3.manifest file isn't present
+Removes all of the one-off file and dir removals in removed-files.in
+Removes code for the OS X distribution directory migration and distribution directory migration tests that were added for v2 signing
+Removes code to remove the precomplete file located in the root of the bundle on OS X
+Removes code too fix the registry entry for the Windows crypto provider which was needed for Windows XP and Windows Vista
+
+diff --git a/browser/installer/removed-files.in b/browser/installer/removed-files.in
+--- a/browser/installer/removed-files.in
++++ b/browser/installer/removed-files.in
+@@ -50,67 +50,20 @@
+ #   will succeed.
+ # * If a file within the directory can't be removed the update will fail.
+ #
+ # Example: path/to/dir/*
+ 
+ # Due to Apple Mac OS X packaging requirements files that are in the same
+ # directory on other platforms must be located in different directories on
+ # Mac OS X. The following defines allow specifying the Mac OS X bundle
+-# location which also work on other platforms.
++# location which will also work on other platforms.
+ #
+ # @DIR_MACOS@
+ # Equals Contents/MacOS/ on Mac OS X and is an empty string on other platforms.
+ #
+ # @DIR_RESOURCES@
+ # Equals Contents/Resources/ on Mac OS X and is an empty string on other
+ # platforms.
+ 
+-# Common File Removals
+-# This is located under the "distribution/" directory and it was added before
+-# Firefox 27
+-@DIR_MACOS@distribution/extensions/testpilot@labs.mozilla.com.xpi
+-
+-# Mac OS X v2 signing removals
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@active-update.xml
+-  @DIR_MACOS@update-settings.ini
+-  @DIR_MACOS@updates.xml
+-  @DIR_MACOS@defaults/*
+-  @DIR_MACOS@updates/*
+-#endif
+-
+-# Common Directory removals
+-@DIR_MACOS@chrome/
+-#ifdef XP_UNIX
+-  #ifndef XP_MACOSX
+-    chrome/icons/
+-    chrome/icons/default/
+-  #endif
+-#endif
+-@DIR_MACOS@chrome/overlayinfo/
+-@DIR_MACOS@components/
+-@DIR_MACOS@defaults/autoconfig/
+-@DIR_MACOS@defaults/profile/
+-@DIR_MACOS@defaults/profile/chrome/
+-@DIR_MACOS@defaults/profile/US/*
+-@DIR_MACOS@defaults/profile/extensions/
+-@DIR_MACOS@defaults/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/*
+-@DIR_MACOS@distribution/
+-@DIR_MACOS@distribution/extensions/
+-@DIR_MACOS@extensions/
+-@DIR_MACOS@extensions/inspector@mozilla.org/*
+-@DIR_MACOS@extensions/reporter@mozilla.org/*
+-@DIR_MACOS@extensions/talkback@mozilla.org/*
+-@DIR_MACOS@extensions/testpilot@labs.mozilla.com/*
+-@DIR_MACOS@extensions/{641d8d09-7dda-4850-8228-ac0ab65e2ac9}/*
+-@DIR_MACOS@extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/*
+-@DIR_MACOS@greprefs/
+-@DIR_MACOS@jssubloader/
+-@DIR_MACOS@modules/
+-#ifdef XP_MACOSX
+-  @DIR_MACOS@plugins/Default Plugin.plugin/*
+-  @DIR_MACOS@plugins/JavaEmbeddingPlugin.bundle/*
+-  @DIR_MACOS@plugins/MRJPlugin.plugin/*
+-  Contents/Plug-Ins/PrintPDE.plugin/*
+-#endif
+-@DIR_MACOS@searchplugins/*
+-@DIR_MACOS@webapprt/components/
++# An update watershed was required to update to Firefox 56 for LZMA and SHA384
++# support. This made it possible to delete all of the removal instructions in
++# this file.
+diff --git a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
++++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+@@ -81,18 +81,16 @@ const FILE_MAINTENANCE_SERVICE_BIN = "ma
+ const FILE_MAINTENANCE_SERVICE_INSTALLER_BIN = "maintenanceservice_installer.exe";
+ const FILE_OLD_VERSION_MAR = "old_version.mar";
+ const FILE_PARTIAL_EXE = "partial.exe";
+ const FILE_UPDATER_BIN = "updater" + BIN_SUFFIX;
+ const FILE_WRONG_CHANNEL_MAR = "wrong_product_channel.mar";
+ 
+ const PERFORMING_STAGED_UPDATE = "Performing a staged update";
+ const CALL_QUIT = "calling QuitProgressUI";
+-const REMOVE_OLD_DIST_DIR = "removing old distribution directory";
+-const MOVE_OLD_DIST_DIR = "Moving old distribution directory to new location";
+ const ERR_UPDATE_IN_PROGRESS = "Update already in progress! Exiting";
+ const ERR_RENAME_FILE = "rename_file: failed to rename file";
+ const ERR_ENSURE_COPY = "ensure_copy: failed to copy the file";
+ const ERR_UNABLE_OPEN_DEST = "unable to open destination file";
+ const ERR_BACKUP_DISCARD = "backup_discard: unable to remove";
+ const ERR_MOVE_DESTDIR_7 = "Moving destDir to tmpDir failed, err: 7";
+ const ERR_BACKUP_CREATE_7 = "backup_create failed: 7";
+ const ERR_LOADSOURCEFILE_FAILED = "LoadSourceFile failed";
+@@ -3003,22 +3001,16 @@ function checkUpdateLogContents(aCompare
+   // These could be changed to relative paths using <test_dir_path> and
+   // <update_dir_path>
+   updateLogContents = updateLogContents.replace(/PATCH DIRECTORY.*/g, "");
+   updateLogContents = updateLogContents.replace(/INSTALLATION DIRECTORY.*/g, "");
+   updateLogContents = updateLogContents.replace(/WORKING DIRECTORY.*/g, "");
+   // Skip lines that log failed attempts to open the callback executable.
+   updateLogContents = updateLogContents.replace(/NS_main: callback app file .*/g, "");
+ 
+-  if (IS_MACOSX) {
+-    // Skip lines that log moving the distribution directory for Mac v2 signing.
+-    updateLogContents = updateLogContents.replace(/Moving old [^\n]*\nrename_file: .*/g, "");
+-    updateLogContents = updateLogContents.replace(/New distribution directory .*/g, "");
+-  }
+-
+   if (IS_WIN) {
+     // The FindFile results when enumerating the filesystem on Windows is not
+     // determistic so the results matching the following need to be fixed.
+     let re = new RegExp("([^\n]* 7\/7text1[^\n]*)\n" +
+                         "([^\n]* 7\/7text0[^\n]*)\n", "g");
+     updateLogContents = updateLogContents.replace(re, "$2\n$1\n");
+   }
+ 
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js b/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js
+@@ -11,17 +11,16 @@ function run_test() {
+   if (!setupTestCommon()) {
+     return;
+   }
+   gTestFiles = gTestFilesCompleteSuccess;
+   gTestFiles[gTestFiles.length - 1].originalContents = null;
+   gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
+   gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
+   gTestDirs = gTestDirsCompleteSuccess;
+-  setupDistributionDir();
+   setupSymLinks();
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+@@ -51,56 +50,28 @@ function runUpdateFinished() {
+  */
+ function checkPostUpdateAppLogFinished() {
+   checkAppBundleModTime();
+   checkSymLinks();
+   standardInit();
+   checkPostUpdateRunningFile(true);
+   checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
+   checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
+-  checkDistributionDir();
+   executeSoon(waitForUpdateXMLFiles);
+ }
+ 
+ /**
+  * Called after the call to waitForUpdateXMLFiles finishes.
+  */
+ function waitForUpdateXMLFilesFinished() {
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+ 
+ /**
+- * Setup the state of the distribution directory for the test.
+- */
+-function setupDistributionDir() {
+-  if (IS_MACOSX) {
+-    // Create files in the old distribution directory location to verify that
+-    // the directory and its contents are removed when there is a distribution
+-    // directory in the new location.
+-    let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
+-    writeFile(testFile, "test\n");
+-    testFile = getApplyDirFile(DIR_MACOS + "distribution/test1/testFile", true);
+-    writeFile(testFile, "test\n");
+-  }
+-}
+-
+-/**
+- * Checks the state of the distribution directory for the test.
+- */
+-function checkDistributionDir() {
+-  if (IS_MACOSX) {
+-    let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-    checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
+-  }
+-}
+-
+-/**
+  * Setup symlinks for the test.
+  */
+ function setupSymLinks() {
+   // Don't test symlinks on Mac OS X in this test since it tends to timeout.
+   // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
+   if (IS_UNIX && !IS_MACOSX) {
+     removeSymlink();
+     createSymlink();
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js b/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessPartial.js
+@@ -12,17 +12,16 @@ function run_test() {
+     return;
+   }
+   gTestFiles = gTestFilesPartialSuccess;
+   gTestFiles[gTestFiles.length - 2].originalContents = null;
+   gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
+   gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
+   gTestDirs = gTestDirsPartialSuccess;
+   preventDistributionFiles();
+-  setupDistributionDir();
+   setupUpdaterTest(FILE_PARTIAL_MAR, true);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   stageUpdate(true);
+@@ -50,63 +49,18 @@ function runUpdateFinished() {
+  * Called after the call to checkPostUpdateAppLog finishes.
+  */
+ function checkPostUpdateAppLogFinished() {
+   checkAppBundleModTime();
+   standardInit();
+   checkPostUpdateRunningFile(true);
+   checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
+   checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true, true);
+-  checkDistributionDir();
+   executeSoon(waitForUpdateXMLFiles);
+ }
+ 
+ /**
+  * Called after the call to waitForUpdateXMLFiles finishes.
+  */
+ function waitForUpdateXMLFilesFinished() {
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+-
+-/**
+- * Setup the state of the distribution directory for the test.
+- */
+-function setupDistributionDir() {
+-  if (IS_MACOSX) {
+-    // Create files in the old distribution directory location to verify that
+-    // the directory and its contents are moved to the new location on update.
+-    let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
+-    writeFile(testFile, "test\n");
+-    testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
+-    writeFile(testFile, "test\n");
+-  }
+-}
+-
+-/**
+- * Checks the state of the distribution directory.
+- */
+-function checkDistributionDir() {
+-  let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
+-  if (IS_MACOSX) {
+-    Assert.ok(distributionDir.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
+-
+-    let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
+-    Assert.ok(testFile.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+-
+-    testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
+-    Assert.ok(testFile.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+-
+-    distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-
+-    checkUpdateLogContains(MOVE_OLD_DIST_DIR);
+-  } else {
+-    debugDump("testing that files aren't added with an add-if instruction " +
+-              "when the file's destination directory doesn't exist");
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-  }
+-}
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js b/toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/marSuccessComplete.js
+@@ -7,17 +7,16 @@
+ 
+ function run_test() {
+   if (!setupTestCommon()) {
+     return;
+   }
+   gTestFiles = gTestFilesCompleteSuccess;
+   gTestDirs = gTestDirsCompleteSuccess;
+   preventDistributionFiles();
+-  setupDistributionDir();
+   setupUpdaterTest(FILE_COMPLETE_MAR, true);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   runUpdate(STATE_SUCCEEDED, false, 0, true);
+@@ -34,63 +33,18 @@ function runUpdateFinished() {
+  * Called after the call to checkPostUpdateAppLog finishes.
+  */
+ function checkPostUpdateAppLogFinished() {
+   checkAppBundleModTime();
+   standardInit();
+   checkPostUpdateRunningFile(true);
+   checkFilesAfterUpdateSuccess(getApplyDirFile);
+   checkUpdateLogContents(LOG_COMPLETE_SUCCESS, false, false, true);
+-  checkDistributionDir();
+   executeSoon(waitForUpdateXMLFiles);
+ }
+ 
+ /**
+  * Called after the call to waitForUpdateXMLFiles finishes.
+  */
+ function waitForUpdateXMLFilesFinished() {
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+-
+-/**
+- * Setup the state of the distribution directory for the test.
+- */
+-function setupDistributionDir() {
+-  if (IS_MACOSX) {
+-    // Create files in the old distribution directory location to verify that
+-    // the directory and its contents are moved to the new location on update.
+-    let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
+-    writeFile(testFile, "test\n");
+-    testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
+-    writeFile(testFile, "test\n");
+-  }
+-}
+-
+-/**
+- * Checks the state of the distribution directory.
+- */
+-function checkDistributionDir() {
+-  let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
+-  if (IS_MACOSX) {
+-    Assert.ok(distributionDir.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
+-
+-    let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
+-    Assert.ok(testFile.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+-
+-    testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
+-    Assert.ok(testFile.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+-
+-    distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-
+-    checkUpdateLogContains(MOVE_OLD_DIST_DIR);
+-  } else {
+-    debugDump("testing that files aren't added with an add-if instruction " +
+-              "when the file's destination directory doesn't exist");
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-  }
+-}
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js b/toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/marSuccessPartial.js
+@@ -12,17 +12,16 @@ function run_test() {
+   gTestFiles = gTestFilesPartialSuccess;
+   gTestFiles[gTestFiles.length - 1].originalContents = null;
+   gTestFiles[gTestFiles.length - 1].compareContents = "FromPartial\n";
+   gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
+   gTestFiles[gTestFiles.length - 2].originalContents = null;
+   gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
+   gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
+   gTestDirs = gTestDirsPartialSuccess;
+-  setupDistributionDir();
+   // The third parameter will test that a relative path that contains a
+   // directory traversal to the post update binary doesn't execute.
+   setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+@@ -34,46 +33,18 @@ function setupUpdaterTestFinished() {
+  * Called after the call to runUpdate finishes.
+  */
+ function runUpdateFinished() {
+   checkAppBundleModTime();
+   standardInit();
+   checkPostUpdateRunningFile(false);
+   checkFilesAfterUpdateSuccess(getApplyDirFile);
+   checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
+-  checkDistributionDir();
+   executeSoon(waitForUpdateXMLFiles);
+ }
+ 
+ /**
+  * Called after the call to waitForUpdateXMLFiles finishes.
+  */
+ function waitForUpdateXMLFilesFinished() {
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+-
+-/**
+- * Setup the state of the distribution directory for the test.
+- */
+-function setupDistributionDir() {
+-  if (IS_MACOSX) {
+-    // Create files in the old distribution directory location to verify that
+-    // the directory and its contents are removed when there is a distribution
+-    // directory in the new location.
+-    let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
+-    writeFile(testFile, "test\n");
+-    testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
+-    writeFile(testFile, "test\n");
+-  }
+-}
+-
+-/**
+- * Checks the state of the distribution directory.
+- */
+-function checkDistributionDir() {
+-  if (IS_MACOSX) {
+-    let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-    checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
+-  }
+-}
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js
+--- a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js
++++ b/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js
+@@ -11,17 +11,16 @@ function run_test() {
+   if (!setupTestCommon()) {
+     return;
+   }
+   gTestFiles = gTestFilesCompleteSuccess;
+   gTestFiles[gTestFiles.length - 1].originalContents = null;
+   gTestFiles[gTestFiles.length - 1].compareContents = "FromComplete\n";
+   gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
+   gTestDirs = gTestDirsCompleteSuccess;
+-  setupDistributionDir();
+   setupSymLinks();
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+@@ -51,56 +50,28 @@ function runUpdateFinished() {
+  */
+ function checkPostUpdateAppLogFinished() {
+   checkAppBundleModTime();
+   checkSymLinks();
+   standardInit();
+   checkPostUpdateRunningFile(true);
+   checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
+   checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
+-  checkDistributionDir();
+   executeSoon(waitForUpdateXMLFiles);
+ }
+ 
+ /**
+  * Called after the call to waitForUpdateXMLFiles finishes.
+  */
+ function waitForUpdateXMLFilesFinished() {
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+ 
+ /**
+- * Setup the state of the distribution directory for the test.
+- */
+-function setupDistributionDir() {
+-  if (IS_MACOSX) {
+-    // Create files in the old distribution directory location to verify that
+-    // the directory and its contents are removed when there is a distribution
+-    // directory in the new location.
+-    let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
+-    writeFile(testFile, "test\n");
+-    testFile = getApplyDirFile(DIR_MACOS + "distribution/test1/testFile", true);
+-    writeFile(testFile, "test\n");
+-  }
+-}
+-
+-/**
+- * Checks the state of the distribution directory for the test.
+- */
+-function checkDistributionDir() {
+-  if (IS_MACOSX) {
+-    let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-    checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
+-  }
+-}
+-
+-/**
+  * Setup symlinks for the test.
+  */
+ function setupSymLinks() {
+   // Don't test symlinks on Mac OS X in this test since it tends to timeout.
+   // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
+   if (IS_UNIX && !IS_MACOSX) {
+     removeSymlink();
+     createSymlink();
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessPartialSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessPartialSvc.js
+--- a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessPartialSvc.js
++++ b/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessPartialSvc.js
+@@ -12,17 +12,16 @@ function run_test() {
+     return;
+   }
+   gTestFiles = gTestFilesPartialSuccess;
+   gTestFiles[gTestFiles.length - 2].originalContents = null;
+   gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
+   gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
+   gTestDirs = gTestDirsPartialSuccess;
+   preventDistributionFiles();
+-  setupDistributionDir();
+   setupUpdaterTest(FILE_PARTIAL_MAR, true);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   stageUpdate(true);
+@@ -50,63 +49,18 @@ function runUpdateFinished() {
+  * Called after the call to checkPostUpdateAppLog finishes.
+  */
+ function checkPostUpdateAppLogFinished() {
+   checkAppBundleModTime();
+   standardInit();
+   checkPostUpdateRunningFile(true);
+   checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
+   checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true, true);
+-  checkDistributionDir();
+   executeSoon(waitForUpdateXMLFiles);
+ }
+ 
+ /**
+  * Called after the call to waitForUpdateXMLFiles finishes.
+  */
+ function waitForUpdateXMLFilesFinished() {
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+-
+-/**
+- * Setup the state of the distribution directory for the test.
+- */
+-function setupDistributionDir() {
+-  if (IS_MACOSX) {
+-    // Create files in the old distribution directory location to verify that
+-    // the directory and its contents are moved to the new location on update.
+-    let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
+-    writeFile(testFile, "test\n");
+-    testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
+-    writeFile(testFile, "test\n");
+-  }
+-}
+-
+-/**
+- * Checks the state of the distribution directory.
+- */
+-function checkDistributionDir() {
+-  let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
+-  if (IS_MACOSX) {
+-    Assert.ok(distributionDir.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
+-
+-    let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
+-    Assert.ok(testFile.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+-
+-    testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
+-    Assert.ok(testFile.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+-
+-    distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-
+-    checkUpdateLogContains(MOVE_OLD_DIST_DIR);
+-  } else {
+-    debugDump("testing that files aren't added with an add-if instruction " +
+-              "when the file's destination directory doesn't exist");
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-  }
+-}
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marSuccessCompleteSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marSuccessCompleteSvc.js
+--- a/toolkit/mozapps/update/tests/unit_service_updater/marSuccessCompleteSvc.js
++++ b/toolkit/mozapps/update/tests/unit_service_updater/marSuccessCompleteSvc.js
+@@ -7,17 +7,16 @@
+ 
+ function run_test() {
+   if (!setupTestCommon()) {
+     return;
+   }
+   gTestFiles = gTestFilesCompleteSuccess;
+   gTestDirs = gTestDirsCompleteSuccess;
+   preventDistributionFiles();
+-  setupDistributionDir();
+   setupUpdaterTest(FILE_COMPLETE_MAR, true);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   runUpdate(STATE_SUCCEEDED, false, 0, true);
+@@ -34,63 +33,18 @@ function runUpdateFinished() {
+  * Called after the call to checkPostUpdateAppLog finishes.
+  */
+ function checkPostUpdateAppLogFinished() {
+   checkAppBundleModTime();
+   standardInit();
+   checkPostUpdateRunningFile(true);
+   checkFilesAfterUpdateSuccess(getApplyDirFile);
+   checkUpdateLogContents(LOG_COMPLETE_SUCCESS, false, false, true);
+-  checkDistributionDir();
+   executeSoon(waitForUpdateXMLFiles);
+ }
+ 
+ /**
+  * Called after the call to waitForUpdateXMLFiles finishes.
+  */
+ function waitForUpdateXMLFilesFinished() {
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+-
+-/**
+- * Setup the state of the distribution directory for the test.
+- */
+-function setupDistributionDir() {
+-  if (IS_MACOSX) {
+-    // Create files in the old distribution directory location to verify that
+-    // the directory and its contents are moved to the new location on update.
+-    let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
+-    writeFile(testFile, "test\n");
+-    testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
+-    writeFile(testFile, "test\n");
+-  }
+-}
+-
+-/**
+- * Checks the state of the distribution directory.
+- */
+-function checkDistributionDir() {
+-  let distributionDir = getApplyDirFile(DIR_RESOURCES + "distribution", true);
+-  if (IS_MACOSX) {
+-    Assert.ok(distributionDir.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(distributionDir.path));
+-
+-    let testFile = getApplyDirFile(DIR_RESOURCES + "distribution/testFile", true);
+-    Assert.ok(testFile.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+-
+-    testFile = getApplyDirFile(DIR_RESOURCES + "distribution/test/testFile", true);
+-    Assert.ok(testFile.exists(),
+-              MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+-
+-    distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-
+-    checkUpdateLogContains(MOVE_OLD_DIST_DIR);
+-  } else {
+-    debugDump("testing that files aren't added with an add-if instruction " +
+-              "when the file's destination directory doesn't exist");
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-  }
+-}
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marSuccessPartialSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marSuccessPartialSvc.js
+--- a/toolkit/mozapps/update/tests/unit_service_updater/marSuccessPartialSvc.js
++++ b/toolkit/mozapps/update/tests/unit_service_updater/marSuccessPartialSvc.js
+@@ -12,17 +12,16 @@ function run_test() {
+   gTestFiles = gTestFilesPartialSuccess;
+   gTestFiles[gTestFiles.length - 1].originalContents = null;
+   gTestFiles[gTestFiles.length - 1].compareContents = "FromPartial\n";
+   gTestFiles[gTestFiles.length - 1].comparePerms = 0o644;
+   gTestFiles[gTestFiles.length - 2].originalContents = null;
+   gTestFiles[gTestFiles.length - 2].compareContents = "FromPartial\n";
+   gTestFiles[gTestFiles.length - 2].comparePerms = 0o644;
+   gTestDirs = gTestDirsPartialSuccess;
+-  setupDistributionDir();
+   // The third parameter will test that a relative path that contains a
+   // directory traversal to the post update binary doesn't execute.
+   setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+@@ -34,46 +33,18 @@ function setupUpdaterTestFinished() {
+  * Called after the call to runUpdate finishes.
+  */
+ function runUpdateFinished() {
+   checkAppBundleModTime();
+   standardInit();
+   checkPostUpdateRunningFile(false);
+   checkFilesAfterUpdateSuccess(getApplyDirFile);
+   checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
+-  checkDistributionDir();
+   executeSoon(waitForUpdateXMLFiles);
+ }
+ 
+ /**
+  * Called after the call to waitForUpdateXMLFiles finishes.
+  */
+ function waitForUpdateXMLFilesFinished() {
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+-
+-/**
+- * Setup the state of the distribution directory for the test.
+- */
+-function setupDistributionDir() {
+-  if (IS_MACOSX) {
+-    // Create files in the old distribution directory location to verify that
+-    // the directory and its contents are removed when there is a distribution
+-    // directory in the new location.
+-    let testFile = getApplyDirFile(DIR_MACOS + "distribution/testFile", true);
+-    writeFile(testFile, "test\n");
+-    testFile = getApplyDirFile(DIR_MACOS + "distribution/test/testFile", true);
+-    writeFile(testFile, "test\n");
+-  }
+-}
+-
+-/**
+- * Checks the state of the distribution directory.
+- */
+-function checkDistributionDir() {
+-  if (IS_MACOSX) {
+-    let distributionDir = getApplyDirFile(DIR_MACOS + "distribution", true);
+-    Assert.ok(!distributionDir.exists(),
+-              MSG_SHOULD_NOT_EXIST + getMsgPath(distributionDir.path));
+-    checkUpdateLogContains(REMOVE_OLD_DIST_DIR);
+-  }
+-}
+diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
+--- a/toolkit/mozapps/update/updater/updater.cpp
++++ b/toolkit/mozapps/update/updater/updater.cpp
+@@ -8,32 +8,28 @@
+  *
+  *  contents = 1*( line )
+  *  line     = method LWS *( param LWS ) CRLF
+  *  CRLF     = "\r\n"
+  *  LWS      = 1*( " " | "\t" )
+  *
+  *  Available methods for the manifest file:
+  *
+- *  updatev2.manifest
+- *  -----------------
+- *  method   = "add" | "add-if" | "patch" | "patch-if" | "remove" |
+- *             "rmdir" | "rmrfdir" | type
+- *
+- *  'type' is the update type (e.g. complete or partial) and when present MUST
+- *  be the first entry in the update manifest. The type is used to support
+- *  downgrades by causing the actions defined in precomplete to be performed.
+- *
+  *  updatev3.manifest
+  *  -----------------
+  *  method   = "add" | "add-if" | "add-if-not" | "patch" | "patch-if" |
+  *             "remove" | "rmdir" | "rmrfdir" | type
+  *
+  *  'add-if-not' adds a file if it doesn't exist.
+  *
++ *  'type' is the update type (e.g. complete or partial) and when present MUST
++ *  be the first entry in the update manifest. The type is used to support
++ *  removing files that no longer exist when when applying a complete update by
++ *  causing the actions defined in the precomplete file to be performed.
++ *
+  *  precomplete
+  *  -----------
+  *  method   = "remove" | "rmdir"
+  */
+ #include "bspatch.h"
+ #include "progressui.h"
+ #include "archivereader.h"
+ #include "readstrings.h"
+@@ -2473,52 +2469,17 @@ UpdateThreadFunc(void *param)
+     NS_tchar dataFile[MAXPATHLEN];
+     rv = GetUpdateFileName(dataFile, sizeof(dataFile)/sizeof(dataFile[0]));
+     if (rv == OK) {
+       rv = gArchiveReader.Open(dataFile);
+     }
+ 
+ #ifdef MOZ_VERIFY_MAR_SIGNATURE
+     if (rv == OK) {
+-#ifdef XP_WIN
+-      HKEY baseKey = nullptr;
+-      wchar_t valueName[] = L"Image Path";
+-      wchar_t rasenh[] = L"rsaenh.dll";
+-      bool reset = false;
+-      if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+-                        L"SOFTWARE\\Microsoft\\Cryptography\\Defaults\\Provider\\Microsoft Enhanced Cryptographic Provider v1.0",
+-                        0, KEY_READ | KEY_WRITE,
+-                        &baseKey) == ERROR_SUCCESS) {
+-        wchar_t path[MAX_PATH + 1];
+-        DWORD size = sizeof(path);
+-        DWORD type;
+-        if (RegQueryValueExW(baseKey, valueName, 0, &type,
+-                             (LPBYTE)path, &size) == ERROR_SUCCESS) {
+-          if (type == REG_SZ && wcscmp(path, rasenh) == 0) {
+-            wchar_t rasenhFullPath[] = L"%SystemRoot%\\System32\\rsaenh.dll";
+-            if (RegSetValueExW(baseKey, valueName, 0, REG_SZ,
+-                               (const BYTE*)rasenhFullPath,
+-                               sizeof(rasenhFullPath)) == ERROR_SUCCESS) {
+-              reset = true;
+-            }
+-          }
+-        }
+-      }
+-#endif
+       rv = gArchiveReader.VerifySignature();
+-#ifdef XP_WIN
+-      if (baseKey) {
+-        if (reset) {
+-          RegSetValueExW(baseKey, valueName, 0, REG_SZ,
+-                         (const BYTE*)rasenh,
+-                         sizeof(rasenh));
+-        }
+-        RegCloseKey(baseKey);
+-      }
+-#endif
+     }
+ 
+     if (rv == OK) {
+       if (rv == OK) {
+         NS_tchar updateSettingsPath[MAX_TEXT_LEN];
+         NS_tsnprintf(updateSettingsPath,
+                      sizeof(updateSettingsPath) / sizeof(updateSettingsPath[0]),
+ #ifdef XP_MACOSX
+@@ -3619,54 +3580,16 @@ int NS_main(int argc, NS_tchar **argv)
+     } else {
+       LOG(("NS_main: failed to schedule OS reboot removal of " \
+            "directory: " LOG_S, DELETE_DIR));
+     }
+   }
+ #endif /* XP_WIN */
+ 
+ #ifdef XP_MACOSX
+-  // When the update is successful remove the precomplete file in the root of
+-  // the application bundle and move the distribution directory from
+-  // Contents/MacOS to Contents/Resources and if both exist delete the
+-  // directory under Contents/MacOS (see Bug 1068439).
+-  if (gSucceeded && !sStagedUpdate) {
+-    NS_tchar oldPrecomplete[MAXPATHLEN];
+-    NS_tsnprintf(oldPrecomplete, sizeof(oldPrecomplete)/sizeof(oldPrecomplete[0]),
+-                 NS_T("%s/precomplete"), gInstallDirPath);
+-    NS_tremove(oldPrecomplete);
+-
+-    NS_tchar oldDistDir[MAXPATHLEN];
+-    NS_tsnprintf(oldDistDir, sizeof(oldDistDir)/sizeof(oldDistDir[0]),
+-                 NS_T("%s/Contents/MacOS/distribution"), gInstallDirPath);
+-    int rv = NS_taccess(oldDistDir, F_OK);
+-    if (!rv) {
+-      NS_tchar newDistDir[MAXPATHLEN];
+-      NS_tsnprintf(newDistDir, sizeof(newDistDir)/sizeof(newDistDir[0]),
+-                   NS_T("%s/Contents/Resources/distribution"), gInstallDirPath);
+-      rv = NS_taccess(newDistDir, F_OK);
+-      if (!rv) {
+-        LOG(("New distribution directory already exists... removing old " \
+-             "distribution directory: " LOG_S, oldDistDir));
+-        rv = ensure_remove_recursive(oldDistDir);
+-        if (rv) {
+-          LOG(("Removing old distribution directory failed - err: %d", rv));
+-        }
+-      } else {
+-        LOG(("Moving old distribution directory to new location. src: " LOG_S \
+-             ", dst:" LOG_S, oldDistDir, newDistDir));
+-        rv = rename_file(oldDistDir, newDistDir, true);
+-        if (rv) {
+-          LOG(("Moving old distribution directory to new location failed - " \
+-               "err: %d", rv));
+-        }
+-      }
+-    }
+-  }
+-
+   if (isElevated) {
+     SetGroupOwnershipAndPermissions(gInstallDirPath);
+     freeArguments(argc, argv);
+     CleanupElevatedMacUpdate(false);
+   } else if (IsOwnedByGroupAdmin(gInstallDirPath)) {
+     // If the group ownership of the Firefox .app bundle was set to the "admin"
+     // group during a previous elevated update, we need to ensure that all files
+     // in the bundle have group ownership of "admin" as well as write permission
+@@ -4197,21 +4120,18 @@ int DoUpdate()
+   NS_tchar manifest[MAXPATHLEN];
+   NS_tsnprintf(manifest, sizeof(manifest)/sizeof(manifest[0]),
+                NS_T("%s/updating/update.manifest"), gWorkingDirPath);
+   ensure_parent_dir(manifest);
+ 
+   // extract the manifest
+   int rv = gArchiveReader.ExtractFile("updatev3.manifest", manifest);
+   if (rv) {
+-    rv = gArchiveReader.ExtractFile("updatev2.manifest", manifest);
+-    if (rv) {
+-      LOG(("DoUpdate: error extracting manifest file"));
+-      return rv;
+-    }
++    LOG(("DoUpdate: error extracting manifest file"));
++    return rv;
+   }
+ 
+   NS_tchar *rb = GetManifestContents(manifest);
+   NS_tremove(manifest);
+   if (rb == nullptr) {
+     LOG(("DoUpdate: error opening manifest file: " LOG_S, manifest));
+     return READ_ERROR;
+   }

+ 26 - 0
mozilla-release/patches/1401814-58a1.patch

@@ -0,0 +1,26 @@
+# HG changeset patch
+# User Marco Castelluccio <mcastelluccio@mozilla.com>
+# Date 1505955509 -7200
+# Node ID 69c2f0ea56ddc0114cdc4035d7d16dea9ab3d729
+# Parent  d0696085e3e97983a567ce38e0422efa44ff9f0a
+Bug 1401814 - Don't disable crash reporter in coverage builds. r=jmaher
+
+diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mozconfigs/linux64/code-coverage
+--- a/browser/config/mozconfigs/linux64/code-coverage
++++ b/browser/config/mozconfigs/linux64/code-coverage
+@@ -1,15 +1,14 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
+ 
+ TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
+ 
+ ac_add_options --disable-install-strip
+ ac_add_options --disable-jemalloc
+-ac_add_options --disable-crashreporter
+ ac_add_options --disable-elf-hack
+ ac_add_options --enable-debug
+ ac_add_options --disable-sandbox
+ ac_add_options --disable-profiling
+ ac_add_options --enable-coverage
+ 
+ export CFLAGS="--coverage"
+ export CXXFLAGS="--coverage"

+ 37 - 0
mozilla-release/patches/1403005-1-60a1.patch

@@ -0,0 +1,37 @@
+# HG changeset patch
+# User Marco Castelluccio <mcastelluccio@mozilla.com>
+# Date 1516113940 -3600
+# Node ID 7879c7d16bb4b105a660dade09b83197bf47ade5
+# Parent  38f95ef0329c540ec3efdbe349b44980ee115d31
+Bug 1403005 - Don't run memory/replace/logalloc/replay in coverage builds. r=glandium
+
+diff --git a/memory/replace/logalloc/replay/Makefile.in b/memory/replace/logalloc/replay/Makefile.in
+--- a/memory/replace/logalloc/replay/Makefile.in
++++ b/memory/replace/logalloc/replay/Makefile.in
+@@ -1,15 +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/.
+ 
+ include $(topsrcdir)/mozglue/build/replace_malloc.mk
+ 
+ ifndef CROSS_COMPILE
++ifndef MOZ_CODE_COVERAGE
+ 
+ ifeq ($(OS_TARGET),WINNT)
+ LOGALLOC_VAR = MOZ_REPLACE_MALLOC_LIB
+ else
+ ifeq ($(OS_TARGET),Darwin)
+ LOGALLOC_VAR = DYLD_INSERT_LIBRARIES
+ else
+ LOGALLOC_VAR = LD_PRELOAD
+@@ -35,8 +36,9 @@ check:: $(srcdir)/replay.log expected_ou
+ # Test with MALLOC_LOG as a file name
+ 	$(RM) test_output.log
+ 	MALLOC_LOG=test_output.log $(LOGALLOC) ./$(PROGRAM) < $<
+ 	sed -n '/jemalloc_stats/,$$p' test_output.log | $(PYTHON3) $(srcdir)/logalloc_munge.py | diff -w - expected_output.log
+ 
+ 	MALLOC_LOG=1 MALLOC_LOG_MINIMAL=1 $(LOGALLOC) ./$(PROGRAM) < $< | sed -n '/jemalloc_stats/,$$p' | $(PYTHON3) $(srcdir)/logalloc_munge.py | diff -w - $(srcdir)/expected_output_minimal.log
+ 
+ endif
++endif

+ 25 - 0
mozilla-release/patches/1403005-2-60a1.patch

@@ -0,0 +1,25 @@
+# HG changeset patch
+# User Marco Castelluccio <mcastelluccio@mozilla.com>
+# Date 1516113894 -3600
+# Node ID 311348121c7062ce03fab0406e82669466a7a085
+# Parent  6a3412b3e527b3e6c6938b30e16487feb831916c
+Bug 1403005 - Enable jemalloc in linux64 coverage build. r=glandium
+
+diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mozconfigs/linux64/code-coverage
+--- a/browser/config/mozconfigs/linux64/code-coverage
++++ b/browser/config/mozconfigs/linux64/code-coverage
+@@ -1,14 +1,13 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
+ 
+ TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
+ 
+ ac_add_options --disable-install-strip
+-ac_add_options --disable-jemalloc
+ ac_add_options --disable-elf-hack
+ ac_add_options --enable-debug
+ ac_add_options --disable-sandbox
+ ac_add_options --disable-profiling
+ ac_add_options --enable-coverage
+ 
+ export CFLAGS="--coverage"
+ export CXXFLAGS="--coverage"

+ 144 - 0
mozilla-release/patches/1404823-59a1.patch

@@ -0,0 +1,144 @@
+# HG changeset patch
+# User Sylvestre Ledru <sledru@mozilla.com>
+# Date 1513887191 -7200
+# Node ID d461768da724e3e11585457728b02dc36ebb5c58
+# Parent  a716944bd67e9ca4607a280de6c8cd947dbb7ee9
+Bug 1404823 - Now that nightly is called Firefox Nightly, with-macbundlename-prefix is not necessary r=rail
+
+MozReview-Commit-ID: K3lXdLXdxAO
+
+diff --git a/browser/config/mozconfigs/macosx64/debug b/browser/config/mozconfigs/macosx64/debug
+--- a/browser/config/mozconfigs/macosx64/debug
++++ b/browser/config/mozconfigs/macosx64/debug
+@@ -2,18 +2,14 @@
+ 
+ ac_add_options --enable-debug
+ ac_add_options --enable-dmd
+ ac_add_options --enable-verify-mar
+ 
+ # Needed to enable breakpad in application.ini
+ export MOZILLA_OFFICIAL=1
+ 
+-if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
+-ac_add_options --with-macbundlename-prefix=Firefox
+-fi
+-
+ # Package js shell.
+ export MOZ_PACKAGE_JSSHELL=1
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/debug-asan b/browser/config/mozconfigs/macosx64/debug-asan
+--- a/browser/config/mozconfigs/macosx64/debug-asan
++++ b/browser/config/mozconfigs/macosx64/debug-asan
+@@ -1,20 +1,16 @@
+ # Use at least -O1 for optimization to avoid stack space
+ # exhaustions caused by Clang function inlining.
+ ac_add_options --enable-application=browser
+ ac_add_options --enable-debug
+ ac_add_options --enable-optimize="-O1"
+ 
+ . $topsrcdir/build/unix/mozconfig.asan
+ 
+-if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
+-ac_add_options --with-macbundlename-prefix=Firefox
+-fi
+-
+ # Package js shell.
+ export MOZ_PACKAGE_JSSHELL=1
+ 
+ # Need this to prevent name conflicts with the normal nightly build packages
+ # Before mozconfig.common so we can test for asan builds there
+ export MOZ_PKG_SPECIAL=asan
+ 
+ . "$topsrcdir/build/macosx/mozconfig.common"
+diff --git a/browser/config/mozconfigs/macosx64/l10n-mozconfig b/browser/config/mozconfigs/macosx64/l10n-mozconfig
+--- a/browser/config/mozconfigs/macosx64/l10n-mozconfig
++++ b/browser/config/mozconfigs/macosx64/l10n-mozconfig
+@@ -8,19 +8,15 @@ if test `uname -s` = "Linux"; then
+   export DMG_TOOL=$topsrcdir/dmg/dmg
+   export HFS_TOOL=$topsrcdir/dmg/hfsplus
+ fi
+ 
+ ac_add_options --with-l10n-base=../../l10n
+ ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
+ ac_add_options --enable-official-branding
+ 
+-if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
+-ac_add_options --with-macbundlename-prefix=Firefox
+-fi
+-
+ export MOZILLA_OFFICIAL=1
+ 
+ # Don't autoclobber l10n, as this can lead to missing binaries and broken builds
+ # Bug 1283438
+ mk_add_options AUTOCLOBBER=
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconfigs/macosx64/nightly
+--- a/browser/config/mozconfigs/macosx64/nightly
++++ b/browser/config/mozconfigs/macosx64/nightly
+@@ -5,15 +5,11 @@ ac_add_options --enable-verify-mar
+ 
+ ac_add_options --enable-instruments
+ 
+ # Cross-compiled builds fail when dtrace is enabled
+ if test `uname -s` != Linux; then
+   ac_add_options --enable-dtrace
+ fi
+ 
+-if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
+-ac_add_options --with-macbundlename-prefix=Firefox
+-fi
+-
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/nightly-asan b/browser/config/mozconfigs/macosx64/nightly-asan
+--- a/browser/config/mozconfigs/macosx64/nightly-asan
++++ b/browser/config/mozconfigs/macosx64/nightly-asan
+@@ -1,19 +1,15 @@
+ ac_add_options --enable-application=browser
+ # We still need to build with debug symbols
+ ac_add_options --disable-debug
+ ac_add_options --enable-optimize="-O2"
+ 
+ . $topsrcdir/build/unix/mozconfig.asan
+ 
+-if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
+-ac_add_options --with-macbundlename-prefix=Firefox
+-fi
+-
+ # Package js shell.
+ export MOZ_PACKAGE_JSSHELL=1
+ 
+ # Need this to prevent name conflicts with the normal nightly build packages
+ # Before mozconfig.common so we can test for asan builds there
+ export MOZ_PKG_SPECIAL=asan
+ 
+ . "$topsrcdir/build/macosx/mozconfig.common"
+diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whitelist
+--- a/browser/config/mozconfigs/whitelist
++++ b/browser/config/mozconfigs/whitelist
+@@ -17,20 +17,16 @@ whitelist['nightly']['linux32'] += [
+     'STRIP_FLAGS="--strip-debug"',
+ ]
+ 
+ whitelist['nightly']['linux64'] += [
+     'STRIP_FLAGS="--strip-debug"',
+ ]
+ 
+ whitelist['nightly']['macosx64'] += [
+-    'if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then',
+-    'if test "${MOZ_UPDATE_CHANNEL}" = "nightly-try"; then',
+-    'ac_add_options --with-macbundlename-prefix=Firefox',
+-    'fi',
+     'ac_add_options --disable-install-strip',
+     'ac_add_options --enable-instruments',
+     'ac_add_options --enable-dtrace',
+     'if test `uname -s` != Linux; then',
+     'fi',
+ ]
+ 
+ whitelist['nightly']['win64'] += [

+ 56 - 0
mozilla-release/patches/1409739-1-64a1.patch

@@ -0,0 +1,56 @@
+# HG changeset patch
+# User Eric Rahm <erahm@mozilla.com>
+# Date 1538437097 25200
+# Node ID 46462bfc0e9b3de81847600e6d15f2c688766cde
+# Parent  6a4f3c2f6cd008bd58bacccc15c77a19177e8289
+Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
+
+On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.
+
+diff --git a/memory/replace/dmd/dmd.py b/memory/replace/dmd/dmd.py
+--- a/memory/replace/dmd/dmd.py
++++ b/memory/replace/dmd/dmd.py
+@@ -314,25 +314,27 @@ def getDigestFromFile(args, inputFile):
+ 
+     def buildTraceDescription(traceTable, frameTable, traceKey):
+         frameKeys = traceTable[traceKey]
+         fmt = '    #{:02d}{:}'
+ 
+         if args.filter_stacks_for_testing:
+             # When running SmokeDMD.cpp, every stack trace should contain at
+             # least one frame that contains 'DMD.cpp', from either |DMD.cpp| or
+-            # |SmokeDMD.cpp|. (Or 'dmd.cpp' on Windows.) If we see such a
++            # |SmokeDMD.cpp|. (Or 'dmd.cpp' on Windows.) On builds without
++            # debuginfo we expect just |SmokeDMD|. If we see such a
+             # frame, we replace the entire stack trace with a single,
+             # predictable frame. There is too much variation in the stack
+             # traces across different machines and platforms to do more precise
+             # matching, but this level of matching will result in failure if
+             # stack fixing fails completely.
+             for frameKey in frameKeys:
+                 frameDesc = frameTable[frameKey]
+-                if 'DMD.cpp' in frameDesc or 'dmd.cpp' in frameDesc:
++                expected = ('DMD.cpp', 'dmd.cpp', 'SmokeDMD')
++                if any(ex in frameDesc for ex in expected):
+                     return [fmt.format(1, ': ... DMD.cpp ...')]
+ 
+         # The frame number is always '#00' (see DMD.h for why), so we have to
+         # replace that with the correct frame number.
+         desc = []
+         for n, frameKey in enumerate(traceTable[traceKey], start=1):
+             desc.append(fmt.format(n, frameTable[frameKey][3:]))
+         return desc
+diff --git a/memory/replace/dmd/test/xpcshell.ini b/memory/replace/dmd/test/xpcshell.ini
+--- a/memory/replace/dmd/test/xpcshell.ini
++++ b/memory/replace/dmd/test/xpcshell.ini
+@@ -26,9 +26,9 @@ support-files =
+   script-diff-live2.json
+   script-diff-live-expected.txt
+   script-diff-dark-matter1.json
+   script-diff-dark-matter2.json
+   script-diff-dark-matter-expected.txt
+ 
+ [test_dmd.js]
+ dmd = true
+-skip-if = !(os=='linux' || os=='win' || os=='mac')
++skip-if = !(os=='linux' || os=='mac' || (os=='win' && !pgo))

+ 72 - 0
mozilla-release/patches/1409739-2-64a1.patch

@@ -0,0 +1,72 @@
+# HG changeset patch
+# User Chris AtLee <catlee@mozilla.com>
+# Date 1508253964 14400
+# Node ID 74abe131db1b909552db62ba35aef83f5d1dc802
+# Parent  998774036540d03cd8d5b727b5470751b2f9a686
+Bug 1409739 - Part 2: Remove old DMD configs r=glandium
+
+MozReview-Commit-ID: H7kc33CXIbQ
+
+diff --git a/browser/config/mozconfigs/linux32/opt-dmd b/browser/config/mozconfigs/linux32/opt-dmd
+deleted file mode 100644
+--- a/browser/config/mozconfigs/linux32/opt-dmd
++++ /dev/null
+@@ -1,3 +0,0 @@
+-ac_add_options --enable-dmd
+-
+-. "$topsrcdir/browser/config/mozconfigs/linux32/nightly"
+diff --git a/browser/config/mozconfigs/linux64/opt-dmd b/browser/config/mozconfigs/linux64/opt-dmd
+deleted file mode 100644
+--- a/browser/config/mozconfigs/linux64/opt-dmd
++++ /dev/null
+@@ -1,3 +0,0 @@
+-ac_add_options --enable-dmd
+-
+-. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
+diff --git a/browser/config/mozconfigs/macosx64/opt-dmd b/browser/config/mozconfigs/macosx64/opt-dmd
+deleted file mode 100644
+--- a/browser/config/mozconfigs/macosx64/opt-dmd
++++ /dev/null
+@@ -1,5 +0,0 @@
+-ac_add_options --enable-dmd
+-
+-. "$topsrcdir/browser/config/mozconfigs/macosx64/nightly"
+-
+-ac_add_options --disable-lto
+diff --git a/browser/config/mozconfigs/win32/opt-dmd b/browser/config/mozconfigs/win32/opt-dmd
+deleted file mode 100644
+--- a/browser/config/mozconfigs/win32/opt-dmd
++++ /dev/null
+@@ -1,3 +0,0 @@
+-ac_add_options --enable-dmd
+-
+-. "$topsrcdir/browser/config/mozconfigs/win32/nightly"
+diff --git a/browser/config/mozconfigs/win64/opt-dmd b/browser/config/mozconfigs/win64/opt-dmd
+deleted file mode 100644
+--- a/browser/config/mozconfigs/win64/opt-dmd
++++ /dev/null
+@@ -1,3 +0,0 @@
+-ac_add_options --enable-dmd
+-
+-. "$topsrcdir/browser/config/mozconfigs/win64/nightly"
+diff --git a/testing/mozharness/mozharness/mozilla/building/buildbase.py b/testing/mozharness/mozharness/mozilla/building/buildbase.py
+--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
++++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
+@@ -435,17 +435,16 @@ class BuildOptionParser(object):
+         'android-test': 'builds/releng_sub_%s_configs/%s_test.py',
+         'android-checkstyle': 'builds/releng_sub_%s_configs/%s_checkstyle.py',
+         'android-lint': 'builds/releng_sub_%s_configs/%s_lint.py',
+         'android-findbugs': 'builds/releng_sub_%s_configs/%s_findbugs.py',
+         'valgrind' : 'builds/releng_sub_%s_configs/%s_valgrind.py',
+         'artifact': 'builds/releng_sub_%s_configs/%s_artifact.py',
+         'debug-artifact': 'builds/releng_sub_%s_configs/%s_debug_artifact.py',
+         'devedition': 'builds/releng_sub_%s_configs/%s_devedition.py',
+-        'dmd': 'builds/releng_sub_%s_configs/%s_dmd.py',
+     }
+     build_pool_cfg_file = 'builds/build_pool_specifics.py'
+     branch_cfg_file = 'builds/branch_specifics.py'
+ 
+     @classmethod
+     def _query_pltfrm_and_bits(cls, target_option, options):
+         """ determine platform and bits
+ 

+ 150 - 0
mozilla-release/patches/1409739-3-64a1.patch

@@ -0,0 +1,150 @@
+# HG changeset patch
+# User Chris AtLee <catlee@mozilla.com>
+# Date 1508334300 14400
+# Node ID 568a3198520c34d9d73d3924a178528bf791946d
+# Parent  eecc6147ab526690ca781c624df68fb43e0b9f82
+Bug 1409739 - Part 3: Enable DMD in nightly/CI builds r=glandium
+
+MozReview-Commit-ID: 12tmFzzvRvP
+
+diff --git a/browser/config/mozconfigs/linux32/nightly b/browser/config/mozconfigs/linux32/nightly
+--- a/browser/config/mozconfigs/linux32/nightly
++++ b/browser/config/mozconfigs/linux32/nightly
+@@ -1,7 +1,8 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
+ 
+ ac_add_options --enable-verify-mar
++ac_add_options --enable-dmd
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux32/valgrind b/browser/config/mozconfigs/linux32/valgrind
+--- a/browser/config/mozconfigs/linux32/valgrind
++++ b/browser/config/mozconfigs/linux32/valgrind
+@@ -1,10 +1,11 @@
+ . $topsrcdir/browser/config/mozconfigs/linux32/nightly
+ 
+ ac_add_options --enable-valgrind
++ac_add_options --disable-dmd
+ ac_add_options --disable-jemalloc
+ ac_add_options --disable-install-strip
+ ac_add_options --disable-gtest-in-build
+ 
+ # Include the override mozconfig again (even though the above includes it)
+ # since it's supposed to override everything.
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mozconfigs/linux64/code-coverage
+--- a/browser/config/mozconfigs/linux64/code-coverage
++++ b/browser/config/mozconfigs/linux64/code-coverage
+@@ -1,16 +1,17 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
+ 
+ TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
+ 
+ ac_add_options --disable-install-strip
+ ac_add_options --disable-elf-hack
+ ac_add_options --enable-debug
+ ac_add_options --disable-sandbox
++ac_add_options --disable-dmd
+ ac_add_options --disable-profiling
+ ac_add_options --disable-warnings-as-errors
+ ac_add_options --enable-coverage
+ 
+ export CFLAGS="--coverage"
+ export CXXFLAGS="--coverage"
+ export LDFLAGS="--coverage -L$topsrcdir/clang/lib/clang/7.0.1/lib/linux/"
+ export LIBS="-lclang_rt.profile-x86_64"
+diff --git a/browser/config/mozconfigs/linux64/nightly b/browser/config/mozconfigs/linux64/nightly
+--- a/browser/config/mozconfigs/linux64/nightly
++++ b/browser/config/mozconfigs/linux64/nightly
+@@ -1,7 +1,8 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
+ 
+ ac_add_options --enable-verify-mar
++ac_add_options --enable-dmd
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux64/valgrind b/browser/config/mozconfigs/linux64/valgrind
+--- a/browser/config/mozconfigs/linux64/valgrind
++++ b/browser/config/mozconfigs/linux64/valgrind
+@@ -1,10 +1,11 @@
+ . $topsrcdir/browser/config/mozconfigs/linux64/nightly
+ 
+ ac_add_options --enable-valgrind
++ac_add_options --disable-dmd
+ ac_add_options --disable-jemalloc
+ ac_add_options --disable-install-strip
+ ac_add_options --disable-gtest-in-build
+ 
+ # Include the override mozconfig again (even though the above includes it)
+ # since it's supposed to override everything.
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconfigs/macosx64/nightly
+--- a/browser/config/mozconfigs/macosx64/nightly
++++ b/browser/config/mozconfigs/macosx64/nightly
+@@ -1,13 +1,14 @@
+ . "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
+ 
+ ac_add_options --disable-install-strip
+ ac_add_options --enable-verify-mar
+ ac_add_options --enable-instruments
++ac_add_options --enable-dmd
+ 
+ # Cross-compiled builds fail when dtrace is enabled
+ if test `uname -s` != Linux; then
+   ac_add_options --enable-dtrace
+ fi
+ 
+ ac_add_options --enable-lto
+ 
+diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whitelist
+--- a/browser/config/mozconfigs/whitelist
++++ b/browser/config/mozconfigs/whitelist
+@@ -4,16 +4,17 @@ whitelist = {
+     'release': {},
+     'nightly': {},
+     }
+ 
+ all_platforms = ['win64', 'win64-aarch64', 'win32', 'linux32', 'linux64', 'macosx64']
+ 
+ for platform in all_platforms:
+     whitelist['nightly'][platform] = [
++        'ac_add_options --enable-dmd',
+         'ac_add_options --with-branding=browser/branding/nightly',
+     ]
+ 
+ whitelist['nightly']['macosx64'] += [
+     'ac_add_options --disable-install-strip',
+     'ac_add_options --enable-instruments',
+     'ac_add_options --enable-dtrace',
+     'if test `uname -s` != Linux; then',
+diff --git a/browser/config/mozconfigs/win32/nightly b/browser/config/mozconfigs/win32/nightly
+--- a/browser/config/mozconfigs/win32/nightly
++++ b/browser/config/mozconfigs/win32/nightly
+@@ -1,8 +1,9 @@
+ . "$topsrcdir/build/mozconfig.win-common"
+ . "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
+ 
+ ac_add_options --enable-verify-mar
++ac_add_options --enable-dmd
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/win64/nightly b/browser/config/mozconfigs/win64/nightly
+--- a/browser/config/mozconfigs/win64/nightly
++++ b/browser/config/mozconfigs/win64/nightly
+@@ -1,9 +1,10 @@
+ . "$topsrcdir/build/mozconfig.win-common"
+ . "$topsrcdir/browser/config/mozconfigs/win64/common-win64"
+ . "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
+ 
+ ac_add_options --enable-verify-mar
++ac_add_options --enable-dmd
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"

+ 73 - 0
mozilla-release/patches/1414450-59a1.patch

@@ -0,0 +1,73 @@
+# HG changeset patch
+# User Ian Moody <moz-ian@perix.co.uk>
+# Date 1511027463 0
+# Node ID 9f405fd77937077511c6b936e89460c0a96580d3
+# Parent  02a05ca936f9c9e95ecd750286d76e58010c18ee
+Bug 1414450 - Allow ability to enable legacy extensions in unbranded builds. r=catlee
+
+MozReview-Commit-ID: JTuIhSKaN7i
+
+diff --git a/browser/config/mozconfigs/linux64/add-on-devel b/browser/config/mozconfigs/linux64/add-on-devel
+--- a/browser/config/mozconfigs/linux64/add-on-devel
++++ b/browser/config/mozconfigs/linux64/add-on-devel
+@@ -1,9 +1,12 @@
+ . $topsrcdir/browser/config/mozconfigs/linux64/nightly
+ 
+ #add-on signing is checked but not enforced
+ MOZ_REQUIRE_SIGNING=0
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ ac_add_options --with-branding=browser/branding/unofficial
+ ac_add_options --enable-update-channel=default
+ 
+ # Need this to prevent name conflicts with the normal nightly build packages
+ export MOZ_PKG_SPECIAL=add-on-devel
+diff --git a/browser/config/mozconfigs/macosx64/add-on-devel b/browser/config/mozconfigs/macosx64/add-on-devel
+--- a/browser/config/mozconfigs/macosx64/add-on-devel
++++ b/browser/config/mozconfigs/macosx64/add-on-devel
+@@ -1,9 +1,12 @@
+ . $topsrcdir/browser/config/mozconfigs/macosx64/nightly
+ 
+ #add-on signing is checked but not enforced
+ MOZ_REQUIRE_SIGNING=0
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ ac_add_options --with-branding=browser/branding/unofficial
+ ac_add_options --enable-update-channel=default
+ 
+ # Need this to prevent name conflicts with the normal nightly build packages
+ export MOZ_PKG_SPECIAL=add-on-devel
+diff --git a/browser/config/mozconfigs/win32/add-on-devel b/browser/config/mozconfigs/win32/add-on-devel
+--- a/browser/config/mozconfigs/win32/add-on-devel
++++ b/browser/config/mozconfigs/win32/add-on-devel
+@@ -1,9 +1,12 @@
+ . $topsrcdir/browser/config/mozconfigs/win32/nightly
+ 
+ #add-on signing is checked but not enforced
+ MOZ_REQUIRE_SIGNING=0
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ ac_add_options --with-branding=browser/branding/unofficial
+ ac_add_options --enable-update-channel=default
+ 
+ # Need this to prevent name conflicts with the normal nightly build packages
+ export MOZ_PKG_SPECIAL=add-on-devel
+diff --git a/browser/config/mozconfigs/win64/add-on-devel b/browser/config/mozconfigs/win64/add-on-devel
+--- a/browser/config/mozconfigs/win64/add-on-devel
++++ b/browser/config/mozconfigs/win64/add-on-devel
+@@ -1,9 +1,12 @@
+ . $topsrcdir/browser/config/mozconfigs/win64/nightly
+ 
+ #add-on signing is checked but not enforced
+ MOZ_REQUIRE_SIGNING=0
++# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
++ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
++
+ ac_add_options --with-branding=browser/branding/unofficial
+ ac_add_options --enable-update-channel=default
+ 
+ #Need this to prevent name conflicts with the normal nightly build packages
+ export MOZ_PKG_SPECIAL=add-on-devel

+ 105 - 0
mozilla-release/patches/1426566-3-PARTIAL-59a1.patch

@@ -0,0 +1,105 @@
+# HG changeset patch
+# User Gregory Szorc <gps@mozilla.com>
+# Date 1515526964 28800
+# Node ID 9e220db2bf10f0e3b4e3343f8cbced57c98e8a43
+# Parent  0e238912ee4569b05184cdc6f6248505a15e1b28
+Bug 1426566 - Remove --enable-profiling from nightly mozconfigs; r=froydnj
+
+moz.configure automatically enables profiling if the milestone is
+Nightly (see js/moz.configure:226). So, --enable-profiling in the
+nightly mozconfigs is redundant and can be removed.
+
+The whitelist has also been updated to reflect the removal of this
+line.
+
+MozReview-Commit-ID: 7nUJVcFOp6c
+
+diff --git a/browser/config/mozconfigs/linux32/nightly b/browser/config/mozconfigs/linux32/nightly
+--- a/browser/config/mozconfigs/linux32/nightly
++++ b/browser/config/mozconfigs/linux32/nightly
+@@ -1,8 +1,7 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
+ 
+-
+ ac_add_options --enable-verify-mar
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux64/nightly b/browser/config/mozconfigs/linux64/nightly
+--- a/browser/config/mozconfigs/linux64/nightly
++++ b/browser/config/mozconfigs/linux64/nightly
+@@ -1,8 +1,7 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
+ 
+-
+ ac_add_options --enable-verify-mar
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconfigs/macosx64/nightly
+--- a/browser/config/mozconfigs/macosx64/nightly
++++ b/browser/config/mozconfigs/macosx64/nightly
+@@ -1,13 +1,12 @@
+ . "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
+ 
+ ac_add_options --disable-install-strip
+ ac_add_options --enable-verify-mar
+-
+ ac_add_options --enable-instruments
+ 
+ # Cross-compiled builds fail when dtrace is enabled
+ if test `uname -s` != Linux; then
+   ac_add_options --enable-dtrace
+ fi
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whitelist
+--- a/browser/config/mozconfigs/whitelist
++++ b/browser/config/mozconfigs/whitelist
+@@ -5,17 +5,16 @@ whitelist = {
+     'nightly': {},
+     }
+ 
+ all_platforms = ['win64', 'win64-aarch64', 'win32', 'linux32', 'linux64', 'macosx64']
+ 
+ for platform in all_platforms:
+     whitelist['nightly'][platform] = [
+         'ac_add_options --with-branding=browser/branding/nightly',
+-        'ac_add_options --enable-profiling',
+     ]
+ 
+ whitelist['nightly']['macosx64'] += [
+     'ac_add_options --disable-install-strip',
+     'ac_add_options --enable-instruments',
+     'ac_add_options --enable-dtrace',
+     'if test `uname -s` != Linux; then',
+     'fi',
+diff --git a/browser/config/mozconfigs/win32/nightly b/browser/config/mozconfigs/win32/nightly
+--- a/browser/config/mozconfigs/win32/nightly
++++ b/browser/config/mozconfigs/win32/nightly
+@@ -1,9 +1,8 @@
+ . "$topsrcdir/build/mozconfig.win-common"
+ . "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
+ 
+-
+ ac_add_options --enable-verify-mar
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/win64/nightly b/browser/config/mozconfigs/win64/nightly
+--- a/browser/config/mozconfigs/win64/nightly
++++ b/browser/config/mozconfigs/win64/nightly
+@@ -1,10 +1,9 @@
+ . "$topsrcdir/build/mozconfig.win-common"
+ . "$topsrcdir/browser/config/mozconfigs/win64/common-win64"
+ . "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
+ 
+-
+ ac_add_options --enable-verify-mar
+ 
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"

+ 120 - 0
mozilla-release/patches/1427155-59a1.patch

@@ -0,0 +1,120 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1514357052 -32400
+# Node ID bb6003aa6966827c609172fa311a2a15879cb41b
+# Parent  4363d4c9ff57781ada0ddbe2f514085a0d8f7fe3
+Bug 1427155 - Don't set STRIP_FLAGS from in-tree mozconfigs. r=gps
+
+The reason it was set from mozconfigs is that profiling require it. But
+since it was added, bug 751355 made it implied by --enable-profiling,
+and bug 1144842 further made sure that profiling and STRIP_FLAGS were
+tied together.
+
+diff --git a/browser/config/mozconfigs/linux32/devedition b/browser/config/mozconfigs/linux32/devedition
+--- a/browser/config/mozconfigs/linux32/devedition
++++ b/browser/config/mozconfigs/linux32/devedition
+@@ -2,19 +2,14 @@ export MOZ_PGO=1
+ 
+ . "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
+ 
+ # Add-on signing is not required for DevEdition
+ MOZ_REQUIRE_SIGNING=0
+ 
+ ac_add_options --enable-verify-mar
+ 
+-# This will overwrite the default of stripping everything and keep the symbol table.
+-# This is useful for profiling and debugging and only increases the package size
+-# by 2 MBs.
+-STRIP_FLAGS="--strip-debug"
+-
+ ac_add_options --with-branding=browser/branding/aurora
+ 
+ # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
+ ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux32/nightly b/browser/config/mozconfigs/linux32/nightly
+--- a/browser/config/mozconfigs/linux32/nightly
++++ b/browser/config/mozconfigs/linux32/nightly
+@@ -1,13 +1,8 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
+ 
+ 
+ ac_add_options --enable-verify-mar
+ 
+-# This will overwrite the default of stripping everything and keep the symbol table.
+-# This is useful for profiling and debugging and only increases the package size
+-# by 2 MBs.
+-STRIP_FLAGS="--strip-debug"
+-
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux64/devedition b/browser/config/mozconfigs/linux64/devedition
+--- a/browser/config/mozconfigs/linux64/devedition
++++ b/browser/config/mozconfigs/linux64/devedition
+@@ -2,19 +2,14 @@ export MOZ_PGO=1
+ 
+ . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
+ 
+ # Add-on signing is not required for DevEdition
+ MOZ_REQUIRE_SIGNING=0
+ 
+ ac_add_options --enable-verify-mar
+ 
+-# This will overwrite the default of stripping everything and keep the symbol table.
+-# This is useful for profiling and debugging and only increases the package size
+-# by 2 MBs.
+-STRIP_FLAGS="--strip-debug"
+-
+ ac_add_options --with-branding=browser/branding/aurora
+ 
+ # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
+ ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/linux64/nightly b/browser/config/mozconfigs/linux64/nightly
+--- a/browser/config/mozconfigs/linux64/nightly
++++ b/browser/config/mozconfigs/linux64/nightly
+@@ -1,13 +1,8 @@
+ . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
+ 
+ 
+ ac_add_options --enable-verify-mar
+ 
+-# This will overwrite the default of stripping everything and keep the symbol table.
+-# This is useful for profiling and debugging and only increases the package size
+-# by 2 MBs.
+-STRIP_FLAGS="--strip-debug"
+-
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/whitelist b/browser/config/mozconfigs/whitelist
+--- a/browser/config/mozconfigs/whitelist
++++ b/browser/config/mozconfigs/whitelist
+@@ -8,24 +8,16 @@ whitelist = {
+ all_platforms = ['win64', 'win64-aarch64', 'win32', 'linux32', 'linux64', 'macosx64']
+ 
+ for platform in all_platforms:
+     whitelist['nightly'][platform] = [
+         'ac_add_options --with-branding=browser/branding/nightly',
+         'ac_add_options --enable-profiling',
+     ]
+ 
+-whitelist['nightly']['linux32'] += [
+-    'STRIP_FLAGS="--strip-debug"',
+-]
+-
+-whitelist['nightly']['linux64'] += [
+-    'STRIP_FLAGS="--strip-debug"',
+-]
+-
+ whitelist['nightly']['macosx64'] += [
+     'ac_add_options --disable-install-strip',
+     'ac_add_options --enable-instruments',
+     'ac_add_options --enable-dtrace',
+     'if test `uname -s` != Linux; then',
+     'fi',
+ ]
+ 

+ 24 - 0
mozilla-release/patches/1461964-62a1.patch

@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Andreea Pavel <apavel>
+# Date 1526846880 -10800
+# Node ID 1a3b9492f30dd0604966e7b4f322332807ceb55a
+# Parent  cba56c5d961ffd028826c0d2c3bd17643a362c44
+Bug 1461964 - removed mac 10.6 reference r=njn
+
+diff --git a/memory/replace/dmd/test/xpcshell.ini b/memory/replace/dmd/test/xpcshell.ini
+--- a/memory/replace/dmd/test/xpcshell.ini
++++ b/memory/replace/dmd/test/xpcshell.ini
+@@ -24,12 +24,11 @@ support-files =
+   script-ignore-alloc-fns-expected.txt
+   script-diff-live1.json
+   script-diff-live2.json
+   script-diff-live-expected.txt
+   script-diff-dark-matter1.json
+   script-diff-dark-matter2.json
+   script-diff-dark-matter-expected.txt
+ 
+-# Bug 1077230 explains why this test is disabled on Mac 10.6.
+ [test_dmd.js]
+ dmd = true
+-skip-if = !(os=='linux' || os=='win' || (os=='mac' && os_version!='10.6'))
++skip-if = !(os=='linux' || os=='win' || os=='mac')

+ 28 - 0
mozilla-release/patches/1467285-62a1.patch

@@ -0,0 +1,28 @@
+# HG changeset patch
+# User Jed Davis <jld@mozilla.com>
+# Date 1528320279 21600
+# Node ID e1fec9d31bcd25c8672b540289cd893cad8e2dc9
+# Parent  e71c6c7ec1a0369b1b365ff20ed7fe385c47a1b1
+Bug 1467285 - Disable warnings-as-errors on code coverage builds to avoid false positives. r=marco
+
+MozReview-Commit-ID: AlGvRrzzZtn
+
+diff --git a/browser/config/mozconfigs/linux64/code-coverage b/browser/config/mozconfigs/linux64/code-coverage
+--- a/browser/config/mozconfigs/linux64/code-coverage
++++ b/browser/config/mozconfigs/linux64/code-coverage
+@@ -2,14 +2,15 @@
+ 
+ TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
+ 
+ ac_add_options --disable-install-strip
+ ac_add_options --disable-elf-hack
+ ac_add_options --enable-debug
+ ac_add_options --disable-sandbox
+ ac_add_options --disable-profiling
++ac_add_options --disable-warnings-as-errors
+ ac_add_options --enable-coverage
+ 
+ export CFLAGS="--coverage"
+ export CXXFLAGS="--coverage"
+ export LDFLAGS="--coverage -L$topsrcdir/clang/lib/clang/7.0.1/lib/linux/"
+ export LIBS="-lclang_rt.profile-x86_64"

+ 82 - 0
mozilla-release/patches/1473786-1-64a1.patch

@@ -0,0 +1,82 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1536144151 -32400
+# Node ID 105ab876a6a21716a74b9c6f1e13af35bd3bfbe8
+# Parent  ed87e918b364f76f36a4a12bfe9883a81af58f6b
+Bug 1473786 - Avoid the aboutNetError-new.xhtml url being smashed into pieces by compiler optimizations. r=felipe
+
+The browser_all_files_referenced.js test partly relies on finding chrome
+and resource urls in the libxul binary, but with LTO, clang actually
+replaces AssignASCII calls to inline copies using immediate values, like
+this:
+
+  movabsq $0x726573776f72622f, %rcx
+  movq   %rcx, 0x8(%rax)
+  movabsq $0x2f3a656d6f726863, %rcx
+  movq   %rcx, (%rax)
+
+Those immediate values are, respectively, "/browser" and "chrome:/".
+
+Somehow, the aboutNetError-new url is the only one where that causes
+problems, which is kind of surprising, in a sense. It's also in a
+special position, being temporary until aboutNetError is actually
+replaced and the new about:certerror rides the train. Chances are, if we
+add an exception for aboutNetError-new in the
+browser_all_files_referenced.js test itself, it would remain there after
+the new about:certerror rides the train.
+
+However, using the somehow circumvoluted Assign(NS_LITERAL_CSTRING())
+construct, we can prevent clang from LTOing the string into pieces. And
+there are better chances the code will go away when the new
+about:certerror rides the train.
+
+Differential Revision: https://phabricator.services.mozilla.com/D5017
+
+diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
+--- a/browser/components/about/AboutRedirector.cpp
++++ b/browser/components/about/AboutRedirector.cpp
+@@ -148,17 +148,17 @@ AboutRedirector::NewChannel(nsIURI* aURI
+       if (path.EqualsLiteral("newtab")) {
+         // let the aboutNewTabService decide where to redirect
+         nsCOMPtr<nsIAboutNewTabService> aboutNewTabService =
+           do_GetService("@mozilla.org/browser/aboutnewtab-service;1", &rv);
+         NS_ENSURE_SUCCESS(rv, rv);
+         rv = aboutNewTabService->GetDefaultURL(url);
+         NS_ENSURE_SUCCESS(rv, rv);
+       } else if (path.EqualsLiteral("preferences") && !sUseOldPreferences) {
+-        url.AssignASCII("chrome://browser/content/preferences/in-content-new/preferences.xul");
++        url.Assign(NS_LITERAL_CSTRING("chrome://browser/content/preferences/in-content-new/preferences.xul"));
+       }
+       // fall back to the specified url in the map
+       if (url.IsEmpty()) {
+         url.AssignASCII(redir.url);
+       }
+ 
+       nsCOMPtr<nsIChannel> tempChannel;
+       nsCOMPtr<nsIURI> tempURI;
+diff --git a/browser/components/about/AboutRedirector.cpp.1473786-1.later b/browser/components/about/AboutRedirector.cpp.1473786-1.later
+new file mode 100644
+--- /dev/null
++++ b/browser/components/about/AboutRedirector.cpp.1473786-1.later
+@@ -0,0 +1,21 @@
++--- AboutRedirector.cpp
+++++ AboutRedirector.cpp
++@@ -178,17 +178,17 @@ AboutRedirector::NewChannel(nsIURI* aURI
++         nsCOMPtr<nsIAboutNewTabService> aboutNewTabService =
++           do_GetService("@mozilla.org/browser/aboutnewtab-service;1", &rv);
++         NS_ENSURE_SUCCESS(rv, rv);
++         rv = aboutNewTabService->GetWelcomeURL(url);
++         NS_ENSURE_SUCCESS(rv, rv);
++       }
++ 
++       if (sNewCertErrorPageEnabled && path.EqualsLiteral("certerror")) {
++-        url.AssignASCII("chrome://browser/content/aboutNetError-new.xhtml");
+++        url.Assign(NS_LITERAL_CSTRING("chrome://browser/content/aboutNetError-new.xhtml"));
++       }
++ 
++       // fall back to the specified url in the map
++       if (url.IsEmpty()) {
++         url.AssignASCII(redir.url);
++       }
++ 
++       nsCOMPtr<nsIChannel> tempChannel;

+ 55 - 0
mozilla-release/patches/1473786-2-64a1.patch

@@ -0,0 +1,55 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1530845442 -32400
+# Node ID a9caa2a0b5ed5189e945762272e895439aa7b847
+# Parent  77b272718390ba73df33af3942baf1828ca7060b
+Bug 1473786 - Enable LTO on macOS builds. r=ted
+
+diff --git a/browser/config/mozconfigs/macosx64/beta b/browser/config/mozconfigs/macosx64/beta
+--- a/browser/config/mozconfigs/macosx64/beta
++++ b/browser/config/mozconfigs/macosx64/beta
+@@ -1,6 +1,8 @@
+ . "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
+ 
+ ac_add_options --enable-official-branding
+ ac_add_options --enable-verify-mar
+ 
++ac_add_options --enable-lto
++
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconfigs/macosx64/nightly
+--- a/browser/config/mozconfigs/macosx64/nightly
++++ b/browser/config/mozconfigs/macosx64/nightly
+@@ -4,11 +4,13 @@ ac_add_options --disable-install-strip
+ ac_add_options --enable-verify-mar
+ ac_add_options --enable-instruments
+ 
+ # Cross-compiled builds fail when dtrace is enabled
+ if test `uname -s` != Linux; then
+   ac_add_options --enable-dtrace
+ fi
+ 
++ac_add_options --enable-lto
++
+ ac_add_options --with-branding=browser/branding/nightly
+ 
+ . "$topsrcdir/build/mozconfig.common.override"
+diff --git a/browser/config/mozconfigs/macosx64/release b/browser/config/mozconfigs/macosx64/release
+--- a/browser/config/mozconfigs/macosx64/release
++++ b/browser/config/mozconfigs/macosx64/release
+@@ -1,13 +1,15 @@
+ # This make file should be identical to the beta mozconfig, apart from the
+ # safeguard below
+ 
+ . "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
+ 
+ ac_add_options --enable-official-branding
+ ac_add_options --enable-verify-mar
+ 
++ac_add_options --enable-lto
++
+ # safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
+ # defines.sh during the beta cycle
+ export BUILDING_RELEASE=1
+ 
+ . "$topsrcdir/build/mozconfig.common.override"

+ 45 - 0
mozilla-release/patches/1489484-64a1.patch

@@ -0,0 +1,45 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1536623488 0
+# Node ID 771b94d5ab5c7a5b0a42233bc2cc3b1b11553672
+# Parent  5e76781b4e9366777200f713d96360e50b51d8af
+Bug 1489484 - Disable LTO on various mac builds r=froydnj
+
+Bug 1473786 enabled LTO on mac builds for nightlies, but this had the
+side effect of enabling it on unrelated builds that just happen to
+include the nightly mozconfig just because out mozconfigs kind of suck.
+
+Differential Revision: https://phabricator.services.mozilla.com/D5482
+
+diff --git a/browser/config/mozconfigs/macosx64/add-on-devel b/browser/config/mozconfigs/macosx64/add-on-devel
+--- a/browser/config/mozconfigs/macosx64/add-on-devel
++++ b/browser/config/mozconfigs/macosx64/add-on-devel
+@@ -1,10 +1,12 @@
+ . $topsrcdir/browser/config/mozconfigs/macosx64/nightly
+ 
++ac_add_options --disable-lto
++
+ #add-on signing is checked but not enforced
+ MOZ_REQUIRE_SIGNING=0
+ # Enable MOZ_ALLOW_LEGACY_EXTENSIONS
+ ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
+ 
+ ac_add_options --with-branding=browser/branding/unofficial
+ ac_add_options --enable-update-channel=default
+ 
+diff --git a/browser/config/mozconfigs/macosx64/nightly-fuzzing-asan b/browser/config/mozconfigs/macosx64/nightly-fuzzing-asan
+--- a/browser/config/mozconfigs/macosx64/nightly-fuzzing-asan
++++ b/browser/config/mozconfigs/macosx64/nightly-fuzzing-asan
+@@ -1,2 +1,3 @@
+ . "$topsrcdir/browser/config/mozconfigs/macosx64/nightly-asan"
++ac_add_options --disable-lto
+ ac_add_options --enable-fuzzing
+diff --git a/browser/config/mozconfigs/macosx64/opt-dmd b/browser/config/mozconfigs/macosx64/opt-dmd
+--- a/browser/config/mozconfigs/macosx64/opt-dmd
++++ b/browser/config/mozconfigs/macosx64/opt-dmd
+@@ -1,3 +1,5 @@
+ ac_add_options --enable-dmd
+ 
+ . "$topsrcdir/browser/config/mozconfigs/macosx64/nightly"
++
++ac_add_options --disable-lto

+ 31 - 0
mozilla-release/patches/1491233-64a1.patch

@@ -0,0 +1,31 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla@glandium.org>
+# Date 1536946885 0
+# Node ID b75e728dd2ab83bb8d8239807e3349d3267b9807
+# Parent  77b272718390ba73df33af3942baf1828ca7060b
+Bug 1491233 - Enable LTO in mac devedition mozconfig r=froydnj
+
+Differential Revision: https://phabricator.services.mozilla.com/D5845
+
+diff --git a/browser/config/mozconfigs/macosx64/devedition b/browser/config/mozconfigs/macosx64/devedition
+--- a/browser/config/mozconfigs/macosx64/devedition
++++ b/browser/config/mozconfigs/macosx64/devedition
+@@ -1,16 +1,18 @@
+ . "$topsrcdir/browser/config/mozconfigs/macosx64/common-opt"
+ 
+ # Add-on signing is not required for DevEdition
+ MOZ_REQUIRE_SIGNING=0
+ 
+ ac_add_options --disable-install-strip
+ ac_add_options --enable-verify-mar
+ 
++ac_add_options --enable-lto
++
+ ac_add_options --enable-instruments
+ 
+ # Cross-compiled builds fail when dtrace is enabled
+ if test `uname -s` != Linux; then
+   ac_add_options --enable-dtrace
+ fi
+ 
+ if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then

+ 239 - 0
mozilla-release/patches/1493414-64a1.patch

@@ -0,0 +1,239 @@
+# HG changeset patch
+# User Masatoshi Kimura <VYV03354@nifty.ne.jp>
+# Date 1537275868 -32400
+# Node ID ae9c5017ec91f315af511d9572d03082f469aa56
+# Parent  41249efb4584cfe121a81663a907a010ba66f2ed
+Bug 1493414 - Re-enable warnings as errors on clang-cl in toolkit/xre/. r=froydnj
+
+_CrtSetReportXxxx stuff is dead decause we do not use debug CRT even in debug
+builds for a long time. So I removed it to fix -Wunused-function.
+
+diff --git a/toolkit/xre/moz.build.1493414.later b/toolkit/xre/moz.build.1493414.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/xre/moz.build.1493414.later
+@@ -0,0 +1,14 @@
++--- moz.build
+++++ moz.build
++@@ -228,11 +228,8 @@ FINAL_TARGET_PP_FILES += [
++     'platform.ini'
++ ]
++ 
++ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
++     CXXFLAGS += ['-Wno-error=shadow']
++ 
++ if CONFIG['MOZ_IPDL_TESTS']:
++     DEFINES['MOZ_IPDL_TESTS'] = True
++-
++-if CONFIG['CC_TYPE'] == 'clang-cl':
++-    AllowCompilerWarnings()  # workaround for bug 1090497
+diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
+--- a/toolkit/xre/nsAppRunner.cpp
++++ b/toolkit/xre/nsAppRunner.cpp
+@@ -1613,58 +1613,16 @@ DumpHelp()
+ #endif
+ 
+   // this works, but only after the components have registered.  so if you drop in a new command line handler, --help
+   // won't not until the second run.
+   // out of the bug, because we ship a component.reg file, it works correctly.
+   DumpArbitraryHelp();
+ }
+ 
+-#if defined(DEBUG) && defined(XP_WIN)
+-#ifdef DEBUG_warren
+-#define _CRTDBG_MAP_ALLOC
+-#endif
+-// Set a CRT ReportHook function to capture and format MSCRT
+-// warnings, errors and assertions.
+-// See http://msdn.microsoft.com/en-US/library/74kabxyx(v=VS.80).aspx
+-#include <stdio.h>
+-#include <crtdbg.h>
+-#include "mozilla/mozalloc_abort.h"
+-static int MSCRTReportHook( int aReportType, char *aMessage, int *oReturnValue)
+-{
+-  *oReturnValue = 0; // continue execution
+-
+-  // Do not use fprintf or other functions which may allocate
+-  // memory from the heap which may be corrupted. Instead,
+-  // use fputs to output the leading portion of the message
+-  // and use mozalloc_abort to emit the remainder of the
+-  // message.
+-
+-  switch(aReportType) {
+-  case 0:
+-    fputs("\nWARNING: CRT WARNING", stderr);
+-    fputs(aMessage, stderr);
+-    fputs("\n", stderr);
+-    break;
+-  case 1:
+-    fputs("\n###!!! ABORT: CRT ERROR ", stderr);
+-    mozalloc_abort(aMessage);
+-    break;
+-  case 2:
+-    fputs("\n###!!! ABORT: CRT ASSERT ", stderr);
+-    mozalloc_abort(aMessage);
+-    break;
+-  }
+-
+-  // do not invoke the debugger
+-  return 1;
+-}
+-
+-#endif
+-
+ static inline void
+ DumpVersion()
+ {
+   if (gAppData->vendor)
+     printf("%s ", (const char*) gAppData->vendor);
+   printf("%s %s", (const char*) gAppData->name, (const char*) gAppData->version);
+   if (gAppData->copyright)
+       printf(", %s", (const char*) gAppData->copyright);
+@@ -5110,31 +5068,16 @@ SetupErrorHandling(const char* progname)
+   // for a dozen of the dialog boxes to litter the console
+   if (getenv("XRE_NO_WINDOWS_CRASH_DIALOG"))
+     realMode |= SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX;
+ 
+   SetErrorMode(realMode);
+ 
+ #endif
+ 
+-#if defined (DEBUG) && defined(XP_WIN)
+-  // Send MSCRT Warnings, Errors and Assertions to stderr.
+-  // See http://msdn.microsoft.com/en-us/library/1y71x448(v=VS.80).aspx
+-  // and http://msdn.microsoft.com/en-us/library/a68f826y(v=VS.80).aspx.
+-
+-  _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+-  _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+-  _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
+-  _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+-  _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
+-  _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
+-
+-  _CrtSetReportHook(MSCRTReportHook);
+-#endif
+-
+   InstallSignalHandlers(progname);
+ 
+   // Unbuffer stdout, needed for tinderbox tests.
+   setbuf(stdout, 0);
+ }
+ 
+ // Note: This function should not be needed anymore. See Bug 818634 for details.
+ void
+diff --git a/toolkit/xre/nsAppRunner.cpp.1493414.later b/toolkit/xre/nsAppRunner.cpp.1493414.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/xre/nsAppRunner.cpp.1493414.later
+@@ -0,0 +1,21 @@
++--- nsAppRunner.cpp
+++++ nsAppRunner.cpp
++@@ -1801,17 +1759,17 @@ RegisterApplicationRestartChanged(const 
++     wasRegistered = true;
++   }
++ 
++   if (Preferences::GetBool(PREF_WIN_REGISTER_APPLICATION_RESTART, false) && !wasRegistered) {
++     // Make the command line to use when restarting.
++     // Excludes argv[0] because RegisterApplicationRestart adds the
++     // executable name, replace that temporarily with -os-restarted
++     char* exeName = gRestartArgv[0];
++-    gRestartArgv[0] = "-os-restarted";
+++    gRestartArgv[0] = const_cast<char*>("-os-restarted");
++     wchar_t** restartArgvConverted =
++       AllocConvertUTF8toUTF16Strings(gRestartArgc, gRestartArgv);
++     gRestartArgv[0] = exeName;
++ 
++     mozilla::UniquePtr<wchar_t[]> restartCommandLine;
++     if (restartArgvConverted) {
++       restartCommandLine = mozilla::MakeCommandLine(gRestartArgc, restartArgvConverted);
++       FreeAllocStrings(gRestartArgc, restartArgvConverted);
+diff --git a/toolkit/xre/nsNativeAppSupportWin.cpp b/toolkit/xre/nsNativeAppSupportWin.cpp
+--- a/toolkit/xre/nsNativeAppSupportWin.cpp
++++ b/toolkit/xre/nsNativeAppSupportWin.cpp
+@@ -833,25 +833,16 @@ static nsCString hszValue( DWORD instanc
+     if ( len ) {
+         char buffer[ 256 ];
+         DdeQueryString( instance, hsz, buffer, sizeof buffer, CP_WINANSI );
+         result += buffer;
+     }
+     result += "]";
+     return result;
+ }
+-#else
+-// These are purely a safety measure to avoid the infamous "won't
+-// build non-debug" type Tinderbox flames.
+-static nsCString uTypeDesc( UINT ) {
+-    return nsCString( "?" );
+-}
+-static nsCString hszValue( DWORD, HSZ ) {
+-    return nsCString( "?" );
+-}
+ #endif
+ 
+ 
+ // Utility function to escape double-quotes within a string.
+ static void escapeQuotes( nsAString &aString ) {
+     int32_t offset = -1;
+     while( 1 ) {
+        // Find next '"'.
+diff --git a/toolkit/xre/nsUpdateDriver.cpp b/toolkit/xre/nsUpdateDriver.cpp
+--- a/toolkit/xre/nsUpdateDriver.cpp
++++ b/toolkit/xre/nsUpdateDriver.cpp
+@@ -294,16 +294,17 @@ IsOlderVersion(nsIFile *versionFile, con
+     return false;
+ 
+   if (mozilla::Version(appVersion) > buf)
+     return true;
+ 
+   return false;
+ }
+ 
++#if !defined(XP_WIN)
+ static bool
+ CopyFileIntoUpdateDir(nsIFile *parentDir, const nsACString& leaf, nsIFile *updateDir)
+ {
+   nsCOMPtr<nsIFile> file;
+ 
+   // Make sure there is not an existing file in the target location.
+   nsresult rv = updateDir->Clone(getter_AddRefs(file));
+   if (NS_FAILED(rv))
+@@ -389,16 +390,17 @@ CopyUpdaterIntoUpdateDir(nsIFile *greDir
+   }
+   tmp = updater->AppendNative(NS_LITERAL_CSTRING("MacOS"));
+   if (NS_FAILED(tmp) || NS_FAILED(rv))
+     return false;
+ #endif
+   rv = updater->AppendNative(NS_LITERAL_CSTRING(UPDATER_BIN));
+   return NS_SUCCEEDED(rv);
+ }
++#endif
+ 
+ /**
+  * Appends the specified path to the library path.
+  * This is used so that updater can find libmozsqlite3.so and other shared libs.
+  *
+  * @param pathToAppend A new library path to prepend to LD_LIBRARY_PATH
+  */
+ #if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
+diff --git a/toolkit/xre/nsWindowsRestart.cpp b/toolkit/xre/nsWindowsRestart.cpp
+--- a/toolkit/xre/nsWindowsRestart.cpp
++++ b/toolkit/xre/nsWindowsRestart.cpp
+@@ -100,17 +100,17 @@ WinLaunchChild(const wchar_t *exePath,
+ 
+   mozilla::UniquePtr<wchar_t[]> cl(mozilla::MakeCommandLine(argc, argv));
+   if (!cl) {
+     return FALSE;
+   }
+ 
+   STARTUPINFOW si = {0};
+   si.cb = sizeof(STARTUPINFOW);
+-  si.lpDesktop = L"winsta0\\Default";
++  si.lpDesktop = const_cast<LPWSTR>(L"winsta0\\Default");
+   PROCESS_INFORMATION pi = {0};
+ 
+   if (userToken == nullptr) {
+     ok = CreateProcessW(exePath,
+                         cl.get(),
+                         nullptr,  // no special security attributes
+                         nullptr,  // no special thread attributes
+                         FALSE, // don't inherit filehandles

+ 34 - 0
mozilla-release/patches/1504878-65a1.patch

@@ -0,0 +1,34 @@
+# HG changeset patch
+# User Matt Howell <mhowell@mozilla.com>
+# Date 1541528124 0
+# Node ID f8d63cc0c95feea7aa1e6b28724be95ff3fba93c
+# Parent  9863956489e4418f4be7e538b3e5bcc4bd22e991
+Bug 1504878 - Exclude Mac OS from update log file tests. r=rstrong
+
+Differential Revision: https://phabricator.services.mozilla.com/D10982
+
+diff --git a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
++++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+@@ -2971,19 +2971,19 @@ function replaceLogPaths(aLogContents) {
+  * @param   aReplace
+  *          If the update log file is for a replace update.
+  * @param   aExcludeDistDir
+  *          Removes lines containing the distribution directory from the log
+  *          file to compare the update log with.
+  */
+ function checkUpdateLogContents(aCompareLogFile, aStaged = false,
+                                 aReplace = false, aExcludeDistDir = false) {
+-  if (IS_UNIX && !IS_MACOSX) {
++  if (IS_UNIX) {
+     // The order that files are returned when enumerating the file system on
+-    // Linux is not deterministic so skip checking the logs.
++    // Linux and Mac is not deterministic so skip checking the logs.
+     return;
+   }
+ 
+   let updateLog = getUpdateLog(FILE_LAST_UPDATE_LOG);
+   let updateLogContents = readFileBytes(updateLog);
+ 
+   // The channel-prefs.js is defined in gTestFilesCommon which will always be
+   // located to the end of gTestFiles when it is present.

+ 31 - 0
mozilla-release/patches/1524142-67a1.patch

@@ -0,0 +1,31 @@
+# HG changeset patch
+# User Gabriele Svelto <gsvelto@mozilla.com>
+# Date 1549060039 0
+# Node ID 6d30d431b5d84b7f1e3cd77bda9e1b64359bf30e
+# Parent  87c32b87df84e319838fc8a49d6c8d3301c7f2b1
+Bug 1524142 - Ensure that MOZ_CRASHREPORTER is properly defined in Windows/AArch64 builds r=glandium
+
+Differential Revision: https://phabricator.services.mozilla.com/D18216
+
+diff --git a/old-configure.in b/old-configure.in
+--- a/old-configure.in
++++ b/old-configure.in
+@@ -1946,17 +1946,17 @@ fi
+ fi # COMPILE_ENVIRONMENT
+ 
+ 
+ dnl ========================================================
+ dnl = Breakpad crash reporting (on by default on supported platforms)
+ dnl ========================================================
+ 
+ case $target in
+-i?86-*-mingw*|x86_64-*-mingw*)
++i?86-*-mingw*|x86_64-*-mingw*|aarch64-*-mingw*)
+   MOZ_CRASHREPORTER=1
+   ;;
+ i?86-apple-darwin*|x86_64-apple-darwin*)
+   MOZ_CRASHREPORTER=1
+   ;;
+ *-android*|*-linuxandroid*)
+   dnl Android/arm is arm-unknown-linux-androideabi, so android condition should
+   dnl be before Linux condition

+ 2267 - 0
mozilla-release/patches/1525858-67a1.patch

@@ -0,0 +1,2267 @@
+# HG changeset patch
+# User Robert Strong <robert.bugzilla@gmail.com>
+# Date 1549653574 0
+# Node ID 3c3b09d5cadd1ab4c93168f4062c6b2bc5c1310d
+# Parent  14327305d9bc8eef3c807f95717ff819fa2bd920
+Bug 1525858 - Use AppConstants and mozinfo where possible instead of the preprocessed test file. r=mhowell
+
+Removes INSTALL_LOCALE (@AB_CD@) since it is no longer used
+Replaces MOZ_APP_NAME (@MOZ_APP_NAME@) with AppConstants.MOZ_APP_NAME
+Replaces IS_WIN, IS_MACOSX, and IS_UNIX with values available from AppConstants.platform
+Replaces BIN_SUFFIX with mozinfo.bin_suffix
+
+Differential Revision: https://phabricator.services.mozilla.com/D19104
+
+diff --git a/toolkit/mozapps/update/tests/browser/head.js b/toolkit/mozapps/update/tests/browser/head.js
+--- a/toolkit/mozapps/update/tests/browser/head.js
++++ b/toolkit/mozapps/update/tests/browser/head.js
+@@ -1,47 +1,42 @@
+-ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
+-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
++/* Any copyright is dedicated to the Public Domain.
++ * http://creativecommons.org/publicdomain/zero/1.0/ */
++
++"use strict";
++
++const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+ 
+ ChromeUtils.defineModuleGetter(this, "AppMenuNotifications",
+                                "resource://gre/modules/AppMenuNotifications.jsm");
+ ChromeUtils.defineModuleGetter(this, "UpdateListener",
+                                "resource://gre/modules/UpdateListener.jsm");
+ 
+-const IS_MACOSX = ("nsILocalFileMac" in Ci);
+-const IS_WIN = ("@mozilla.org/windows-registry-key;1" in Cc);
+-
+-const BIN_SUFFIX = (IS_WIN ? ".exe" : "");
+-const FILE_UPDATER_BIN = "updater" + (IS_MACOSX ? ".app" : BIN_SUFFIX);
++const BIN_SUFFIX = (AppConstants.platform == "win" ? ".exe" : "");
++const FILE_UPDATER_BIN = "updater" + (AppConstants.platform == "macosx" ? ".app" : BIN_SUFFIX);
+ const FILE_UPDATER_BIN_BAK = FILE_UPDATER_BIN + ".bak";
+ 
+-const PREF_APP_UPDATE_INTERVAL = "app.update.interval";
+-const PREF_APP_UPDATE_LASTUPDATETIME = "app.update.lastUpdateTime.background-update-timer";
+-
+ let gRembemberedPrefs = [];
+ 
+-const DATA_URI_SPEC =  "chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/";
+-
+ var DEBUG_AUS_TEST = true;
+ var gUseTestUpdater = false;
+ 
+ const LOG_FUNCTION = info;
+ 
+ const MAX_UPDATE_COPY_ATTEMPTS = 10;
+ 
++const DATA_URI_SPEC = "chrome://mochitests/content/browser/toolkit/mozapps/update/tests/browser/";
+ /* import-globals-from testConstants.js */
+ Services.scriptloader.loadSubScript(DATA_URI_SPEC + "testConstants.js", this);
+-/* import-globals-from ../data/shared.js */
+-Services.scriptloader.loadSubScript(DATA_URI_SPEC + "shared.js", this);
+ 
+ var gURLData = URL_HOST + "/" + REL_PATH_DATA;
+ const URL_MANUAL_UPDATE = gURLData + "downloadPage.html";
+ 
+-const gEnv = Cc["@mozilla.org/process/environment;1"].
+-             getService(Ci.nsIEnvironment);
++/* import-globals-from ../data/shared.js */
++Services.scriptloader.loadSubScript(DATA_URI_SPEC + "shared.js", this);
+ 
+ const NOTIFICATIONS = [
+   "update-available",
+   "update-manual",
+   "update-restart"
+ ];
+ 
+ /**
+diff --git a/toolkit/mozapps/update/tests/browser/head.js.1525858.later b/toolkit/mozapps/update/tests/browser/head.js.1525858.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/mozapps/update/tests/browser/head.js.1525858.later
+@@ -0,0 +1,40 @@
++--- head.js
+++++ head.js
++@@ -97,17 +92,17 @@ async function continueFileHandler(leafN
++  * when the user doesn't have write access to update. Since this is only
++  * possible on Windows the function throws when it is called on other platforms.
++  * This uses registerCleanupFunction to remove the lock and the file when the
++  * test completes.
++  *
++  * @throws If the function is called on a platform other than Windows.
++  */
++ function lockWriteTestFile() {
++-  if (!IS_WIN) {
+++  if (AppConstants.platform != "win") {
++     throw new Error("Windows only test function called");
++   }
++   let file = getUpdatesRootDir();
++   file.append(FILE_UPDATE_TEST);
++   file.QueryInterface(Ci.nsILocalFileWin);
++   // Remove the file if it exists just in case.
++   if (file.exists()) {
++     file.fileAttributesWin |= file.WFA_READWRITE;
++@@ -120,17 +115,17 @@ function lockWriteTestFile() {
++   registerCleanupFunction(() => {
++     file.fileAttributesWin |= file.WFA_READWRITE;
++     file.fileAttributesWin &= ~file.WFA_READONLY;
++     file.remove(false);
++   });
++ }
++ 
++ function setOtherInstanceHandlingUpdates() {
++-  if (!IS_WIN) {
+++  if (AppConstants.platform != "win") {
++     throw new Error("Windows only test function called");
++   }
++   gAUS.observe(null, "test-close-handle-update-mutex", "");
++   let handle = createMutex(getPerInstallationMutexName());
++   registerCleanupFunction(() => {
++     closeHandle(handle);
++   });
++ }
+diff --git a/toolkit/mozapps/update/tests/chrome/test_9999_cleanup.xul.1525858.later b/toolkit/mozapps/update/tests/chrome/test_9999_cleanup.xul.1525858.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/mozapps/update/tests/chrome/test_9999_cleanup.xul.1525858.later
+@@ -0,0 +1,30 @@
++--- test_9999_cleanup.xul
+++++ test_9999_cleanup.xul
++@@ -39,26 +39,25 @@ function runTest() {
++   if (DEBUG_AUS_TEST) {
++     Services.prefs.setBoolPref(PREF_APP_UPDATE_LOG, true);
++   }
++ 
++   closeUpdateWindow();
++ 
++   // Always disable updates and update staging when cleaning up.
++   Services.prefs.setBoolPref(PREF_APP_UPDATE_DISABLEDFORTESTING, true);
++-  Services.prefs.setBoolPref(PREF_DISABLE_SECURITY, true);  // Needed to disable updates
++   Services.prefs.setBoolPref(PREF_APP_UPDATE_STAGING_ENABLED, false);
++ 
++   resetFiles();
++   reloadUpdateManagerData(true);
++   removeUpdateDirsAndFiles();
++ 
++   // The updates directory is located outside of the application directory and
++   // needs to be removed on Windows and Mac OS X.
++-  if (IS_WIN || IS_MACOSX) {
+++  if (AppConstants.platform == "win" || AppConstants.platform == "macosx") {
++     let updatesDir = getUpdatesRootDir();
++     // Try to remove the directory used to apply updates. Since the test has
++     // already finished this is non-fatal for the test.
++     if (updatesDir.exists()) {
++       debugDump("attempting to remove directory. Path: " + updatesDir.path);
++       try {
++         removeDirRecursive(updatesDir);
++       } catch (e) {
+diff --git a/toolkit/mozapps/update/tests/chrome/utils.js b/toolkit/mozapps/update/tests/chrome/utils.js
+--- a/toolkit/mozapps/update/tests/chrome/utils.js
++++ b/toolkit/mozapps/update/tests/chrome/utils.js
+@@ -64,25 +64,26 @@
+  * prefHasUserValue (optional)
+  *   For comparing the expected value defined by this property with the return
+  *   value of prefHasUserValue using gPrefToCheck for the preference name in the
+  *   checkPrefHasUserValue function.
+  */
+ 
+ "use strict";
+ 
++// Definitions needed to run eslint on this file.
+ /* globals TESTS, runTest, finishTest */
+ 
+-ChromeUtils.import("resource://gre/modules/Services.jsm", this);
++const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
++const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
++
++const DATA_URI_SPEC = "chrome://mochitests/content/chrome/toolkit/mozapps/update/tests/chrome/";
+ 
+ /* import-globals-from testConstants.js */
+-Services.scriptloader.loadSubScript("chrome://mochitests/content/chrome/toolkit/mozapps/update/tests/chrome/testConstants.js", this);
+-
+-const IS_MACOSX = ("nsILocalFileMac" in Ci);
+-const IS_WIN = ("@mozilla.org/windows-registry-key;1" in Cc);
++Services.scriptloader.loadSubScript(DATA_URI_SPEC + "testConstants.js", this);
+ 
+ // The tests have to use the pageid instead of the pageIndex due to the
+ // app update wizard's access method being random.
+ const PAGEID_DUMMY            = "dummy";                 // Done
+ const PAGEID_CHECKING         = "checking";              // Done
+ const PAGEID_NO_UPDATES_FOUND = "noupdatesfound";        // Done
+ const PAGEID_MANUAL_UPDATE    = "manualUpdate";          // Done
+ const PAGEID_UNSUPPORTED      = "unsupported";           // Done
+@@ -98,23 +99,20 @@ const UPDATE_WINDOW_NAME = "Update:Wizar
+ 
+ // These two URLs must not contain parameters since tests add their own
+ // test specific parameters.
+ const URL_HTTP_UPDATE_XML = URL_HTTP_UPDATE_SJS;
+ const URL_HTTPS_UPDATE_XML = "https://example.com" + URL_PATH_UPDATE_XML;
+ 
+ const URI_UPDATE_PROMPT_DIALOG  = "chrome://mozapps/content/update/updates.xul";
+ 
+-const PREF_APP_UPDATE_INTERVAL = "app.update.interval";
+-const PREF_APP_UPDATE_LASTUPDATETIME = "app.update.lastUpdateTime.background-update-timer";
+-
+ const LOG_FUNCTION = info;
+ 
+-const BIN_SUFFIX = (IS_WIN ? ".exe" : "");
+-const FILE_UPDATER_BIN = "updater" + (IS_MACOSX ? ".app" : BIN_SUFFIX);
++const BIN_SUFFIX = (AppConstants.platform == "win" ? ".exe" : "");
++const FILE_UPDATER_BIN = "updater" + (AppConstants.platform == "macosx" ? ".app" : BIN_SUFFIX);
+ const FILE_UPDATER_BIN_BAK = FILE_UPDATER_BIN + ".bak";
+ 
+ var gURLData = URL_HOST + "/" + REL_PATH_DATA + "/";
+ 
+ var gTestTimeout = 240000; // 4 minutes
+ var gTimeoutTimer;
+ 
+ // The number of SimpleTest.executeSoon calls to perform when waiting on an
+@@ -137,17 +135,16 @@ var gDocElem;
+ var gPrefToCheck;
+ var gUseTestUpdater = false;
+ 
+ // Set to true to log additional information for debugging. To log additional
+ // information for an individual test set DEBUG_AUS_TEST to true in the test's
+ // onload function.
+ var DEBUG_AUS_TEST = true;
+ 
+-const DATA_URI_SPEC = "chrome://mochitests/content/chrome/toolkit/mozapps/update/tests/data/";
+ /* import-globals-from ../data/shared.js */
+ Services.scriptloader.loadSubScript(DATA_URI_SPEC + "shared.js", this);
+ 
+ /**
+  * The current test in TESTS array.
+  */
+ this.__defineGetter__("gTest", function() {
+   return TESTS[gTestCounter];
+@@ -821,17 +818,17 @@ function resetFiles() {
+   if (updateSettingsIni.exists()) {
+     updateSettingsIni.moveTo(baseAppDir, FILE_UPDATE_SETTINGS_INI);
+   }
+ 
+   // Not being able to remove the "updated" directory will not adversely affect
+   // subsequent tests so wrap it in a try block and don't test whether its
+   // removal was successful.
+   let updatedDir;
+-  if (IS_MACOSX) {
++  if (AppConstants.platform == "macosx") {
+     updatedDir = getUpdatesDir();
+     updatedDir.append(DIR_PATCH);
+   } else {
+     updatedDir = getAppBaseDir();
+   }
+   updatedDir.append(DIR_UPDATED);
+   if (updatedDir.exists()) {
+     try {
+diff --git a/toolkit/mozapps/update/tests/chrome/utils.js.1525858.later b/toolkit/mozapps/update/tests/chrome/utils.js.1525858.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/mozapps/update/tests/chrome/utils.js.1525858.later
+@@ -0,0 +1,21 @@
++--- utils.js
+++++ utils.js
++@@ -815,17 +812,17 @@ function setupPrefs() {
++   Services.prefs.setIntPref(PREF_APP_UPDATE_LASTUPDATETIME, now);
++   Services.prefs.setIntPref(PREF_APP_UPDATE_INTERVAL, 43200);
++ 
++   if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_DISABLEDFORTESTING)) {
++     gAppUpdateDisabled = Services.prefs.getBoolPref(PREF_APP_UPDATE_DISABLEDFORTESTING);
++   }
++   Services.prefs.setBoolPref(PREF_APP_UPDATE_DISABLEDFORTESTING, false);
++ 
++-  if (IS_WIN) {
+++  if (AppConstants.platform == "win") {
++     let configFile = getUpdateConfigFile();
++     if (configFile.exists()) {
++       let configData = JSON.parse(readFileBytes(configFile));
++       gAppUpdateAuto = !!configData[CONFIG_APP_UPDATE_AUTO];
++     }
++   } else if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_AUTO)) {
++     gAppUpdateAuto = Services.prefs.getBoolPref(PREF_APP_UPDATE_AUTO);
++   }
+diff --git a/toolkit/mozapps/update/tests/data/shared.js b/toolkit/mozapps/update/tests/data/shared.js
+--- a/toolkit/mozapps/update/tests/data/shared.js
++++ b/toolkit/mozapps/update/tests/data/shared.js
+@@ -1,29 +1,34 @@
+ /* 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/. */
+ 
+-/* Shared code for xpcshell and mochitests-chrome */
+-/* eslint-disable no-undef */
++/* Shared code for xpcshell, mochitests-chrome, and mochitest-browser-chrome. */
+ 
+-ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
+-ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
++// Definitions needed to run eslint on this file.
++/* global AppConstants, DATA_URI_SPEC, LOG_FUNCTION */
++/* global Services, URL_HOST, DEBUG_AUS_TEST */
++
++const {FileUtils} = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
++const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+ 
+ const PREF_APP_UPDATE_AUTO                       = "app.update.auto";
+ const PREF_APP_UPDATE_BACKGROUNDERRORS           = "app.update.backgroundErrors";
+ const PREF_APP_UPDATE_BACKGROUNDMAXERRORS        = "app.update.backgroundMaxErrors";
+ const PREF_APP_UPDATE_CANCELATIONS               = "app.update.cancelations";
+ const PREF_APP_UPDATE_CHANNEL                    = "app.update.channel";
+ const PREF_APP_UPDATE_DOORHANGER                 = "app.update.doorhanger";
+ const PREF_APP_UPDATE_DOWNLOADPROMPTATTEMPTS     = "app.update.download.attempts";
+ const PREF_APP_UPDATE_DOWNLOADPROMPTMAXATTEMPTS  = "app.update.download.maxAttempts";
+ const PREF_APP_UPDATE_DOWNLOADBACKGROUNDINTERVAL = "app.update.download.backgroundInterval";
+ const PREF_APP_UPDATE_ENABLED                    = "app.update.enabled";
+ const PREF_APP_UPDATE_IDLETIME                   = "app.update.idletime";
++const PREF_APP_UPDATE_INTERVAL                   = "app.update.interval";
++const PREF_APP_UPDATE_LASTUPDATETIME             = "app.update.lastUpdateTime.background-update-timer";
+ const PREF_APP_UPDATE_LOG                        = "app.update.log";
+ const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED        = "app.update.notifiedUnsupported";
+ const PREF_APP_UPDATE_PROMPTWAITTIME             = "app.update.promptWaitTime";
+ const PREF_APP_UPDATE_RETRYTIMEOUT               = "app.update.socket.retryTimeout";
+ const PREF_APP_UPDATE_SERVICE_ENABLED            = "app.update.service.enabled";
+ const PREF_APP_UPDATE_SILENT                     = "app.update.silent";
+ const PREF_APP_UPDATE_SOCKET_MAXERRORS           = "app.update.socket.maxErrors";
+ const PREF_APP_UPDATE_STAGING_ENABLED            = "app.update.staging.enabled";
+@@ -41,42 +46,43 @@ const NS_GRE_DIR                   = "Gr
+ const NS_GRE_BIN_DIR               = "GreBinD";
+ const NS_XPCOM_CURRENT_PROCESS_DIR = "XCurProcD";
+ const XRE_EXECUTABLE_FILE          = "XREExeF";
+ const XRE_UPDATE_ROOT_DIR          = "UpdRootD";
+ 
+ const DIR_PATCH        = "0";
+ const DIR_TOBEDELETED  = "tobedeleted";
+ const DIR_UPDATES      = "updates";
+-const DIR_UPDATED      = IS_MACOSX ? "Updated.app" : "updated";
++const DIR_UPDATED      = AppConstants.platform == "macosx" ? "Updated.app"
++                                                           : "updated";
+ 
+ const FILE_ACTIVE_UPDATE_XML         = "active-update.xml";
+ const FILE_APPLICATION_INI           = "application.ini";
+ const FILE_BACKUP_UPDATE_LOG         = "backup-update.log";
+ const FILE_LAST_UPDATE_LOG           = "last-update.log";
++const FILE_UPDATE_LOG                = "update.log";
++const FILE_UPDATE_MAR                = "update.mar";
+ const FILE_UPDATE_SETTINGS_INI       = "update-settings.ini";
+ const FILE_UPDATE_SETTINGS_INI_BAK   = "update-settings.ini.bak";
+-const FILE_UPDATER_INI               = "updater.ini";
+-const FILE_UPDATES_XML               = "updates.xml";
+-const FILE_UPDATE_LOG                = "update.log";
+-const FILE_UPDATE_MAR                = "update.mar";
+ const FILE_UPDATE_STATUS             = "update.status";
+ const FILE_UPDATE_TEST               = "update.test";
+ const FILE_UPDATE_VERSION            = "update.version";
++const FILE_UPDATER_INI               = "updater.ini";
++const FILE_UPDATES_XML               = "updates.xml";
+ 
+ const UPDATE_SETTINGS_CONTENTS = "[Settings]\n" +
+                                  "ACCEPTED_MAR_CHANNEL_IDS=xpcshell-test\n";
+ 
+ const PR_RDWR        = 0x04;
+ const PR_CREATE_FILE = 0x08;
+ const PR_TRUNCATE    = 0x20;
+ 
+ var gChannel;
+ 
+-/* import-globals-from ../data/sharedUpdateXML.js */
++/* import-globals-from sharedUpdateXML.js */
+ Services.scriptloader.loadSubScript(DATA_URI_SPEC + "sharedUpdateXML.js", this);
+ 
+ const PERMS_FILE      = FileUtils.PERMS_FILE;
+ const PERMS_DIRECTORY = FileUtils.PERMS_DIRECTORY;
+ 
+ const MODE_WRONLY   = FileUtils.MODE_WRONLY;
+ const MODE_CREATE   = FileUtils.MODE_CREATE;
+ const MODE_APPEND   = FileUtils.MODE_APPEND;
+diff --git a/toolkit/mozapps/update/tests/data/shared.js.1525858.later b/toolkit/mozapps/update/tests/data/shared.js.1525858.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/mozapps/update/tests/data/shared.js.1525858.later
+@@ -0,0 +1,146 @@
++--- shared.js
+++++ shared.js
++@@ -1,94 +1,100 @@
++ const PREF_APP_UPDATE_NOTIFIEDUNSUPPORTED        = "app.update.notifiedUnsupported";
++ const PREF_APP_UPDATE_PROMPTWAITTIME             = "app.update.promptWaitTime";
++ const PREF_APP_UPDATE_RETRYTIMEOUT               = "app.update.socket.retryTimeout";
++ const PREF_APP_UPDATE_SERVICE_ENABLED            = "app.update.service.enabled";
++ const PREF_APP_UPDATE_SILENT                     = "app.update.silent";
++ const PREF_APP_UPDATE_SOCKET_MAXERRORS           = "app.update.socket.maxErrors";
++ const PREF_APP_UPDATE_STAGING_ENABLED            = "app.update.staging.enabled";
++ const PREF_APP_UPDATE_URL                        = "app.update.url";
++ const PREF_APP_UPDATE_URL_DETAILS                = "app.update.url.details";
++ const PREF_APP_UPDATE_URL_MANUAL                 = "app.update.url.manual";
++ 
++ const PREFBRANCH_APP_PARTNER         = "app.partner.";
++ const PREF_DISTRIBUTION_ID           = "distribution.id";
++ const PREF_DISTRIBUTION_VERSION      = "distribution.version";
++-const PREF_DISABLE_SECURITY          = "security.turn_off_all_security_so_that_viruses_can_take_over_this_computer";
++ 
++ const CONFIG_APP_UPDATE_AUTO         = "app.update.auto";
++ 
++ const NS_APP_PROFILE_DIR_STARTUP   = "ProfDS";
++ const NS_APP_USER_PROFILE_50_DIR   = "ProfD";
++ const NS_GRE_BIN_DIR               = "GreBinD";
++ const NS_GRE_DIR                   = "GreD";
++ const NS_XPCOM_CURRENT_PROCESS_DIR = "XCurProcD";
++ const XRE_EXECUTABLE_FILE          = "XREExeF";
++ const XRE_OLD_UPDATE_ROOT_DIR      = "OldUpdRootD";
++ const XRE_UPDATE_ROOT_DIR          = "UpdRootD";
++ 
++ const DIR_PATCH        = "0";
++ const DIR_TOBEDELETED  = "tobedeleted";
++ const DIR_UPDATES      = "updates";
++ const DIR_UPDATED      = AppConstants.platform == "macosx" ? "Updated.app"
++                                                            : "updated";
++ 
++ const FILE_ACTIVE_UPDATE_XML         = "active-update.xml";
++ const FILE_APPLICATION_INI           = "application.ini";
++ const FILE_BACKUP_UPDATE_LOG         = "backup-update.log";
++-const FILE_BT_RESULT                 = "update.bt";
+++const FILE_BT_RESULT                 = "bt.result";
++ const FILE_LAST_UPDATE_LOG           = "last-update.log";
++ const FILE_PRECOMPLETE               = "precomplete";
++ const FILE_PRECOMPLETE_BAK           = "precomplete.bak";
+++const FILE_UPDATE_CONFIG_JSON        = "update-config.json";
++ const FILE_UPDATE_LOG                = "update.log";
++ const FILE_UPDATE_MAR                = "update.mar";
++ const FILE_UPDATE_SETTINGS_INI       = "update-settings.ini";
++ const FILE_UPDATE_SETTINGS_INI_BAK   = "update-settings.ini.bak";
++-const FILE_UPDATE_CONFIG             = "update-config.json";
++ const FILE_UPDATE_STATUS             = "update.status";
++ const FILE_UPDATE_TEST               = "update.test";
++ const FILE_UPDATE_VERSION            = "update.version";
++ const FILE_UPDATER_INI               = "updater.ini";
++ const FILE_UPDATES_XML               = "updates.xml";
++ 
++ const UPDATE_SETTINGS_CONTENTS = "[Settings]\n" +
++                                  "ACCEPTED_MAR_CHANNEL_IDS=xpcshell-test\n";
++@@ -252,17 +258,17 @@ function writeVersionFile(aVersion) {
++  *         Possible values are true, false, null, and undefined. When true or
++  *         false this value will be written for app.update.auto in the update
++  *         configuration file on Windows or to the user preference on other
++  *         platforms. When null or undefined the update configuration file will
++  *         be removed on Windows or the user preference will be removed on other
++  *         platforms.
++  */
++ function setAppUpdateAutoSync(aEnabled) {
++-  if (IS_WIN) {
+++  if (AppConstants.platform == "win") {
++     let file = getUpdateConfigFile();
++     if (aEnabled === undefined || aEnabled === null) {
++       if (file.exists()) {
++         file.remove(false);
++       }
++     } else {
++       writeFile(file, "{\"" + CONFIG_APP_UPDATE_AUTO + "\":" +
++                       aEnabled.toString() + "}");
++@@ -640,28 +646,28 @@ function getGREBinDir() {
++   return Services.dirsvc.get(NS_GRE_BIN_DIR, Ci.nsIFile);
++ }
++ 
++ /**
++  * Returns the file containing update configuration
++  */
++ function getUpdateConfigFile() {
++   let configFile = getUpdatesRootDir();
++-  configFile.append(FILE_UPDATE_CONFIG);
+++  configFile.append(FILE_UPDATE_CONFIG_JSON);
++   return configFile;
++ }
++ 
++ /**
++  * Gets the unique mutex name for the installation.
++  *
++  * @return Global mutex path.
++  * @throws If the function is called on a platform other than Windows.
++  */
++ function getPerInstallationMutexName() {
++-  if (!IS_WIN) {
+++  if (AppConstants.platform != "win") {
++     throw new Error("Windows only function called by a different platform!");
++   }
++ 
++   let hasher = Cc["@mozilla.org/security/hash;1"].
++                createInstance(Ci.nsICryptoHash);
++   hasher.init(hasher.SHA1);
++ 
++   let exeFile = Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsIFile);
++@@ -677,17 +683,17 @@ function getPerInstallationMutexName() {
++ /**
++  * Closes a Win32 handle.
++  *
++  * @param  aHandle
++  *         The handle to close.
++  * @throws If the function is called on a platform other than Windows.
++  */
++ function closeHandle(aHandle) {
++-  if (!IS_WIN) {
+++  if (AppConstants.platform != "win") {
++     throw new Error("Windows only function called by a different platform!");
++   }
++ 
++   let lib = ctypes.open("kernel32.dll");
++   let CloseHandle = lib.declare("CloseHandle",
++                                 ctypes.winapi_abi,
++                                 ctypes.int32_t, /* success */
++                                 ctypes.void_t.ptr); /* handle */
++@@ -699,17 +705,17 @@ function closeHandle(aHandle) {
++  * Creates a mutex.
++  *
++  * @param  aName
++  *         The name for the mutex.
++  * @return The Win32 handle to the mutex.
++  * @throws If the function is called on a platform other than Windows.
++  */
++ function createMutex(aName) {
++-  if (!IS_WIN) {
+++  if (AppConstants.platform != "win") {
++     throw new Error("Windows only function called by a different platform!");
++   }
++ 
++   const INITIAL_OWN = 1;
++   const ERROR_ALREADY_EXISTS = 0xB7;
++   let lib = ctypes.open("kernel32.dll");
++   let CreateMutexW = lib.declare("CreateMutexW",
++                                  ctypes.winapi_abi,
+diff --git a/toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js b/toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
+--- a/toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
++++ b/toolkit/mozapps/update/tests/data/xpcshellConstantsPP.js
+@@ -1,53 +1,23 @@
+ /* 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/. */
+ 
+ /* Preprocessed constants used by xpcshell tests */
+ 
+-const INSTALL_LOCALE = "@AB_CD@";
+-const MOZ_APP_NAME = "@MOZ_APP_NAME@";
+-const BIN_SUFFIX = "@BIN_SUFFIX@";
+-
+ // MOZ_APP_VENDOR is optional.
+ #ifdef MOZ_APP_VENDOR
+ const MOZ_APP_VENDOR = "@MOZ_APP_VENDOR@";
+ #else
+ const MOZ_APP_VENDOR = "";
+ #endif
+ 
+ // MOZ_APP_BASENAME is not optional for tests.
+ const MOZ_APP_BASENAME = "@MOZ_APP_BASENAME@";
+-#ifdef XP_LINUX
+-const APP_BIN_SUFFIX = "-bin";
+-#else
+-const APP_BIN_SUFFIX = "@BIN_SUFFIX@";
+-#endif
+-
+-const APP_INFO_NAME = "XPCShell";
+-const APP_INFO_VENDOR = "Mozilla";
+-
+-#ifdef XP_WIN
+-const IS_WIN = true;
+-#else
+-const IS_WIN = false;
+-#endif
+-
+-#ifdef XP_MACOSX
+-const IS_MACOSX = true;
+-#else
+-const IS_MACOSX = false;
+-#endif
+-
+-#ifdef XP_UNIX
+-const IS_UNIX = true;
+-#else
+-const IS_UNIX = false;
+-#endif
+ 
+ #ifdef MOZ_VERIFY_MAR_SIGNATURE
+ const MOZ_VERIFY_MAR_SIGNATURE = true;
+ #else
+ const MOZ_VERIFY_MAR_SIGNATURE = false;
+ #endif
+ 
+ #ifdef DISABLE_UPDATER_AUTHENTICODE_CHECK
+diff --git a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
++++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+@@ -27,66 +27,63 @@
+  * "NS_FAILED(rv)" in nsThreadUtils.cpp are due to using timers and it might be
+  * possible to fix some or all of these in the test itself.
+  */
+ 
+ "use strict";
+ 
+ /* eslint-disable no-undef */
+ 
++const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
++const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
++const {TestUtils} = ChromeUtils.import("resource://testing-common/TestUtils.jsm");
++
++ChromeUtils.defineModuleGetter(this, "MockRegistrar",
++                               "resource://testing-common/MockRegistrar.jsm");
++
+ const Cm = Components.manager;
+ 
+ const URL_HTTP_UPDATE_SJS = "http://test_details/";
+ 
+-/* global INSTALL_LOCALE, MOZ_APP_NAME, BIN_SUFFIX, MOZ_APP_VENDOR */
+-/* global MOZ_APP_BASENAME, APP_BIN_SUFFIX, APP_INFO_NAME, APP_INFO_VENDOR */
+-/* global IS_WIN, IS_MACOSX, IS_UNIX, MOZ_VERIFY_MAR_SIGNATURE */
+-/* global IS_AUTHENTICODE_CHECK_ENABLED */
++/* global MOZ_APP_VENDOR, MOZ_APP_BASENAME */
++/* global MOZ_VERIFY_MAR_SIGNATURE, IS_AUTHENTICODE_CHECK_ENABLED */
+ load("../data/xpcshellConstantsPP.js");
+ 
+-function getLogSuffix() {
+-  if (IS_WIN) {
+-    return "_win";
+-  }
+-  if (IS_MACOSX) {
+-    return "_mac";
+-  }
+-  return "_linux";
+-}
+-
+-ChromeUtils.import("resource://gre/modules/Services.jsm", this);
+-
+-const DIR_MACOS = IS_MACOSX ? "Contents/MacOS/" : "";
+-const DIR_RESOURCES = IS_MACOSX ? "Contents/Resources/" : "";
+-const TEST_FILE_SUFFIX = IS_MACOSX ? "_mac" : "";
++const DIR_MACOS = AppConstants.platform == "macosx" ? "Contents/MacOS/" : "";
++const DIR_RESOURCES = AppConstants.platform == "macosx" ? "Contents/Resources/" : "";
++const TEST_FILE_SUFFIX = AppConstants.platform == "macosx" ? "_mac" : "";
+ const FILE_COMPLETE_MAR = "complete" + TEST_FILE_SUFFIX + ".mar";
+ const FILE_PARTIAL_MAR = "partial" + TEST_FILE_SUFFIX + ".mar";
+ const FILE_COMPLETE_PRECOMPLETE = "complete_precomplete" + TEST_FILE_SUFFIX;
+ const FILE_PARTIAL_PRECOMPLETE = "partial_precomplete" + TEST_FILE_SUFFIX;
+ const FILE_COMPLETE_REMOVEDFILES = "complete_removed-files" + TEST_FILE_SUFFIX;
+ const FILE_PARTIAL_REMOVEDFILES = "partial_removed-files" + TEST_FILE_SUFFIX;
+ const FILE_UPDATE_IN_PROGRESS_LOCK = "updated.update_in_progress.lock";
+-const COMPARE_LOG_SUFFIX = getLogSuffix();
++const COMPARE_LOG_SUFFIX = "_" + mozinfo.os;
+ const LOG_COMPLETE_SUCCESS = "complete_log_success" + COMPARE_LOG_SUFFIX;
+ const LOG_PARTIAL_SUCCESS = "partial_log_success" + COMPARE_LOG_SUFFIX;
+ const LOG_PARTIAL_FAILURE = "partial_log_failure" + COMPARE_LOG_SUFFIX;
+ const LOG_REPLACE_SUCCESS = "replace_log_success";
+ 
+-const USE_EXECV = IS_UNIX && !IS_MACOSX;
++const USE_EXECV = AppConstants.platform == "linux";
+ 
+ const URL_HOST = "http://localhost";
+ 
+-const FILE_APP_BIN = MOZ_APP_NAME + APP_BIN_SUFFIX;
++const APP_INFO_NAME = "XPCShell";
++const APP_INFO_VENDOR = "Mozilla";
++
++const APP_BIN_SUFFIX = AppConstants.platform == "linux" ? "-bin" : mozinfo.bin_suffix;
++const FILE_APP_BIN = AppConstants.MOZ_APP_NAME + APP_BIN_SUFFIX;
+ const FILE_COMPLETE_EXE = "complete.exe";
+-const FILE_HELPER_BIN = "TestAUSHelper" + BIN_SUFFIX;
++const FILE_HELPER_BIN = "TestAUSHelper" + mozinfo.bin_suffix;
+ const FILE_MAINTENANCE_SERVICE_BIN = "maintenanceservice.exe";
+ const FILE_MAINTENANCE_SERVICE_INSTALLER_BIN = "maintenanceservice_installer.exe";
+ const FILE_OLD_VERSION_MAR = "old_version.mar";
+ const FILE_PARTIAL_EXE = "partial.exe";
+-const FILE_UPDATER_BIN = "updater" + BIN_SUFFIX;
++const FILE_UPDATER_BIN = "updater" + mozinfo.bin_suffix;
+ const FILE_WRONG_CHANNEL_MAR = "wrong_product_channel.mar";
+ 
+ const PERFORMING_STAGED_UPDATE = "Performing a staged update";
+ const CALL_QUIT = "calling QuitProgressUI";
+ const ERR_UPDATE_IN_PROGRESS = "Update already in progress! Exiting";
+ const ERR_RENAME_FILE = "rename_file: failed to rename file";
+ const ERR_ENSURE_COPY = "ensure_copy: failed to copy the file";
+ const ERR_UNABLE_OPEN_DEST = "unable to open destination file";
+@@ -119,17 +116,17 @@ const HELPER_SLEEP_TIMEOUT = 180;
+ // the test will try to kill it.
+ const APP_TIMER_TIMEOUT = 120000;
+ 
+ // How many of do_timeout calls using FILE_IN_USE_TIMEOUT_MS to wait before the
+ // test is aborted.
+ const FILE_IN_USE_MAX_TIMEOUT_RUNS = 60;
+ const FILE_IN_USE_TIMEOUT_MS = 1000;
+ 
+-const PIPE_TO_NULL = IS_WIN ? ">nul" : "> /dev/null 2>&1";
++const PIPE_TO_NULL = AppConstants.platform == "win" ? ">nul" : "> /dev/null 2>&1";
+ 
+ const LOG_FUNCTION = info;
+ 
+ const gHTTPHandlerPath = "updates.xml";
+ 
+ // This default value will be overridden when using the http server.
+ var gURLData = URL_HOST + "/";
+ 
+@@ -156,19 +153,19 @@ var gHandle;
+ var gGREDirOrig;
+ var gGREBinDirOrig;
+ var gAppDirOrig;
+ 
+ var gPIDPersistProcess;
+ 
+ // Variables are used instead of contants so tests can override these values if
+ // necessary.
+-var gCallbackBinFile = "callback_app" + BIN_SUFFIX;
++var gCallbackBinFile = "callback_app" + mozinfo.bin_suffix;
+ var gCallbackArgs = ["./", "callback.log", "Test Arg 2", "Test Arg 3"];
+-var gPostUpdateBinFile = "postup_app" + BIN_SUFFIX;
++var gPostUpdateBinFile = "postup_app" + mozinfo.bin_suffix;
+ var gSvcOriginalLogContents;
+ // Some update staging failures can remove the update. This allows tests to
+ // specify that the status file and the active update should not be checked
+ // after an update is staged.
+ var gStagingRemovedUpdate = false;
+ 
+ var gTimeoutRuns = 0;
+ var gFileInUseTimeoutRuns = 0;
+@@ -182,24 +179,23 @@ var gEnvDyldLibraryPath;
+ var gEnvLdLibraryPath;
+ var gASanOptions;
+ 
+ // Set to true to log additional information for debugging. To log additional
+ // information for an individual test set DEBUG_AUS_TEST to true in the test's
+ // run_test function.
+ var DEBUG_AUS_TEST = true;
+ 
++const URL_HTTP_UPDATE_SJS = "http://test_details/";
+ const DATA_URI_SPEC = Services.io.newFileURI(do_get_file("../data", false)).spec;
+ /* import-globals-from ../data/shared.js */
+ Services.scriptloader.loadSubScript(DATA_URI_SPEC + "shared.js", this);
+ 
+ XPCOMUtils.defineLazyModuleGetter(this, "ctypes",
+                                   "resource://gre/modules/ctypes.jsm");
+-XPCOMUtils.defineLazyModuleGetter(this, "MockRegistrar",
+-                                  "resource://testing-common/MockRegistrar.jsm");
+ 
+ var gTestFiles = [];
+ var gTestDirs = [];
+ 
+ // Common files for both successful and failed updates.
+ var gTestFilesCommon = [
+   {
+     description: "Should never change",
+@@ -800,22 +796,20 @@ function setupTestCommon() {
+       // existing test directory (bug 1294196).
+       gTestID += "_new";
+       logTestInfo("using a new directory for the test by changing gTestID " +
+                   "since there is an existing test directory that can't be " +
+                   "removed, gTestID: " + gTestID);
+     }
+   }
+ 
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     Services.prefs.setBoolPref(PREF_APP_UPDATE_SERVICE_ENABLED, !!IS_SERVICE_TEST);
+   }
+ 
+-  // adjustGeneralPaths registers a cleanup function that calls end_test when
+-  // it is defined as a function.
+   adjustGeneralPaths();
+   // Logged once here instead of in the mock directory provider to lessen test
+   // log spam.
+   debugDump("Updates Directory (UpdRootD) Path: " + getMockUpdRootD().path);
+ 
+   // This prevents a warning about not being able to find the greprefs.js file
+   // from being logged.
+   let grePrefsFile = getGREDir();
+@@ -826,17 +820,17 @@ function setupTestCommon() {
+   if (!grePrefsFile.exists()) {
+     grePrefsFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, PERMS_FILE);
+   }
+ 
+   // Remove the updates directory on Windows and Mac OS X which is located
+   // outside of the application directory after the call to adjustGeneralPaths
+   // has set it up. Since the test hasn't ran yet and the directory shouldn't
+   // exist this is non-fatal for the test.
+-  if (IS_WIN || IS_MACOSX) {
++  if (AppConstants.platform == "win" || AppConstants.platform == "macosx") {
+     let updatesDir = getMockUpdRootD();
+     if (updatesDir.exists()) {
+       debugDump("attempting to remove directory. Path: " + updatesDir.path);
+       try {
+         removeDirRecursive(updatesDir);
+       } catch (e) {
+         logTestInfo("non-fatal error removing directory. Path: " +
+                     updatesDir.path + ", Exception: " + e);
+@@ -863,22 +857,22 @@ function cleanupTestCommon() {
+   // shutdown of app update runs without throwing or leaking. The observer
+   // method is used directly instead of calling notifyObservers so components
+   // outside of the scope of this test don't assert and thereby cause app update
+   // tests to fail.
+   gAUS.observe(null, "quit-application", "");
+ 
+   gTestserver = null;
+ 
+-  if (IS_UNIX) {
++  if (AppConstants.platform == "macosx" || AppConstants.platform == "linux") {
+     // This will delete the launch script if it exists.
+     getLaunchScript();
+   }
+ 
+-  if (IS_WIN && MOZ_APP_BASENAME) {
++  if (AppConstants.platform == "win" && MOZ_APP_BASENAME) {
+     let appDir = getApplyDirFile(null, true);
+     let vendor = MOZ_APP_VENDOR ? MOZ_APP_VENDOR : "Mozilla";
+     const REG_PATH = "SOFTWARE\\" + vendor + "\\" + MOZ_APP_BASENAME +
+                      "\\TaskBarIDs";
+     let key = Cc["@mozilla.org/windows-registry-key;1"].
+               createInstance(Ci.nsIWindowsRegKey);
+     try {
+       key.open(Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE, REG_PATH,
+@@ -895,29 +889,29 @@ function cleanupTestCommon() {
+         key.removeValue(appDir.path);
+       }
+     } catch (e) {
+     }
+   }
+ 
+   // The updates directory is located outside of the application directory and
+   // needs to be removed on Windows and Mac OS X.
+-  if (IS_WIN || IS_MACOSX) {
++  if (AppConstants.platform == "win" || AppConstants.platform == "macosx") {
+     let updatesDir = getMockUpdRootD();
+     // Try to remove the directory used to apply updates. Since the test has
+     // already finished this is non-fatal for the test.
+     if (updatesDir.exists()) {
+       debugDump("attempting to remove directory. Path: " + updatesDir.path);
+       try {
+         removeDirRecursive(updatesDir);
+       } catch (e) {
+         logTestInfo("non-fatal error removing directory. Path: " +
+                     updatesDir.path + ", Exception: " + e);
+       }
+-      if (IS_MACOSX) {
++      if (AppConstants.platform == "macosx") {
+         let updatesRootDir = gUpdatesRootDir.clone();
+         while (updatesRootDir.path != updatesDir.path) {
+           if (updatesDir.exists()) {
+             debugDump("attempting to remove directory. Path: " +
+                       updatesDir.path);
+             try {
+               // Try to remove the directory without the recursive flag set
+               // since the top level directory has already had its contents
+@@ -1072,32 +1066,32 @@ function preventDistributionFiles() {
+ }
+ 
+ /**
+  * On Mac OS X this sets the last modified time for the app bundle directory to
+  * a date in the past to test that the last modified time is updated when an
+  * update has been successfully applied (bug 600098).
+  */
+ function setAppBundleModTime() {
+-  if (!IS_MACOSX) {
++  if (AppConstants.platform != "macosx") {
+     return;
+   }
+   let now = Date.now();
+   let yesterday = now - (1000 * 60 * 60 * 24);
+   let applyToDir = getApplyDirFile();
+   applyToDir.lastModifiedTime = yesterday;
+ }
+ 
+ /**
+  * On Mac OS X this checks that the last modified time for the app bundle
+  * directory has been updated when an update has been successfully applied
+  * (bug 600098).
+  */
+ function checkAppBundleModTime() {
+-  if (!IS_MACOSX) {
++  if (AppConstants.platform != "macosx") {
+     return;
+   }
+   let now = Date.now();
+   let applyToDir = getApplyDirFile();
+   let timeDiff = Math.abs(applyToDir.lastModifiedTime - now);
+   Assert.ok(timeDiff < MAC_MAX_TIME_DIFFERENCE,
+             "the last modified time on the apply to directory should " +
+             "change after a successful update");
+@@ -1201,17 +1195,17 @@ function waitForUpdateXMLFiles(aActiveUp
+ /**
+  * On Mac OS X and Windows this checks if the post update '.running' file exists
+  * to determine if the post update binary was launched.
+  *
+  * @param   aShouldExist
+  *          Whether the post update '.running' file should exist.
+  */
+ function checkPostUpdateRunningFile(aShouldExist) {
+-  if (!IS_WIN && !IS_MACOSX) {
++  if (AppConstants.platform == "linux") {
+     return;
+   }
+   let postUpdateRunningFile = getPostUpdateFile(".running");
+   if (aShouldExist) {
+     Assert.ok(postUpdateRunningFile.exists(),
+               MSG_SHOULD_EXIST + getMsgPath(postUpdateRunningFile.path));
+   } else {
+     Assert.ok(!postUpdateRunningFile.exists(),
+@@ -1310,17 +1304,17 @@ function getApplyDirFile(aRelPath, aAllo
+  *          Whether the file must exist. If false or not specified the file must
+  *          exist or the function will throw.
+  * @return  The nsIFile for the file in the directory where the update will be
+  *          staged.
+  * @throws  If aAllowNonexistent is not specified or is false and the file or
+  *          directory does not exist.
+  */
+ function getStageDirFile(aRelPath, aAllowNonexistent) {
+-  if (IS_MACOSX) {
++  if (AppConstants.platform == "macosx") {
+     let file = getMockUpdRootD();
+     file.append(DIR_UPDATES);
+     file.append(DIR_PATCH);
+     file.append(DIR_UPDATED);
+     if (aRelPath) {
+       let pathParts = aRelPath.split("/");
+       for (let i = 0; i < pathParts.length; i++) {
+         if (pathParts[i]) {
+@@ -1369,19 +1363,20 @@ function getTestDirFile(aRelPath, aAllow
+   return do_get_file(relpath, !!aAllowNonExists);
+ }
+ 
+ /**
+  * Helper function for getting the nsIFile for the maintenance service
+  * directory on Windows.
+  *
+  * @return  The nsIFile for the maintenance service directory.
++ * @throws  If called from a platform other than Windows.
+  */
+ function getMaintSvcDir() {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   const CSIDL_PROGRAM_FILES = 0x26;
+   const CSIDL_PROGRAM_FILESX86 = 0x2A;
+   // This will return an empty string on our Win XP build systems.
+   let maintSvcDir = getSpecialFolderDir(CSIDL_PROGRAM_FILESX86);
+   if (maintSvcDir) {
+@@ -1409,17 +1404,17 @@ function getMaintSvcDir() {
+  * passed.
+  *
+  * @param   aCSIDL
+  *          The CSIDL for the Windows special folder.
+  * @return  The nsIFile for the Windows special folder.
+  * @throws  If called from a platform other than Windows.
+  */
+ function getSpecialFolderDir(aCSIDL) {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   let lib = ctypes.open("shell32");
+   let SHGetSpecialFolderPath = lib.declare("SHGetSpecialFolderPathW",
+                                            ctypes.winapi_abi,
+                                            ctypes.bool, /* bool(return) */
+                                            ctypes.int32_t, /* HWND hwndOwner */
+@@ -1437,17 +1432,17 @@ function getSpecialFolderDir(aCSIDL) {
+   }
+   debugDump("SHGetSpecialFolderPath returned path: " + path);
+   let dir = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
+   dir.initWithPath(path);
+   return dir;
+ }
+ 
+ XPCOMUtils.defineLazyGetter(this, "gInstallDirPathHash", function test_gIDPH() {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   if (!MOZ_APP_BASENAME) {
+     return null;
+   }
+ 
+   let vendor = MOZ_APP_VENDOR ? MOZ_APP_VENDOR : "Mozilla";
+@@ -1474,59 +1469,61 @@ XPCOMUtils.defineLazyGetter(this, "gInst
+     logTestInfo("failed to create registry key. Registry Path: " + REG_PATH +
+                 ", Key Name: " + appDir.path + ", Key Value: " + gTestID +
+                 ", Exception " + e);
+   }
+   return null;
+ });
+ 
+ XPCOMUtils.defineLazyGetter(this, "gLocalAppDataDir", function test_gLADD() {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   const CSIDL_LOCAL_APPDATA = 0x1c;
+   return getSpecialFolderDir(CSIDL_LOCAL_APPDATA);
+ });
+ 
+ XPCOMUtils.defineLazyGetter(this, "gProgFilesDir", function test_gPFD() {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   const CSIDL_PROGRAM_FILES = 0x26;
+   return getSpecialFolderDir(CSIDL_PROGRAM_FILES);
+ });
+ 
+ /**
+  * Helper function for getting the update root directory used by the tests. This
+  * returns the same directory as returned by nsXREDirProvider::GetUpdateRootDir
+  * in nsXREDirProvider.cpp so an application will be able to find the update
+  * when running a test that launches the application.
+  */
+ function getMockUpdRootD() {
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     return getMockUpdRootDWin();
+   }
+ 
+-  if (IS_MACOSX) {
++  if (AppConstants.platform == "macosx") {
+     return getMockUpdRootDMac();
+   }
+ 
+   return getApplyDirFile(DIR_MACOS, true);
+ }
+ 
+ /**
+  * Helper function for getting the update root directory used by the tests. This
+  * returns the same directory as returned by nsXREDirProvider::GetUpdateRootDir
+  * in nsXREDirProvider.cpp so an application will be able to find the update
+  * when running a test that launches the application.
++ *
++ *  @throws  If called from a platform other than Windows.
+  */
+ function getMockUpdRootDWin() {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   let localAppDataDir = gLocalAppDataDir.clone();
+   let progFilesDir = gProgFilesDir.clone();
+   let appDir = Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsIFile).parent;
+ 
+   let appDirPath = appDir.path;
+@@ -1560,17 +1557,17 @@ function getMockUpdRootDWin() {
+ 
+   let updatesDir = Cc["@mozilla.org/file/local;1"].
+                    createInstance(Ci.nsIFile);
+   updatesDir.initWithPath(localAppDataDir.path + "\\" + relPathUpdates);
+   return updatesDir;
+ }
+ 
+ XPCOMUtils.defineLazyGetter(this, "gUpdatesRootDir", function test_gURD() {
+-  if (!IS_MACOSX) {
++  if (AppConstants.platform != "macosx") {
+     do_throw("Mac OS X only function called by a different platform!");
+   }
+ 
+   let dir = Services.dirsvc.get("ULibDir", Ci.nsIFile);
+   dir.append("Caches");
+   if (MOZ_APP_VENDOR || MOZ_APP_BASENAME) {
+     dir.append(MOZ_APP_VENDOR ? MOZ_APP_VENDOR : MOZ_APP_BASENAME);
+   } else {
+@@ -1582,17 +1579,17 @@ XPCOMUtils.defineLazyGetter(this, "gUpda
+ 
+ /**
+  * Helper function for getting the update root directory used by the tests. This
+  * returns the same directory as returned by nsXREDirProvider::GetUpdateRootDir
+  * in nsXREDirProvider.cpp so an application will be able to find the update
+  * when running a test that launches the application.
+  */
+ function getMockUpdRootDMac() {
+-  if (!IS_MACOSX) {
++  if (AppConstants.platform != "macosx") {
+     do_throw("Mac OS X only function called by a different platform!");
+   }
+ 
+   let appDir = Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsIFile).
+                parent.parent.parent;
+   let appDirPath = appDir.path;
+   appDirPath = appDirPath.substr(0, appDirPath.length - 4);
+ 
+@@ -1604,19 +1601,20 @@ function getMockUpdRootDMac() {
+ }
+ 
+ /**
+  * Creates an update in progress lock file in the specified directory on
+  * Windows.
+  *
+  * @param   aDir
+  *          The nsIFile for the directory where the lock file should be created.
++ * @throws  If called from a platform other than Windows.
+  */
+ function createUpdateInProgressLockFile(aDir) {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   let file = aDir.clone();
+   file.append(FILE_UPDATE_IN_PROGRESS_LOCK);
+   file.create(file.NORMAL_FILE_TYPE, 0o444);
+   file.QueryInterface(Ci.nsILocalFileWin);
+   file.fileAttributesWin |= file.WFA_READONLY;
+@@ -1628,19 +1626,20 @@ function createUpdateInProgressLockFile(
+ }
+ 
+ /**
+  * Removes an update in progress lock file in the specified directory on
+  * Windows.
+  *
+  * @param   aDir
+  *          The nsIFile for the directory where the lock file is located.
++ * @throws  If called from a platform other than Windows.
+  */
+ function removeUpdateInProgressLockFile(aDir) {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   let file = aDir.clone();
+   file.append(FILE_UPDATE_IN_PROGRESS_LOCK);
+   file.QueryInterface(Ci.nsILocalFileWin);
+   file.fileAttributesWin |= file.WFA_READWRITE;
+   file.fileAttributesWin &= ~file.WFA_READONLY;
+@@ -1685,28 +1684,28 @@ function copyTestUpdaterToBinDir() {
+ 
+ /**
+  * Copies the test updater to the location where it will be launched to apply an
+  * update and returns the nsIFile for the copied test updater.
+  *
+  * @return  nsIFIle for the copied test updater.
+  */
+ function copyTestUpdaterForRunUsingUpdater() {
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     return copyTestUpdaterToBinDir();
+   }
+ 
+   let testUpdater = getTestUpdater();
+   let updater = getUpdatesPatchDir();
+   updater.append(testUpdater.leafName);
+   if (!updater.exists()) {
+     testUpdater.copyToFollowingLinks(updater.parent, updater.leafName);
+   }
+ 
+-  if (IS_MACOSX) {
++  if (AppConstants.platform == "macosx") {
+     updater.append("Contents");
+     updater.append("MacOS");
+     updater.append("org.mozilla.updater");
+   }
+   return updater;
+ }
+ 
+ /**
+@@ -2057,17 +2056,17 @@ function stageUpdate(aCheckSvcLog) {
+  * Checks that the update state is correct as well as the expected files are
+  * present after staging and update for updater tests and then calls
+  * stageUpdateFinished.
+  *
+  * @param   aUpdateState
+  *          The update state received by the observer notification.
+  */
+ function checkUpdateStagedState(aUpdateState) {
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     if (IS_SERVICE_TEST) {
+       waitForServiceStop(false);
+     } else {
+       let updater = getApplyDirFile(FILE_UPDATER_BIN, true);
+       if (isFileInUse(updater)) {
+         do_timeout(FILE_IN_USE_TIMEOUT_MS,
+                    checkUpdateStagedState.bind(null, aUpdateState));
+         return;
+@@ -2121,19 +2120,20 @@ function checkUpdateStagedState(aUpdateS
+   executeSoon(stageUpdateFinished);
+ }
+ 
+ /**
+  * Helper function to check whether the maintenance service updater tests should
+  * run. See bug 711660 for more details.
+  *
+  * @return true if the test should run and false if it shouldn't.
++ * @throws  If called from a platform other than Windows.
+  */
+ function shouldRunServiceTest() {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   let binDir = getGREBinDir();
+   let updaterBin = binDir.clone();
+   updaterBin.append(FILE_UPDATER_BIN);
+   Assert.ok(updaterBin.exists(),
+             MSG_SHOULD_EXIST + ", leafName: " + updaterBin.leafName);
+@@ -2256,17 +2256,17 @@ function setupAppFiles() {
+   let appFiles = [{relPath: FILE_APP_BIN,
+                    inGreDir: false},
+                   {relPath: FILE_APPLICATION_INI,
+                    inGreDir: true},
+                   {relPath: "dependentlibs.list",
+                    inGreDir: true}];
+ 
+   // On Linux the updater.png must also be copied
+-  if (IS_UNIX && !IS_MACOSX) {
++  if (AppConstants.platform == "linux") {
+     appFiles.push({relPath: "icons/updater.png",
+                    inGreDir: true});
+   }
+ 
+   // Read the dependent libs file leafnames from the dependentlibs.list file
+   // into the array.
+   let deplibsFile = gGREDirOrig.clone();
+   deplibsFile.append("dependentlibs.list");
+@@ -2318,17 +2318,17 @@ function copyFileToTestAppDir(aFileRelPa
+   let pathParts = fileRelPath.split("/");
+   for (let i = 0; i < pathParts.length; i++) {
+     if (pathParts[i]) {
+       srcFile.append(pathParts[i]);
+       destFile.append(pathParts[i]);
+     }
+   }
+ 
+-  if (IS_MACOSX && !srcFile.exists()) {
++  if (AppConstants.platform == "macosx" && !srcFile.exists()) {
+     debugDump("unable to copy file since it doesn't exist! Checking if " +
+               fileRelPath + ".app exists. Path: " + srcFile.path);
+     // gGREDirOrig and gGREBinDirOrig must always be cloned when changing its
+     // properties
+     srcFile = aInGreDir ? gGREDirOrig.clone() : gGREBinDirOrig.clone();
+     destFile = aInGreDir ? getGREDir() : getGREBinDir();
+     for (let i = 0; i < pathParts.length; i++) {
+       if (pathParts[i]) {
+@@ -2352,21 +2352,21 @@ function copyFileToTestAppDir(aFileRelPa
+         srcFile.copyToFollowingLinks(destFile.parent, destFile.leafName);
+       } catch (e) {
+         // Just in case it is partially copied
+         if (destFile.exists()) {
+           try {
+             destFile.remove(true);
+           } catch (ex) {
+             logTestInfo("unable to remove file that failed to copy! Path: " +
+-                        destFile.path);
++                        destFile.path + ", Exception: " + ex);
+           }
+         }
+         do_throw("Unable to copy file! Path: " + srcFile.path +
+-                 ", Exception: " + ex);
++                 ", Exception: " + e);
+       }
+     }
+   } else {
+     try {
+       if (destFile.exists()) {
+         destFile.remove(false);
+       }
+       let ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
+@@ -2388,19 +2388,20 @@ function copyFileToTestAppDir(aFileRelPa
+  * Attempts to upgrade the maintenance service if permissions are allowed.
+  * This is useful for XP where we have permission to upgrade in case an
+  * older service installer exists.  Also if the user manually installed into
+  * a unprivileged location.
+  *
+  * @return true if the installed service is from this build. If the installed
+  *         service is not from this build the test will fail instead of
+  *         returning false.
++ * @throws  If called from a platform other than Windows.
+  */
+ function attemptServiceInstall() {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   let maintSvcDir = getMaintSvcDir();
+   Assert.ok(maintSvcDir.exists(),
+             MSG_SHOULD_EXIST + ", leafName: " + maintSvcDir.leafName);
+   let oldMaintSvcBin = maintSvcDir.clone();
+   oldMaintSvcBin.append(FILE_MAINTENANCE_SERVICE_BIN);
+@@ -2437,35 +2438,39 @@ function attemptServiceInstall() {
+   }
+ 
+   return true;
+ }
+ 
+ /**
+  * Waits for the applications that are launched by the maintenance service to
+  * stop.
++ *
++ * @throws  If called from a platform other than Windows.
+  */
+ function waitServiceApps() {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   // maintenanceservice_installer.exe is started async during updates.
+   waitForApplicationStop("maintenanceservice_installer.exe");
+   // maintenanceservice_tmp.exe is started async from the service installer.
+   waitForApplicationStop("maintenanceservice_tmp.exe");
+   // In case the SCM thinks the service is stopped, but process still exists.
+   waitForApplicationStop("maintenanceservice.exe");
+ }
+ 
+ /**
+  * Waits for the maintenance service to stop.
++ *
++ * @throws  If called from a platform other than Windows.
+  */
+ function waitForServiceStop(aFailTest) {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   waitServiceApps();
+   debugDump("waiting for the maintenance service to stop if necessary");
+   // Use the helper bin to ensure the service is stopped. If not stopped, then
+   // wait for the service to stop (at most 120 seconds).
+   let args = ["wait-for-service-stop", "MozillaMaintenance", "120"];
+@@ -2485,19 +2490,20 @@ function waitForServiceStop(aFailTest) {
+   waitServiceApps();
+ }
+ 
+ /**
+  * Waits for the specified application to stop.
+  *
+  * @param   aApplication
+  *          The application binary name to wait until it has stopped.
++ * @throws  If called from a platform other than Windows.
+  */
+ function waitForApplicationStop(aApplication) {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   debugDump("waiting for " + aApplication + " to stop if necessary");
+   // Use the helper bin to ensure the application is stopped. If not stopped,
+   // then wait for it to stop (at most 120 seconds).
+   let args = ["wait-for-application-exit", aApplication, "120"];
+   let exitValue = runTestHelperSync(args);
+@@ -2512,17 +2518,17 @@ function waitForApplicationStop(aApplica
+  * in turn launches a binary used for the test (e.g. application, updater,
+  * etc.). A shell is used so debug console output can be redirected to a file so
+  * it doesn't end up in the test log.
+  *
+  * @return nsIFile for the shell binary to launch using nsIProcess.
+  */
+ function getLaunchBin() {
+   let launchBin;
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     launchBin = Services.dirsvc.get("WinD", Ci.nsIFile);
+     launchBin.append("System32");
+     launchBin.append("cmd.exe");
+   } else {
+     launchBin = Cc["@mozilla.org/file/local;1"].
+                 createInstance(Ci.nsIFile);
+     launchBin.initWithPath("/bin/sh");
+   }
+@@ -2533,19 +2539,20 @@ function getLaunchBin() {
+ }
+ 
+ 
+ /**
+  * Locks a Windows directory.
+  *
+  * @param   aDirPath
+  *          The test file object that describes the file to make in use.
++ * @throws  If called from a platform other than Windows.
+  */
+ function lockDirectory(aDirPath) {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   debugDump("start - locking installation directory");
+   const LPCWSTR = ctypes.char16_t.ptr;
+   const DWORD = ctypes.uint32_t;
+   const LPVOID = ctypes.voidptr_t;
+   const GENERIC_READ = 0x80000000;
+@@ -2642,17 +2649,17 @@ function runHelperLockFile(aTestFile) {
+   // Exclusively lock an existing file so it is in use during the update.
+   let helperBin = getTestDirFile(FILE_HELPER_BIN);
+   let helperDestDir = getApplyDirFile(DIR_RESOURCES);
+   helperBin.copyTo(helperDestDir, FILE_HELPER_BIN);
+   helperBin = getApplyDirFile(DIR_RESOURCES + FILE_HELPER_BIN);
+   // Strip off the first two directories so the path has to be from the helper's
+   // working directory.
+   let lockFileRelPath = aTestFile.relPathDir.split("/");
+-  if (IS_MACOSX) {
++  if (AppConstants.platform == "macosx") {
+     lockFileRelPath = lockFileRelPath.slice(2);
+   }
+   lockFileRelPath = lockFileRelPath.join("/") + "/" + aTestFile.fileName;
+   let args = [getApplyDirPath() + DIR_RESOURCES, "input", "output", "-s",
+               HELPER_SLEEP_TIMEOUT, lockFileRelPath];
+   let helperProcess = Cc["@mozilla.org/process/util;1"].
+                         createInstance(Ci.nsIProcess);
+   helperProcess.init(helperBin);
+@@ -2791,17 +2798,17 @@ function setupUpdaterTest(aMarFile, aPos
+       } else {
+         testFile = getApplyDirFile(aTestFile.relPathDir + aTestFile.fileName,
+                                    true);
+         writeFile(testFile, aTestFile.originalContents);
+       }
+ 
+       // Skip these tests on Windows since chmod doesn't really set permissions
+       // on Windows.
+-      if (!IS_WIN && aTestFile.originalPerms) {
++      if (AppConstants.platform != "win" && aTestFile.originalPerms) {
+         testFile.permissions = aTestFile.originalPerms;
+         // Store the actual permissions on the file for reference later after
+         // setting the permissions.
+         if (!aTestFile.comparePerms) {
+           aTestFile.comparePerms = testFile.permissions;
+         }
+       }
+     }
+@@ -2883,17 +2890,17 @@ function createUpdaterINI(aIsExeAsync, a
+     if (aIsExeAsync) {
+       exeAsync = "ExeAsync=true\n";
+     } else {
+       exeArg = "ExeArg=post-update-sync\n";
+       exeAsync = "ExeAsync=false\n";
+     }
+   }
+ 
+-  if (aExeRelPathPrefix && IS_WIN) {
++  if (AppConstants.platform == "win" && aExeRelPathPrefix) {
+     aExeRelPathPrefix = aExeRelPathPrefix.replace("/", "\\");
+   }
+ 
+   let exeRelPathMac = "ExeRelPath=" + aExeRelPathPrefix + DIR_RESOURCES +
+                       gPostUpdateBinFile + "\n";
+   let exeRelPathWin = "ExeRelPath=" + aExeRelPathPrefix + gPostUpdateBinFile + "\n";
+   let updaterIniContents = "[Strings]\n" +
+                            "Title=Update Test\n" +
+@@ -2933,30 +2940,30 @@ function getMsgPath(aPath) {
+  *          The update log file's contents.
+  * @return  the log contents with the paths replaced.
+  */
+ function replaceLogPaths(aLogContents) {
+   let logContents = aLogContents;
+   // Remove the majority of the path up to the test directory. This is needed
+   // since Assert.equal won't print long strings to the test logs.
+   let testDirPath = do_get_file(gTestID, false).path;
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     // Replace \\ with \\\\ so the regexp works.
+     testDirPath = testDirPath.replace(/\\/g, "\\\\");
+   }
+   logContents = logContents.replace(new RegExp(testDirPath, "g"),
+                                     "<test_dir_path>/" + gTestID);
+   let updatesDirPath = getMockUpdRootD().path;
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     // Replace \\ with \\\\ so the regexp works.
+     updatesDirPath = updatesDirPath.replace(/\\/g, "\\\\");
+   }
+   logContents = logContents.replace(new RegExp(updatesDirPath, "g"),
+                                     "<update_dir_path>/" + gTestID);
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     // Replace \ with /
+     logContents = logContents.replace(/\\/g, "/");
+   }
+   return logContents;
+ }
+ 
+ /**
+  * Helper function for updater binary tests for verifying the contents of the
+@@ -2969,17 +2976,17 @@ function replaceLogPaths(aLogContents) {
+  * @param   aReplace
+  *          If the update log file is for a replace update.
+  * @param   aExcludeDistDir
+  *          Removes lines containing the distribution directory from the log
+  *          file to compare the update log with.
+  */
+ function checkUpdateLogContents(aCompareLogFile, aStaged = false,
+                                 aReplace = false, aExcludeDistDir = false) {
+-  if (IS_UNIX) {
++  if (AppConstants.platform == "macosx" || AppConstants.platform == "linux") {
+     // The order that files are returned when enumerating the file system on
+     // Linux and Mac is not deterministic so skip checking the logs.
+     return;
+   }
+ 
+   let updateLog = getUpdateLog(FILE_LAST_UPDATE_LOG);
+   let updateLogContents = readFileBytes(updateLog);
+ 
+@@ -3001,17 +3008,17 @@ function checkUpdateLogContents(aCompare
+   // These could be changed to relative paths using <test_dir_path> and
+   // <update_dir_path>
+   updateLogContents = updateLogContents.replace(/PATCH DIRECTORY.*/g, "");
+   updateLogContents = updateLogContents.replace(/INSTALLATION DIRECTORY.*/g, "");
+   updateLogContents = updateLogContents.replace(/WORKING DIRECTORY.*/g, "");
+   // Skip lines that log failed attempts to open the callback executable.
+   updateLogContents = updateLogContents.replace(/NS_main: callback app file .*/g, "");
+ 
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     // The FindFile results when enumerating the filesystem on Windows is not
+     // determistic so the results matching the following need to be fixed.
+     let re = new RegExp("([^\n]* 7\/7text1[^\n]*)\n" +
+                         "([^\n]* 7\/7text0[^\n]*)\n", "g");
+     updateLogContents = updateLogContents.replace(re, "$2\n$1\n");
+   }
+ 
+   if (aReplace) {
+@@ -3133,17 +3140,17 @@ function checkFilesAfterUpdateSuccess(aG
+     let testFile = aGetFileFunc(aTestFile.relPathDir + aTestFile.fileName, true);
+     debugDump("testing file: " + testFile.path);
+     if (aTestFile.compareFile || aTestFile.compareContents) {
+       Assert.ok(testFile.exists(),
+                 MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+ 
+       // Skip these tests on Windows since chmod doesn't really set permissions
+       // on Windows.
+-      if (!IS_WIN && aTestFile.comparePerms) {
++      if (AppConstants.platform != "win" && aTestFile.comparePerms) {
+         // Check if the permssions as set in the complete mar file are correct.
+         Assert.equal(testFile.permissions & 0xfff,
+                      aTestFile.comparePerms & 0xfff,
+                      "the file permissions" + MSG_SHOULD_EQUAL);
+       }
+ 
+       let fileContents1 = readFileBytes(testFile);
+       let fileContents2 = aTestFile.compareFile ?
+@@ -3232,17 +3239,17 @@ function checkFilesAfterUpdateFailure(aG
+     let testFile = aGetFileFunc(aTestFile.relPathDir + aTestFile.fileName, true);
+     debugDump("testing file: " + testFile.path);
+     if (aTestFile.compareFile || aTestFile.compareContents) {
+       Assert.ok(testFile.exists(),
+                 MSG_SHOULD_EXIST + getMsgPath(testFile.path));
+ 
+       // Skip these tests on Windows since chmod doesn't really set permissions
+       // on Windows.
+-      if (!IS_WIN && aTestFile.comparePerms) {
++      if (AppConstants.platform != "win" && aTestFile.comparePerms) {
+         // Check the original permssions are retained on the file.
+         Assert.equal(testFile.permissions & 0xfff,
+                      aTestFile.comparePerms & 0xfff,
+                      "the file permissions" + MSG_SHOULD_EQUAL);
+       }
+ 
+       let fileContents1 = readFileBytes(testFile);
+       let fileContents2 = aTestFile.compareFile ?
+@@ -3320,17 +3327,18 @@ function checkFilesAfterUpdateCommon(aGe
+   if (aStageDirExists) {
+     Assert.ok(stageDir.exists(),
+               MSG_SHOULD_EXIST + getMsgPath(stageDir.path));
+   } else {
+     Assert.ok(!stageDir.exists(),
+               MSG_SHOULD_NOT_EXIST + getMsgPath(stageDir.path));
+   }
+ 
+-  let toBeDeletedDirExists = IS_WIN ? aToBeDeletedDirExists : false;
++  let toBeDeletedDirExists =
++    AppConstants.platform == "win" ? aToBeDeletedDirExists : false;
+   let toBeDeletedDir = getApplyDirFile(DIR_TOBEDELETED, true);
+   if (toBeDeletedDirExists) {
+     Assert.ok(toBeDeletedDir.exists(),
+               MSG_SHOULD_EXIST + getMsgPath(toBeDeletedDir.path));
+   } else {
+     Assert.ok(!toBeDeletedDir.exists(),
+               MSG_SHOULD_NOT_EXIST + getMsgPath(toBeDeletedDir.path));
+   }
+@@ -3426,17 +3434,17 @@ function getPostUpdateFile(aSuffix) {
+ }
+ 
+ /**
+  * Checks the contents of the updater post update binary log. When completed
+  * checkPostUpdateAppLogFinished will be called.
+  */
+ function checkPostUpdateAppLog() {
+   // Only Mac OS X and Windows support post update.
+-  if (IS_MACOSX || IS_WIN) {
++  if (AppConstants.platform == "macosx" || AppConstants.platform == "win") {
+     gTimeoutRuns++;
+     let postUpdateLog = getPostUpdateFile(".log");
+     if (!postUpdateLog.exists()) {
+       debugDump("postUpdateLog does not exist. Path: " + postUpdateLog.path);
+       if (gTimeoutRuns > MAX_TIMEOUT_RUNS) {
+         do_throw("Exceeded MAX_TIMEOUT_RUNS while waiting for the post update " +
+                  "process to create the post update log. Path: " +
+                  postUpdateLog.path);
+@@ -3471,19 +3479,20 @@ function checkPostUpdateAppLog() {
+  * a file and attempting to delete the original file. If the deletion is
+  * successful the copy of the original file is renamed to the original file's
+  * name and if the deletion is not successful the copy of the original file is
+  * deleted.
+  *
+  * @param   aFile
+  *          An nsIFile for the file to be checked if it is in use.
+  * @return  true if the file can't be deleted and false otherwise.
++ * @throws  If called from a platform other than Windows.
+  */
+ function isFileInUse(aFile) {
+-  if (!IS_WIN) {
++  if (AppConstants.platform != "win") {
+     do_throw("Windows only function called by a different platform!");
+   }
+ 
+   if (!aFile.exists()) {
+     debugDump("file does not exist, path: " + aFile.path);
+     return false;
+   }
+ 
+@@ -3512,17 +3521,17 @@ function isFileInUse(aFile) {
+   return true;
+ }
+ 
+ /**
+  * Waits until files that are in use that break tests are no longer in use and
+  * then calls doTestFinish to end the test.
+  */
+ function waitForFilesInUse() {
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     let fileNames = [FILE_APP_BIN, FILE_UPDATER_BIN,
+                      FILE_MAINTENANCE_SERVICE_INSTALLER_BIN];
+     for (let i = 0; i < fileNames.length; ++i) {
+       let file = getApplyDirFile(fileNames[i], true);
+       if (isFileInUse(file)) {
+         do_timeout(FILE_IN_USE_TIMEOUT_MS, waitForFilesInUse);
+         return;
+       }
+@@ -3580,17 +3589,16 @@ function checkFilesInDirRecursive(aDir, 
+ /**
+  * Helper function to override the update prompt component to verify whether it
+  * is called or not.
+  *
+  * @param   aCallback
+  *          The callback to call if the update prompt component is called.
+  */
+ function overrideUpdatePrompt(aCallback) {
+-  ChromeUtils.import("resource://testing-common/MockRegistrar.jsm");
+   MockRegistrar.register("@mozilla.org/updates/update-prompt;1", UpdatePrompt, [aCallback]);
+ }
+ 
+ function UpdatePrompt(aCallback) {
+   this._callback = aCallback;
+ 
+   let fns = ["checkForUpdates", "showUpdateAvailable", "showUpdateDownloaded",
+              "showUpdateError", "showUpdateHistory", "showUpdateInstalled"];
+@@ -3735,17 +3743,17 @@ function stop_httpserver(aCallback) {
+  *          The version of the application
+  * @param   aPlatformVersion
+  *          The gecko version of the application
+  */
+ function createAppInfo(aID, aName, aVersion, aPlatformVersion) {
+   const XULAPPINFO_CONTRACTID = "@mozilla.org/xre/app-info;1";
+   const XULAPPINFO_CID = Components.ID("{c763b610-9d49-455a-bbd2-ede71682a1ac}");
+   let ifaces = [Ci.nsIXULAppInfo, Ci.nsIXULRuntime];
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     ifaces.push(Ci.nsIWinAppHelper);
+   }
+   const XULAppInfo = {
+     vendor: APP_INFO_VENDOR,
+     name: aName,
+     ID: aID,
+     version: aVersion,
+     appBuildID: "2007010101",
+@@ -3799,17 +3807,17 @@ function getProcessArgs(aExtraArgs) {
+   }
+ 
+   let appBinPath = getApplyDirFile(DIR_MACOS + FILE_APP_BIN, false).path;
+   if (/ /.test(appBinPath)) {
+     appBinPath = '"' + appBinPath + '"';
+   }
+ 
+   let args;
+-  if (IS_UNIX) {
++  if (AppConstants.platform == "macosx" || AppConstants.platform == "linux") {
+     let launchScript = getLaunchScript();
+     // Precreate the script with executable permissions
+     launchScript.create(Ci.nsIFile.NORMAL_FILE_TYPE, PERMS_DIRECTORY);
+ 
+     let scriptContents = "#! /bin/sh\n";
+     scriptContents += appBinPath + " -no-remote -test-process-updates " +
+                       aExtraArgs.join(" ") + " " + PIPE_TO_NULL;
+     writeFile(launchScript, scriptContents);
+@@ -3927,22 +3935,16 @@ function adjustGeneralPaths() {
+         kernel32.close();
+         gHandle = null;
+         debugDump("finish - closing handle");
+       } catch (e) {
+         debugDump("call to CloseHandle failed. Exception: " + e);
+       }
+     }
+ 
+-    // Call end_test first before the directory provider is unregistered
+-    if (typeof end_test == typeof Function) {
+-      debugDump("calling end_test");
+-      end_test();
+-    }
+-
+     ds.unregisterProvider(dirProvider);
+     cleanupTestCommon();
+ 
+     debugDump("finish - unregistering directory provider");
+   });
+ }
+ 
+ /**
+@@ -3990,17 +3992,17 @@ function runUpdateUsingApp(aExpectedStat
+       executeSoon(afterAppExits);
+     },
+     QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
+   };
+ 
+   function afterAppExits() {
+     gTimeoutRuns++;
+ 
+-    if (IS_WIN) {
++    if (AppConstants.platform == "win") {
+       waitForApplicationStop(FILE_UPDATER_BIN);
+     }
+ 
+     let status;
+     try {
+       status = readStatusFile();
+     } catch (e) {
+       logTestInfo("error reading status file, exception: " + e);
+@@ -4187,17 +4189,17 @@ IncrementalDownload.prototype = {
+   QueryInterface: XPCOMUtils.generateQI([Ci.nsIIncrementalDownload])
+ };
+ 
+ /**
+  * Sets the environment that will be used by the application process when it is
+  * launched.
+  */
+ function setEnvironment() {
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     // The tests use nsIProcess to launch the updater and it is simpler to just
+     // set an environment variable and have the test updater set the current
+     // working directory than it is to set the current working directory in the
+     // test itself.
+     gEnv.set("CURWORKDIRPATH", getApplyDirFile().path);
+   }
+ 
+   // Prevent setting the environment more than once.
+@@ -4210,29 +4212,29 @@ function setEnvironment() {
+   // See bug 1279108.
+   if (gEnv.exists("ASAN_OPTIONS")) {
+     gASanOptions = gEnv.get("ASAN_OPTIONS");
+     gEnv.set("ASAN_OPTIONS", gASanOptions + ":detect_leaks=0");
+   } else {
+     gEnv.set("ASAN_OPTIONS", "detect_leaks=0");
+   }
+ 
+-  if (IS_WIN && !gEnv.exists("XRE_NO_WINDOWS_CRASH_DIALOG")) {
++  if (AppConstants.platform == "win" && !gEnv.exists("XRE_NO_WINDOWS_CRASH_DIALOG")) {
+     gAddedEnvXRENoWindowsCrashDialog = true;
+     debugDump("setting the XRE_NO_WINDOWS_CRASH_DIALOG environment " +
+               "variable to 1... previously it didn't exist");
+     gEnv.set("XRE_NO_WINDOWS_CRASH_DIALOG", "1");
+   }
+ 
+-  if (IS_UNIX) {
++  if (AppConstants.platform == "macosx" || AppConstants.platform == "linux") {
+     let appGreBinDir = gGREBinDirOrig.clone();
+     let envGreBinDir = Cc["@mozilla.org/file/local;1"].
+                        createInstance(Ci.nsIFile);
+     let shouldSetEnv = true;
+-    if (IS_MACOSX) {
++    if (AppConstants.platform == "macosx") {
+       if (gEnv.exists("DYLD_LIBRARY_PATH")) {
+         gEnvDyldLibraryPath = gEnv.get("DYLD_LIBRARY_PATH");
+         envGreBinDir.initWithPath(gEnvDyldLibraryPath);
+         if (envGreBinDir.path == appGreBinDir.path) {
+           gEnvDyldLibraryPath = null;
+           shouldSetEnv = false;
+         }
+       }
+@@ -4309,18 +4311,18 @@ function resetEnvironment() {
+     debugDump("setting the XPCOM_DEBUG_BREAK environment variable back to " +
+               gEnvXPCOMDebugBreak);
+     gEnv.set("XPCOM_DEBUG_BREAK", gEnvXPCOMDebugBreak);
+   } else if (gEnv.exists("XPCOM_DEBUG_BREAK")) {
+     debugDump("clearing the XPCOM_DEBUG_BREAK environment variable");
+     gEnv.set("XPCOM_DEBUG_BREAK", "");
+   }
+ 
+-  if (IS_UNIX) {
+-    if (IS_MACOSX) {
++  if (AppConstants.platform == "macosx" || AppConstants.platform == "linux") {
++    if (AppConstants.platform == "macosx") {
+       if (gEnvDyldLibraryPath) {
+         debugDump("setting DYLD_LIBRARY_PATH environment variable value " +
+                   "back to " + gEnvDyldLibraryPath);
+         gEnv.set("DYLD_LIBRARY_PATH", gEnvDyldLibraryPath);
+       } else if (gEnvDyldLibraryPath !== null) {
+         debugDump("removing DYLD_LIBRARY_PATH environment variable");
+         gEnv.set("DYLD_LIBRARY_PATH", "");
+       }
+@@ -4329,17 +4331,17 @@ function resetEnvironment() {
+                 "to " + gEnvLdLibraryPath);
+       gEnv.set("LD_LIBRARY_PATH", gEnvLdLibraryPath);
+     } else if (gEnvLdLibraryPath !== null) {
+       debugDump("removing LD_LIBRARY_PATH environment variable");
+       gEnv.set("LD_LIBRARY_PATH", "");
+     }
+   }
+ 
+-  if (IS_WIN && gAddedEnvXRENoWindowsCrashDialog) {
++  if (AppConstants.platform == "win" && gAddedEnvXRENoWindowsCrashDialog) {
+     debugDump("removing the XRE_NO_WINDOWS_CRASH_DIALOG environment " +
+               "variable");
+     gEnv.set("XRE_NO_WINDOWS_CRASH_DIALOG", "");
+   }
+ 
+   if (IS_SERVICE_TEST) {
+     debugDump("removing MOZ_NO_SERVICE_FALLBACK environment variable");
+     gEnv.set("MOZ_NO_SERVICE_FALLBACK", "");
+diff --git a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js.1525858.later b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js.1525858.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js.1525858.later
+@@ -0,0 +1,58 @@
++--- xpcshellUtilsAUS.js
+++++ xpcshellUtilsAUS.js
++@@ -1511,35 +1503,35 @@ XPCOMUtils.defineLazyGetter(this, "gInst
++                 ", Exception " + e);
++     do_throw("Unable to write HKLM or HKCU TaskBarIDs registry key, key path: "
++              + REG_PATH);
++   }
++   return null;
++ });
++ 
++ XPCOMUtils.defineLazyGetter(this, "gLocalAppDataDir", function test_gLADD() {
++   if (AppConstants.platform != "win") {
++     do_throw("Windows only function called by a different platform!");
++   }
++ 
++   const CSIDL_LOCAL_APPDATA = 0x1c;
++   return getSpecialFolderDir(CSIDL_LOCAL_APPDATA);
++ });
++ 
++ XPCOMUtils.defineLazyGetter(this, "gCommonAppDataDir", function test_gCDD() {
++-  if (!IS_WIN) {
+++  if (AppConstants.platform != "win") {
++     do_throw("Windows only function called by a different platform!");
++   }
++ 
++   const CSIDL_COMMON_APPDATA = 0x0023;
++   return getSpecialFolderDir(CSIDL_COMMON_APPDATA);
++ });
++ 
++ XPCOMUtils.defineLazyGetter(this, "gProgFilesDir", function test_gPFD() {
++   if (AppConstants.platform != "win") {
++     do_throw("Windows only function called by a different platform!");
++   }
++ 
++   const CSIDL_PROGRAM_FILES = 0x26;
++   return getSpecialFolderDir(CSIDL_PROGRAM_FILES);
++ });
++ 
++ /**
++@@ -1593,17 +1587,17 @@ function getMockUpdRootDWin(aGetOldLocat
++   let updatesDir = Cc["@mozilla.org/file/local;1"].
++                    createInstance(Ci.nsIFile);
++   updatesDir.initWithPath(dataDirectory.path + "\\" + relPathUpdates);
++   return updatesDir;
++ }
++ 
++ function createWorldWritableAppUpdateDir() {
++   // This function is only necessary in Windows
++-  if (IS_WIN) {
+++  if (AppConstants.platform == "win") {
++     let installDir = Services.dirsvc.get(XRE_EXECUTABLE_FILE, Ci.nsIFile).parent;
++     let exitValue = runTestHelperSync(["create-update-dir", installDir.path]);
++     Assert.equal(exitValue, 0, "The helper process exit value should be 0");
++   }
++ }
++ 
++ XPCOMUtils.defineLazyGetter(this, "gUpdatesRootDir", function test_gURD() {
++   if (AppConstants.platform != "macosx") {
+diff --git a/toolkit/mozapps/update/tests/moz.build b/toolkit/mozapps/update/tests/moz.build
+--- a/toolkit/mozapps/update/tests/moz.build
++++ b/toolkit/mozapps/update/tests/moz.build
+@@ -35,18 +35,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
+     OS_LIBS += [
+         'shlwapi',
+       ]
+ 
+ USE_LIBS += [
+     'updatecommon',
+ ]
+ 
+-for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_DISPLAYNAME',
+-            'MOZ_APP_VENDOR', 'BIN_SUFFIX', 'MOZ_DEBUG'):
++for var in ('MOZ_APP_VENDOR', 'MOZ_APP_BASENAME'):
+     DEFINES[var] = CONFIG[var]
+ 
+ DEFINES['NS_NO_XPCOM'] = True
+ 
+ DisableStlWrapping()
+ 
+ if CONFIG['MOZ_MAINTENANCE_SERVICE']:
+     DEFINES['MOZ_MAINTENANCE_SERVICE'] = CONFIG['MOZ_MAINTENANCE_SERVICE']
+diff --git a/toolkit/mozapps/update/tests/unit_aus_update/ausReadStrings.js b/toolkit/mozapps/update/tests/unit_aus_update/ausReadStrings.js
+--- a/toolkit/mozapps/update/tests/unit_aus_update/ausReadStrings.js
++++ b/toolkit/mozapps/update/tests/unit_aus_update/ausReadStrings.js
+@@ -1,14 +1,14 @@
+ /* Any copyright is dedicated to the Public Domain.
+  * http://creativecommons.org/publicdomain/zero/1.0/
+  */
+ 
+-const BIN_DIR = (IS_WIN ? "test_bug473417-ó" : "test_bug473417");
+-const BIN_EXE = "TestAUSReadStrings" + BIN_SUFFIX;
++const BIN_DIR = (AppConstants.platform == "win" ? "test_bug473417-ó" : "test_bug473417");
++const BIN_EXE = "TestAUSReadStrings" + mozinfo.bin_suffix;
+ const tempdir = do_get_tempdir();
+ 
+ function run_test() {
+   let workdir = tempdir.clone();
+   workdir.append(BIN_DIR);
+ 
+   let paths = [
+     BIN_EXE,
+diff --git a/toolkit/mozapps/update/tests/unit_aus_update/canCheckForAndCanApplyUpdates.js b/toolkit/mozapps/update/tests/unit_aus_update/canCheckForAndCanApplyUpdates.js
+--- a/toolkit/mozapps/update/tests/unit_aus_update/canCheckForAndCanApplyUpdates.js
++++ b/toolkit/mozapps/update/tests/unit_aus_update/canCheckForAndCanApplyUpdates.js
+@@ -10,17 +10,17 @@ function run_test() {
+   debugDump("testing write access to the application directory");
+   let testFile = getCurrentProcessDir();
+   testFile.append("update_write_access_test");
+   testFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, PERMS_FILE);
+   Assert.ok(testFile.exists(), MSG_SHOULD_EXIST);
+   testFile.remove(false);
+   Assert.ok(!testFile.exists(), MSG_SHOULD_NOT_EXIST);
+ 
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     // Create a mutex to prevent being able to check for or apply updates.
+     debugDump("attempting to create mutex");
+     let handle = createMutex(getPerInstallationMutexName());
+     Assert.ok(!!handle, "the update mutex should have been created");
+ 
+     // Check if available updates cannot be checked for when there is a mutex
+     // for this installation.
+     Assert.ok(!gAUS.canCheckForUpdates, "should not be able to check for " +
+@@ -35,17 +35,17 @@ function run_test() {
+     closeHandle(handle);
+   }
+ 
+   // Check if available updates can be checked for
+   Assert.ok(gAUS.canCheckForUpdates, "should be able to check for updates");
+   // Check if updates can be applied
+   Assert.ok(gAUS.canApplyUpdates, "should be able to apply updates");
+ 
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     // Attempt to create a mutex when application update has already created one
+     // with the same name.
+     debugDump("attempting to create mutex");
+     let handle = createMutex(getPerInstallationMutexName());
+ 
+     Assert.ok(!handle, "should not be able to create the update mutex when " +
+               "the application has created the update mutex");
+   }
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/head_update.js.1525858.later b/toolkit/mozapps/update/tests/unit_base_updater/head_update.js.1525858.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/mozapps/update/tests/unit_base_updater/head_update.js.1525858.later
+@@ -0,0 +1,15 @@
++--- head_update.js
+++++ head_update.js
++@@ -1,12 +1,8 @@
++ /* Any copyright is dedicated to the Public Domain.
++  * http://creativecommons.org/publicdomain/zero/1.0/
++  */
++ 
++ const IS_SERVICE_TEST = false;
++ 
++ /* import-globals-from ../data/xpcshellUtilsAUS.js */
++ load("xpcshellUtilsAUS.js");
++-
++-XPCOMUtils.defineLazyModuleGetters(this, {
++-  AppConstants: "resource://gre/modules/AppConstants.jsm",
++-});
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFilePathTooLongFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFilePathTooLongFailure.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFilePathTooLongFailure.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgCallbackFilePathTooLongFailure.js
+@@ -17,17 +17,17 @@ function run_test() {
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   let path = "123456789";
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     path = "\\" + path;
+     path = path.repeat(30); // 300 characters
+     path = "C:" + path;
+   } else {
+     path = "/" + path;
+     path = path.repeat(1000); // 10000 characters
+   }
+ 
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTooLongFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTooLongFailure.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTooLongFailure.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTooLongFailure.js
+@@ -19,17 +19,17 @@ function run_test() {
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   let path = "123456789";
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     path = "\\" + path;
+     path = path.repeat(30); // 300 characters
+     path = "C:" + path;
+   } else {
+     path = "/" + path;
+     path = path.repeat(1000); // 10000 characters
+   }
+ 
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTraversalFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTraversalFailure.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTraversalFailure.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgInstallDirPathTraversalFailure.js
+@@ -19,17 +19,17 @@ function run_test() {
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   let path = "123456789";
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     path = "C:\\" + path + "\\..\\" + path;
+   } else {
+     path = "/" + path + "/../" + path;
+   }
+ 
+   runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
+ }
+ 
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgPatchDirPathTraversalFailure.js b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgPatchDirPathTraversalFailure.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/invalidArgPatchDirPathTraversalFailure.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/invalidArgPatchDirPathTraversalFailure.js
+@@ -18,17 +18,17 @@ function run_test() {
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   let path = getUpdatesPatchDir();
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     path = path + "\\..\\";
+   } else {
+     path = path + "/../";
+   }
+ 
+   runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
+ }
+ 
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageSuccessComplete_unix.js b/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageSuccessComplete_unix.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageSuccessComplete_unix.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/marAppInUseStageSuccessComplete_unix.js
+@@ -79,17 +79,17 @@ function waitForUpdateXMLFilesFinished()
+   checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
+   checkCallbackLog();
+ }
+ 
+ /**
+  * Setup symlinks for the test.
+  */
+ function setupSymLinks() {
+-  if (IS_UNIX) {
++  if (AppConstants.platform == "macosx" || AppConstants.platform == "linux") {
+     removeSymlink();
+     createSymlink();
+     registerCleanupFunction(removeSymlink);
+     gTestFiles.splice(gTestFiles.length - 3, 0,
+       {
+         description: "Readable symlink",
+         fileName: "link",
+         relPathDir: DIR_RESOURCES,
+@@ -102,12 +102,12 @@ function setupSymLinks() {
+       });
+   }
+ }
+ 
+ /**
+  * Checks the state of the symlinks for the test.
+  */
+ function checkSymLinks() {
+-  if (IS_UNIX) {
++  if (AppConstants.platform == "macosx" || AppConstants.platform == "linux") {
+     checkSymlink();
+   }
+ }
+diff --git a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js b/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js
+--- a/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js
++++ b/toolkit/mozapps/update/tests/unit_base_updater/marStageSuccessComplete.js
+@@ -67,17 +67,17 @@ function waitForUpdateXMLFilesFinished()
+ }
+ 
+ /**
+  * Setup symlinks for the test.
+  */
+ function setupSymLinks() {
+   // Don't test symlinks on Mac OS X in this test since it tends to timeout.
+   // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
+-  if (IS_UNIX && !IS_MACOSX) {
++  if (AppConstants.platform == "linux") {
+     removeSymlink();
+     createSymlink();
+     registerCleanupFunction(removeSymlink);
+     gTestFiles.splice(gTestFiles.length - 3, 0,
+       {
+         description: "Readable symlink",
+         fileName: "link",
+         relPathDir: DIR_RESOURCES,
+@@ -92,12 +92,12 @@ function setupSymLinks() {
+ }
+ 
+ /**
+  * Checks the state of the symlinks for the test.
+  */
+ function checkSymLinks() {
+   // Don't test symlinks on Mac OS X in this test since it tends to timeout.
+   // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
+-  if (IS_UNIX && !IS_MACOSX) {
++  if (AppConstants.platform == "linux") {
+     checkSymlink();
+   }
+ }
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/head_update.js.1525858.later b/toolkit/mozapps/update/tests/unit_service_updater/head_update.js.1525858.later
+new file mode 100644
+--- /dev/null
++++ b/toolkit/mozapps/update/tests/unit_service_updater/head_update.js.1525858.later
+@@ -0,0 +1,15 @@
++--- head_update.js
+++++ head_update.js
++@@ -1,12 +1,8 @@
++ /* Any copyright is dedicated to the Public Domain.
++  * http://creativecommons.org/publicdomain/zero/1.0/
++  */
++ 
++ const IS_SERVICE_TEST = true;
++ 
++ /* import-globals-from ../data/xpcshellUtilsAUS.js */
++ load("xpcshellUtilsAUS.js");
++-
++-XPCOMUtils.defineLazyModuleGetters(this, {
++-  AppConstants: "resource://gre/modules/AppConstants.jsm",
++-});
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTooLongFailureSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTooLongFailureSvc.js
+--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTooLongFailureSvc.js
++++ b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTooLongFailureSvc.js
+@@ -19,17 +19,17 @@ function run_test() {
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   let path = "123456789";
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     path = "\\" + path;
+     path = path.repeat(30); // 300 characters
+     path = "C:" + path;
+   } else {
+     path = "/" + path;
+     path = path.repeat(1000); // 10000 characters
+   }
+ 
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTraversalFailureSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTraversalFailureSvc.js
+--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTraversalFailureSvc.js
++++ b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgInstallDirPathTraversalFailureSvc.js
+@@ -19,17 +19,17 @@ function run_test() {
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   let path = "123456789";
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     path = "C:\\" + path + "\\..\\" + path;
+   } else {
+     path = "/" + path + "/../" + path;
+   }
+ 
+   runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
+ }
+ 
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgPatchDirPathTraversalFailureSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgPatchDirPathTraversalFailureSvc.js
+--- a/toolkit/mozapps/update/tests/unit_service_updater/invalidArgPatchDirPathTraversalFailureSvc.js
++++ b/toolkit/mozapps/update/tests/unit_service_updater/invalidArgPatchDirPathTraversalFailureSvc.js
+@@ -18,17 +18,17 @@ function run_test() {
+   setupUpdaterTest(FILE_COMPLETE_MAR, false);
+ }
+ 
+ /**
+  * Called after the call to setupUpdaterTest finishes.
+  */
+ function setupUpdaterTestFinished() {
+   let path = getUpdatesPatchDir();
+-  if (IS_WIN) {
++  if (AppConstants.platform == "win") {
+     path = path + "\\..\\";
+   } else {
+     path = path + "/../";
+   }
+ 
+   runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
+ }
+ 
+diff --git a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js b/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js
+--- a/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js
++++ b/toolkit/mozapps/update/tests/unit_service_updater/marStageSuccessCompleteSvc.js
+@@ -67,17 +67,17 @@ function waitForUpdateXMLFilesFinished()
+ }
+ 
+ /**
+  * Setup symlinks for the test.
+  */
+ function setupSymLinks() {
+   // Don't test symlinks on Mac OS X in this test since it tends to timeout.
+   // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
+-  if (IS_UNIX && !IS_MACOSX) {
++  if (AppConstants.platform == "linux") {
+     removeSymlink();
+     createSymlink();
+     registerCleanupFunction(removeSymlink);
+     gTestFiles.splice(gTestFiles.length - 3, 0,
+       {
+         description: "Readable symlink",
+         fileName: "link",
+         relPathDir: DIR_RESOURCES,
+@@ -92,12 +92,12 @@ function setupSymLinks() {
+ }
+ 
+ /**
+  * Checks the state of the symlinks for the test.
+  */
+ function checkSymLinks() {
+   // Don't test symlinks on Mac OS X in this test since it tends to timeout.
+   // It is tested on Mac OS X in marAppInUseStageSuccessComplete_unix.js
+-  if (IS_UNIX && !IS_MACOSX) {
++  if (AppConstants.platform == "linux") {
+     checkSymlink();
+   }
+ }

+ 23 - 0
mozilla-release/patches/series

@@ -7205,25 +7205,48 @@ TOP-1909743-nsstyle-prefers-color-scheme-25320.patch
 TOP-NOBUG-nsstyle-prefers-contrast.patch
 TOP-NOBUG-nsstyle-prefers-reduced-motion.patch
 TOP-1909714-NSS3904-11514.patch
+1391079-2-57a1.patch
+1363897-2-57a1.patch
+1401814-58a1.patch
+1392913-58a1.patch
 1406662-1only-59a1.patch
+1414450-59a1.patch
+1404823-59a1.patch
+1427155-59a1.patch
+1426566-3-PARTIAL-59a1.patch
 1431477-1-60a1.patch
 1431477-2-60a1.patch
+1403005-1-60a1.patch
+1403005-2-60a1.patch
 1433517-60a1.patch
 1446270-61a1.patch
 1447442-12-61a1.patch
 1456552-62a1.patch
+1461964-62a1.patch
+1467285-62a1.patch
 1476333-1-63a1.patch
 1476333-2-63a1.patch
 1478128-63a1.patch
 1480004-63a1.patch
 1481864-63a1.patch
 1484759-63a1.patch
+1473786-1-64a1.patch
+1473786-2-64a1.patch
+1491233-64a1.patch
+1489484-64a1.patch
 1483780-1-64a1.patch
 1483780-2-64a1.patch
+1493414-64a1.patch
+1409739-1-64a1.patch
+1409739-2-64a1.patch
+1409739-3-64a1.patch
+1504878-65a1.patch
 1508547-1-65a1.patch
 1508547-2-65a1.patch
 1359905-65a1.patch
 1517077-66a1.patch
 1520149-66a1.patch
 1521133-66a1.patch
+1524142-67a1.patch
+1525858-67a1.patch
 TOP-NOBUG-blockquad0-25319.patch