Browse Source

sync a bit with wip

Frank-Rainer Grahl 5 months ago
parent
commit
d45a592e54

+ 1 - 1
comm-release/patches/TOP-1816667-cc-25316.patch → comm-release/patches/1816667-cc-25316.patch

@@ -2,7 +2,7 @@
 # User Frank-Rainer Grahl <frgrahl@gmx.net>
 # Date 1676923164 -3600
 # Parent  f7ac72bacc04fcc93ae2f60f86bd0f2a8837a165
-Bug 1816667 - Set minimum required macOS version back to 10.11 for now. cc part. r=me a=me
+Bug 1816667 - Set minimum required macOS version back to 10.11. cc part. r=me a=me
 
 diff --git a/mail/app/macbuild/Contents/Info.plist.in b/mail/app/macbuild/Contents/Info.plist.in
 --- a/mail/app/macbuild/Contents/Info.plist.in

+ 2 - 2
comm-release/patches/9999999-offlineappcachehelper-25319.patch → comm-release/patches/1896292-offlineappcachehelper-25319.patch

@@ -1,8 +1,8 @@
 # HG changeset patch
 # User Frank-Rainer Grahl <frgrahl@gmx.net>
 # Date 1715417656 -7200
-# Parent  19a55fbac1d4023824761ac161ac721bd6880624
-Bug 9999999 - Use toolkits OfflineAppCacheHelper in sanitizer. r=IanN a=IanN
+# Parent  f5645bf932d15ede0abe62a7c9c319c9b527ebc0
+Bug 1896292 - Use toolkits OfflineAppCacheHelper in sanitizer. r=IanN a=IanN
 
 It was moved into toolkit from browser in Bug 1415342 so we can delete our copy.
 

+ 1 - 1
comm-release/patches/WIP-NOBUG-implement-about-seamonkey-comm.patch → comm-release/patches/9999999-about-seamonkey-25319.patch

@@ -1,7 +1,7 @@
 # HG changeset patch
 # User Bill Gianopoulos <wgianopoulos@gmail.com>
 # Date 1714559415 0
-NOBUG - Implement about:seamonkey.
+Bug 9999999 - Implement about:seamonkey. r=IanN a=IanN
 
 diff --git a/suite/base/content/aboutSeaMonkey.xhtml b/suite/base/content/aboutSeaMonkey.xhtml
 new file mode 100644

+ 0 - 0
comm-release/patches/TOP-NOBUG-dummyvenv-25316.patch → comm-release/patches/NOBUG-dummyvenv-25316.patch


+ 0 - 0
comm-release/patches/TOP-1378089-4-bookmarks-wip-25319.patch → comm-release/patches/TOP-1378089-4-WIP-bookmarks-25319.patch


+ 425 - 164
comm-release/patches/WIP-1687385-mozconfigs-v1_2-253.patch → comm-release/patches/WIP-1687385-mozconfigs-v2_0-253.patch

@@ -1,9 +1,246 @@
 # HG changeset patch
 # User Ian Neal <iann_cvs@blueyonder.co.uk>
 # Date 1611530270 0
-# Parent  5088f0b55162b9d6f51ea20e459b2a7beccdc1a3
+# Parent  6af958c2922d525f3b0618eab2e5eeb86b455b1f
 Bug 1687385 - Update SeaMonkey mozconfigs - mozconfigs part. r=frg a=frg
 
+diff --git a/suite/config/mozconfigs/common-win/make-release.sh b/suite/config/mozconfigs/common-win/make-release.sh
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/make-release.sh
+@@ -0,0 +1,85 @@
++pushd $SOURCEDIR
++
++mach build
++# read -p "Press any key to resume ..."
++mach buildsymbols
++
++pushd $MOZ_OBJDIR/dist/bin
++
++find ./ -type f -name "*.exe" -exec signwinbinary.sh {} \;
++find ./ -type f \( -iname "*.dll" ! -iname "api-ms-*.dll" ! -iname "d3dcompiler*.dll" ! -iname "msvcp*.dll" ! -iname "vcrun*.dll" \) -exec signwinbinary.sh {} \;
++
++popd
++
++mach build full-package
++
++signwinbinary.sh "$MOZ_OBJDIR/comm/suite/installer/windows/instgen/setup.exe"
++
++rm -f $MOZ_OBJDIR/dist/install/sea/seamonkey-$PACKAGE.en-US.$ARCH.installer.exe
++
++mach repackage installer --package-name seamonkey \
++                         --package  $MOZ_OBJDIR/dist/seamonkey-$PACKAGE.en-US.$ARCH.zip \
++                         --tag $SOURCEDIR/comm/suite/installer/windows/app.tag \
++                         --setupexe $MOZ_OBJDIR/comm/suite/installer/windows/instgen/setup.exe \
++                         --o $MOZ_OBJDIR/dist/install/sea/seamonkey-$PACKAGE.en-US.$ARCH.installer.exe \
++                         --sfx-stub $SOURCEDIR/comm/other-licenses/7zstub/seamonkey/7zSD.sfx
++
++signwinbinary.sh "$MOZ_OBJDIR/dist/install/sea/seamonkey-$PACKAGE.en-US.$ARCH.installer.exe"
++
++while read -r line || [[ -n "$line" ]]; do
++  # Skip linux and macOS entries.
++  if [[ "$line" == ja*linux ]] || [[ "$line" == ja-JP-mac* ]] ;
++  then
++    echo "l10n $line skipped"
++  else
++    # Fix up Windows entry.
++    if [[ "$line" == ja*win32 ]] ;
++    then
++      L10N=ja
++    else
++      L10N=$line
++    fi
++    echo $L10N
++
++    mach build installers-$L10N
++
++    # urgkkkk no way to sign helper.exe properly
++    # unpack sign and update
++    signwinbinary.sh "$MOZ_OBJDIR/dist/l10n-stage/seamonkey/uninstall/helper.exe"
++
++    pushd $MOZ_OBJDIR/dist/l10n-stage
++    7z a $MOZ_OBJDIR/dist/seamonkey-$PACKAGE.$L10N.$ARCH.zip seamonkey/uninstall/helper.exe
++    # 7z a $MOZ_OBJDIR/dist/install/sea/seamonkey-$PACKAGE.$L10N.$ARCH.installer.exe seamonkey/uninstall/helper.exe
++    popd
++
++    rm -f $MOZ_OBJDIR/dist/install/sea/seamonkey-$PACKAGE.$L10N.$ARCH.installer.exe
++
++    signwinbinary.sh "$MOZ_OBJDIR/comm/suite/installer/windows/l10ngen/setup.exe"
++
++    # Instead of doing an installer repack helper.exe and setup.exe could be updated directly but compression suffers.
++    # pushd $MOZ_OBJDIR/comm/suite/installer/windows/l10ngen
++    # 7z a $MOZ_OBJDIR/dist/install/sea/seamonkey-$PACKAGE.$L10N.$ARCH.installer.exe setup.exe
++    # popd
++
++    mach repackage installer --package-name seamonkey \
++                             --package  $MOZ_OBJDIR/dist/seamonkey-$PACKAGE.$L10N.$ARCH.zip \
++                             --tag $SOURCEDIR/comm/suite/installer/windows/app.tag \
++                             --setupexe $MOZ_OBJDIR/comm/suite/installer/windows/l10ngen/setup.exe \
++                             --o $MOZ_OBJDIR/dist/install/sea/seamonkey-$PACKAGE.$L10N.$ARCH.installer.exe \
++                             --sfx-stub $SOURCEDIR/comm/other-licenses/7zstub/seamonkey/7zSD.sfx
++
++    signwinbinary.sh "$MOZ_OBJDIR/dist/install/sea/seamonkey-$PACKAGE.$L10N.$ARCH.installer.exe"
++
++    mach build createmar-$L10N
++
++    # if [ $? -eq 0 ]
++    # then
++    #   echo "ok"
++    # else
++    #   echo "error"
++    #   exit 1
++    # fi
++  fi
++done < "$L10NSHIPPED"
++
++popd
+\ No newline at end of file
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-all-beta b/suite/config/mozconfigs/common-win/mozconfig.build-all-beta
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-all-beta
+@@ -0,0 +1,6 @@
++ac_add_options --enable-release
++ac_add_options --enable-update-channel=beta
++ac_add_options --enable-debug-symbols
++# tests are known broken and result in long compile times.
++ac_add_options --disable-tests
++ac_add_options --enable-optimize=-O2
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-all-common b/suite/config/mozconfigs/common-win/mozconfig.build-all-common
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-all-common
+@@ -0,0 +1,24 @@
++ac_add_options --enable-application=comm/suite
++
++ac_add_options --enable-calendar
++ac_add_options --enable-irc
++ac_add_options --enable-dominspector
++
++ac_add_options --with-google-location-service-api-keyfile=e:/builds/data/google-api.key
++ac_add_options --with-google-safebrowsing-api-keyfile=e:/builds/data/google-api.key
++
++mk_add_options "export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=e:/builds/data/crash-stats-api.token"
++
++# Needed to enable breakpad in application.ini
++export MOZILLA_OFFICIAL=1
++# Disable checking that add-ons are signed by the trusted root
++MOZ_ADDON_SIGNING=0
++# Disable enforcing that add-ons are signed by the trusted root
++MOZ_REQUIRE_SIGNING=0
++# Package js shell
++export MOZ_PACKAGE_JSSHELL=1
++
++export GECKO_HEAD_REPOSITORY=https://gitlab.com/seamonkey-project/seamonkey-2.53-mozilla
++# export GECKO_HEAD_REV=`git log | grep '^commit ' | head -1 | sed -e 's@commit @@'`
++export COMM_HEAD_REPOSITORY=https://gitlab.com/seamonkey-project/seamonkey-2.53-comm
++export MOZ_INCLUDE_SOURCE_INFO=1
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-all-common-beta b/suite/config/mozconfigs/common-win/mozconfig.build-all-common-beta
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-all-common-beta
+@@ -0,0 +1,3 @@
++ac_add_options --enable-debugqa
++# ac_add_options --with-crashreporter-url=https://crash-uploads-test.seamonkey-project.org/crashreports
++ac_add_options --with-crashreporter-url=https://seamonkey_project.bugsplat.com/post/bp/crash/postBP.php
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-all-common-release b/suite/config/mozconfigs/common-win/mozconfig.build-all-common-release
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-all-common-release
+@@ -0,0 +1,2 @@
++# ac_add_options --with-crashreporter-url=https://crash-uploads-test.seamonkey-project.org/crashreports
++ac_add_options --with-crashreporter-url=https://seamonkey_project.bugsplat.com/post/bp/crash/postBP.php
+\ No newline at end of file
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-all-compile b/suite/config/mozconfigs/common-win/mozconfig.build-all-compile
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-all-compile
+@@ -0,0 +1,3 @@
++mk_add_options MOZ_MAKE_FLAGS=-j4
++ac_add_options --enable-jemalloc
++ac_add_options --enable-js-shell
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-all-release b/suite/config/mozconfigs/common-win/mozconfig.build-all-release
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-all-release
+@@ -0,0 +1,6 @@
++ac_add_options --enable-release
++ac_add_options --enable-update-channel=release
++ac_add_options --enable-debug-symbols
++# tests are known broken and result in long compile times.
++ac_add_options --disable-tests
++ac_add_options --enable-optimize=-O2
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-x64-common b/suite/config/mozconfigs/common-win/mozconfig.build-x64-common
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-x64-common
+@@ -0,0 +1,2 @@
++ac_add_options --target=x86_64-pc-mingw32
++ac_add_options --host=x86_64-pc-mingw32
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-x64-redist b/suite/config/mozconfigs/common-win/mozconfig.build-x64-redist
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-x64-redist
+@@ -0,0 +1,2 @@
++export WIN32_REDIST_DIR=/e/builds/vs2019runtime/vc/redist/x64/Microsoft.VC142.CRT
++export WIN_UCRT_REDIST_DIR=/e/builds/vs2019runtime/ucrt/DLLs/x64
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-x86-common b/suite/config/mozconfigs/common-win/mozconfig.build-x86-common
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-x86-common
+@@ -0,0 +1,1 @@
++ac_add_options --target=i686-pc-mingw32
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.build-x86-redist b/suite/config/mozconfigs/common-win/mozconfig.build-x86-redist
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.build-x86-redist
+@@ -0,0 +1,2 @@
++export WIN32_REDIST_DIR=/e/builds/vs2019runtime/vc/redist/x86/Microsoft.VC142.CRT
++export WIN_UCRT_REDIST_DIR=/e/builds/vs2019runtime/ucrt/DLLs/x86
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.clang-all-compile b/suite/config/mozconfigs/common-win/mozconfig.clang-all-compile
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.clang-all-compile
+@@ -0,0 +1,6 @@
++CLANG_DIR=`cd "/e/builds/tools/clang/bin" ; pwd`
++export PATH="${CLANG_DIR}:${PATH}"
++
++export CC="clang-cl $FLAGS"
++export CXX="clang-cl $FLAGS"
++export LINKER="lld-link.exe"
+diff --git a/suite/config/mozconfigs/common-win/mozconfig.vs2019-all-compile b/suite/config/mozconfigs/common-win/mozconfig.vs2019-all-compile
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/mozconfig.vs2019-all-compile
+@@ -0,0 +1,3 @@
++ac_add_options --with-visual-studio-version=2019
++
++export CC=cl
+diff --git a/suite/config/mozconfigs/common-win/signwinbinary.sh b/suite/config/mozconfigs/common-win/signwinbinary.sh
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/common-win/signwinbinary.sh
+@@ -0,0 +1,19 @@
++# signwinbinary.sh
++
++# signtool sign with SHA256 command
++export SIGNTOOL="signtool.exe sign -tr http://timestamp.digicert.com -f $SIGNKEY -p $SIGNPSWD -fd sha256 -td sha256"
++
++signbinary() {
++  $SIGNTOOL $1
++
++  retVal=$?
++  if [ $retVal -ne 0 ]; then
++      echo "Signing error"
++      read -p "Press any key to continue ..."
++      exit $retVal
++  fi
++
++  sleep 4
++}
++
++signbinary "$1"
+\ No newline at end of file
 diff --git a/suite/config/mozconfigs/linux32/beta b/suite/config/mozconfigs/linux32/beta
 new file mode 100644
 --- /dev/null
@@ -501,6 +738,13 @@ deleted file mode 100644
 -
 -ac_add_options --enable-application=suite
 -ac_add_options --enable-calendar
+diff --git a/suite/config/mozconfigs/macosx64-aarch64/dummy.txt b/suite/config/mozconfigs/macosx64-aarch64/dummy.txt
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/macosx64-aarch64/dummy.txt
+@@ -0,0 +1,1 @@
++this config intentionally left blank
+\ No newline at end of file
 diff --git a/suite/config/mozconfigs/macosx64/release b/suite/config/mozconfigs/macosx64/beta
 copy from suite/config/mozconfigs/macosx64/release
 copy to suite/config/mozconfigs/macosx64/beta
@@ -927,34 +1171,12 @@ new file mode 100644
 +export MOZ_COMM_SOURCE_CHANGESET=2_53_6_final
 +export MOZ_COMM_SOURCE_REPO=https://gitlab.com/seamonkey-project/seamonkey-2.53-comm
 +export MOZ_INCLUDE_SOURCE_INFO=1
-diff --git a/suite/config/mozconfigs/mozconfig.win.common b/suite/config/mozconfigs/mozconfig.win.builder
-copy from suite/config/mozconfigs/mozconfig.win.common
-copy to suite/config/mozconfigs/mozconfig.win.builder
---- a/suite/config/mozconfigs/mozconfig.win.common
-+++ b/suite/config/mozconfigs/mozconfig.win.builder
-@@ -1,8 +1,14 @@
--# Common statements that are applicable to Windows x86 and x64.
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.win.common"
-+
-+# Common statements that are applicable to Windows x86 and x64 releases.
- 
--ac_add_options --with-google-location-service-api-keyfile=/builds/google-api.key
--ac_add_options --with-google-safebrowsing-api-keyfile=/builds/google-api.key
-+export INCLUDE="c:\builds\Outlook 2010 MAPI Headers"
-+
-+ac_add_options --with-google-location-service-api-keyfile=c:/data/google-api.key
-+ac_add_options --with-google-safebrowsing-api-keyfile=c:/data/google-api.key
- 
- # SeaMonkey uses the google api key for Geolocation services
- # See Bug 1352850 - Switch to Google for Geolocation services
- # ac_add_options --with-mozilla-api-keyfile=c:/builds/mozilla-desktop-geoloc-api.key
-+
-+mk_add_options "export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=c:/data/crash-stats-api.token"
 diff --git a/suite/config/mozconfigs/mozconfig.win.common b/suite/config/mozconfigs/mozconfig.win.common
+deleted file mode 100644
 --- a/suite/config/mozconfigs/mozconfig.win.common
-+++ b/suite/config/mozconfigs/mozconfig.win.common
-@@ -1,8 +1,1 @@
- # Common statements that are applicable to Windows x86 and x64.
++++ /dev/null
+@@ -1,8 +0,0 @@
+-# Common statements that are applicable to Windows x86 and x64.
 -
 -ac_add_options --with-google-location-service-api-keyfile=/builds/google-api.key
 -ac_add_options --with-google-safebrowsing-api-keyfile=/builds/google-api.key
@@ -962,65 +1184,11 @@ diff --git a/suite/config/mozconfigs/mozconfig.win.common b/suite/config/mozconf
 -# SeaMonkey uses the google api key for Geolocation services
 -# See Bug 1352850 - Switch to Google for Geolocation services
 -# ac_add_options --with-mozilla-api-keyfile=c:/builds/mozilla-desktop-geoloc-api.key
-diff --git a/suite/config/mozconfigs/win32/release b/suite/config/mozconfigs/win32/beta
-copy from suite/config/mozconfigs/win32/release
-copy to suite/config/mozconfigs/win32/beta
---- a/suite/config/mozconfigs/win32/release
-+++ b/suite/config/mozconfigs/win32/beta
-@@ -1,27 +1,6 @@
--. "$topsrcdir/build/mozconfig.win-common"
--. "$topsrcdir/build/mozconfig.common"
--. "$topsrcdir/suite/config/mozconfigs/mozconfig.win.common"
--. "$topsrcdir/build/mozconfig.stylo"
--
--ac_add_options --enable-application=suite
--ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
--ac_add_options --enable-official-branding
--ac_add_options --enable-jemalloc
--ac_add_options --enable-calendar
--
--# Needed to enable breakpad in application.ini
--export MOZILLA_OFFICIAL=1
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.win.builder"
-+. "$commtopsrcdir/suite/config/mozconfigs/win32/common"
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.release"
- 
--# Disable checking that add-ons are signed by the trusted root
--MOZ_ADDON_SIGNING=0
--# Disable enforcing that add-ons are signed by the trusted root
--MOZ_REQUIRE_SIGNING=0
--
--. $topsrcdir/build/win32/mozconfig.vs-latest
--
--# Package js shell
--export MOZ_PACKAGE_JSSHELL=1
--
--# Set up mapi includes (must be done after visual studio setup)
--export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
--mk_export_correct_style INCLUDE
-+ac_add_options --enable-debug-symbols
-+ac_add_options --disable-tests
-diff --git a/suite/config/mozconfigs/win32/common b/suite/config/mozconfigs/win32/common
-new file mode 100644
---- /dev/null
-+++ b/suite/config/mozconfigs/win32/common
-@@ -0,0 +1,12 @@
-+# Common statements that are applicable to Windows x86 releases.
-+CLANG_DIR=`cd "/e/builds/tools/clang/bin" ; pwd`
-+export PATH="${CLANG_DIR}:${PATH}"
-+
-+export CC="clang-cl $FLAGS"
-+export CXX="clang-cl $FLAGS"
-+export LINKER="lld-link.exe"
-+
-+ac_add_options --target=i686-pc-mingw32
-+
-+export WIN32_REDIST_DIR=/c/builds/vs2019runtime/vc/redist/x86/Microsoft.VC142.CRT
-+export WIN_UCRT_REDIST_DIR=/c/builds/vs2019runtime/ucrt/DLLs/x86
 diff --git a/suite/config/mozconfigs/win32/debug b/suite/config/mozconfigs/win32/debug
+deleted file mode 100644
 --- a/suite/config/mozconfigs/win32/debug
-+++ b/suite/config/mozconfigs/win32/debug
-@@ -1,24 +1,5 @@
++++ /dev/null
+@@ -1,24 +0,0 @@
 -. "$topsrcdir/build/mozconfig.win-common"
 -. "$topsrcdir/build/mozconfig.common"
 -. "$topsrcdir/build/mozconfig.stylo"
@@ -1031,10 +1199,7 @@ diff --git a/suite/config/mozconfigs/win32/debug b/suite/config/mozconfigs/win32
 -
 -# Needed to enable breakpad in application.ini
 -export MOZILLA_OFFICIAL=1
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.win.builder"
-+. "$commtopsrcdir/suite/config/mozconfigs/win32/common"
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.release"
- 
+-
 -# Disable checking that add-ons are signed by the trusted root
 -MOZ_ADDON_SIGNING=0
 -# Disable enforcing that add-ons are signed by the trusted root
@@ -1048,7 +1213,6 @@ diff --git a/suite/config/mozconfigs/win32/debug b/suite/config/mozconfigs/win32
 -# Set up mapi includes (must be done after visual studio setup)
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
-+ac_add_options --enable-debug
 diff --git a/suite/config/mozconfigs/win32/l10n-mozconfig b/suite/config/mozconfigs/win32/l10n-mozconfig
 deleted file mode 100644
 --- a/suite/config/mozconfigs/win32/l10n-mozconfig
@@ -1078,6 +1242,85 @@ deleted file mode 100644
 -# Set up mapi includes (must be done after visual studio setup)
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
+diff --git a/suite/config/mozconfigs/win32/make-beta-x86.sh b/suite/config/mozconfigs/win32/make-beta-x86.sh
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/win32/make-beta-x86.sh
+@@ -0,0 +1,20 @@
++export SOURCEDIR="/e/builds/beta-253/comm-release"
++export MOZ_OBJDIR=e:/builds/obj/TODOOO/obj-i686-pc-mingw32
++export PACKAGE=$(<$SOURCEDIR/comm/suite/config/version_package.txt)
++export L10NSHIPPED=$SOURCEDIR/comm/suite/locales/shipped-locales
++export SIGNPSWD=$(</e/builds/data/sign.pass)
++export SIGNKEY="e:\builds\data\seamonkey_code_signing.pfx"
++export ARCH=win32
++export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64:/e/builds/beta-253"
++export GECKO_HEAD_REV=$(<$SOURCEDIR/comm/suite/config/version_source.txt)
++export COMM_HEAD_REV=$(<$SOURCEDIR/comm/suite/config/version_source.txt)
++
++export MACH_USE_SYSTEM_PYTHON=1
++
++rustup default 1.73.0-x86_64-pc-windows-msvc
++# rustup default stable-x86_64-pc-windows-msvc
++rustup target add i686-pc-windows-msvc
++
++cp -p -f /e/builds/beta-253/mozconfigs/mozconfig-beta.x86cl $SOURCEDIR/.mozconfig
++
++./make-release.sh
+diff --git a/suite/config/mozconfigs/win32/make-release-x86.sh b/suite/config/mozconfigs/win32/make-release-x86.sh
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/win32/make-release-x86.sh
+@@ -0,0 +1,20 @@
++export SOURCEDIR="/e/builds/rel-253/comm-release"
++export MOZ_OBJDIR=e:/builds/obj/TODOOO/obj-i686-pc-mingw32
++export PACKAGE=$(<$SOURCEDIR/comm/suite/config/version_package.txt)
++export L10NSHIPPED=$SOURCEDIR/comm/suite/locales/shipped-locales
++export SIGNPSWD=$(</e/builds/data/sign.pass)
++export SIGNKEY="e:\builds\data\seamonkey_code_signing.pfx"
++export ARCH=win32
++export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64:/e/builds/rel-253"
++export GECKO_HEAD_REV=$(<$SOURCEDIR/comm/suite/config/version_source.txt)
++export COMM_HEAD_REV=$(<$SOURCEDIR/comm/suite/config/version_source.txt)
++
++export MACH_USE_SYSTEM_PYTHON=1
++
++rustup default 1.73.0-x86_64-pc-windows-msvc
++# rustup default stable-x86_64-pc-windows-msvc
++rustup target add i686-pc-windows-msvc
++
++cp -p -f /e/builds/rel-253/mozconfigs/mozconfig-release.x86cl $SOURCEDIR/.mozconfig
++
++./make-release.sh
+diff --git a/suite/config/mozconfigs/win32/mozconfig-beta.x86cl b/suite/config/mozconfigs/win32/mozconfig-beta.x86cl
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/win32/mozconfig-beta.x86cl
+@@ -0,0 +1,9 @@
++ac_add_options --with-l10n-base=e:/builds/beta-253/l10n-release
++
++. /e/builds/beta-253/mozconfigs/mozconfig.build-all-common
++. /e/builds/beta-253/mozconfigs/mozconfig.build-all-common-beta
++. /e/builds/beta-253/mozconfigs/mozconfig.clang-all-compile
++. /e/builds/beta-253/mozconfigs/mozconfig.build-all-compile
++. /e/builds/beta-253/mozconfigs/mozconfig.build-all-beta
++. /e/builds/beta-253/mozconfigs/mozconfig.build-x86-redist
++. /e/builds/beta-253/mozconfigs/mozconfig.build-x86-common
+diff --git a/suite/config/mozconfigs/win32/mozconfig-release.x86cl b/suite/config/mozconfigs/win32/mozconfig-release.x86cl
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/win32/mozconfig-release.x86cl
+@@ -0,0 +1,10 @@
++ac_add_options --with-l10n-base=e:/builds/rel-253/l10n-release
++
++. /e/builds/rel-253/mozconfigs/mozconfig.build-all-common
++. /e/builds/rel-253/mozconfigs/mozconfig.build-all-common-release
++. /e/builds/rel-253/mozconfigs/mozconfig.clang-all-compile
++. /e/builds/rel-253/mozconfigs/mozconfig.build-all-compile
++. /e/builds/rel-253/mozconfigs/mozconfig.build-all-release
++. /e/builds/rel-253/mozconfigs/mozconfig.build-x86-redist
++. /e/builds/rel-253/mozconfigs/mozconfig.build-x86-common
++
 diff --git a/suite/config/mozconfigs/win32/nightly b/suite/config/mozconfigs/win32/nightly
 deleted file mode 100644
 --- a/suite/config/mozconfigs/win32/nightly
@@ -1111,9 +1354,10 @@ deleted file mode 100644
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
 diff --git a/suite/config/mozconfigs/win32/release b/suite/config/mozconfigs/win32/release
+deleted file mode 100644
 --- a/suite/config/mozconfigs/win32/release
-+++ b/suite/config/mozconfigs/win32/release
-@@ -1,27 +1,6 @@
++++ /dev/null
+@@ -1,27 +0,0 @@
 -. "$topsrcdir/build/mozconfig.win-common"
 -. "$topsrcdir/build/mozconfig.common"
 -. "$topsrcdir/suite/config/mozconfigs/mozconfig.win.common"
@@ -1127,10 +1371,7 @@ diff --git a/suite/config/mozconfigs/win32/release b/suite/config/mozconfigs/win
 -
 -# Needed to enable breakpad in application.ini
 -export MOZILLA_OFFICIAL=1
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.win.builder"
-+. "$commtopsrcdir/suite/config/mozconfigs/win32/common"
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.release"
- 
+-
 -# Disable checking that add-ons are signed by the trusted root
 -MOZ_ADDON_SIGNING=0
 -# Disable enforcing that add-ons are signed by the trusted root
@@ -1144,8 +1385,6 @@ diff --git a/suite/config/mozconfigs/win32/release b/suite/config/mozconfigs/win
 -# Set up mapi includes (must be done after visual studio setup)
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
-+ac_add_options --enable-debug-symbols
-+ac_add_options --disable-tests
 diff --git a/suite/config/mozconfigs/win32/release-l10n b/suite/config/mozconfigs/win32/release-l10n
 deleted file mode 100644
 --- a/suite/config/mozconfigs/win32/release-l10n
@@ -1175,64 +1414,18 @@ deleted file mode 100644
 -# Set up mapi includes (must be done after visual studio setup)
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
-diff --git a/suite/config/mozconfigs/win64/release b/suite/config/mozconfigs/win64/beta
-copy from suite/config/mozconfigs/win64/release
-copy to suite/config/mozconfigs/win64/beta
---- a/suite/config/mozconfigs/win64/release
-+++ b/suite/config/mozconfigs/win64/beta
-@@ -1,30 +1,6 @@
--. "$topsrcdir/build/mozconfig.win-common"
--. "$topsrcdir/build/mozconfig.common"
--. "$topsrcdir/suite/config/mozconfigs/mozconfig.win.common"
--. "$topsrcdir/build/mozconfig.stylo"
--
--ac_add_options --target=x86_64-pc-mingw32
--ac_add_options --host=x86_64-pc-mingw32
--
--ac_add_options --enable-application=suite
--ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
--ac_add_options --enable-official-branding
--ac_add_options --enable-jemalloc
--ac_add_options --enable-calendar
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.win.builder"
-+. "$commtopsrcdir/suite/config/mozconfigs/win64/common"
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.beta"
- 
--# Needed to enable breakpad in application.ini
--export MOZILLA_OFFICIAL=1
--
--# Disable checking that add-ons are signed by the trusted root
--MOZ_ADDON_SIGNING=0
--# Disable enforcing that add-ons are signed by the trusted root
--MOZ_REQUIRE_SIGNING=0
--
--. $topsrcdir/build/win32/mozconfig.vs-latest
--
--# Package js shell
--export MOZ_PACKAGE_JSSHELL=1
--
--# Set up mapi includes (must be done after visual studio setup)
--export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
--mk_export_correct_style INCLUDE
-+ac_add_options --enable-debug-symbols
-+ac_add_options --disable-tests
-diff --git a/suite/config/mozconfigs/win64/common b/suite/config/mozconfigs/win64/common
+diff --git a/suite/config/mozconfigs/win64-aarch64/dummy.txt b/suite/config/mozconfigs/win64-aarch64/dummy.txt
 new file mode 100644
 --- /dev/null
-+++ b/suite/config/mozconfigs/win64/common
-@@ -0,0 +1,8 @@
-+# Common statements that are applicable to Windows x64 releases.
-+ac_add_options --with-visual-studio-version=2019
-+
-+ac_add_options --target=x86_64-pc-mingw32
-+ac_add_options --host=x86_64-pc-mingw32
-+
-+export WIN32_REDIST_DIR=/c/builds/vs2019runtime/vc/redist/x64/Microsoft.VC142.CRT
-+export WIN_UCRT_REDIST_DIR=/c/builds/vs2019runtime/ucrt/DLLs/x64
++++ b/suite/config/mozconfigs/win64-aarch64/dummy.txt
+@@ -0,0 +1,1 @@
++this config intentionally left blank
+\ No newline at end of file
 diff --git a/suite/config/mozconfigs/win64/debug b/suite/config/mozconfigs/win64/debug
+deleted file mode 100644
 --- a/suite/config/mozconfigs/win64/debug
-+++ b/suite/config/mozconfigs/win64/debug
-@@ -1,27 +1,5 @@
++++ /dev/null
+@@ -1,27 +0,0 @@
 -. "$topsrcdir/build/mozconfig.win-common"
 -. "$topsrcdir/build/mozconfig.common"
 -. "$topsrcdir/build/mozconfig.stylo"
@@ -1246,10 +1439,7 @@ diff --git a/suite/config/mozconfigs/win64/debug b/suite/config/mozconfigs/win64
 -
 -# Needed to enable breakpad in application.ini
 -export MOZILLA_OFFICIAL=1
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.win.builder"
-+. "$commtopsrcdir/suite/config/mozconfigs/win64/common"
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.release"
- 
+-
 -# Disable checking that add-ons are signed by the trusted root
 -MOZ_ADDON_SIGNING=0
 -# Disable enforcing that add-ons are signed by the trusted root
@@ -1263,7 +1453,6 @@ diff --git a/suite/config/mozconfigs/win64/debug b/suite/config/mozconfigs/win64
 -# Set up mapi includes (must be done after visual studio setup)
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
-+ac_add_options --enable-debug
 diff --git a/suite/config/mozconfigs/win64/l10n-mozconfig b/suite/config/mozconfigs/win64/l10n-mozconfig
 deleted file mode 100644
 --- a/suite/config/mozconfigs/win64/l10n-mozconfig
@@ -1296,6 +1485,82 @@ deleted file mode 100644
 -# Set up mapi includes (must be done after visual studio setup)
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
+diff --git a/suite/config/mozconfigs/win64/make-beta-x64.sh b/suite/config/mozconfigs/win64/make-beta-x64.sh
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/win64/make-beta-x64.sh
+@@ -0,0 +1,19 @@
++export SOURCEDIR="/e/builds/beta-253/comm-release"
++export MOZ_OBJDIR=e:/builds/obj/TODOOOO/obj-x86_64-pc-mingw32
++export PACKAGE=$(<$SOURCEDIR/comm/suite/config/version_package.txt)
++export L10NSHIPPED=$SOURCEDIR/comm/suite/locales/shipped-locales
++export SIGNPSWD=$(</e/builds/data/sign.pass)
++export SIGNKEY="e:\builds\data\seamonkey_code_signing.pfx"
++export ARCH=win64
++export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64:/e/builds/beta-253"
++export GECKO_HEAD_REV=$(<$SOURCEDIR/comm/suite/config/version_source.txt)
++export COMM_HEAD_REV=$(<$SOURCEDIR/comm/suite/config/version_source.txt)
++
++export MACH_USE_SYSTEM_PYTHON=1
++
++rustup default 1.73.0-x86_64-pc-windows-msvc
++# rustup default stable-x86_64-pc-windows-msvc
++
++cp -p -f /e/builds/beta-253/mozconfigs/mozconfig-beta.x6419 $SOURCEDIR/.mozconfig
++
++./make-release.sh
+diff --git a/suite/config/mozconfigs/win64/make-release-x64.sh b/suite/config/mozconfigs/win64/make-release-x64.sh
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/win64/make-release-x64.sh
+@@ -0,0 +1,19 @@
++export SOURCEDIR="/e/builds/rel-253/comm-release"
++export MOZ_OBJDIR=e:/builds/obj/TODOOOO/obj-x86_64-pc-mingw32
++export PACKAGE=$(<$SOURCEDIR/comm/suite/config/version_package.txt)
++export L10NSHIPPED=$SOURCEDIR/comm/suite/locales/shipped-locales
++export SIGNPSWD=$(</e/builds/data/sign.pass)
++export SIGNKEY="e:\builds\data\seamonkey_code_signing.pfx"
++export ARCH=win64
++export PATH="$PATH:/c/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64:/e/builds/rel-253"
++export GECKO_HEAD_REV=$(<$SOURCEDIR/comm/suite/config/version_source.txt)
++export COMM_HEAD_REV=$(<$SOURCEDIR/comm/suite/config/version_source.txt)
++
++export MACH_USE_SYSTEM_PYTHON=1
++
++rustup default 1.73.0-x86_64-pc-windows-msvc
++# rustup default stable-x86_64-pc-windows-msvc
++
++cp -p -f /e/builds/rel-253/mozconfigs/mozconfig-release.x6419 $SOURCEDIR/.mozconfig
++
++./make-release.sh
+diff --git a/suite/config/mozconfigs/win64/mozconfig-beta.x6419 b/suite/config/mozconfigs/win64/mozconfig-beta.x6419
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/win64/mozconfig-beta.x6419
+@@ -0,0 +1,9 @@
++ac_add_options --with-l10n-base=e:/builds/beta-253/l10n-release
++
++. /e/builds/beta-253/mozconfigs/mozconfig.build-all-common
++. /e/builds/beta-253/mozconfigs/mozconfig.build-all-common-beta
++. /e/builds/beta-253/mozconfigs/mozconfig.vs2019-all-compile
++. /e/builds/beta-253/mozconfigs/mozconfig.build-all-compile
++. /e/builds/beta-253/mozconfigs/mozconfig.build-all-beta
++. /e/builds/beta-253/mozconfigs/mozconfig.build-x64-redist
++. /e/builds/beta-253/mozconfigs/mozconfig.build-x64-common
+diff --git a/suite/config/mozconfigs/win64/mozconfig-release.x6419 b/suite/config/mozconfigs/win64/mozconfig-release.x6419
+new file mode 100644
+--- /dev/null
++++ b/suite/config/mozconfigs/win64/mozconfig-release.x6419
+@@ -0,0 +1,9 @@
++ac_add_options --with-l10n-base=e:/builds/rel-253/l10n-release
++
++. /e/builds/rel-253/mozconfigs/mozconfig.build-all-common
++. /e/builds/rel-253/mozconfigs/mozconfig.build-all-common-release
++. /e/builds/rel-253/mozconfigs/mozconfig.vs2019-all-compile
++. /e/builds/rel-253/mozconfigs/mozconfig.build-all-compile
++. /e/builds/rel-253/mozconfigs/mozconfig.build-all-release
++. /e/builds/rel-253/mozconfigs/mozconfig.build-x64-redist
++. /e/builds/rel-253/mozconfigs/mozconfig.build-x64-common
 diff --git a/suite/config/mozconfigs/win64/nightly b/suite/config/mozconfigs/win64/nightly
 deleted file mode 100644
 --- a/suite/config/mozconfigs/win64/nightly
@@ -1332,9 +1597,10 @@ deleted file mode 100644
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
 diff --git a/suite/config/mozconfigs/win64/release b/suite/config/mozconfigs/win64/release
+deleted file mode 100644
 --- a/suite/config/mozconfigs/win64/release
-+++ b/suite/config/mozconfigs/win64/release
-@@ -1,30 +1,6 @@
++++ /dev/null
+@@ -1,30 +0,0 @@
 -. "$topsrcdir/build/mozconfig.win-common"
 -. "$topsrcdir/build/mozconfig.common"
 -. "$topsrcdir/suite/config/mozconfigs/mozconfig.win.common"
@@ -1348,10 +1614,7 @@ diff --git a/suite/config/mozconfigs/win64/release b/suite/config/mozconfigs/win
 -ac_add_options --enable-official-branding
 -ac_add_options --enable-jemalloc
 -ac_add_options --enable-calendar
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.win.builder"
-+. "$commtopsrcdir/suite/config/mozconfigs/win64/common"
-+. "$commtopsrcdir/suite/config/mozconfigs/mozconfig.release"
- 
+-
 -# Needed to enable breakpad in application.ini
 -export MOZILLA_OFFICIAL=1
 -
@@ -1368,8 +1631,6 @@ diff --git a/suite/config/mozconfigs/win64/release b/suite/config/mozconfigs/win
 -# Set up mapi includes (must be done after visual studio setup)
 -export INCLUDE=$INCLUDE:/c/Office\ 2010\ Developer\ Resources/Outlook\ 2010\ MAPI\ Headers
 -mk_export_correct_style INCLUDE
-+ac_add_options --enable-debug-symbols
-+ac_add_options --disable-tests
 diff --git a/suite/config/mozconfigs/win64/release-l10 b/suite/config/mozconfigs/win64/release-l10
 deleted file mode 100644
 --- a/suite/config/mozconfigs/win64/release-l10

+ 12 - 12
comm-release/patches/series

@@ -1916,8 +1916,8 @@ NOBUG-moderndup-25316.patch
 1816667-macosplist-25316.patch
 1816667-macosplisttabs-25316.patch
 1795774-2-version-beta-cr-25316.patch
-TOP-NOBUG-dummyvenv-25316.patch
-TOP-1816667-cc-25316.patch
+NOBUG-dummyvenv-25316.patch
+1816667-cc-25316.patch
 1817655-version-release-cr-25316.patch
 1817654-1-version-prebeta-cr-25317.patch
 863246-cc-57a1.patch
@@ -2122,7 +2122,14 @@ NOBUG-fixcalbackend-25318.patch
 1611010-DOMEventListener-25319.patch
 1868034-registerAllActors-25319.patch
 1870934-debugqa-website-25319.patch
+1445374-61a1.patch
+1446050-2-61a1.patch
+1466297-62a1.patch
+1353704-69a1.patch
 1871992-122a1.patch
+815638-125a1.patch
+1885748-brokentab-25319.patch
+1896292-offlineappcachehelper-25319.patch
 PPPPPPP-tbbranding-253.patch
 PPPPPPP-privateprefs-253.patch
 TOP-1534155-PARTIAL-69a1.patch
@@ -2140,19 +2147,12 @@ WIP-9999999-delete.patch
 WIP-521861-Account_Creation.patch
 WIP-1584473-6x-71a1.patch
 WIP-1584473-7x-71a1.patch
-WIP-1687385-mozconfigs-v1_2-253.patch
 WIP-9999999-lintglobals.patch
-TOP-1378089-4-bookmarks-wip-25319.patch
+WIP-1687385-mozconfigs-v2_0-253.patch
+TOP-1378089-4-WIP-bookmarks-25319.patch
 TOP-1872623-cancelbookmark-25319.patch
-1466297-62a1.patch
 1877001-port1407891-25319.patch
-1353704-69a1.patch
 1879726-port1398229-25319.patch
-1445374-61a1.patch
-815638-125a1.patch
-1885748-brokentab-25319.patch
-1446050-2-61a1.patch
-WIP-NOBUG-implement-about-seamonkey-comm.patch
+9999999-about-seamonkey-25319.patch
 1437393-fontsasync-25319.patch
 1896174-checkbox-25319.patch
-9999999-offlineappcachehelper-25319.patch

+ 38 - 0
mozilla-release/patches/1414340-2-fix-58a1.patch

@@ -0,0 +1,38 @@
+# HG changeset patch
+# User Jan de Mooij <jdemooij@mozilla.com>
+# Date 1510311149 -3600
+# Node ID 67fe0ac257b8a1169a208bf4c7f5c2369c3239ee
+# Parent  d06094c6f08d22efd54c9e8636c49db7f4a4a609
+Bug 1414340 part 2 - Remove array/generator comprehensions from SpiderMonkey. r=evilpie
+
+diff --git a/js/src/vm/Opcodes.h b/js/src/vm/Opcodes.h
+--- a/js/src/vm/Opcodes.h
++++ b/js/src/vm/Opcodes.h
+@@ -2100,26 +2100,17 @@ 1234567890123456789012345678901234567890
+      * frame and resumes execution of it. Pushes the return value after the
+      * generator yields.
+      *   Category: Statements
+      *   Type: Generator
+      *   Operands: resume kind (GeneratorObject::ResumeKind)
+      *   Stack: gen, val => rval
+      */ \
+     macro(JSOP_RESUME,        205,"resume",      NULL,    3,  2,  1,  JOF_UINT8|JOF_INVOKE) \
+-    /*
+-     * Pops the top two values on the stack as 'obj' and 'v', pushes 'v' to
+-     * 'obj'.
+-     *
+-     * This opcode is used for Array Comprehension.
+-     *   Category: Literals
+-     *   Type: Array
+-     *   Operands:
+-     *   Stack: v, obj =>
+-     */ \
++    \
+     macro(JSOP_UNUSED206,     206,"unused206",   NULL,    1,  0,  0,  JOF_BYTE) \
+     \
+     /*
+      * No-op bytecode only emitted in some self-hosted functions. Not handled by
+      * the JITs so the script always runs in the interpreter.
+      *
+      *   Category: Other
+      *   Operands:

+ 227 - 0
mozilla-release/patches/1420975-60a1.patch

@@ -0,0 +1,227 @@
+# HG changeset patch
+# User Andrew McCreight <continuation@gmail.com>
+# Date 1515621765 28800
+# Node ID 5c7b21fa7315ca753684881b3dc3cee5ec235ca7
+# Parent  e16fc8abd345b6b4afb9c3e5541e7e684894b7c0
+Bug 1420975 - Add a environment variable to record JS stack for leaks. r=froydnj,mrbkap
+
+This patch adds a new environment variable XPCOM_MEM_LOG_JS_STACK that
+changes XPCOM leakchecking to record a JS stack for all objects, in
+addition to a C++ stack. This is useful when a C++ object is being
+leaked due to JS. The JS stack will be printed if the object leaks, if
+it is used in combination with XPCOM_MEM_BLOAT_LOG=1 and
+XPCOM_MEM_LOG_CLASSES=nsFoo, if nsFoo is the class of interest.
+
+This patch moves a few XPConnect functions for recording the stack
+into xpcpublic.h so they can be called from nsTraceRefcnt.cpp.
+
+MozReview-Commit-ID: FX2QVCSXz4f
+
+diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h
+--- a/js/xpconnect/src/xpcprivate.h
++++ b/js/xpconnect/src/xpcprivate.h
+@@ -2348,28 +2348,16 @@ extern JSObject*
+ xpc_NewIDObject(JSContext* cx, JS::HandleObject jsobj, const nsID& aID);
+ 
+ extern const nsID*
+ xpc_JSObjectToID(JSContext* cx, JSObject* obj);
+ 
+ extern bool
+ xpc_JSObjectIsID(JSContext* cx, JSObject* obj);
+ 
+-/***************************************************************************/
+-// in XPCDebug.cpp
+-
+-extern bool
+-xpc_DumpJSStack(bool showArgs, bool showLocals, bool showThisProps);
+-
+-// Return a newly-allocated string containing a representation of the
+-// current JS stack.
+-extern JS::UniqueChars
+-xpc_PrintJSStack(JSContext* cx, bool showArgs, bool showLocals,
+-                 bool showThisProps);
+-
+ /******************************************************************************
+  * Handles pre/post script processing.
+  */
+ class MOZ_RAII AutoScriptEvaluate
+ {
+ public:
+     /**
+      * Saves the JSContext as well as initializing our state
+diff --git a/js/xpconnect/src/xpcpublic.h b/js/xpconnect/src/xpcpublic.h
+--- a/js/xpconnect/src/xpcpublic.h
++++ b/js/xpconnect/src/xpcpublic.h
+@@ -249,16 +249,27 @@ xpc_MarkInCCGeneration(nsISupports* aVar
+ 
+ // If aWrappedJS is a JS wrapper, unmark its JSObject.
+ extern void
+ xpc_TryUnmarkWrappedGrayObject(nsISupports* aWrappedJS);
+ 
+ extern void
+ xpc_UnmarkSkippableJSHolders();
+ 
++// Defined in XPCDebug.cpp.
++extern bool
++xpc_DumpJSStack(bool showArgs, bool showLocals, bool showThisProps);
++
++// Return a newly-allocated string containing a representation of the
++// current JS stack. Defined in XPCDebug.cpp.
++extern JS::UniqueChars
++xpc_PrintJSStack(JSContext* cx, bool showArgs, bool showLocals,
++                 bool showThisProps);
++
++
+ // readable string conversions, static methods and members only
+ class XPCStringConvert
+ {
+ public:
+ 
+     // If the string shares the readable's buffer, that buffer will
+     // get assigned to *sharedBuffer.  Otherwise null will be
+     // assigned.
+diff --git a/xpcom/base/nsTraceRefcnt.cpp b/xpcom/base/nsTraceRefcnt.cpp
+--- a/xpcom/base/nsTraceRefcnt.cpp
++++ b/xpcom/base/nsTraceRefcnt.cpp
+@@ -29,16 +29,17 @@
+ #else
+ #include <unistd.h>
+ #endif
+ 
+ #include "mozilla/Atomics.h"
+ #include "mozilla/AutoRestore.h"
+ #include "mozilla/BlockingResourceBase.h"
+ #include "mozilla/PoisonIOInterposer.h"
++#include "mozilla/UniquePtr.h"
+ 
+ #include <string>
+ #include <vector>
+ 
+ #ifdef HAVE_DLOPEN
+ #include <dlfcn.h>
+ #endif
+ 
+@@ -78,16 +79,17 @@ struct MOZ_STACK_CLASS AutoTraceLogLock 
+ };
+ 
+ static PLHashTable* gBloatView;
+ static PLHashTable* gTypesToLog;
+ static PLHashTable* gObjectsToLog;
+ static PLHashTable* gSerialNumbers;
+ static intptr_t gNextSerialNumber;
+ static bool gDumpedStatistics = false;
++static bool gLogJSStacks = false;
+ 
+ // By default, debug builds only do bloat logging. Bloat logging
+ // only tries to record when an object is created or destroyed, so we
+ // optimize the common case in NS_LogAddRef and NS_LogRelease where
+ // only bloat logging is enabled and no logging needs to be done.
+ enum LoggingType
+ {
+   NoLogging,
+@@ -128,16 +130,37 @@ struct SerialNumberRecord
+ 
+   intptr_t serialNumber;
+   int32_t refCount;
+   int32_t COMPtrCount;
+   // We use std:: classes here rather than the XPCOM equivalents because the
+   // XPCOM equivalents do leak-checking, and if you try to leak-check while
+   // leak-checking, you're gonna have a bad time.
+   std::vector<void*> allocationStack;
++  mozilla::UniquePtr<char[]> jsStack;
++
++  void SaveJSStack() {
++    // If this thread isn't running JS, there's nothing to do.
++    if (!CycleCollectedJSContext::Get()) {
++      return;
++    }
++
++    JSContext* cx = nsContentUtils::GetCurrentJSContextForThread();
++    if (!cx) {
++      return;
++    }
++
++    JS::UniqueChars chars = xpc_PrintJSStack(cx,
++                                             /*showArgs=*/ false,
++                                             /*showLocals=*/ false,
++                                             /*showThisProps=*/ false);
++    size_t len = strlen(chars.get());
++    jsStack = MakeUnique<char[]>(len + 1);
++    memcpy(jsStack.get(), chars.get(), len + 1);
++  }
+ };
+ 
+ struct nsTraceRefcntStats
+ {
+   uint64_t mCreates;
+   uint64_t mDestroys;
+ 
+   bool HaveLeaks() const
+@@ -467,16 +490,25 @@ DumpSerialNumbers(PLHashEntry* aHashEntr
+     for (size_t i = 0, length = record->allocationStack.size();
+          i < length;
+          ++i) {
+       gCodeAddressService->GetLocation(i, record->allocationStack[i],
+                                        buf, bufLen);
+       fprintf(outputFile, "%s\n", buf);
+     }
+   }
++
++  if (gLogJSStacks) {
++    if (record->jsStack) {
++      fprintf(outputFile, "JS allocation stack:\n%s\n", record->jsStack.get());
++    } else {
++      fprintf(outputFile, "There is no JS context on the stack.\n");
++    }
++  }
++
+   return HT_ENUMERATE_NEXT;
+ }
+ 
+ 
+ template<>
+ class nsDefaultComparator<BloatEntry*, BloatEntry*>
+ {
+ public:
+@@ -582,16 +614,19 @@ GetSerialNumber(void* aPtr, bool aCreate
+   if (!aCreate) {
+     return 0;
+   }
+ 
+   SerialNumberRecord* record = new SerialNumberRecord();
+   WalkTheStackSavingLocations(record->allocationStack);
+   PL_HashTableRawAdd(gSerialNumbers, hep, HashNumber(aPtr),
+                      aPtr, static_cast<void*>(record));
++  if (gLogJSStacks) {
++    record->SaveJSStack();
++  }
+   return gNextSerialNumber;
+ }
+ 
+ static int32_t*
+ GetRefCount(void* aPtr)
+ {
+   PLHashEntry** hep = PL_HashTableRawLookup(gSerialNumbers,
+                                             HashNumber(aPtr),
+@@ -824,16 +859,20 @@ InitTraceLog()
+         }
+         *cm = ',';
+         cp = cm + 1;
+       }
+       fprintf(stdout, "\n");
+     }
+   }
+ 
++  if (getenv("XPCOM_MEM_LOG_JS_STACK")) {
++    fprintf(stdout, "### XPCOM_MEM_LOG_JS_STACK defined\n");
++    gLogJSStacks = true;
++  }
+ 
+   if (gBloatLog) {
+     gLogging = OnlyBloatLogging;
+   }
+ 
+   if (gRefcntsLog || gAllocLog || gCOMPtrLog) {
+     gLogging = FullLogging;
+   }
+

+ 307 - 0
mozilla-release/patches/1422036-60a1.patch

@@ -0,0 +1,307 @@
+# HG changeset patch
+# User Andrea Marchesini <amarchesini@mozilla.com>
+# Date 1517856908 -3600
+# Node ID d79788e03f7451ebc4a3c694117497f091a5a129
+# Parent  dc287c69de65a05ee6394fe350fc2baa076721ee
+Bug 1422036 - Using WorkerControlRunnable to release resources in fetch when the worker is shutting down, r=catalinb
+
+diff --git a/dom/fetch/FetchConsumer.cpp b/dom/fetch/FetchConsumer.cpp
+--- a/dom/fetch/FetchConsumer.cpp
++++ b/dom/fetch/FetchConsumer.cpp
+@@ -97,16 +97,42 @@ public:
+   bool
+   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
+   {
+     mFetchBodyConsumer->ContinueConsumeBody(mStatus, mLength, mResult);
+     return true;
+   }
+ };
+ 
++// ControlRunnable used to complete the releasing of resources on the worker
++// thread when already shutting down.
++template <class Derived>
++class ContinueConsumeBodyControlRunnable final : public MainThreadWorkerControlRunnable
++{
++  RefPtr<FetchBodyConsumer<Derived>> mFetchBodyConsumer;
++
++public:
++  ContinueConsumeBodyControlRunnable(FetchBodyConsumer<Derived>* aFetchBodyConsumer,
++                                     uint8_t* aResult)
++    : MainThreadWorkerControlRunnable(aFetchBodyConsumer->GetWorkerPrivate())
++    , mFetchBodyConsumer(aFetchBodyConsumer)
++  {
++    MOZ_ASSERT(NS_IsMainThread());
++    free(aResult);
++  }
++
++  bool
++  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
++  {
++    mFetchBodyConsumer->ContinueConsumeBody(NS_BINDING_ABORTED, 0, nullptr,
++                                            true /* shutting down */);
++    return true;
++  }
++};
++
+ template <class Derived>
+ class FailConsumeBodyWorkerRunnable : public MainThreadWorkerControlRunnable
+ {
+   RefPtr<FetchBodyConsumer<Derived>> mBodyConsumer;
+ 
+ public:
+   explicit FailConsumeBodyWorkerRunnable(FetchBodyConsumer<Derived>* aBodyConsumer)
+     : MainThreadWorkerControlRunnable(aBodyConsumer->GetWorkerPrivate())
+@@ -184,16 +210,41 @@ public:
+   bool
+   WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
+   {
+     mFetchBodyConsumer->ContinueConsumeBlobBody(mBlobImpl);
+     return true;
+   }
+ };
+ 
++// ControlRunnable used to complete the releasing of resources on the worker
++// thread when already shutting down.
++template <class Derived>
++class ContinueConsumeBlobBodyControlRunnable final
++  : public MainThreadWorkerControlRunnable
++{
++  RefPtr<FetchBodyConsumer<Derived>> mFetchBodyConsumer;
++
++public:
++  explicit ContinueConsumeBlobBodyControlRunnable(FetchBodyConsumer<Derived>* aFetchBodyConsumer)
++    : MainThreadWorkerControlRunnable(aFetchBodyConsumer->GetWorkerPrivate())
++    , mFetchBodyConsumer(aFetchBodyConsumer)
++  {
++    MOZ_ASSERT(NS_IsMainThread());
++  }
++
++  bool
++  WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
++  {
++    mFetchBodyConsumer->ContinueConsumeBlobBody(nullptr,
++                                                true /* shutting down */);
++    return true;
++  }
++};
++
+ template <class Derived>
+ class ConsumeBodyDoneObserver : public nsIStreamLoaderObserver
+                               , public MutableBlobStorageCallback
+ {
+   RefPtr<FetchBodyConsumer<Derived>> mFetchBodyConsumer;
+ 
+ public:
+   NS_DECL_THREADSAFE_ISUPPORTS
+@@ -211,30 +262,43 @@ public:
+   {
+     MOZ_ASSERT(NS_IsMainThread());
+ 
+     // The loading is completed. Let's nullify the pump before continuing the
+     // consuming of the body.
+     mFetchBodyConsumer->NullifyConsumeBodyPump();
+ 
+     uint8_t* nonconstResult = const_cast<uint8_t*>(aResult);
+-    if (mFetchBodyConsumer->GetWorkerPrivate()) {
++    if (!mFetchBodyConsumer->GetWorkerPrivate()) {
++      mFetchBodyConsumer->ContinueConsumeBody(aStatus, aResultLength,
++                                              nonconstResult);
++      // FetchBody is responsible for data.
++      return NS_SUCCESS_ADOPTED_DATA;
++    }
++
++    {
+       RefPtr<ContinueConsumeBodyRunnable<Derived>> r =
+         new ContinueConsumeBodyRunnable<Derived>(mFetchBodyConsumer,
+                                                  aStatus,
+                                                  aResultLength,
+                                                  nonconstResult);
+-      if (!r->Dispatch()) {
+-        NS_WARNING("Could not dispatch ConsumeBodyRunnable");
+-        // Return failure so that aResult is freed.
+-        return NS_ERROR_FAILURE;
++      if (r->Dispatch()) {
++        // FetchBody is responsible for data.
++        return NS_SUCCESS_ADOPTED_DATA;
+       }
+-    } else {
+-      mFetchBodyConsumer->ContinueConsumeBody(aStatus, aResultLength,
+-                                              nonconstResult);
++    }
++
++    // The worker is shutting down. Let's use a control runnable to complete the
++    // shutting down procedure.
++
++    RefPtr<ContinueConsumeBodyControlRunnable<Derived>> r =
++      new ContinueConsumeBodyControlRunnable<Derived>(mFetchBodyConsumer,
++                                                      nonconstResult);
++    if (NS_WARN_IF(!r->Dispatch())) {
++      return NS_ERROR_FAILURE;
+     }
+ 
+     // FetchBody is responsible for data.
+     return NS_SUCCESS_ADOPTED_DATA;
+   }
+ 
+   virtual void BlobStoreCompleted(MutableBlobStorage* aBlobStorage,
+                                   Blob* aBlob,
+@@ -247,28 +311,38 @@ public:
+     }
+ 
+     // The loading is completed. Let's nullify the pump before continuing the
+     // consuming of the body.
+     mFetchBodyConsumer->NullifyConsumeBodyPump();
+ 
+     MOZ_ASSERT(aBlob);
+ 
+-    if (mFetchBodyConsumer->GetWorkerPrivate()) {
++    if (!mFetchBodyConsumer->GetWorkerPrivate()) {
++      mFetchBodyConsumer->ContinueConsumeBlobBody(aBlob->Impl());
++      return;
++    }
++
++    {
+       RefPtr<ContinueConsumeBlobBodyRunnable<Derived>> r =
+         new ContinueConsumeBlobBodyRunnable<Derived>(mFetchBodyConsumer,
+                                                      aBlob->Impl());
+ 
+-      if (!r->Dispatch()) {
+-        NS_WARNING("Could not dispatch ConsumeBlobBodyRunnable");
++      if (r->Dispatch()) {
+         return;
+       }
+-    } else {
+-      mFetchBodyConsumer->ContinueConsumeBlobBody(aBlob->Impl());
+     }
++
++    // The worker is shutting down. Let's use a control runnable to complete the
++    // shutting down procedure.
++
++    RefPtr<ContinueConsumeBlobBodyControlRunnable<Derived>> r =
++      new ContinueConsumeBlobBodyControlRunnable<Derived>(mFetchBodyConsumer);
++
++    Unused << NS_WARN_IF(!r->Dispatch());
+   }
+ 
+ private:
+   virtual ~ConsumeBodyDoneObserver()
+   { }
+ };
+ 
+ template <class Derived>
+@@ -520,17 +594,18 @@ FetchBodyConsumer<Derived>::BeginConsume
+     }
+   }
+ }
+ 
+ template <class Derived>
+ void
+ FetchBodyConsumer<Derived>::ContinueConsumeBody(nsresult aStatus,
+                                                 uint32_t aResultLength,
+-                                                uint8_t* aResult)
++                                                uint8_t* aResult,
++                                                bool aShuttingDown)
+ {
+   AssertIsOnTargetThread();
+ 
+   if (mBodyConsumed) {
+     return;
+   }
+   mBodyConsumed = true;
+ 
+@@ -545,16 +620,21 @@ FetchBodyConsumer<Derived>::ContinueCons
+   MOZ_ASSERT(mConsumePromise);
+   RefPtr<Promise> localPromise = mConsumePromise.forget();
+ 
+   RefPtr<FetchBodyConsumer<Derived>> self = this;
+   auto autoReleaseObject = mozilla::MakeScopeExit([&] {
+     self->ReleaseObject();
+   });
+ 
++  if (aShuttingDown) {
++    // If shutting down, we don't want to resolve any promise.
++    return;
++  }
++
+   if (NS_WARN_IF(NS_FAILED(aStatus))) {
+     localPromise->MaybeReject(NS_ERROR_DOM_ABORT_ERR);
+   }
+ 
+   // Don't warn here since we warned above.
+   if (NS_FAILED(aStatus)) {
+     return;
+   }
+@@ -627,37 +707,40 @@ FetchBodyConsumer<Derived>::ContinueCons
+   error.WouldReportJSException();
+   if (error.Failed()) {
+     localPromise->MaybeReject(error);
+   }
+ }
+ 
+ template <class Derived>
+ void
+-FetchBodyConsumer<Derived>::ContinueConsumeBlobBody(BlobImpl* aBlobImpl)
++FetchBodyConsumer<Derived>::ContinueConsumeBlobBody(BlobImpl* aBlobImpl,
++                                                    bool aShuttingDown)
+ {
+   AssertIsOnTargetThread();
+   MOZ_ASSERT(mConsumeType == CONSUME_BLOB);
+ 
+   if (mBodyConsumed) {
+     return;
+   }
+   mBodyConsumed = true;
+ 
+   // Just a precaution to ensure ContinueConsumeBody is not called out of
+   // sync with a body read.
+   MOZ_ASSERT(mBody->BodyUsed());
+ 
+-  MOZ_ASSERT(mConsumePromise);
+-  RefPtr<Promise> localPromise = mConsumePromise.forget();
++  if (!aShuttingDown) {
++    MOZ_ASSERT(mConsumePromise);
++    RefPtr<Promise> localPromise = mConsumePromise.forget();
+ 
+-  RefPtr<dom::Blob> blob = dom::Blob::Create(mGlobal, aBlobImpl);
+-  MOZ_ASSERT(blob);
++    RefPtr<dom::Blob> blob = dom::Blob::Create(mGlobal, aBlobImpl);
++    MOZ_ASSERT(blob);
+ 
+-  localPromise->MaybeResolve(blob);
++    localPromise->MaybeResolve(blob);
++  }
+ 
+   ReleaseObject();
+ }
+ 
+ template <class Derived>
+ void
+ FetchBodyConsumer<Derived>::ShutDownMainThreadConsuming()
+ {
+diff --git a/dom/fetch/FetchConsumer.h b/dom/fetch/FetchConsumer.h
+--- a/dom/fetch/FetchConsumer.h
++++ b/dom/fetch/FetchConsumer.h
+@@ -49,20 +49,21 @@ public:
+ 
+   void
+   ReleaseObject();
+ 
+   void
+   BeginConsumeBodyMainThread();
+ 
+   void
+-  ContinueConsumeBody(nsresult aStatus, uint32_t aLength, uint8_t* aResult);
++  ContinueConsumeBody(nsresult aStatus, uint32_t aLength, uint8_t* aResult,
++                      bool aShuttingDown = false);
+ 
+   void
+-  ContinueConsumeBlobBody(BlobImpl* aBlobImpl);
++  ContinueConsumeBlobBody(BlobImpl* aBlobImpl, bool aShuttingDown = false);
+ 
+   void
+   ShutDownMainThreadConsuming();
+ 
+   workers::WorkerPrivate*
+   GetWorkerPrivate() const
+   {
+     return mWorkerPrivate;

+ 370 - 0
mozilla-release/patches/1426721-1-60a1.patch

@@ -0,0 +1,370 @@
+# HG changeset patch
+# User Doug Thayer <dothayer@mozilla.com>
+# Date 1516730791 28800
+# Node ID df447e1b1a3879756ca210491bfc6802f81909ce
+# Parent  faed66e0c231e918e2a5101776474a9e562887bb
+Bug 1426721 - Add async/bulk encryption interface to SDR r=keeler,MattN
+
+Since encryption can be somewhat CPU intensive, if we're encrypting
+a large number of strings we want to be able to do so in a background
+thread. This will be consumed by the profile migrators when importing
+logins.
+
+MozReview-Commit-ID: JoJGOgMzZ4u
+
+diff --git a/security/manager/ssl/SecretDecoderRing.cpp b/security/manager/ssl/SecretDecoderRing.cpp
+--- a/security/manager/ssl/SecretDecoderRing.cpp
++++ b/security/manager/ssl/SecretDecoderRing.cpp
+@@ -5,32 +5,67 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "SecretDecoderRing.h"
+ 
+ #include "ScopedNSSTypes.h"
+ #include "mozilla/Base64.h"
+ #include "mozilla/Casting.h"
+ #include "mozilla/Services.h"
++#include "mozilla/ErrorResult.h"
++#include "mozilla/dom/Promise.h"
+ #include "nsCOMPtr.h"
+ #include "nsIInterfaceRequestor.h"
+ #include "nsIInterfaceRequestorUtils.h"
+ #include "nsIObserverService.h"
+ #include "nsIServiceManager.h"
+ #include "nsITokenPasswordDialogs.h"
+ #include "nsNSSComponent.h"
+ #include "nsNSSHelper.h"
+ #include "pk11func.h"
+ #include "pk11sdr.h" // For PK11SDR_Encrypt, PK11SDR_Decrypt
+ #include "ssl.h" // For SSL_ClearSessionCache
+ 
+ using namespace mozilla;
++using dom::Promise;
+ 
++// -// NOTE: Should these be the thread-safe versions?
+ NS_IMPL_ISUPPORTS(SecretDecoderRing, nsISecretDecoderRing)
+ 
++void BackgroundSdrEncryptStrings(const nsTArray<nsCString>& plaintexts,
++                                 RefPtr<Promise>& aPromise) {
++  nsCOMPtr<nsISecretDecoderRing> sdrService =
++    do_GetService(NS_SECRETDECODERRING_CONTRACTID);
++  InfallibleTArray<nsString> cipherTexts(plaintexts.Length());
++
++  nsresult rv = NS_ERROR_FAILURE;
++  for (uint32_t i = 0; i < plaintexts.Length(); ++i) {
++    const nsCString& plaintext = plaintexts[i];
++    nsCString cipherText;
++    rv = sdrService->EncryptString(plaintext, cipherText);
++
++    if (NS_WARN_IF(NS_FAILED(rv))) {
++      break;
++    }
++
++    cipherTexts.AppendElement(NS_ConvertASCIItoUTF16(cipherText));
++  }
++
++  nsCOMPtr<nsIRunnable> runnable(
++    NS_NewRunnableFunction("BackgroundSdrEncryptStringsResolve",
++                           [rv, aPromise = std::move(aPromise), cipherTexts = std::move(cipherTexts)]() {                             
++                             if (NS_FAILED(rv)) {
++                               aPromise->MaybeReject(rv);
++                             } else {
++                               aPromise->MaybeResolve(cipherTexts);
++                             }
++                           }));
++  NS_DispatchToMainThread(runnable);
++}
++
+ nsresult
+ SecretDecoderRing::Encrypt(const nsACString& data, /*out*/ nsACString& result)
+ {
+   UniquePK11SlotInfo slot(PK11_GetInternalKeySlot());
+   if (!slot) {
+     return NS_ERROR_NOT_AVAILABLE;
+   }
+ 
+@@ -103,16 +138,61 @@ SecretDecoderRing::EncryptString(const n
+   if (NS_FAILED(rv)) {
+     return rv;
+   }
+ 
+   return NS_OK;
+ }
+ 
+ NS_IMETHODIMP
++SecretDecoderRing::AsyncEncryptStrings(uint32_t plaintextsCount,
++                                       const char16_t** plaintexts,
++                                       JSContext* aCx,
++                                       nsISupports** aPromise) {
++  MOZ_RELEASE_ASSERT(NS_IsMainThread());
++  NS_ENSURE_ARG(plaintextsCount);
++  NS_ENSURE_ARG_POINTER(plaintexts);
++  NS_ENSURE_ARG_POINTER(aCx);
++
++  nsIGlobalObject* globalObject =
++    xpc::NativeGlobal(JS::CurrentGlobalOrNull(aCx));
++
++  if (NS_WARN_IF(!globalObject)) {
++    return NS_ERROR_UNEXPECTED;
++  }
++
++  ErrorResult result;
++  RefPtr<Promise> promise = Promise::Create(globalObject, result);
++  if (NS_WARN_IF(result.Failed())) {
++    return result.StealNSResult();
++  }
++
++  InfallibleTArray<nsCString> plaintextsUtf8(plaintextsCount);
++  for (uint32_t i = 0; i < plaintextsCount; ++i) {
++    plaintextsUtf8.AppendElement(NS_ConvertUTF16toUTF8(plaintexts[i]));
++  }
++  nsCOMPtr<nsIRunnable> runnable(
++    NS_NewRunnableFunction("BackgroundSdrEncryptStrings",
++      [promise, plaintextsUtf8 = std::move(plaintextsUtf8)]() mutable {
++        BackgroundSdrEncryptStrings(plaintextsUtf8, promise);
++      }));
++
++  nsCOMPtr<nsIThread> encryptionThread;
++  nsresult rv = NS_NewNamedThread("AsyncSDRThread",
++                                  getter_AddRefs(encryptionThread),
++                                  runnable);
++  if (NS_WARN_IF(NS_FAILED(rv))) {
++    return rv;
++  }
++
++  promise.forget(aPromise);
++  return NS_OK;
++}
++
++NS_IMETHODIMP
+ SecretDecoderRing::DecryptString(const nsACString& encryptedBase64Text,
+                          /*out*/ nsACString& decryptedText)
+ {
+   nsAutoCString encryptedText;
+   nsresult rv = Base64Decode(encryptedBase64Text, encryptedText);
+   if (NS_FAILED(rv)) {
+     return rv;
+   }
+diff --git a/security/manager/ssl/SecretDecoderRing.h b/security/manager/ssl/SecretDecoderRing.h
+--- a/security/manager/ssl/SecretDecoderRing.h
++++ b/security/manager/ssl/SecretDecoderRing.h
+@@ -13,17 +13,17 @@
+ #define NS_SECRETDECODERRING_CONTRACTID "@mozilla.org/security/sdr;1"
+ 
+ #define NS_SECRETDECODERRING_CID \
+   { 0x0c4f1ddc, 0x1dd2, 0x11b2, { 0x9d, 0x95, 0xf2, 0xfd, 0xf1, 0x13, 0x04, 0x4b } }
+ 
+ class SecretDecoderRing : public nsISecretDecoderRing
+ {
+ public:
+-  NS_DECL_ISUPPORTS
++  NS_DECL_THREADSAFE_ISUPPORTS
+   NS_DECL_NSISECRETDECODERRING
+ 
+   SecretDecoderRing() {}
+ 
+ protected:
+   virtual ~SecretDecoderRing() {}
+ 
+ private:
+diff --git a/security/manager/ssl/nsISecretDecoderRing.idl b/security/manager/ssl/nsISecretDecoderRing.idl
+--- a/security/manager/ssl/nsISecretDecoderRing.idl
++++ b/security/manager/ssl/nsISecretDecoderRing.idl
+@@ -18,16 +18,30 @@ interface nsISecretDecoderRing: nsISuppo
+    *
+    * @param text The text to encrypt.
+    * @return The encrypted text, encoded as Base64.
+    */
+   [must_use]
+   ACString encryptString(in ACString text);
+ 
+   /**
++   * Run encryptString on multiple strings, asynchronously. This will allow you
++   * to not jank the browser if you need to encrypt a large number of strings
++   * all at once. This method accepts an array of wstrings which it will convert
++   * to UTF-8 internally before encrypting.
++   *
++   * @param plaintextsCount the number of strings to encrypt.
++   * @param plaintexts the strings to encrypt.
++   * @return A promise for the list of encrypted strings, encoded as Base64.
++   */
++  [implicit_jscontext, must_use]
++  nsISupports asyncEncryptStrings(in unsigned long plaintextsCount,
++                                  [array, size_is(plaintextsCount)] in wstring plaintexts);
++
++  /**
+    * Decrypt Base64 input.
+    * See the encryptString() documentation - this method has basically the same
+    * limitations.
+    *
+    * @param encryptedBase64Text Encrypted input text, encoded as Base64.
+    * @return The decoded text.
+    */
+   [must_use]
+diff --git a/security/manager/ssl/tests/unit/test_sdr.js b/security/manager/ssl/tests/unit/test_sdr.js
+--- a/security/manager/ssl/tests/unit/test_sdr.js
++++ b/security/manager/ssl/tests/unit/test_sdr.js
+@@ -16,17 +16,17 @@ const gTokenPasswordDialogs = {
+     info(`setPassword() called; shown ${gSetPasswordShownCount} times`);
+     info(`tokenName: ${tokenName}`);
+     return false; // Returning false means "the user didn't cancel".
+   },
+ 
+   QueryInterface: XPCOMUtils.generateQI([Ci.nsITokenPasswordDialogs])
+ };
+ 
+-function run_test() {
++add_task(function testEncryptString() {
+   let sdr = Cc["@mozilla.org/security/sdr;1"]
+               .getService(Ci.nsISecretDecoderRing);
+ 
+   // Test valid inputs for encryptString() and decryptString().
+   let inputs = [
+     "",
+     " ", // First printable latin1 character (code point 32).
+     "foo",
+@@ -73,9 +73,47 @@ function run_test() {
+     });
+ 
+     equal(gSetPasswordShownCount, 0,
+           "changePassword() dialog should have been shown zero times");
+     sdr.changePassword();
+     equal(gSetPasswordShownCount, 1,
+           "changePassword() dialog should have been shown exactly once");
+   }
+-}
++});
++
++add_task(async function testAsyncEncryptStrings() {
++  let sdr = Cc["@mozilla.org/security/sdr;1"]
++              .getService(Ci.nsISecretDecoderRing);
++
++  // Test valid inputs for encryptString() and decryptString().
++  let inputs = [
++    "",
++    " ", // First printable latin1 character (code point 32).
++    "foo",
++    "1234567890`~!@#$%^&*()-_=+{[}]|\\:;'\",<.>/?",
++    "¡äöüÿ", // Misc + last printable latin1 character (code point 255).
++    "aaa 一二三", // Includes Unicode with code points outside [0, 255].
++  ];
++
++  let encrypteds = await sdr.asyncEncryptStrings(inputs.length, inputs);
++  for (let i = 0; i < inputs.length; i++) {
++    let encrypted = encrypteds[i];
++    let input = inputs[i];
++    let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
++                      .createInstance(Ci.nsIScriptableUnicodeConverter);
++    converter.charset = "UTF-8";
++
++    let convertedInput = converter.ConvertFromUnicode(input);
++    convertedInput += converter.Finish();
++    notEqual(convertedInput, encrypted,
++             "Encrypted input should not just be the input itself");
++
++    try {
++      atob(encrypted);
++    } catch (e) {
++      ok(false, `encryptString() should have returned Base64: ${e}`);
++    }
++
++    equal(convertedInput, sdr.decryptString(encrypted),
++          "decryptString(encryptString(input)) should return input");
++  }
++});
+diff --git a/toolkit/components/passwordmgr/crypto-SDR.js b/toolkit/components/passwordmgr/crypto-SDR.js
+--- a/toolkit/components/passwordmgr/crypto-SDR.js
++++ b/toolkit/components/passwordmgr/crypto-SDR.js
+@@ -93,16 +93,61 @@ LoginManagerCrypto_SDR.prototype = {
+       else if (canceledMP)
+         this._notifyObservers("passwordmgr-crypto-loginCanceled");
+     }
+     return cipherText;
+   },
+ 
+ 
+   /*
++   * encryptMany
++   *
++   * Encrypts the specified strings, using the SecretDecoderRing.
++   *
++   * Returns a promise which resolves with the the encrypted strings,
++   * or throws/rejects with an error if there was a problem.
++   */
++  async encryptMany(plaintexts) {
++    if (!Array.isArray(plaintexts) || !plaintexts.length) {
++      throw Components.Exception("Need at least one plaintext to encrypt",
++                                 Cr.NS_ERROR_INVALID_ARG);
++    }
++
++    let cipherTexts;
++
++    let wasLoggedIn = this.isLoggedIn;
++    let canceledMP = false;
++
++    this._uiBusy = true;
++    try {
++      cipherTexts = await this._decoderRing.asyncEncryptStrings(plaintexts.length, plaintexts);
++    } catch (e) {
++      this.log("Failed to encrypt strings. (" + e.name + ")");
++      // If the user clicks Cancel, we get NS_ERROR_FAILURE.
++      // (unlike decrypting, which gets NS_ERROR_NOT_AVAILABLE).
++      if (e.result == Cr.NS_ERROR_FAILURE) {
++        canceledMP = true;
++        throw Components.Exception("User canceled master password entry", Cr.NS_ERROR_ABORT);
++      } else {
++        throw Components.Exception("Couldn't encrypt strings", Cr.NS_ERROR_FAILURE);
++      }
++    } finally {
++      this._uiBusy = false;
++      // If we triggered a master password prompt, notify observers.
++      if (!wasLoggedIn && this.isLoggedIn) {
++        this._notifyObservers("passwordmgr-crypto-login");
++      } else if (canceledMP) {
++        this._notifyObservers("passwordmgr-crypto-loginCanceled");
++      }
++    }
++    return cipherTexts;
++  },
++
++
++  /*
+    * decrypt
+    *
+    * Decrypts the specified string, using the SecretDecoderRing.
+    *
+    * Returns the decrypted string, or throws an exception if there was a
+    * problem.
+    */
+   decrypt(cipherText) {
+diff --git a/toolkit/components/passwordmgr/nsILoginManagerCrypto.idl b/toolkit/components/passwordmgr/nsILoginManagerCrypto.idl
+--- a/toolkit/components/passwordmgr/nsILoginManagerCrypto.idl
++++ b/toolkit/components/passwordmgr/nsILoginManagerCrypto.idl
+@@ -23,16 +23,27 @@ interface nsILoginManagerCrypto : nsISup
+    * NOTE: The current implemention of this inferface simply uses NSS/PSM's
+    * "Secret Decoder Ring" service. It is not recommended for general
+    * purpose encryption/decryption.
+    *
+    * Can throw if the user cancels entry of their master password.
+    */
+   AString encrypt(in AString plainText);
+ 
++  /*
++   * encryptMany
++   *
++   * @param plainTexts
++   *        The strings to be encrypted.
++   *
++   * Encrypts the specified strings, similar to encrypt, but returning a promise
++   * which resolves with the the encrypted strings.
++   */
++  jsval encryptMany(in jsval plainTexts);
++
+   /**
+    * decrypt
+    *
+    * @param cipherText
+    *        The string to be decrypted.
+    *
+    * Decrypts the specified string, returning the plaintext value.
+    *

+ 84 - 0
mozilla-release/patches/1432272-60a1.patch

@@ -0,0 +1,84 @@
+# HG changeset patch
+# User Ben Kelly <ben@wanderview.com>
+# Date 1516718301 18000
+# Node ID b5432554c7bd39dd14adff8060a7f7757bb2c40e
+# Parent  98c901dc8ae2062ab22200beafb21646fdc1eb09
+Bug 1432272 Make Fetch API use the global's base URL instead of the entry document's base URL. r=bz
+
+The fetch spec used to use the entry settings as the base for parsing relative
+Request/Response URL's, but this is no longer the case.  This was changed in:
+
+https://github.com/whatwg/fetch/issues/367
+
+Update our code to match this behavior.  We basically convert GetEntryDocument()
+to QI the global to nsGlobalWindowInner and use its ExtantDoc instead.
+
+No changes are needed for workers since its not possible to perform cross-global
+javascript access in worker threads.
+
+diff --git a/dom/fetch/Request.cpp b/dom/fetch/Request.cpp
+--- a/dom/fetch/Request.cpp
++++ b/dom/fetch/Request.cpp
+@@ -314,17 +314,18 @@ Request::Constructor(const GlobalObject&
+   } else {
+     // aInput is USVString.
+     // We need to get url before we create a InternalRequest.
+     nsAutoString input;
+     input.Assign(aInput.GetAsUSVString());
+     nsAutoString requestURL;
+     nsCString fragment;
+     if (NS_IsMainThread()) {
+-      nsIDocument* doc = GetEntryDocument();
++      nsCOMPtr<nsPIDOMWindowInner> inner(do_QueryInterface(global));
++      nsIDocument* doc = inner ? inner->GetExtantDoc() : nullptr;
+       if (doc) {
+         GetRequestURLFromDocument(doc, input, requestURL, fragment, aRv);
+       } else {
+         // If we don't have a document, we must assume that this is a full URL.
+         GetRequestURLFromChrome(input, requestURL, fragment, aRv);
+       }
+     } else {
+       GetRequestURLFromWorker(aGlobal, input, requestURL, fragment, aRv);
+@@ -363,17 +364,18 @@ Request::Constructor(const GlobalObject&
+   }
+   if (aInit.mReferrer.WasPassed()) {
+     const nsString& referrer = aInit.mReferrer.Value();
+     if (referrer.IsEmpty()) {
+       request->SetReferrer(NS_LITERAL_STRING(""));
+     } else {
+       nsAutoString referrerURL;
+       if (NS_IsMainThread()) {
+-        nsIDocument* doc = GetEntryDocument();
++        nsCOMPtr<nsPIDOMWindowInner> inner(do_QueryInterface(global));
++        nsIDocument* doc = inner ? inner->GetExtantDoc() : nullptr;
+         nsCOMPtr<nsIURI> uri;
+         if (doc) {
+           uri = ParseURLFromDocument(doc, referrer, aRv);
+         } else {
+           // If we don't have a document, we must assume that this is a full URL.
+           uri = ParseURLFromChrome(referrer, aRv);
+         }
+         if (NS_WARN_IF(aRv.Failed())) {
+diff --git a/dom/fetch/Response.cpp b/dom/fetch/Response.cpp
+--- a/dom/fetch/Response.cpp
++++ b/dom/fetch/Response.cpp
+@@ -95,17 +95,18 @@ Response::Error(const GlobalObject& aGlo
+ /* static */ already_AddRefed<Response>
+ Response::Redirect(const GlobalObject& aGlobal, const nsAString& aUrl,
+                    uint16_t aStatus, ErrorResult& aRv)
+ {
+   nsAutoString parsedURL;
+ 
+   if (NS_IsMainThread()) {
+     nsCOMPtr<nsIURI> baseURI;
+-    nsIDocument* doc = GetEntryDocument();
++    nsCOMPtr<nsPIDOMWindowInner> inner(do_QueryInterface(aGlobal.GetAsSupports()));
++    nsIDocument* doc = inner ? inner->GetExtantDoc() : nullptr;
+     if (doc) {
+       baseURI = doc->GetBaseURI();
+     }
+     nsCOMPtr<nsIURI> resolvedURI;
+     aRv = NS_NewURI(getter_AddRefs(resolvedURI), aUrl, nullptr, baseURI);
+     if (NS_WARN_IF(aRv.Failed())) {
+       return nullptr;
+     }

+ 34 - 0
mozilla-release/patches/1432713-60a1.patch

@@ -0,0 +1,34 @@
+# HG changeset patch
+# User Andrea Marchesini <amarchesini@mozilla.com>
+# Date 1516794359 -3600
+# Node ID 3f6f27565c8d62aef8f65e488bd5a7c81eb15263
+# Parent  6e9b4b746ee65833240588cef1ce6cf2f09ed333
+Bug 1432713 - PerformanceResouceTiming entries should have initiatorType set to 'fetch' if related to Fetch method requests, r=smaug
+
+diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp
+--- a/dom/fetch/FetchDriver.cpp
++++ b/dom/fetch/FetchDriver.cpp
+@@ -617,16 +617,22 @@ FetchDriver::HttpFetch(const nsACString&
+     MOZ_ASSERT(NS_SUCCEEDED(rv));
+     rv = internalChan->SetRedirectMode(static_cast<uint32_t>(mRequest->GetRedirectMode()));
+     MOZ_ASSERT(NS_SUCCEEDED(rv));
+     mRequest->MaybeSkipCacheIfPerformingRevalidation();
+     rv = internalChan->SetFetchCacheMode(static_cast<uint32_t>(mRequest->GetCacheMode()));
+     MOZ_ASSERT(NS_SUCCEEDED(rv));
+     rv = internalChan->SetIntegrityMetadata(mRequest->GetIntegrity());
+     MOZ_ASSERT(NS_SUCCEEDED(rv));
++
++    // Set the initiator type
++    nsCOMPtr<nsITimedChannel> timedChannel(do_QueryInterface(httpChan));
++    if (timedChannel) {
++      timedChannel->SetInitiatorType(NS_LITERAL_STRING("fetch"));
++    }
+   }
+ 
+   // Step 5. Proxy authentication will be handled by Necko.
+ 
+   // Continue setting up 'HTTPRequest'. Content-Type and body data.
+   nsCOMPtr<nsIUploadChannel2> uploadChan = do_QueryInterface(chan);
+   if (uploadChan) {
+     nsAutoCString contentType;
+

+ 250 - 0
mozilla-release/patches/1436742-60a1.patch

@@ -0,0 +1,250 @@
+# HG changeset patch
+# User Josh Matthews <josh@joshmatthews.net>
+# Date 1518211021 18000
+# Node ID 70c39ef867018954055fd0271a1806cdaee099d4
+# Parent  f9be19eacc0ca4f9bec4133d53152a39279b0dcd
+Bug 1436742 - Expose docgroup used to dispatch events when possible. r=froydnj
+
+diff --git a/dom/base/DocGroup.cpp b/dom/base/DocGroup.cpp
+--- a/dom/base/DocGroup.cpp
++++ b/dom/base/DocGroup.cpp
+@@ -57,17 +57,17 @@ DocGroup::~DocGroup()
+ 
+   mTabGroup->mDocGroups.RemoveEntry(mKey);
+ }
+ 
+ nsresult
+ DocGroup::Dispatch(TaskCategory aCategory,
+                    already_AddRefed<nsIRunnable>&& aRunnable)
+ {
+-  return mTabGroup->Dispatch(aCategory, Move(aRunnable));
++  return mTabGroup->DispatchWithDocGroup(aCategory, Move(aRunnable), this);
+ }
+ 
+ nsISerialEventTarget*
+ DocGroup::EventTargetFor(TaskCategory aCategory) const
+ {
+   return mTabGroup->EventTargetFor(aCategory);
+ }
+ 
+diff --git a/xpcom/threads/SchedulerGroup.cpp b/xpcom/threads/SchedulerGroup.cpp
+--- a/xpcom/threads/SchedulerGroup.cpp
++++ b/xpcom/threads/SchedulerGroup.cpp
+@@ -6,16 +6,17 @@
+ 
+ #include "mozilla/SchedulerGroup.h"
+ 
+ #include "jsfriendapi.h"
+ #include "mozilla/AbstractThread.h"
+ #include "mozilla/Atomics.h"
+ #include "mozilla/Move.h"
+ #include "mozilla/Unused.h"
++#include "mozilla/dom/DocGroup.h"
+ #include "nsINamed.h"
+ #include "nsQueryObject.h"
+ #include "mozilla/dom/ScriptSettings.h"
+ #include "nsThreadUtils.h"
+ 
+ #include "mozilla/Telemetry.h"
+ 
+ using namespace mozilla;
+@@ -209,20 +210,28 @@ SchedulerGroup::SchedulerGroup()
+  : mIsRunning(false)
+ {
+   if (NS_IsMainThread()) {
+     sTlsValidatingAccess.infallibleInit();
+   }
+ }
+ 
+ nsresult
++SchedulerGroup::DispatchWithDocGroup(TaskCategory aCategory,
++                                     already_AddRefed<nsIRunnable>&& aRunnable,
++                                     dom::DocGroup* aDocGroup)
++{
++  return LabeledDispatch(aCategory, Move(aRunnable), aDocGroup);
++}
++
++nsresult
+ SchedulerGroup::Dispatch(TaskCategory aCategory,
+                          already_AddRefed<nsIRunnable>&& aRunnable)
+ {
+-  return LabeledDispatch(aCategory, Move(aRunnable));
++  return LabeledDispatch(aCategory, Move(aRunnable), nullptr);
+ }
+ 
+ nsISerialEventTarget*
+ SchedulerGroup::EventTargetFor(TaskCategory aCategory) const
+ {
+   MOZ_ASSERT(aCategory != TaskCategory::Count);
+   MOZ_ASSERT(mEventTargets[size_t(aCategory)]);
+   return mEventTargets[size_t(aCategory)];
+@@ -295,21 +304,22 @@ SchedulerGroup::FromEventTarget(nsIEvent
+   if (!target) {
+     return nullptr;
+   }
+   return target->Dispatcher();
+ }
+ 
+ nsresult
+ SchedulerGroup::LabeledDispatch(TaskCategory aCategory,
+-                                already_AddRefed<nsIRunnable>&& aRunnable)
++                                already_AddRefed<nsIRunnable>&& aRunnable,
++                                dom::DocGroup* aDocGroup)
+ {
+   nsCOMPtr<nsIRunnable> runnable(aRunnable);
+   if (XRE_IsContentProcess()) {
+-    RefPtr<Runnable> internalRunnable = new Runnable(runnable.forget(), this);
++    RefPtr<Runnable> internalRunnable = new Runnable(runnable.forget(), this, aDocGroup);
+     return InternalUnlabeledDispatch(aCategory, internalRunnable.forget());
+   }
+   return UnlabeledDispatch(aCategory, runnable.forget());
+ }
+ 
+ /*static*/ nsresult
+ SchedulerGroup::InternalUnlabeledDispatch(TaskCategory aCategory,
+                                           already_AddRefed<Runnable>&& aRunnable)
+@@ -346,31 +356,39 @@ SchedulerGroup::SetValidatingAccess(Vali
+   sTlsValidatingAccess.set(validating);
+ 
+   dom::AutoJSAPI jsapi;
+   jsapi.Init();
+   js::EnableAccessValidation(jsapi.cx(), validating);
+ }
+ 
+ SchedulerGroup::Runnable::Runnable(already_AddRefed<nsIRunnable>&& aRunnable,
+-                                   SchedulerGroup* aGroup)
++                                   SchedulerGroup* aGroup,
++                                   dom::DocGroup* aDocGroup)
+   : mozilla::Runnable("SchedulerGroup::Runnable")
+   , mRunnable(Move(aRunnable))
+   , mGroup(aGroup)
++  , mDocGroup(aDocGroup)
+ {
+ }
+ 
+ bool
+ SchedulerGroup::Runnable::GetAffectedSchedulerGroups(SchedulerGroupSet& aGroups)
+ {
+   aGroups.Clear();
+   aGroups.Put(Group());
+   return true;
+ }
+ 
++dom::DocGroup*
++SchedulerGroup::Runnable::DocGroup() const
++{
++  return mDocGroup;
++}
++
+ NS_IMETHODIMP
+ SchedulerGroup::Runnable::GetName(nsACString& aName)
+ {
+   // Try to get a name from the underlying runnable.
+   nsCOMPtr<nsINamed> named = do_QueryInterface(mRunnable);
+   if (named) {
+     named->GetName(aName);
+   }
+diff --git a/xpcom/threads/SchedulerGroup.h b/xpcom/threads/SchedulerGroup.h
+--- a/xpcom/threads/SchedulerGroup.h
++++ b/xpcom/threads/SchedulerGroup.h
+@@ -21,16 +21,17 @@
+ 
+ class nsIEventTarget;
+ class nsIRunnable;
+ class nsISerialEventTarget;
+ 
+ namespace mozilla {
+ class AbstractThread;
+ namespace dom {
++class DocGroup;
+ class TabGroup;
+ }
+ 
+ #define NS_SCHEDULERGROUPRUNNABLE_IID \
+ { 0xd31b7420, 0x872b, 0x4cfb, \
+   { 0xa9, 0xc6, 0xae, 0x4c, 0x0f, 0x06, 0x36, 0x74 } }
+ 
+ // The "main thread" in Gecko will soon be a set of cooperatively scheduled
+@@ -108,21 +109,23 @@ public:
+   }
+ 
+   class Runnable final : public mozilla::Runnable
+                        , public nsIRunnablePriority
+                        , public nsILabelableRunnable
+   {
+   public:
+     Runnable(already_AddRefed<nsIRunnable>&& aRunnable,
+-             SchedulerGroup* aGroup);
++             SchedulerGroup* aGroup,
++             dom::DocGroup* aDocGroup);
+ 
+     bool GetAffectedSchedulerGroups(SchedulerGroupSet& aGroups) override;
+ 
+     SchedulerGroup* Group() const { return mGroup; }
++    dom::DocGroup* DocGroup() const;
+ 
+     NS_IMETHOD GetName(nsACString& aName) override;
+ 
+     bool IsBackground() const { return mGroup->IsBackground(); }
+ 
+     NS_DECL_ISUPPORTS_INHERITED
+     NS_DECL_NSIRUNNABLE
+     NS_DECL_NSIRUNNABLEPRIORITY
+@@ -131,16 +134,17 @@ public:
+ 
+  private:
+     friend class SchedulerGroup;
+ 
+     ~Runnable() = default;
+ 
+     nsCOMPtr<nsIRunnable> mRunnable;
+     RefPtr<SchedulerGroup> mGroup;
++    RefPtr<dom::DocGroup> mDocGroup;
+   };
+   friend class Runnable;
+ 
+   bool* GetValidAccessPtr() { return &mIsRunning; }
+ 
+   virtual nsresult Dispatch(TaskCategory aCategory,
+                             already_AddRefed<nsIRunnable>&& aRunnable);
+ 
+@@ -185,33 +189,38 @@ public:
+   using RunnableEpochQueue = Queue<EpochQueueEntry, 32>;
+ 
+   RunnableEpochQueue& GetQueue(mozilla::EventPriority aPriority)
+   {
+     return mEventQueues[size_t(aPriority)];
+   }
+ 
+ protected:
++  nsresult DispatchWithDocGroup(TaskCategory aCategory,
++                                already_AddRefed<nsIRunnable>&& aRunnable,
++                                dom::DocGroup* aDocGroup);
++
+   static nsresult InternalUnlabeledDispatch(TaskCategory aCategory,
+                                             already_AddRefed<Runnable>&& aRunnable);
+ 
+   // Implementations are guaranteed that this method is called on the main
+   // thread.
+   virtual AbstractThread* AbstractMainThreadForImpl(TaskCategory aCategory);
+ 
+   // Helper method to create an event target specific to a particular TaskCategory.
+   virtual already_AddRefed<nsISerialEventTarget>
+   CreateEventTargetFor(TaskCategory aCategory);
+ 
+   // Given an event target returned by |dispatcher->CreateEventTargetFor|, this
+   // function returns |dispatcher|.
+   static SchedulerGroup* FromEventTarget(nsIEventTarget* aEventTarget);
+ 
+   nsresult LabeledDispatch(TaskCategory aCategory,
+-                           already_AddRefed<nsIRunnable>&& aRunnable);
++                           already_AddRefed<nsIRunnable>&& aRunnable,
++                           dom::DocGroup* aDocGroup);
+ 
+   void CreateEventTargets(bool aNeedValidation);
+ 
+   // Shuts down this dispatcher. If aXPCOMShutdown is true, invalidates this
+   // dispatcher.
+   void Shutdown(bool aXPCOMShutdown);
+ 
+   static MOZ_THREAD_LOCAL(bool) sTlsValidatingAccess;

+ 247 - 0
mozilla-release/patches/1436743-60a1.patch

@@ -0,0 +1,247 @@
+# HG changeset patch
+# User Josh Matthews <josh@joshmatthews.net>
+# Date 1518123240 18000
+# Node ID d9da3f3bf43203a0ad3de87adfd8298c5e5e85a2
+# Parent  5f8a4eabe5dfd942a5568c37463fd2d3bcdc661f
+Bug 1436743 - Dispatch events via the docgroup rather than the tabgroup when possible. r=mystor
+
+diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
+--- a/docshell/base/nsDocShell.cpp
++++ b/docshell/base/nsDocShell.cpp
+@@ -1803,16 +1803,19 @@ nsDocShell::DispatchToTabGroup(TaskCateg
+   nsCOMPtr<nsIRunnable> runnable(aRunnable);
+   nsCOMPtr<nsPIDOMWindowOuter> win = GetWindow();
+   if (!win) {
+     // Window should only be unavailable after destroyed.
+     MOZ_ASSERT(mIsBeingDestroyed);
+     return NS_ERROR_FAILURE;
+   }
+ 
++  if (win->GetDocGroup()) {
++    return win->GetDocGroup()->Dispatch(aCategory, runnable.forget());
++  }
+   RefPtr<mozilla::dom::TabGroup> tabGroup = win->TabGroup();
+   return tabGroup->Dispatch(aCategory, runnable.forget());
+ }
+ 
+ NS_IMETHODIMP
+ nsDocShell::DispatchLocationChangeEvent()
+ {
+   return DispatchToTabGroup(
+diff --git a/docshell/shistory/nsSHistory.cpp b/docshell/shistory/nsSHistory.cpp
+--- a/docshell/shistory/nsSHistory.cpp
++++ b/docshell/shistory/nsSHistory.cpp
+@@ -1861,22 +1861,23 @@ nsSHistory::SetRootDocShell(nsIDocShell*
+     // Seamonkey moves shistory between <xul:browser>s when restoring a tab.
+     // Let's try not to break our friend too badly...
+     if (mHistoryTracker) {
+       NS_WARNING("Change the root docshell of a shistory is unsafe and "
+                  "potentially problematic.");
+       mHistoryTracker->AgeAllGenerations();
+     }
+ 
+-    RefPtr<mozilla::dom::TabGroup> tabGroup = win->TabGroup();
++    nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(win);
++
+     mHistoryTracker = mozilla::MakeUnique<HistoryTracker>(
+       this,
+       mozilla::Preferences::GetUint(CONTENT_VIEWER_TIMEOUT_SECONDS,
+                                     CONTENT_VIEWER_TIMEOUT_SECONDS_DEFAULT),
+-      tabGroup->EventTargetFor(mozilla::TaskCategory::Other));
++      global->EventTargetFor(mozilla::TaskCategory::Other));
+   }
+ 
+   return NS_OK;
+ }
+ 
+ NS_IMETHODIMP
+ nsSHistory::GetSHistoryEnumerator(nsISimpleEnumerator** aEnumerator)
+ {
+diff --git a/dom/jsurl/nsJSProtocolHandler.cpp b/dom/jsurl/nsJSProtocolHandler.cpp
+--- a/dom/jsurl/nsJSProtocolHandler.cpp
++++ b/dom/jsurl/nsJSProtocolHandler.cpp
+@@ -5,16 +5,17 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "nsCOMPtr.h"
+ #include "jsapi.h"
+ #include "jswrapper.h"
+ #include "nsCRT.h"
+ #include "nsError.h"
+ #include "nsString.h"
++#include "nsGlobalWindow.h"
+ #include "nsReadableUtils.h"
+ #include "nsJSProtocolHandler.h"
+ #include "nsStringStream.h"
+ #include "nsNetUtil.h"
+ 
+ #include "nsIStreamListener.h"
+ #include "nsIComponentManager.h"
+ #include "nsIServiceManager.h"
+@@ -650,18 +651,19 @@ nsJSChannel::AsyncOpen(nsIStreamListener
+ 
+         // We're returning success from asyncOpen2(), but we didn't open a
+         // stream channel.  We'll have to notify ourselves, but make sure to do
+         // it asynchronously.
+         method = &nsJSChannel::NotifyListener;
+         name = "nsJSChannel::NotifyListener";
+     }
+ 
+-    nsresult rv = NS_DispatchToCurrentThread(
+-      mozilla::NewRunnableMethod(name, this, method));
++    nsCOMPtr<nsIRunnable> runnable = mozilla::NewRunnableMethod(name, this, method);
++    nsGlobalWindow* window = nsGlobalWindow::Cast(mOriginalInnerWindow);
++    nsresult rv = window->Dispatch(mozilla::TaskCategory::Other, runnable.forget());
+ 
+     if (NS_FAILED(rv)) {
+         loadGroup->RemoveRequest(this, nullptr, rv);
+         mIsActive = false;
+         CleanupStrongRefs();
+     }
+     return rv;
+ }
+diff --git a/dom/performance/Performance.cpp b/dom/performance/Performance.cpp
+--- a/dom/performance/Performance.cpp
++++ b/dom/performance/Performance.cpp
+@@ -510,17 +510,22 @@ private:
+   RefPtr<Performance> mPerformance;
+ };
+ 
+ void
+ Performance::RunNotificationObserversTask()
+ {
+   mPendingNotificationObserversTask = true;
+   nsCOMPtr<nsIRunnable> task = new NotifyObserversTask(this);
+-  nsresult rv = NS_DispatchToCurrentThread(task);
++  nsresult rv;
++  if (GetOwnerGlobal()) {
++    rv = GetOwnerGlobal()->Dispatch(TaskCategory::Other, task.forget());
++  } else {
++    rv = NS_DispatchToCurrentThread(task);
++  }
+   if (NS_WARN_IF(NS_FAILED(rv))) {
+     mPendingNotificationObserversTask = false;
+   }
+ }
+ 
+ void
+ Performance::QueueEntry(PerformanceEntry* aEntry)
+ {
+diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
+--- a/dom/script/ScriptLoader.cpp
++++ b/dom/script/ScriptLoader.cpp
+@@ -1372,20 +1372,25 @@ ScriptLoader::ProcessExternalScript(nsIS
+     LOG(("ScriptLoadRequest (%p): Created request for external script",
+          request.get()));
+ 
+     nsresult rv = StartLoad(request);
+     if (NS_FAILED(rv)) {
+       ReportErrorToConsole(request, rv);
+ 
+       // Asynchronously report the load failure
+-      NS_DispatchToCurrentThread(
++      nsCOMPtr<nsIRunnable> runnable =
+         NewRunnableMethod("nsIScriptElement::FireErrorEvent",
+                           aElement,
+-                          &nsIScriptElement::FireErrorEvent));
++                          &nsIScriptElement::FireErrorEvent);
++      if (mDocument) {
++        mDocument->Dispatch(TaskCategory::Other, runnable.forget());
++      } else {
++        NS_DispatchToCurrentThread(runnable);
++      }
+       return false;
+     }
+   }
+ 
+   // We should still be in loading stage of script unless we're loading a
+   // module.
+   NS_ASSERTION(!request->InCompilingStage() || request->IsModuleRequest(),
+                "Request should not yet be in compiling stage.");
+diff --git a/image/imgRequestProxy.cpp b/image/imgRequestProxy.cpp
+--- a/image/imgRequestProxy.cpp
++++ b/image/imgRequestProxy.cpp
+@@ -352,17 +352,17 @@ imgRequestProxy::AddToOwner(nsIDocument*
+   // scheduler group is valid with or without a document, but that means
+   // we will use the most generic event target possible on dispatch.
+   if (aLoadingDocument) {
+     RefPtr<dom::DocGroup> docGroup = aLoadingDocument->GetDocGroup();
+     if (docGroup) {
+       mTabGroup = docGroup->GetTabGroup();
+       MOZ_ASSERT(mTabGroup);
+ 
+-      mEventTarget = mTabGroup->EventTargetFor(mozilla::TaskCategory::Other);
++      mEventTarget = docGroup->EventTargetFor(mozilla::TaskCategory::Other);
+       MOZ_ASSERT(mEventTarget);
+     }
+   }
+ 
+   if (mListener && !mEventTarget) {
+     mEventTarget = do_GetMainThread();
+   }
+ 
+diff --git a/toolkit/components/satchel/nsFormFillController.cpp b/toolkit/components/satchel/nsFormFillController.cpp
+--- a/toolkit/components/satchel/nsFormFillController.cpp
++++ b/toolkit/components/satchel/nsFormFillController.cpp
+@@ -154,17 +154,17 @@ nsFormFillController::AttributeChanged(n
+     // to avoid ending up in an endless loop due to re-registering our
+     // mutation observer (which would notify us again for *this* event).
+     nsCOMPtr<nsIRunnable> event =
+       mozilla::NewRunnableMethod<nsCOMPtr<nsIDOMHTMLInputElement>>(
+         "nsFormFillController::MaybeStartControllingInput",
+         this,
+         &nsFormFillController::MaybeStartControllingInput,
+         focusedInput);
+-    NS_DispatchToCurrentThread(event);
++    aDocument->Dispatch(TaskCategory::Other, event.forget());
+   }
+ 
+   if (mListNode && mListNode->Contains(aElement)) {
+     RevalidateDataList();
+   }
+ }
+ 
+ void
+diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp
+--- a/uriloader/base/nsDocLoader.cpp
++++ b/uriloader/base/nsDocLoader.cpp
+@@ -1,15 +1,14 @@
+ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /* This Source Code Form is subject to the terms of the Mozilla Public
+  * License, v. 2.0. If a copy of the MPL was not distributed with this
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include "nspr.h"
+-#include "mozilla/dom/TabGroup.h"
+ #include "mozilla/Logging.h"
+ #include "mozilla/IntegerPrintfMacros.h"
+ 
+ #include "nsDocLoader.h"
+ #include "nsCURILoader.h"
+ #include "nsNetUtil.h"
+ #include "nsIHttpChannel.h"
+ #include "nsIWebProgressListener2.h"
+@@ -984,20 +983,20 @@ nsDocLoader::GetLoadType(uint32_t *aLoad
+ 
+ NS_IMETHODIMP
+ nsDocLoader::GetTarget(nsIEventTarget** aTarget)
+ {
+   nsCOMPtr<mozIDOMWindowProxy> window;
+   nsresult rv = GetDOMWindow(getter_AddRefs(window));
+   NS_ENSURE_SUCCESS(rv, rv);
+ 
+-  nsCOMPtr<nsPIDOMWindowOuter> piwindow = nsPIDOMWindowOuter::From(window);
+-  NS_ENSURE_STATE(piwindow);
++  nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(window);
++  NS_ENSURE_STATE(global);
+ 
+-  nsCOMPtr<nsIEventTarget> target = piwindow->TabGroup()->EventTargetFor(mozilla::TaskCategory::Other);
++  nsCOMPtr<nsIEventTarget> target = global->EventTargetFor(mozilla::TaskCategory::Other);
+   target.forget(aTarget);
+   return NS_OK;
+ }
+ 
+ NS_IMETHODIMP
+ nsDocLoader::SetTarget(nsIEventTarget* aTarget)
+ {
+   return NS_ERROR_NOT_IMPLEMENTED;

+ 28 - 20
mozilla-release/patches/1465585-3-std-62a1.patch

@@ -2,7 +2,7 @@
 # User Emilio Cobos Alvarez <emilio@crisal.io>
 # Date 1527707735 -7200
 # Node ID b54db66223586b4e04f5cb926fccdacf8a176b91
-# Parent  8e1edde418db43cf7b16fd2ac37b19485928d36b
+# Parent  ca3847b26a424b86d6b8023b4041f2a321d71efd
 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
 
 This was done automatically replacing:
@@ -1280,7 +1280,7 @@ diff --git a/devtools/shared/heapsnapshot/tests/gtest/DevTools.h b/devtools/shar
 diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
 --- a/docshell/base/nsDocShell.cpp
 +++ b/docshell/base/nsDocShell.cpp
-@@ -2864,17 +2864,17 @@ nsDocShell::MaybeCreateInitialClientSour
+@@ -2867,17 +2867,17 @@ nsDocShell::MaybeCreateInitialClientSour
  }
  
  Maybe<ClientInfo>
@@ -1299,7 +1299,7 @@ diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
  
    if (!doc || !doc->IsInitialDocument()) {
      return Maybe<ClientInfo>();
-@@ -5062,17 +5062,17 @@ nsDocShell::Reload(uint32_t aReloadFlags
+@@ -5065,17 +5065,17 @@ nsDocShell::Reload(uint32_t aReloadFlags
      // Stack variables to ensure changes to the member variables don't affect to
      // the call.
      nsCOMPtr<nsIURI> currentURI = mCurrentURI;
@@ -1318,7 +1318,7 @@ diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
                        referrerURI,
                        referrerPolicy,
                        triggeringPrincipal,
-@@ -11171,17 +11171,17 @@ nsDocShell::DoChannelLoad(nsIChannel* aC
+@@ -11174,17 +11174,17 @@ nsDocShell::DoChannelLoad(nsIChannel* aC
  
    // Since we are loading a document we need to make sure the proper reserved
    // and initial client data is stored on the nsILoadInfo.  The
@@ -1337,7 +1337,7 @@ diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
    NS_ENSURE_SUCCESS(rv, rv);
  
    // We're about to load a new page and it may take time before necko
-@@ -12357,17 +12357,17 @@ nsDocShell::LoadHistoryEntry(nsISHEntry*
+@@ -12360,17 +12360,17 @@ nsDocShell::LoadHistoryEntry(nsISHEntry*
      return NS_ERROR_FAILURE;
    }
  
@@ -1356,7 +1356,7 @@ diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
                      referrerURI,
                      referrerPolicy,
                      triggeringPrincipal,
-@@ -14155,17 +14155,17 @@ nsDocShell::NotifyJSRunToCompletionStart
+@@ -14158,17 +14158,17 @@ nsDocShell::NotifyJSRunToCompletionStart
                                           const uint32_t aLineNumber,
                                           JS::Handle<JS::Value> aAsyncStack,
                                           const char* aAsyncCause)
@@ -1375,7 +1375,7 @@ diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
  
    mJSRunToCompletionDepth++;
  }
-@@ -14309,17 +14309,17 @@ nsDocShell::InFrameSwap()
+@@ -14312,17 +14312,17 @@ nsDocShell::InFrameSwap()
      shell = shell->GetParentDocshell();
    } while (shell);
    return false;
@@ -2488,8 +2488,8 @@ diff --git a/dom/base/DocGroup.cpp b/dom/base/DocGroup.cpp
  DocGroup::Dispatch(TaskCategory aCategory,
                     already_AddRefed<nsIRunnable>&& aRunnable)
  {
--  return mTabGroup->Dispatch(aCategory, Move(aRunnable));
-+  return mTabGroup->Dispatch(aCategory, std::move(aRunnable));
+-  return mTabGroup->DispatchWithDocGroup(aCategory, Move(aRunnable), this);
++  return mTabGroup->DispatchWithDocGroup(aCategory, std::move(aRunnable), this);
  }
  
  nsISerialEventTarget*
@@ -53472,7 +53472,7 @@ diff --git a/xpcom/threads/Queue.h b/xpcom/threads/Queue.h
 diff --git a/xpcom/threads/SchedulerGroup.cpp b/xpcom/threads/SchedulerGroup.cpp
 --- a/xpcom/threads/SchedulerGroup.cpp
 +++ b/xpcom/threads/SchedulerGroup.cpp
-@@ -140,17 +140,17 @@ SchedulerEventTarget::DispatchFromScript
+@@ -141,17 +141,17 @@ SchedulerEventTarget::DispatchFromScript
  }
  
  NS_IMETHODIMP
@@ -53491,7 +53491,7 @@ diff --git a/xpcom/threads/SchedulerGroup.cpp b/xpcom/threads/SchedulerGroup.cpp
    return NS_ERROR_NOT_IMPLEMENTED;
  }
  
-@@ -167,19 +167,19 @@ SchedulerEventTarget::IsOnCurrentThreadI
+@@ -168,19 +168,19 @@ SchedulerEventTarget::IsOnCurrentThreadI
    return NS_IsMainThread();
  }
  
@@ -53513,17 +53513,25 @@ diff --git a/xpcom/threads/SchedulerGroup.cpp b/xpcom/threads/SchedulerGroup.cpp
  {
    if (gEarliestUnprocessedVsync) {
      // If we've seen a vsync already, but haven't handled it, keep the
-@@ -212,17 +212,17 @@ SchedulerGroup::SchedulerGroup()
-     sTlsValidatingAccess.infallibleInit();
+@@ -214,24 +214,24 @@ SchedulerGroup::SchedulerGroup()
    }
  }
  
+ nsresult
+ SchedulerGroup::DispatchWithDocGroup(TaskCategory aCategory,
+                                      already_AddRefed<nsIRunnable>&& aRunnable,
+                                      dom::DocGroup* aDocGroup)
+ {
+-  return LabeledDispatch(aCategory, Move(aRunnable), aDocGroup);
++  return LabeledDispatch(aCategory, std::move(aRunnable), aDocGroup);
+ }
+ 
  nsresult
  SchedulerGroup::Dispatch(TaskCategory aCategory,
                           already_AddRefed<nsIRunnable>&& aRunnable)
  {
--  return LabeledDispatch(aCategory, Move(aRunnable));
-+  return LabeledDispatch(aCategory, std::move(aRunnable));
+-  return LabeledDispatch(aCategory, Move(aRunnable), nullptr);
++  return LabeledDispatch(aCategory, std::move(aRunnable), nullptr);
  }
  
  nsISerialEventTarget*
@@ -53532,7 +53540,7 @@ diff --git a/xpcom/threads/SchedulerGroup.cpp b/xpcom/threads/SchedulerGroup.cpp
    MOZ_ASSERT(aCategory != TaskCategory::Count);
    MOZ_ASSERT(mEventTargets[size_t(aCategory)]);
    return mEventTargets[size_t(aCategory)];
-@@ -312,17 +312,17 @@ SchedulerGroup::LabeledDispatch(TaskCate
+@@ -322,17 +322,17 @@ SchedulerGroup::LabeledDispatch(TaskCate
  
  /*static*/ nsresult
  SchedulerGroup::InternalUnlabeledDispatch(TaskCategory aCategory,
@@ -53551,25 +53559,25 @@ diff --git a/xpcom/threads/SchedulerGroup.cpp b/xpcom/threads/SchedulerGroup.cpp
      // Dispatch failed.  This is a situation where we would have used
      // NS_DispatchToMainThread rather than calling into the SchedulerGroup
      // machinery, and the caller would be expecting to leak the nsIRunnable
-@@ -348,17 +348,17 @@ SchedulerGroup::SetValidatingAccess(Vali
-   dom::AutoJSAPI jsapi;
+@@ -359,17 +359,17 @@ SchedulerGroup::SetValidatingAccess(Vali
    jsapi.Init();
    js::EnableAccessValidation(jsapi.cx(), validating);
  }
  
  SchedulerGroup::Runnable::Runnable(already_AddRefed<nsIRunnable>&& aRunnable,
-                                    SchedulerGroup* aGroup)
+                                    SchedulerGroup* aGroup,
+                                    dom::DocGroup* aDocGroup)
    : mozilla::Runnable("SchedulerGroup::Runnable")
 -  , mRunnable(Move(aRunnable))
 +  , mRunnable(std::move(aRunnable))
    , mGroup(aGroup)
+   , mDocGroup(aDocGroup)
  {
  }
  
  bool
  SchedulerGroup::Runnable::GetAffectedSchedulerGroups(SchedulerGroupSet& aGroups)
  {
-   aGroups.Clear();
 diff --git a/xpcom/threads/SharedThreadPool.h b/xpcom/threads/SharedThreadPool.h
 --- a/xpcom/threads/SharedThreadPool.h
 +++ b/xpcom/threads/SharedThreadPool.h

+ 6 - 6
mozilla-release/patches/1522150-1-66a1.patch

@@ -2,7 +2,7 @@
 # User Randell Jesup <rjesup@jesup.org>
 # Date 1548523085 18000
 # Node ID 0f5c896960f5147c3600c847209fb786dc6c1481
-# Parent  61193547bd951c37b20dac413247966918ad082c
+# Parent  5cf6a22e0fb625a8bbe71a933642ce478d01d7db
 Bug 1522150: Rename EventPriority to EventQueuePriority to avoid name conflict with MacOS r=froyd
 
 diff --git a/xpcom/threads/AbstractEventQueue.h b/xpcom/threads/AbstractEventQueue.h
@@ -458,7 +458,7 @@ diff --git a/xpcom/threads/PrioritizedEventQueue.h b/xpcom/threads/PrioritizedEv
 diff --git a/xpcom/threads/SchedulerGroup.h b/xpcom/threads/SchedulerGroup.h
 --- a/xpcom/threads/SchedulerGroup.h
 +++ b/xpcom/threads/SchedulerGroup.h
-@@ -179,18 +179,17 @@ public:
+@@ -183,18 +183,17 @@ public:
        : mRunnable(aRunnable)
        , mEpochNumber(aEpoch)
      {
@@ -474,11 +474,11 @@ diff --git a/xpcom/threads/SchedulerGroup.h b/xpcom/threads/SchedulerGroup.h
    }
  
  protected:
-   static nsresult InternalUnlabeledDispatch(TaskCategory aCategory,
-                                             already_AddRefed<Runnable>&& aRunnable);
+   nsresult DispatchWithDocGroup(TaskCategory aCategory,
+                                 already_AddRefed<nsIRunnable>&& aRunnable,
+                                 dom::DocGroup* aDocGroup);
  
-   // Implementations are guaranteed that this method is called on the main
-@@ -219,16 +218,16 @@ protected:
+@@ -228,16 +227,16 @@ protected:
    bool mIsRunning;
  
    // Number of events that are currently enqueued for this SchedulerGroup

+ 1 - 1
mozilla-release/patches/523950-01-60a1.patch

@@ -41,7 +41,7 @@ diff --git a/image/imgRequestProxy.cpp b/image/imgRequestProxy.cpp
        mTabGroup = docGroup->GetTabGroup();
        MOZ_ASSERT(mTabGroup);
  
-       mEventTarget = mTabGroup->EventTargetFor(mozilla::TaskCategory::Other);
+       mEventTarget = docGroup->EventTargetFor(mozilla::TaskCategory::Other);
        MOZ_ASSERT(mEventTarget);
      }
    }

+ 3 - 1
mozilla-release/patches/WIP-NOBUG-implement-about-seamonkey-mozilla.patch → mozilla-release/patches/9999999-about-seamonkey-mozilla-25319.patch

@@ -1,7 +1,9 @@
 # HG changeset patch
 # User Bill Gianopoulos <wgianopoulos@gmail.com>
 # Date 1712676522 0
-NOBUG - Implement about:seamonkey.
+Bug 9999999 - Implement about:seamonkey. r=IanN a=IanN
+
+mozilla part 2.53 release branch.
 
 diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp
 --- a/docshell/base/nsAboutRedirector.cpp

+ 9 - 1
mozilla-release/patches/series

@@ -342,6 +342,7 @@ NOBUG-20170803-promisehelper-57a1.patch
 1366531-58a1.patch
 1408337-58a1.patch
 1415919-58a1.patch
+1414340-2-fix-58a1.patch
 1412608-58a1.patch
 1415300-58a1.patch
 1411402-58a1.patch
@@ -1092,6 +1093,8 @@ servo-19850-60a1.patch
 1432811-60a1.patch
 1428774-60a1.patch
 1432414-60a1.patch
+1432272-60a1.patch
+1432713-60a1.patch
 1432187-1-60a1.patch
 1432187-2-60a1.patch
 1432187-3-60a1.patch
@@ -1195,6 +1198,7 @@ servo-19868-60a1.patch
 1428698-60a1.patch
 1431217-60a1.patch
 1432923-60a1.patch
+1426721-1-60a1.patch
 1432789-1-60a1.patch
 1432789-2-60a1.patch
 1432850-60a1.patch
@@ -1286,6 +1290,7 @@ servo-19851-60a1.patch
 servo-19878-60a1.patch
 1433501-1-60a1.patch
 1433501-2-60a1.patch
+1420975-60a1.patch
 1433846-1-60a1.patch
 1433846-2-60a1.patch
 1433846-3-60a1.patch
@@ -1609,6 +1614,7 @@ NOBUG-20180206-jsgdb-60a1.patch
 1434600-1-60a1.patch
 1434600-2-60a1.patch
 1434600-3-60a1.patch
+1422036-60a1.patch
 1434723-1-60a1.patch
 1434723-2-60a1.patch
 1434723-3-60a1.patch
@@ -1833,6 +1839,8 @@ servo-20011-60a1.patch
 servo-20010-60a1.patch
 1435139-60a1.patch
 servo-20013-60a1.patch
+1436742-60a1.patch
+1436743-60a1.patch
 1429508-1-60a1.patch
 1429508-2-60a1.patch
 1429508-3-60a1.patch
@@ -6750,7 +6758,6 @@ TOP-NOBUG-REGEXP-44-irregexp-25318.patch
 TOP-NOBUG-REGEXP-45-final-25318.patch
 TOP-NOBUG-REGEXP-46-fixes-25318.patch
 WIP-NOBUG-seamonkey-credits.patch
-WIP-NOBUG-implement-about-seamonkey-mozilla.patch
 1717947-1-91a1.patch
 1717947-2-91a1.patch
 1717947-3-91a1.patch
@@ -6777,3 +6784,4 @@ WIP-NOBUG-implement-about-seamonkey-mozilla.patch
 1881183-PARTIAL-NOTESTS-11510.patch
 1890514-11511.patch
 1893340-PARTIAL-NOTESTS-11511.patch
+9999999-about-seamonkey-mozilla-25319.patch