summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:59 +0000
commit4619c1a0ffc127c8f645077f5c322663d8b9b2b3 (patch)
tree070869da410d51f1e532cfb680e493ef847523c7 /debian/patches
parentAdding upstream version 86.0.1. (diff)
downloadfirefox-4619c1a0ffc127c8f645077f5c322663d8b9b2b3.tar.xz
firefox-4619c1a0ffc127c8f645077f5c322663d8b9b2b3.zip
Adding debian version 86.0.1-1.debian/86.0.1-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch47
-rw-r--r--debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch34
-rw-r--r--debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch20
-rw-r--r--debian/patches/debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch21
-rw-r--r--debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch21
-rw-r--r--debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch21
-rw-r--r--debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch37
-rw-r--r--debian/patches/debian-hacks/Don-t-build-image-gtests.patch23
-rw-r--r--debian/patches/debian-hacks/Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch24
-rw-r--r--debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch21
-rw-r--r--debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch21
-rw-r--r--debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch42
-rw-r--r--debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch21
-rw-r--r--debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch79
-rw-r--r--debian/patches/fixes/Bug-1526653-Include-struct-definitions-for-user_vfp-.patch31
-rw-r--r--debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch516
-rw-r--r--debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch63
-rw-r--r--debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch21
-rw-r--r--debian/patches/porting/Work-around-Debian-bug-844357.patch20
-rw-r--r--debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch22
-rw-r--r--debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch21
-rw-r--r--debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch21
-rw-r--r--debian/patches/prefs/Set-DPI-to-system-settings.patch21
-rw-r--r--debian/patches/prefs/Set-javascript.options.showInConsole.patch20
-rw-r--r--debian/patches/series24
25 files changed, 1212 insertions, 0 deletions
diff --git a/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch b/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch
new file mode 100644
index 0000000000..1ae44c6d9d
--- /dev/null
+++ b/debian/patches/debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch
@@ -0,0 +1,47 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Mon, 27 Dec 2010 10:44:28 +0100
+Subject: Add a 2 minutes timeout on xpcshell tests
+
+---
+ testing/xpcshell/runxpcshelltests.py | 21 ++++++++++++++++++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py
+index 996590e..69aae75 100755
+--- a/testing/xpcshell/runxpcshelltests.py
++++ b/testing/xpcshell/runxpcshelltests.py
+@@ -13,6 +13,7 @@ import os
+ import pipes
+ import random
+ import re
++import select
+ import shutil
+ import signal
+ import sys
+@@ -830,9 +831,23 @@ class XPCShellTestThread(Thread):
+ if self.interactive:
+ self.log.info("%s | Process ID: %d" % (name, self.proc_ident))
+
+- # Communicate returns a tuple of (stdout, stderr), however we always
+- # redirect stderr to stdout, so the second element is ignored.
+- process_output, _ = self.communicate(proc)
++ if self.pStdout == PIPE:
++ process_stdout = ""
++ while True:
++ (r, w, e) = select.select([proc.stdout], [], [], 120)
++ if len(r) == 0:
++ process_stdout += "TEST-UNEXPECTED-FAIL | %s | application timed out after 120 seconds with no output" % (test)
++ proc.kill()
++ break
++ line = proc.stdout.read(1)
++ if line == "":
++ break
++ process_stdout += line
++ proc.wait()
++ else:
++ # Communicate returns a tuple of (stdout, stderr), however we always
++ # redirect stderr to stdout, so the second element is ignored.
++ process_output, _ = self.communicate(proc)
+
+ if self.interactive:
+ # Not sure what else to do here...
diff --git a/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch b/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch
new file mode 100644
index 0000000000..93b500067e
--- /dev/null
+++ b/debian/patches/debian-hacks/Add-another-preferences-directory-for-applications-p.patch
@@ -0,0 +1,34 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Sat, 21 Jun 2008 03:09:21 +0200
+Subject: Add another preferences directory for applications:
+ preferences/syspref
+
+It was existing in previous versions of iceweasel as a symlink to
+/etc/iceweasel/pref.
+
+This has the side effect to make these preferences there work again, and
+to disable the "set as default browser" dialog.
+---
+ toolkit/xre/nsXREDirProvider.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
+index d9bcdb1..9b044f6 100644
+--- a/toolkit/xre/nsXREDirProvider.cpp
++++ b/toolkit/xre/nsXREDirProvider.cpp
+@@ -850,6 +850,7 @@ static nsresult DeleteDirIfExists(nsIFile* dir) {
+
+ static const char* const kAppendPrefDir[] = {"defaults", "preferences",
+ nullptr};
++static const char *const kAppendSysPrefDir[] = { "defaults", "syspref", nullptr };
+
+ nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty,
+ nsISimpleEnumerator** aResult) {
+@@ -860,6 +861,7 @@ nsresult nsXREDirProvider::GetFilesInternal(const char* aProperty,
+ nsCOMArray<nsIFile> directories;
+
+ LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
++ LoadDirIntoArray(mXULAppDir, kAppendSysPrefDir, directories);
+
+ rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile));
+ } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) {
diff --git a/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch b/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch
new file mode 100644
index 0000000000..55472f5bd9
--- /dev/null
+++ b/debian/patches/debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch
@@ -0,0 +1,20 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Mon, 16 Dec 2013 10:53:58 +0900
+Subject: Add debian/extra-stuff to upstream build system directory traversal
+
+---
+ moz.build | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/moz.build b/moz.build
+index 7cb35bf..d23263f 100644
+--- a/moz.build
++++ b/moz.build
+@@ -195,4 +195,7 @@ SPHINX_TREES["setup"] = "docs/setup"
+
+ SPHINX_TREES["crash-reporting"] = "docs/crash-reporting"
+
++if not CONFIG["LIBXUL_SDK"]:
++ DIRS += ["debian/extra-stuff"]
++
+ include("build/templates.mozbuild")
diff --git a/debian/patches/debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch b/debian/patches/debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch
new file mode 100644
index 0000000000..52e743487c
--- /dev/null
+++ b/debian/patches/debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Sat, 6 Feb 2021 07:52:19 +0900
+Subject: Allow to build with cargo in Debian unstable
+
+---
+ build/moz.configure/rust.configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
+index ff3dbe0..2ceff72 100644
+--- a/build/moz.configure/rust.configure
++++ b/build/moz.configure/rust.configure
+@@ -168,7 +168,7 @@ def rust_compiler(rustc_info, cargo_info, build_project):
+ rustc_min_version = Version("1.47.0")
+ else:
+ rustc_min_version = Version(MINIMUM_RUST_VERSION)
+- cargo_min_version = rustc_min_version
++ cargo_min_version = Version("1.46.0")
+
+ version = rustc_info.version
+ is_nightly = "nightly" in version.version
diff --git a/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch b/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch
new file mode 100644
index 0000000000..77fce0c93f
--- /dev/null
+++ b/debian/patches/debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Wed, 8 Apr 2020 08:43:20 +0900
+Subject: Allow to build with older versions of nodejs 10
+
+---
+ python/mozbuild/mozbuild/nodeutil.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/python/mozbuild/mozbuild/nodeutil.py b/python/mozbuild/mozbuild/nodeutil.py
+index 5856227..38ca679 100644
+--- a/python/mozbuild/mozbuild/nodeutil.py
++++ b/python/mozbuild/mozbuild/nodeutil.py
+@@ -13,7 +13,7 @@ from mozboot.util import get_state_dir
+ from mozfile import which
+ from six import PY3
+
+-NODE_MIN_VERSION = StrictVersion("10.23.1")
++NODE_MIN_VERSION = StrictVersion("10.0")
+ NPM_MIN_VERSION = StrictVersion("6.14.10")
+
+
diff --git a/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch b/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch
new file mode 100644
index 0000000000..9a57898132
--- /dev/null
+++ b/debian/patches/debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Tue, 22 May 2018 07:51:56 +0900
+Subject: Avoid using vmrs/vmsr on armel
+
+---
+ dom/media/webaudio/blink/DenormalDisabler.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dom/media/webaudio/blink/DenormalDisabler.h b/dom/media/webaudio/blink/DenormalDisabler.h
+index 51f56bd..ed06a09 100644
+--- a/dom/media/webaudio/blink/DenormalDisabler.h
++++ b/dom/media/webaudio/blink/DenormalDisabler.h
+@@ -44,7 +44,7 @@ namespace WebCore {
+ # define HAVE_DENORMAL 1
+ #endif
+
+-#if defined(__arm__) || defined(__aarch64__)
++#if (defined(__arm__) && !defined(__SOFTFP__)) || defined(__aarch64__)
+ # define HAVE_DENORMAL 1
+ #endif
+
diff --git a/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch b/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch
new file mode 100644
index 0000000000..f163f7116c
--- /dev/null
+++ b/debian/patches/debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch
@@ -0,0 +1,37 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Thu, 12 Nov 2009 17:18:31 +0100
+Subject: Avoid wrong sessionstore data to keep windows out of user sight
+
+It happens that sessionstore can keep wrong information for the window
+position or minimized state. Workaround this until the real bug is found
+and fixed (probably in xulrunner).
+
+Closes: #552426, #553453
+---
+ browser/components/sessionstore/SessionStore.jsm | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm
+index e9f4ba5..6183f77 100644
+--- a/browser/components/sessionstore/SessionStore.jsm
++++ b/browser/components/sessionstore/SessionStore.jsm
+@@ -5017,7 +5017,7 @@ var SessionStoreInternal = {
+ !isNaN(aTop) &&
+ (aLeft != win_("screenX") || aTop != win_("screenY"))
+ ) {
+- aWindow.moveTo(aLeft, aTop);
++ aWindow.moveTo((aLeft < -aWidth) ? 0 : aLeft, (aTop < -aHeight) ? 0 : aTop);
+ }
+ if (
+ aWidth &&
+@@ -5046,9 +5046,8 @@ var SessionStoreInternal = {
+ case "minimized":
+ if (aSizeModeBeforeMinimized == "maximized") {
+ aWindow.maximize();
++ break;
+ }
+- aWindow.minimize();
+- break;
+ case "normal":
+ aWindow.restore();
+ break;
diff --git a/debian/patches/debian-hacks/Don-t-build-image-gtests.patch b/debian/patches/debian-hacks/Don-t-build-image-gtests.patch
new file mode 100644
index 0000000000..6572c1324b
--- /dev/null
+++ b/debian/patches/debian-hacks/Don-t-build-image-gtests.patch
@@ -0,0 +1,23 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Thu, 9 Jun 2016 14:45:44 +0900
+Subject: Don't build image/ gtests
+
+Building them causes an ICE with GCC 4.7. As they are not part of what
+is shipped, and not currently run either, just skip building them.
+---
+ image/moz.build | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/image/moz.build b/image/moz.build
+index 427077f..74949b7 100644
+--- a/image/moz.build
++++ b/image/moz.build
+@@ -5,8 +5,6 @@
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ DIRS += ["build", "decoders", "encoders"]
+-if CONFIG["ENABLE_TESTS"]:
+- DIRS += ["test/gtest"]
+
+ if CONFIG["FUZZING_INTERFACES"]:
+ DIRS += ["test/fuzzing"]
diff --git a/debian/patches/debian-hacks/Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch b/debian/patches/debian-hacks/Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch
new file mode 100644
index 0000000000..4c6a0818f8
--- /dev/null
+++ b/debian/patches/debian-hacks/Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch
@@ -0,0 +1,24 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Sat, 27 Sep 2008 17:17:39 +0200
+Subject: Don't register plugins if the MOZILLA_DISABLE_PLUGINS environment
+ variable is set
+
+---
+ dom/plugins/base/nsPluginHost.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
+index 4cc7d89..deeb0df 100644
+--- a/dom/plugins/base/nsPluginHost.cpp
++++ b/dom/plugins/base/nsPluginHost.cpp
+@@ -301,6 +301,10 @@ nsPluginHost::nsPluginHost()
+ Preferences::AddStrongObserver(this, "plugin.disable");
+ }
+
++ const char *env = PR_GetEnv("MOZILLA_DISABLE_PLUGINS");
++ if (env && env[0])
++ mPluginsDisabled = PR_TRUE;
++
+ nsCOMPtr<nsIObserverService> obsService =
+ mozilla::services::GetObserverService();
+ if (obsService) {
diff --git a/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch b/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch
new file mode 100644
index 0000000000..8793177558
--- /dev/null
+++ b/debian/patches/debian-hacks/Set-program-name-from-the-remoting-name.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Sun, 5 Feb 2017 08:41:22 +0900
+Subject: Set program name from the remoting name
+
+---
+ toolkit/xre/nsAppRunner.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
+index 9c7cb46..6d8a935 100644
+--- a/toolkit/xre/nsAppRunner.cpp
++++ b/toolkit/xre/nsAppRunner.cpp
+@@ -4226,7 +4226,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
+
+ // Set program name to the one defined in application.ini.
+ {
+- nsAutoCString program(gAppData->name);
++ nsAutoCString program(gAppData->remotingName);
+ ToLowerCase(program);
+ g_set_prgname(program.get());
+ }
diff --git a/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch b/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch
new file mode 100644
index 0000000000..7f337afdfb
--- /dev/null
+++ b/debian/patches/debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Fri, 12 Jul 2019 18:37:52 +0900
+Subject: Use build id as langpack version for reproducibility
+
+---
+ python/mozbuild/mozbuild/action/langpack_manifest.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/python/mozbuild/mozbuild/action/langpack_manifest.py b/python/mozbuild/mozbuild/action/langpack_manifest.py
+index fd1e9cc..ffca341 100644
+--- a/python/mozbuild/mozbuild/action/langpack_manifest.py
++++ b/python/mozbuild/mozbuild/action/langpack_manifest.py
+@@ -105,7 +105,7 @@ def get_timestamp_for_locale(path):
+ dt = get_dt_from_hg(path)
+
+ if dt is None:
+- dt = datetime.datetime.utcnow()
++ return os.environ['MOZ_BUILD_DATE']
+
+ dt = dt.replace(microsecond=0)
+ return dt.strftime("%Y%m%d%H%M%S")
diff --git a/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch b/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch
new file mode 100644
index 0000000000..cc650d0350
--- /dev/null
+++ b/debian/patches/debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch
@@ -0,0 +1,42 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Mon, 3 Sep 2018 07:37:40 +0900
+Subject: Use remoting name for call to gdk_set_program_class
+
+Closes: #907574
+---
+ widget/gtk/nsAppShell.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/widget/gtk/nsAppShell.cpp b/widget/gtk/nsAppShell.cpp
+index 24bdd50..0de7757 100644
+--- a/widget/gtk/nsAppShell.cpp
++++ b/widget/gtk/nsAppShell.cpp
+@@ -10,6 +10,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <gdk/gdk.h>
++#include "mozilla/XREAppData.h"
+ #include "nsAppShell.h"
+ #include "nsWindow.h"
+ #include "mozilla/Logging.h"
+@@ -24,6 +25,7 @@
+ # include "WakeLockListener.h"
+ #endif
+ #include "gfxPlatform.h"
++#include "nsAppRunner.h"
+ #include "ScreenHelperGTK.h"
+ #include "HeadlessScreenHelper.h"
+ #include "mozilla/widget/ScreenManager.h"
+@@ -156,10 +158,8 @@ nsresult nsAppShell::Init() {
+ // creating top-level windows. (At this point, a child process hasn't
+ // received the list of registered chrome packages, so the
+ // GetBrandShortName call would fail anyway.)
+- nsAutoString brandName;
+- mozilla::widget::WidgetUtils::GetBrandShortName(brandName);
+- if (!brandName.IsEmpty()) {
+- gdk_set_program_class(NS_ConvertUTF16toUTF8(brandName).get());
++ if (gAppData) {
++ gdk_set_program_class(gAppData->remotingName);
+ }
+ }
+ }
diff --git a/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch b/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch
new file mode 100644
index 0000000000..18861df5f7
--- /dev/null
+++ b/debian/patches/debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Sun, 2 Apr 2017 06:33:19 +0900
+Subject: Use the Mozilla Location Service key when the Google Key is not there
+
+---
+ modules/libpref/init/all.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
+index dba747c..2f5ee03 100644
+--- a/modules/libpref/init/all.js
++++ b/modules/libpref/init/all.js
+@@ -3803,7 +3803,7 @@ pref("network.psl.onUpdate_notify", false);
+
+ // All the Geolocation preferences are here.
+ //
+-#ifndef EARLY_BETA_OR_EARLIER
++#if !defined(EARLY_BETA_OR_EARLIER) && defined(GOOGLE_LOCATION_SERVICE_API_KEY)
+ pref("geo.provider.network.url", "https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%");
+ #else
+ // Use MLS on Nightly and early Beta.
diff --git a/debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch b/debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch
new file mode 100644
index 0000000000..c06839fe7d
--- /dev/null
+++ b/debian/patches/fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch
@@ -0,0 +1,79 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Sat, 21 Jun 2008 02:48:46 +0200
+Subject: Allow .js preference files to set locked prefs with lockPref()
+
+---
+ modules/libpref/parser/src/lib.rs | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+diff --git a/modules/libpref/parser/src/lib.rs b/modules/libpref/parser/src/lib.rs
+index bce98c0..da33195 100644
+--- a/modules/libpref/parser/src/lib.rs
++++ b/modules/libpref/parser/src/lib.rs
+@@ -11,8 +11,9 @@
+ //! ```text
+ //! <pref-file> = <pref>*
+ //! <pref> = <pref-spec> "(" <pref-name> "," <pref-value> <pref-attrs> ")" ";"
+-//! <pref-spec> = "user_pref" | "pref" | "sticky_pref" // in default pref files
++//! <pref-spec> = "user_pref" | "pref" | "sticky_pref" | "lockPref" // in default pref files
+ //! <pref-spec> = "user_pref" // in user pref files
++//! <pref-spec> = "user_pref" | "pref" | "sticky_pref | lockPref"
+ //! <pref-name> = <string-literal>
+ //! <pref-value> = <string-literal> | "true" | "false" | <int-value>
+ //! <int-value> = <sign>? <int-literal>
+@@ -171,6 +172,7 @@ enum Token {
+ // Keywords
+ Pref, // pref
+ StickyPref, // sticky_pref
++ LockPref, // lockPref
+ UserPref, // user_pref
+ True, // true
+ False, // false
+@@ -293,7 +295,7 @@ struct KeywordInfo {
+ token: Token,
+ }
+
+-const KEYWORD_INFOS: [KeywordInfo; 7] = [
++const KEYWORD_INFOS: [KeywordInfo; 8] = [
+ // These are ordered by frequency.
+ KeywordInfo {
+ string: b"pref",
+@@ -323,6 +325,10 @@ const KEYWORD_INFOS: [KeywordInfo; 7] = [
+ string: b"sticky_pref",
+ token: Token::StickyPref,
+ },
++ KeywordInfo {
++ string: b"lockPref",
++ token: Token::LockPref,
++ },
+ ];
+
+ struct Parser<'t> {
+@@ -375,14 +381,15 @@ impl<'t> Parser<'t> {
+ // this will be either the first token of a new pref, or EOF.
+ loop {
+ // <pref-spec>
+- let (pref_value_kind, mut is_sticky) = match token {
++ let (pref_value_kind, mut is_sticky, mut is_locked) = match token {
+ Token::Pref if self.kind == PrefValueKind::Default => {
+- (PrefValueKind::Default, false)
++ (PrefValueKind::Default, false, false)
+ }
+ Token::StickyPref if self.kind == PrefValueKind::Default => {
+- (PrefValueKind::Default, true)
++ (PrefValueKind::Default, true, false)
+ }
+- Token::UserPref => (PrefValueKind::User, false),
++ Token::LockPref => (PrefValueKind::Default, false, true),
++ Token::UserPref => (PrefValueKind::User, false, false),
+ Token::SingleChar(EOF) => return !self.has_errors,
+ _ => {
+ token = self.error_and_recover(
+@@ -492,7 +499,6 @@ impl<'t> Parser<'t> {
+ };
+
+ // ("," <pref-attr>)* // default pref files only
+- let mut is_locked = false;
+ let mut has_attrs = false;
+ if self.kind == PrefValueKind::Default {
+ let ok = loop {
diff --git a/debian/patches/fixes/Bug-1526653-Include-struct-definitions-for-user_vfp-.patch b/debian/patches/fixes/Bug-1526653-Include-struct-definitions-for-user_vfp-.patch
new file mode 100644
index 0000000000..c944d70ce9
--- /dev/null
+++ b/debian/patches/fixes/Bug-1526653-Include-struct-definitions-for-user_vfp-.patch
@@ -0,0 +1,31 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Sat, 1 Jun 2019 09:06:01 +0900
+Subject: Bug 1526653 - Include struct definitions for user_vfp and
+ user_vfp_exc.
+
+---
+ js/src/wasm/WasmSignalHandlers.cpp | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp
+index 6ab1a0c..ed9c2e5 100644
+--- a/js/src/wasm/WasmSignalHandlers.cpp
++++ b/js/src/wasm/WasmSignalHandlers.cpp
+@@ -252,7 +252,16 @@ using mozilla::DebugOnly;
+ #endif
+
+ #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
+-# include <sys/user.h>
++struct user_vfp {
++ unsigned long long fpregs[32];
++ unsigned long fpscr;
++};
++
++struct user_vfp_exc {
++ unsigned long fpexc;
++ unsigned long fpinst;
++ unsigned long fpinst2;
++};
+ #endif
+
+ #if defined(ANDROID)
diff --git a/debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch b/debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch
new file mode 100644
index 0000000000..f3836b1564
--- /dev/null
+++ b/debian/patches/porting/Add-xptcall-support-for-SH4-processors.patch
@@ -0,0 +1,516 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Fri, 30 Apr 2010 11:03:50 +0200
+Subject: Add xptcall support for SH4 processors
+
+Closes: #553593
+https://bugzilla.mozilla.org/show_bug.cgi?id=382214
+---
+ xpcom/reflect/xptcall/md/unix/moz.build | 5 +
+ .../src/md/unix/xptcinvoke_linux_sh.cpp | 203 +++++++++++++
+ .../src/md/unix/xptcstubs_linux_sh.cpp | 271 ++++++++++++++++++
+ 3 files changed, 479 insertions(+)
+ create mode 100644 xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_sh.cpp
+ create mode 100644 xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_sh.cpp
+
+diff --git a/xpcom/reflect/xptcall/md/unix/moz.build b/xpcom/reflect/xptcall/md/unix/moz.build
+index 1083e26..7b7b776 100644
+--- a/xpcom/reflect/xptcall/md/unix/moz.build
++++ b/xpcom/reflect/xptcall/md/unix/moz.build
+@@ -262,6 +262,11 @@ if CONFIG["OS_ARCH"] == "Linux":
+ CXXFLAGS += [
+ "-fno-integrated-as",
+ ]
++ elif CONFIG['OS_TEST'] in ('sh4', 'sh4a'):
++ SOURCES += [
++ 'xptcinvoke_linux_sh.cpp',
++ 'xptcstubs_linux_sh.cpp',
++ ]
+
+ FINAL_LIBRARY = "xul"
+
+diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_sh.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_sh.cpp
+new file mode 100644
+index 0000000..ca4807d
+--- /dev/null
++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_sh.cpp
+@@ -0,0 +1,203 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
++ *
++ * ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is mozilla.org code.
++ *
++ * The Initial Developer of the Original Code is
++ * Netscape Communications Corporation.
++ * Portions created by the Initial Developer are Copyright (C) 1998
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ * - Copyright (C) 2008-2009 STMicroelectronics
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either of the GNU General Public License Version 2 or later (the "GPL"),
++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * Based on the neutroni port, however that assumed that the compiler was pushing params
++ * onto the stack. Change to take this into account.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#include "xptcprivate.h"
++
++extern "C" {
++
++const int c_int_register_params = 4;
++const int c_float_register_params = 8;
++
++static PRUint32 __attribute__((__used__))
++copy_to_stack(PRUint32 **that,PRUint32 methodIndex,PRUint32 paramCount, nsXPTCVariant* s,PRUint32* data)
++{
++ int intCount = 1; // Because of that
++ int floatCount = 0;
++ PRUint32 *intRegParams=data+1 ;
++ float *floatRegParams = (float *)(data+4);
++
++ /* Push the that register into the right place so it can be restored on exit */
++ *data= (PRUint32)(that);
++ data+=12; /* 4 integer registers, and 8 floating point registers */
++
++ for ( PRUint32 i = 0; i < paramCount; ++i, ++s )
++ {
++ nsXPTType type = s->IsPtrData() ? nsXPTType::T_I32 : s->type;
++
++ switch ( type ) {
++ case nsXPTType::T_I64:
++ case nsXPTType::T_U64:
++ // Space to pass in registers?
++ if ( (c_int_register_params - intCount) >= 2 ) {
++ *((PRInt64 *) intRegParams) = s->val.i64;
++ intRegParams += 2;
++ intCount += 2;
++ }
++ else {
++ *((PRInt64*) data) = s->val.i64;
++ data += 2;
++ }
++ break;
++ case nsXPTType::T_FLOAT:
++ // Space to pass in registers?
++ if ( floatCount < c_float_register_params ) {
++ *floatRegParams = s->val.f;
++ ++floatCount;
++ ++floatRegParams;
++ }
++ else {
++ *((float*) data) = s->val.f;
++ ++data;
++ }
++ break;
++ case nsXPTType::T_DOUBLE:
++ // Space to pass in registers?
++ if ( (c_float_register_params - floatCount) >= 2 ) {
++ if ( (floatCount & 1) != 0 ) {
++ ++floatCount;
++ ++floatRegParams;
++ }
++ *(double *)floatRegParams = s->val.d;
++ floatCount += 2;
++ floatRegParams += 2;
++ }
++ else {
++ *((double *) data) = s->val.d;
++ data += 2;
++ }
++ break;
++ default: // 32 (non-float) value
++ PRInt32 value = (PRInt32) (s->IsPtrData() ? s->ptr : s->val.p);
++ // Space to pass in registers?
++ if ( intCount < c_int_register_params ) {
++ *intRegParams = value;
++ ++intRegParams;
++ ++intCount;
++ }
++ else {
++ *data = value;
++ ++data;
++ }
++ break;
++ }
++ }
++
++ /* Now calculate the return address
++ * Dereference that to get vtable pointer
++ */
++ return *( (*(that))+(methodIndex) );
++
++}
++
++}
++
++ /* This was originally done as a C function, but the original code was
++ * relying on how the compiler laid out the stack. Later versions of
++ * gcc do a better job of optimising and never push the parameters on the
++ * stack. So it is simpler to just write the whole thing in assembler anyway
++ */
++
++ /* Because the SH processor passes the first few parameters in registers
++ it is a bit tricky setting things up right. To make things easier,
++ all the hard work will be done by copy_to_stack above. We pass to it
++ a chunk of memory, the bottom of which will be copied to registers r4 to r7
++ and fr4 to fr11 before calling the target function.
++ */
++
++/* r4= that, r5=methodIndex,r6=paramCount,r7=params */
++
++ __asm__ (
++
++
++ /* Make space for parameters to be passed to the method. Assume worst case
++ 8 bytes per parameter. Also leave space for 4 longs and 8 floats that
++ will be put into registers. The worst case is all int64 parameters
++ and even in this case 8 bytes are passed in registers so we can
++ deduct this from our allocation.
++ */
++ ".section .text\n"
++ ".balign 4\n"
++ ".global NS_InvokeByIndex_P\n"
++ "NS_InvokeByIndex_P:\n"
++ "mov.l r14, @-r15 \n\t" // Push frame
++ "sts.l pr, @-r15 \n\t" // Push link
++ "mov.l r8, @-r15 \n\t" // Save
++ "mov r15, r14\n\t" // Set frame
++ "mov #3, r1 \n\t" // Assume worse case, all params are 64bit, hence *8
++ "mov r6, r2\n\t"
++ "shld r1, r2 \n\t"
++ "mov r2, r8 \n\t" // Save stack drop
++ "add #48, r2 \n\t" // Space for 4 longs, 8 floats
++ "sub r2, r15 \n\t" // Drop stack
++ "mov.l 1f, r1 \n\t" // Get address of copy_to_stack_function
++ "jsr @r1 \n\t"
++ "mov.l r15, @-r15 \n\t" // Params will be dumped here
++ "add #4, r15 \n\t" // Pop stack ptr param. r0 contains method address
++
++ /* Now everything is laid out nicely in the stack. We just have to
++ load values at the top end of the memory area into registers and
++ make the call. We may load more things into registers than needed,
++ but nobody will care about that.
++ */
++
++ "mov.l @r15+, r4 \n\t" // that
++ "mov.l @r15+, r5 \n\t"
++ "mov.l @r15+, r6 \n\t"
++ "mov.l @r15+, r7 \n\t"
++ "fmov.s @r15+, fr5 \n\t"
++ "fmov.s @r15+, fr4 \n\t"
++ "fmov.s @r15+, fr7 \n\t"
++ "fmov.s @r15+, fr6 \n\t"
++ "fmov.s @r15+, fr9 \n\t"
++ "fmov.s @r15+, fr8 \n\t"
++ "fmov.s @r15+, fr11 \n\t"
++ "jsr @r0 \n\t" // Invoke method
++ "fmov.s @r15+, fr10 \n\t"
++ "add r8, r15\n\t" // Pop stack back
++ "mov.l @r15+, r8\n\t" // Restore r8
++ "lds.l @r15+, pr\n\t"
++ "rts\n\t"
++ "mov.l @r15+, r14\n\t"
++ ".balign 4\n\t"
++ "1: .long copy_to_stack \n\t"
++ );
++
+diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_sh.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_sh.cpp
+new file mode 100644
+index 0000000..cf9fcea
+--- /dev/null
++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_sh.cpp
+@@ -0,0 +1,271 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
++/* ***** BEGIN LICENSE BLOCK *****
++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
++ *
++ * The contents of this file are subject to the Mozilla Public License Version
++ * 1.1 (the "License"); you may not use this file except in compliance with
++ * the License. You may obtain a copy of the License at
++ * http://www.mozilla.org/MPL/
++ *
++ * Software distributed under the License is distributed on an "AS IS" basis,
++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
++ * for the specific language governing rights and limitations under the
++ * License.
++ *
++ * The Original Code is mozilla.org code.
++ *
++ * The Initial Developer of the Original Code is
++ * Netscape Communications Corporation.
++ * Portions created by the Initial Developer are Copyright (C) 1999
++ * the Initial Developer. All Rights Reserved.
++ *
++ * Contributor(s):
++ * - Copyright (C) 2008-2009 STMicroelectronics
++ *
++ * Alternatively, the contents of this file may be used under the terms of
++ * either of the GNU General Public License Version 2 or later (the "GPL"),
++ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
++ * in which case the provisions of the GPL or the LGPL are applicable instead
++ * of those above. If you wish to allow use of your version of this file only
++ * under the terms of either the GPL or the LGPL, and not to allow others to
++ * use your version of this file under the terms of the MPL, indicate your
++ * decision by deleting the provisions above and replace them with the notice
++ * and other provisions required by the GPL or the LGPL. If you do not delete
++ * the provisions above, a recipient may use your version of this file under
++ * the terms of any one of the MPL, the GPL or the LGPL.
++ *
++ * Based on the neutrino code, with some bug fixes and using the C preprocessor
++ * like all the other ports rather than the python script.
++ *
++ * ***** END LICENSE BLOCK ***** */
++
++#include "xptcprivate.h"
++#include "xptiprivate.h"
++
++const int c_int_register_params = 3;
++const int c_float_register_params = 8;
++
++/*
++ Dispatch function for all stubs.
++
++ The parameters to the original function are spread between 'data' which
++ is value of the stack pointer when the stub was called, intRegParams which
++ points to an area containing the values of r5, r6 and r7 when the stub was
++ called and floatRegParams which points to an area containing the values
++ of float registers fr4 to fr11 when the stub was called.
++
++ */
++extern "C" nsresult
++PrepareAndDispatch(nsXPTCStubBase* self, int methodIndex, PRUint32* data,
++ PRUint32 *intRegParams, float *floatRegParams)
++{
++#define PARAM_BUFFER_COUNT 16
++
++ nsresult result = NS_ERROR_FAILURE;
++ int intCount = 0;
++ int floatCount = 0;
++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
++ nsXPTCMiniVariant* dispatchParams = NULL;
++ const nsXPTMethodInfo* info;
++ PRUint8 paramCount;
++ PRUint8 i;
++
++ NS_ASSERTION(self,"no self");
++
++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
++ NS_ASSERTION(info,"no interface info");
++
++ paramCount = info->GetParamCount();
++
++ // setup variant array pointer
++ if(paramCount > PARAM_BUFFER_COUNT)
++ dispatchParams = new nsXPTCMiniVariant[paramCount];
++ else
++ dispatchParams = paramBuffer;
++ NS_ASSERTION(dispatchParams,"no place for params");
++
++ for ( i = 0; i < paramCount; ++i ) {
++ const nsXPTParamInfo& param = info->GetParam(i);
++ nsXPTCMiniVariant* dp = &dispatchParams[i];
++ nsXPTType type = param.IsOut() ? nsXPTType::T_I32 : param.GetType();
++
++ switch ( type ) {
++ case nsXPTType::T_I64:
++ case nsXPTType::T_U64:
++ // Was this passed in a register?
++ if ( (c_int_register_params - intCount) >= 2 ) {
++ dp->val.i64 = *((PRInt64 *) intRegParams);
++ intRegParams += 2;
++ intCount += 2;
++ }
++ else {
++ dp->val.i64 = *((PRInt64*) data);
++ data += 2;
++ }
++ break;
++ case nsXPTType::T_FLOAT:
++ // Was this passed in a register?
++ if ( floatCount < c_float_register_params ) {
++ dp->val.f = *floatRegParams;
++ ++floatCount;
++ ++floatRegParams;
++ }
++ else {
++ dp->val.f = *((float*) data);
++ ++data;
++ }
++ break;
++ case nsXPTType::T_DOUBLE:
++ // Was this passed in a register?
++ if ( (c_float_register_params - floatCount) >= 2 ) {
++ if ( floatCount & 1 != 0 ) {
++ ++floatCount;
++ ++floatRegParams;
++ }
++ dp->val.d = *(double *)floatRegParams;
++ floatCount += 2;
++ floatRegParams += 2;
++ }
++ else {
++ dp->val.d = *((double *) data);
++ data += 2;
++ }
++ break;
++ default: // 32-bit (non-float) value
++ // Was this passed in a register?
++ if ( intCount < c_int_register_params ) {
++ dp->val.i32 = *intRegParams;
++ ++intRegParams;
++ ++intCount;
++ }
++ else {
++ dp->val.i32 = *data;
++ ++data;
++ }
++ break;
++ }
++ }
++
++ result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
++
++ if(dispatchParams != paramBuffer)
++ delete [] dispatchParams;
++
++ return result;
++}
++
++
++__asm__ (
++ ".text\n"
++ ".little\n"
++ ".section .rodata\n"
++
++ ".globl SharedStub\n"
++ ".type SharedStub, @function\n"
++ "SharedStub:\n"
++ "mov r15, r1\n"
++ "mov.l r14,@-r15\n"
++ "sts.l pr,@-r15\n"
++ "mov r15, r14\n"
++
++ /* Some parameters might have been passed in registers, so push them
++ * all onto the stack, PrepareAndDispatch can then work out whats what
++ * given method type information.
++ */
++ "mov.l r7, @-r15\n"
++ "mov.l r6, @-r15\n"
++ "mov.l r5, @-r15\n"
++ "mov r15, r7\n" /* r7 = PrepareAndDispatch intRegParams param */
++
++ "fmov.s fr10, @-r15\n"
++ "fmov.s fr11, @-r15\n"
++ "fmov.s fr8, @-r15\n"
++ "fmov.s fr9, @-r15\n"
++ "fmov.s fr6, @-r15\n"
++ "fmov.s fr7, @-r15\n"
++ "fmov.s fr4, @-r15\n"
++ "fmov.s fr5, @-r15\n"
++ "mov.l r15, @-r15\n" /* PrepareAndDispatch floatRegParams param */
++
++ "mov r1, r6\n" /* r6 = PrepareAndDispatch data param */
++
++ "mov.l 1f, r1\n"
++ "jsr @r1\n" /* Note, following instruction is executed first*/
++ "mov r2, r5\n" /* r5 = PrepareAndDispatch methodIndex param */
++
++ "mov r14,r15\n"
++ "lds.l @r15+,pr\n"
++ "mov.l @r15+,r14\n"
++ "rts\n"
++ "nop\n"
++ ".align 2\n"
++ "1:\n"
++ ".long PrepareAndDispatch\n"
++ );
++
++#define STUB_ENTRY(n) \
++__asm__( \
++ ".text\n" \
++ ".align 1 \n" \
++ ".if " #n " < 10\n\t" \
++ ".globl _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
++ ".type _ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n"\
++ "_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \
++ ".elseif " #n " < 100\n\t" \
++ ".globl _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
++ ".type _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n"\
++ "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \
++ ".elseif " #n " < 1000\n\t" \
++ ".globl _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
++ ".type _ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n"\
++ "_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \
++ ".else\n\t" \
++ ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \
++ ".endif\n\t" \
++ "mov.l 1f, r1 \n" \
++ ".if "#n" < 128 \n" \
++ "jmp @r1 \n" \
++ " mov #"#n",r2 \n" \
++ ".elseif "#n" < 256 \n" \
++ "mov #"#n", r2 \n" \
++ "jmp @r1 \n" \
++ " extu.b r2, r2 \n" \
++ ".else \n" \
++ "mov #"#n" & 0xff,r2 \n" \
++ "extu.b r2, r2 \n" \
++ "mov #"#n">>8, r3 \n" \
++ "shll8 r3 \n" \
++ "jmp @r1 \n" \
++ " or r3, r2 \n" \
++ ".endif \n" \
++ ".if "#n" % 20 == 0\n" \
++ ".align 2\n" \
++ "1:\n" \
++ ".long SharedStub\n" \
++ ".endif\n" \
++ );
++
++
++/* Due to the fact that the SH4 can only load forward labels, we have
++ * to use sentinel_entry to output the last label. A better solution
++ * would be to introduce a STUB_LAST macro in the defs.in file, but
++ * this will do for now
++ */
++
++#define SENTINEL_ENTRY(n) \
++__asm__( \
++".if "#n" == 0 \n" \
++ ".text \n" \
++ ".align 2\n" \
++ "1:\n" \
++ ".long SharedStub\n" \
++".endif\n" \
++); \
++ \
++nsresult nsXPTCStubBase::Sentinel##n() \
++{ \
++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
++ return NS_ERROR_NOT_IMPLEMENTED; \
++}
++
++#include "xptcstubsdef.inc"
diff --git a/debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch b/debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch
new file mode 100644
index 0000000000..a543693678
--- /dev/null
+++ b/debian/patches/porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch
@@ -0,0 +1,63 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Mon, 13 Jan 2014 12:00:25 +0900
+Subject: [NSS] Fix FTBFS on Hurd because of MAXPATHLEN
+
+---
+ security/nss/cmd/shlibsign/shlibsign.c | 21 ++++++++++++++++-----
+ security/nss/lib/freebl/unix_rand.c | 4 ++++
+ 2 files changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/security/nss/cmd/shlibsign/shlibsign.c b/security/nss/cmd/shlibsign/shlibsign.c
+index ad8f3b8..c33f2c9 100644
+--- a/security/nss/cmd/shlibsign/shlibsign.c
++++ b/security/nss/cmd/shlibsign/shlibsign.c
+@@ -725,7 +725,6 @@ main(int argc, char **argv)
+ #ifdef USES_LINKS
+ int ret;
+ struct stat stat_buf;
+- char link_buf[MAXPATHLEN + 1];
+ char *link_file = NULL;
+ #endif
+
+@@ -1068,10 +1067,22 @@ main(int argc, char **argv)
+ }
+ if (S_ISLNK(stat_buf.st_mode)) {
+ char *dirpath, *dirend;
+- ret = readlink(input_file, link_buf, sizeof(link_buf) - 1);
+- if (ret < 0) {
+- perror(input_file);
+- goto cleanup;
++ char *link_buf = NULL;
++ size_t size = 64;
++ while (1) {
++ link_buf = realloc(link_buf, size);
++ if (!link_buf) {
++ perror(input_file);
++ goto cleanup;
++ }
++ ret = readlink(input_file, link_buf, size - 1);
++ if (ret < 0) {
++ perror(input_file);
++ goto cleanup;
++ }
++ if (ret < size - 1)
++ break;
++ size *= 2;
+ }
+ link_buf[ret] = 0;
+ link_file = mkoutput(input_file);
+diff --git a/security/nss/lib/freebl/unix_rand.c b/security/nss/lib/freebl/unix_rand.c
+index 24381cb..f5520f0 100644
+--- a/security/nss/lib/freebl/unix_rand.c
++++ b/security/nss/lib/freebl/unix_rand.c
+@@ -843,6 +843,10 @@ RNG_FileForRNG(const char *fileName)
+ #define _POSIX_PTHREAD_SEMANTICS
+ #include <dirent.h>
+
++#ifndef PATH_MAX
++#define PATH_MAX 1024
++#endif
++
+ PRBool
+ ReadFileOK(char *dir, char *file)
+ {
diff --git a/debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch b/debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch
new file mode 100644
index 0000000000..4f14d54413
--- /dev/null
+++ b/debian/patches/porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Mon, 26 Nov 2018 09:59:56 +0900
+Subject: Use NEON_FLAGS instead of VPX_ASFLAGS for libaom neon code
+
+---
+ media/libaom/moz.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/media/libaom/moz.build b/media/libaom/moz.build
+index 4a3518a..2c680a1 100644
+--- a/media/libaom/moz.build
++++ b/media/libaom/moz.build
+@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm':
+
+ for f in SOURCES:
+ if f.endswith('neon.c'):
+- SOURCES[f].flags += CONFIG['VPX_ASFLAGS']
++ SOURCES[f].flags += CONFIG['NEON_FLAGS']
+
+ if CONFIG['OS_TARGET'] == 'Android':
+ # For cpu-features.h
diff --git a/debian/patches/porting/Work-around-Debian-bug-844357.patch b/debian/patches/porting/Work-around-Debian-bug-844357.patch
new file mode 100644
index 0000000000..b606596286
--- /dev/null
+++ b/debian/patches/porting/Work-around-Debian-bug-844357.patch
@@ -0,0 +1,20 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Mon, 21 Nov 2016 08:15:38 +0900
+Subject: Work around Debian bug #844357
+
+---
+ widget/gtk/mozgtk/gtk3/moz.build | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/widget/gtk/mozgtk/gtk3/moz.build b/widget/gtk/mozgtk/gtk3/moz.build
+index b4ab68e..f972e06 100644
+--- a/widget/gtk/mozgtk/gtk3/moz.build
++++ b/widget/gtk/mozgtk/gtk3/moz.build
+@@ -36,3 +36,7 @@ OS_LIBS += [
+ "gdk-3",
+ ]
+ OS_LIBS += as_needed
++
++# Work around Debian bug #844357
++if CONFIG['CPU_ARCH'].startswith('mips'):
++ OS_LIBS += ['-Wl,--no-gc-sections']
diff --git a/debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch b/debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch
new file mode 100644
index 0000000000..008994765e
--- /dev/null
+++ b/debian/patches/porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch
@@ -0,0 +1,22 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Fri, 12 Jul 2019 18:28:34 +0900
+Subject: Work around GCC ICE on mips*, i386 and s390x
+
+Closes: #931757
+---
+ gfx/skia/skia/third_party/skcms/src/Transform_inl.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+index c4b3122..cfaae3e 100644
+--- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
++++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+@@ -685,7 +685,7 @@ SI void sample_clut_16(const skcms_A2B* a2b, I32 ix, F* r, F* g, F* b) {
+ // GCC 7.2.0 hits an internal compiler error with -finline-functions (or -O3)
+ // when targeting MIPS 64, i386, or s390x, I think attempting to inline clut() into exec_ops().
+ #if 1 && defined(__GNUC__) && !defined(__clang__) \
+- && (defined(__mips64) || defined(__i386) || defined(__s390x__))
++ && (defined(__mips__) || defined(__i386) || defined(__s390x__))
+ #define MAYBE_NOINLINE __attribute__((noinline))
+ #else
+ #define MAYBE_NOINLINE
diff --git a/debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch b/debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch
new file mode 100644
index 0000000000..31bc9f918d
--- /dev/null
+++ b/debian/patches/porting/Work-around-another-GCC-ICE-on-arm.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Sat, 7 Dec 2019 08:32:14 +0900
+Subject: Work around another GCC ICE on arm
+
+---
+ gfx/skia/skia/third_party/skcms/src/Transform_inl.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+index cfaae3e..604e109 100644
+--- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
++++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+@@ -685,7 +685,7 @@ SI void sample_clut_16(const skcms_A2B* a2b, I32 ix, F* r, F* g, F* b) {
+ // GCC 7.2.0 hits an internal compiler error with -finline-functions (or -O3)
+ // when targeting MIPS 64, i386, or s390x, I think attempting to inline clut() into exec_ops().
+ #if 1 && defined(__GNUC__) && !defined(__clang__) \
+- && (defined(__mips__) || defined(__i386) || defined(__s390x__))
++ && (defined(__arm__) || defined(__aarch64__) || defined(__mips__) || defined(__i386) || defined(__s390x__))
+ #define MAYBE_NOINLINE __attribute__((noinline))
+ #else
+ #define MAYBE_NOINLINE
diff --git a/debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch b/debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch
new file mode 100644
index 0000000000..3e87c9b0f0
--- /dev/null
+++ b/debian/patches/prefs/Don-t-auto-disable-extensions-in-system-directories.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <mh@glandium.org>
+Date: Fri, 17 Feb 2012 17:47:15 +0100
+Subject: Don't auto-disable extensions in system directories
+
+---
+ browser/app/profile/firefox.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
+index 5aad2dd..a2695ce 100644
+--- a/browser/app/profile/firefox.js
++++ b/browser/app/profile/firefox.js
+@@ -61,7 +61,7 @@ pref("extensions.systemAddon.update.enabled", true);
+
+ // Disable add-ons that are not installed by the user in all scopes by default.
+ // See the SCOPE constants in AddonManager.jsm for values to use here.
+-pref("extensions.autoDisableScopes", 15);
++pref("extensions.autoDisableScopes", 3);
+ // Scopes to scan for changes at startup.
+ pref("extensions.startupScanScopes", 0);
+
diff --git a/debian/patches/prefs/Set-DPI-to-system-settings.patch b/debian/patches/prefs/Set-DPI-to-system-settings.patch
new file mode 100644
index 0000000000..4e20ff3b42
--- /dev/null
+++ b/debian/patches/prefs/Set-DPI-to-system-settings.patch
@@ -0,0 +1,21 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Thu, 13 Mar 2008 20:30:19 +0100
+Subject: Set DPI to system settings
+
+---
+ modules/libpref/init/all.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
+index 7d5b13e..0bf832f 100644
+--- a/modules/libpref/init/all.js
++++ b/modules/libpref/init/all.js
+@@ -2397,7 +2397,7 @@ pref("bidi.browser.ui", false);
+ // A value of 0 means use the system DPI. A positive value is used as the DPI.
+ // This sets the physical size of a device pixel and thus controls the
+ // interpretation of physical units such as "pt".
+-pref("layout.css.dpi", -1);
++pref("layout.css.dpi", 0);
+
+ // pref for which side vertical scrollbars should be on
+ // 0 = end-side in UI direction
diff --git a/debian/patches/prefs/Set-javascript.options.showInConsole.patch b/debian/patches/prefs/Set-javascript.options.showInConsole.patch
new file mode 100644
index 0000000000..0ed1295005
--- /dev/null
+++ b/debian/patches/prefs/Set-javascript.options.showInConsole.patch
@@ -0,0 +1,20 @@
+From: Mike Hommey <glandium@debian.org>
+Date: Sat, 8 Dec 2007 19:24:40 +0100
+Subject: Set javascript.options.showInConsole
+
+---
+ modules/libpref/init/all.js | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
+index dba747c..7d5b13e 100644
+--- a/modules/libpref/init/all.js
++++ b/modules/libpref/init/all.js
+@@ -1083,6 +1083,7 @@ pref("javascript.options.ion", true);
+ pref("javascript.options.ion.threshold", 1500);
+ // Duplicated in JitOptions - ensure both match.
+ pref("javascript.options.ion.frequent_bailout_threshold", 10);
++pref("javascript.options.showInConsole", true);
+ pref("javascript.options.asmjs", true);
+ pref("javascript.options.wasm", true);
+ pref("javascript.options.wasm_trustedprincipals", true);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000000..b8cc40fcd7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,24 @@
+fixes/Allow-.js-preference-files-to-set-locked-prefs-with-.patch
+fixes/Bug-1526653-Include-struct-definitions-for-user_vfp-.patch
+porting/Add-xptcall-support-for-SH4-processors.patch
+porting/NSS-Fix-FTBFS-on-Hurd-because-of-MAXPATHLEN.patch
+porting/Work-around-Debian-bug-844357.patch
+porting/Use-NEON_FLAGS-instead-of-VPX_ASFLAGS-for-libaom-neo.patch
+porting/Work-around-GCC-ICE-on-mips-i386-and-s390x.patch
+porting/Work-around-another-GCC-ICE-on-arm.patch
+prefs/Set-javascript.options.showInConsole.patch
+prefs/Set-DPI-to-system-settings.patch
+prefs/Don-t-auto-disable-extensions-in-system-directories.patch
+debian-hacks/Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch
+debian-hacks/Add-another-preferences-directory-for-applications-p.patch
+debian-hacks/Don-t-register-plugins-if-the-MOZILLA_DISABLE_PLUGIN.patch
+debian-hacks/Add-a-2-minutes-timeout-on-xpcshell-tests.patch
+debian-hacks/Add-debian-extra-stuff-to-upstream-build-system-dire.patch
+debian-hacks/Don-t-build-image-gtests.patch
+debian-hacks/Set-program-name-from-the-remoting-name.patch
+debian-hacks/Use-the-Mozilla-Location-Service-key-when-the-Google.patch
+debian-hacks/Avoid-using-vmrs-vmsr-on-armel.patch
+debian-hacks/Use-remoting-name-for-call-to-gdk_set_program_class.patch
+debian-hacks/Use-build-id-as-langpack-version-for-reproducibility.patch
+debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch
+debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch