diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 224e7f052e..0000000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.pc/ diff --git a/.qmake.conf b/.qmake.conf index a56fde9965..04aa122a8e 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) load(qt_build_config) CONFIG += warning_clean -MODULE_VERSION = 5.15.15 +MODULE_VERSION = 5.15.17 diff --git a/.tag b/.tag index a76851c082..149fe6b312 100644 --- a/.tag +++ b/.tag @@ -1 +1 @@ -21ddfe15f638a36160cb11d00639c3126c1aed7c +17fd3176988586168bee8654008a097a5f23ec1d diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION index d293d46b43..cfc4c49b38 100644 --- a/CHROMIUM_VERSION +++ b/CHROMIUM_VERSION @@ -1,2 +1,2 @@ Based on Chromium version: 87.0.4280.144 -Patched with security patches up to Chromium version: 108.0.5359.124 +Patched with security patches up to Chromium version: 123.0.6312.58 diff --git a/config_help.txt b/config_help.txt index 48236c18ab..d50892121c 100644 --- a/config_help.txt +++ b/config_help.txt @@ -15,6 +15,7 @@ WebEngine options: (Linux only) -webengine-pepper-plugins ...... Enable use of Pepper Flash and Widevine plugins [auto] + -webengine-python-version ...... Use specific python version for building [python2/python3] -webengine-printing-and-pdf .... Enable use of printing and output to PDF [auto] -webengine-proprietary-codecs .. Enable support for proprietary codecs [no] diff --git a/configure.pri b/configure.pri index 3a33bdc820..cb53c93b0a 100644 --- a/configure.pri +++ b/configure.pri @@ -12,12 +12,9 @@ defineTest(isPythonVersionSupported) { python_version ~= s/[()]//g python_version = $$split(python_version, ',') python_major_version = $$first(python_version) - greaterThan(python_major_version, 2) { - qtLog("Python version 3 is not supported by Chromium.") - return(false) - } python_minor_version = $$member(python_version, 1) python_patch_version = $$member(python_version, 2) + greaterThan(python_major_version, 2): greaterThan(python_minor_version, 7): return(true) greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true) qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.") return(false) @@ -53,21 +50,37 @@ defineTest(qtConfReport_jumboBuild) { } defineTest(qtConfTest_detectPython2) { - python = $$qtConfFindInPath("python2$$EXE_SUFFIX") - isEmpty(python) { - qtLog("'python2$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.") - python = $$qtConfFindInPath("python$$EXE_SUFFIX") + pythonOverride = $$eval(config.input.python_override) + !isEmpty(pythonOverride) { + python = $$qtConfFindInPath("$$pythonOverride$$EXE_SUFFIX") + isEmpty(python) { + qtLog("User selected '$$pythonOverride$$EXE_SUFFIX' was not found in PATH. Giving up.") + return(false) + } } + + win32 { + # the default name of the python 2 executable on windows is just + # python, so try that first + isEmpty(python):python = $$qtConfFindInPath("python$$EXE_SUFFIX") + isEmpty(python):python = $$qtConfFindInPath("python2$$EXE_SUFFIX") + isEmpty(python):python = $$qtConfFindInPath("python3$$EXE_SUFFIX") + } else { + isEmpty(python):python = $$qtConfFindInPath("python2$$EXE_SUFFIX") + isEmpty(python):python = $$qtConfFindInPath("python3$$EXE_SUFFIX") + isEmpty(python):python = $$qtConfFindInPath("python$$EXE_SUFFIX") + } + isEmpty(python) { - qtLog("'python$$EXE_SUFFIX' not found in PATH. Giving up.") + qtLog("Python not found in PATH. Giving up.") return(false) } !isPythonVersionSupported($$python) { - qtLog("A suitable Python 2 executable could not be located.") + qtLog("A suitable Python executable could not be located.") return(false) } - # Make tests.python2.location available in configure.json. + # Make tests.python.location available in configure.json. $${1}.location = $$clean_path($$python) export($${1}.location) $${1}.cache += location diff --git a/debian/changelog b/debian/changelog index 225e9528b4..ef265c6b7e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,21 +1,132 @@ -qtwebengine-opensource-src (5.15.15+dfsg-3deepin3) unstable; urgency=medium +qtwebengine-opensource-src (5.15.17+dfsg-3deepin1) unstable; urgency=medium - * add LoongArch support + * add support loong64 riscv64. - -- Shi Pujin Fri, 05 Jul 2024 14:19:06 +0800 + -- LiChengGang Wed, 28 Aug 2024 10:52:43 +0800 -qtwebengine-opensource-src (5.15.15+dfsg-3deepin2) unstable; urgency=medium +qtwebengine-opensource-src (5.15.17+dfsg-3) unstable; urgency=medium + + * Upload to unstable. + + -- Dmitry Shachnev Tue, 09 Jul 2024 14:43:34 +0300 + +qtwebengine-opensource-src (5.15.17+dfsg-2) experimental; urgency=medium + + * Backport v8 patch to port the latest RegExpMacroAssembler changes to + mips64el. + * Update debian/libqt5webenginecore5.symbols from buildds’ logs. + + -- Dmitry Shachnev Sun, 07 Jul 2024 11:44:46 +0300 + +qtwebengine-opensource-src (5.15.17+dfsg-1) experimental; urgency=medium + + * New upstream release. + - Fixes build with libxml2 2.12 (closes: #1074671). + * Update SUBMODULE_COMMIT for the new release. + * Drop patches, included in the new release: + - python3.patch + - chromium-python3.patch + - python3.11.patch + - ffmpeg-x86-optimization.patch + - icu74.patch + * Also drop part of python3.12-imp.patch which was applied upstream. + * Refresh debian/patches/system-openjpeg2.patch. + * Update debian/libqt5webenginecore5.symbols from buildds’ logs. + * Bump ABI version to qtwebengine-abi-5-15-17. + * Pass QMAKE_PYTHON2=python3 to qmake, to get the docs built. + + -- Dmitry Shachnev Tue, 02 Jul 2024 22:53:32 +0300 + +qtwebengine-opensource-src (5.15.16+dfsg-5) unstable; urgency=medium + + * Add a patch from Arch Linux to build using C++17, which is required by ICU + 75. + * Cherry-pick upstream patches to build with Ninja 1.12. + * Mark applicable patches as "Forwarded: not-needed" to fix lintian errors. + * Update symbols files from local build log. + + -- Soren Stoutner Wed, 22 May 2024 12:37:00 -0700 + +qtwebengine-opensource-src (5.15.16+dfsg-4) unstable; urgency=medium + + * Upload to unstable. + + [ Soren Stoutner ] + * Merge 5.15.15+dfsg2-1 upload from unstable. + * Update symbols files from buildds’ logs. + + -- Dmitry Shachnev Tue, 21 May 2024 23:07:25 +0300 + +qtwebengine-opensource-src (5.15.16+dfsg-3) experimental; urgency=medium + + * Merge 5.15.15+dfsg-3 upload from unstable. + * Add upstream patches to stop using imp Python module (LP: #2058066). + Thanks Zixing Liu! + * Update bundled six module for Python 3.12 compatibility (LP: #2058117). + + -- Dmitry Shachnev Fri, 29 Mar 2024 16:12:37 +0300 + +qtwebengine-opensource-src (5.15.16+dfsg-2) experimental; urgency=medium + + * Replace pkg-config build-dependency with pkgconf. + * Build against Qt 5.15.13. + + -- Dmitry Shachnev Tue, 12 Mar 2024 18:00:47 +0300 + +qtwebengine-opensource-src (5.15.16+dfsg-1) experimental; urgency=medium + + [ Soren Stoutner ] + * New upstream release. + * Bump ABI version to qtwebengine-abi-5-15-16. + * Refresh python3.patch and system-openjpeg2.patch. + * Update symbols files. [ Dmitry Shachnev ] + * Build against Qt 5.15.12. * Add a patch from Gentoo to fix build with ICU 74. - -- Tianyu Chen Thu, 07 Mar 2024 14:40:40 +0800 + -- Dmitry Shachnev Mon, 25 Dec 2023 00:14:27 +0300 + +qtwebengine-opensource-src (5.15.15+dfsg2-1) unstable; urgency=medium + + [ Soren Stoutner ] + * Drop the build depend on libre2-dev, which forces building with the bundled + RE2 (closes: #1053409). + * Bump standards version to 4.7.0 (no changes needed). + * Fix debian/rules to handle dfsg repack counts. + * Change my email address from soren@stoutner.com to soren@debian.org in the + following locations: + - debian/changelog + - debian/control + - debian/copyright + - debian/patches/fix-example-pro-files.patch + - debian/patches/system-openjpeg2.patch + * Add 2024 to debian/copyright entries. + * Update debian/libqt5webenginecore5.symbols from local build log. -qtwebengine-opensource-src (5.15.15+dfsg-3deepin1) unstable; urgency=medium + [ Dmitry Shachnev ] + * Add a patch from Gentoo to fix build with ICU 74. + * Replace pkg-config build-dependency with pkgconf. + * Add upstream patches to stop using imp Python module (LP: #2058066). + Thanks Zixing Liu! + * Update bundled six module for Python 3.12 compatibility (LP: #2058117). - * Fix riscv64 build (closes: #1030916) + -- Soren Stoutner Thu, 09 May 2024 10:01:42 -0700 + +qtwebengine-opensource-src (5.15.15+dfsg-3) unstable; urgency=medium + + [ Soren Stoutner ] + * Remove unused build-depends on rollup (Closes: #1023334). + * Add Lintian overrides for source-is-missing false positives. + * Add Lintian override for missing-notice-file-for-apache-license false + positive. + * Correct BSD license text in debian/copyright. + * Build with the system version of dagre-layout. + + [ Dmitry Shachnev ] + * Update debian/libqt5webenginecore5.symbols for armhf (closes: #1067906). - -- Chang Yang Wed, 15 Nov 2023 21:11:30 +0800 + -- Dmitry Shachnev Fri, 29 Mar 2024 15:08:36 +0300 qtwebengine-opensource-src (5.15.15+dfsg-2) unstable; urgency=medium @@ -162,7 +273,7 @@ qtwebengine-opensource-src (5.15.12+dfsg-3) unstable; urgency=medium * Bump Standards-Version to 4.6.2, no changes needed. * Add myself to uploaders. - -- Soren Stoutner Wed, 01 Feb 2023 06:57:05 -0700 + -- Soren Stoutner Wed, 01 Feb 2023 06:57:05 -0700 qtwebengine-opensource-src (5.15.12+dfsg-2) unstable; urgency=medium diff --git a/debian/clean b/debian/clean index 2468547fe0..d8f3b1c7c1 100644 --- a/debian/clean +++ b/debian/clean @@ -38,6 +38,7 @@ src/*/*/*/Makefile src/*/*/Makefile src/*/Makefile src/*/Makefile.* +src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/ src/3rdparty/chromium/third_party/jstemplate/jstemplate_compiled.js src/3rdparty/gn/out/ src/Makefile diff --git a/debian/control b/debian/control index 997b82eab1..296e1f8592 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Uploaders: Scarlett Moore , Sandro Knauß , Dmitry Shachnev , Simon Quigley , - Soren Stoutner + Soren Stoutner Section: libs Priority: optional Build-Depends: binutils (>= 2.32-8~), @@ -43,10 +43,9 @@ Build-Depends: binutils (>= 2.32-8~), libpng-dev, libprotobuf-dev, libpulse-dev, - libqt5opengl5-dev (>= 5.15.8), - libqt5svg5-dev (>= 5.15.7), - libqt5webchannel5-dev (>= 5.15.7), - libre2-dev, + libqt5opengl5-dev (>= 5.15.13+dfsg~), + libqt5svg5-dev (>= 5.15.13~), + libqt5webchannel5-dev (>= 5.15.13~), libsnappy-dev, libsqlite3-dev, libusb-1.0-0-dev, @@ -67,36 +66,36 @@ Build-Depends: binutils (>= 2.32-8~), libxtst-dev, mesa-common-dev, ninja-build, + node-dagre-layout, node-rollup-plugin-terser, node-yargs, nodejs (>= 16.14), - pkg-config, pkg-kde-tools, + pkgconf, protobuf-compiler, python3, - qtbase5-dev (>= 5.15.8), - qtbase5-private-dev (>= 5.15.8), - qtdeclarative5-private-dev (>= 5.15.8), - qtpositioning5-dev (>= 5.15.7), - qtquickcontrols2-5-dev (>= 5.15.7), - qttools5-dev (>= 5.15.8), + qtbase5-dev (>= 5.15.13+dfsg~), + qtbase5-private-dev (>= 5.15.13+dfsg~), + qtdeclarative5-private-dev (>= 5.15.13+dfsg~), + qtpositioning5-dev (>= 5.15.13+dfsg~), + qtquickcontrols2-5-dev (>= 5.15.13+dfsg~), + qttools5-dev (>= 5.15.13~), re2c, - rollup, ruby, xauth, xvfb, yui-compressor -Build-Depends-Indep: qdoc-qt5 (>= 5.15.7~) , - qhelpgenerator-qt5 (>= 5.15.7~) , - qtattributionsscanner-qt5 (>= 5.15.7~) , - qtbase5-doc-html (>= 5.15.7) -Standards-Version: 4.6.2 +Build-Depends-Indep: qdoc-qt5 (>= 5.15.13~) , + qhelpgenerator-qt5 (>= 5.15.13~) , + qtattributionsscanner-qt5 (>= 5.15.13~) , + qtbase5-doc-html (>= 5.15.13+dfsg~) +Standards-Version: 4.7.0 Vcs-Browser: https://salsa.debian.org/qt-kde-team/qt/qtwebengine Vcs-Git: https://salsa.debian.org/qt-kde-team/qt/qtwebengine.git Homepage: https://doc.qt.io/qt-5/qtwebengine-index.html Package: qtwebengine5-dev -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Section: libdevel Depends: libqt5webchannel5-dev, @@ -117,7 +116,7 @@ Description: Web content engine library for Qt - development files using QtWebEngine library. Package: qtwebengine5-private-dev -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Section: libdevel Depends: qtwebengine5-dev (= ${binary:Version}), ${misc:Depends} @@ -129,7 +128,7 @@ Description: Web content engine library for Qt - private development files Qt 5 applications using QtWebEngine library. Package: qtpdf5-dev -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Section: libdevel Depends: libqt5pdf5 (= ${binary:Version}), @@ -144,7 +143,7 @@ Description: Qt 5 PDF library - development files using Qt PDF library. Package: libqt5webengine5 -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: libqt5webengine-data (= ${source:Version}), ${misc:Depends}, @@ -157,9 +156,9 @@ Description: Web content engine library for Qt This package contains the QtWebEngine library. Package: libqt5webenginecore5 -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same -Provides: qtwebengine-abi-5-15-15 +Provides: qtwebengine-abi-5-15-17 Depends: libqt5webengine-data (= ${source:Version}), sse2-support [i386], ${misc:Depends}, @@ -174,7 +173,7 @@ Description: Web content engine library for Qt - Core This package contains the core QtWebEngine library. Package: libqt5webenginewidgets5 -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: libqt5webengine-data (= ${source:Version}), ${misc:Depends}, @@ -187,7 +186,7 @@ Description: Web content engine library for Qt - Widget This package contains the widget QtWebEngine library. Package: libqt5pdf5 -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends} Description: Qt 5 PDF library @@ -196,7 +195,7 @@ Description: Qt 5 PDF library This package contains the Qt PDF library. Package: libqt5pdfwidgets5 -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends} Description: Qt 5 PDF Widgets library @@ -216,7 +215,7 @@ Description: Web content engine library for Qt - Data This package contains the arch independent parts of QtWebEngine libraries. Package: qt5-image-formats-plugin-pdf -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: ${misc:Depends}, ${shlibs:Depends} Description: Qt 5 PDF image format plugin @@ -226,7 +225,7 @@ Description: Qt 5 PDF image format plugin to view PDF files (the first page of PDF will be shown). Package: qml-module-qtwebengine -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: qml-module-qtquick2, ${misc:Depends}, ${shlibs:Depends} Pre-Depends: ${misc:Pre-Depends} @@ -237,7 +236,7 @@ Description: Qt WebEngine QML module This package contains the WebEngine QML module for QtDeclarative. Package: qml-module-qtquick-pdf -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: qml-module-qtgraphicaleffects (>= 5.12), qml-module-qtquick-controls2 (>= 5.14), @@ -254,7 +253,7 @@ Description: Qt Quick PDF QML module This package contains the Qt Quick PDF QML module. Package: qtwebengine5-dev-tools -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: foreign Section: devel Depends: qtchooser, ${misc:Depends}, ${shlibs:Depends} @@ -267,7 +266,7 @@ Description: Qt WebEngine tools in Qt WebEngine. Package: qtwebengine5-examples -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: libjs-jquery, libjs-marked, @@ -292,7 +291,7 @@ Description: Qt WebEngine - Examples This package contains the WebEngine examples. Package: qtpdf5-examples -Architecture: amd64 arm64 armhf i386 loong64 mips64el riscv64 +Architecture: amd64 arm64 armhf i386 mips64el loong64 riscv64 Multi-Arch: same Depends: qml-module-qtquick-pdf (= ${binary:Version}), ${misc:Depends}, diff --git a/debian/copyright b/debian/copyright index f8e99e9449..77bfacb8c8 100644 --- a/debian/copyright +++ b/debian/copyright @@ -32,6 +32,7 @@ Files-Excluded: src/3rdparty/chromium/build/android/CheckInstallApk-debug.apk src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/elf/elf_image_reader_fuzzer_corpus src/3rdparty/chromium/third_party/crashpad/crashpad/third_party/apple_cf/* src/3rdparty/chromium/third_party/crashpad/crashpad/util/misc/capture_context_win_arm64.obj + src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/diff/diff_match_patch.js src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/acorn/package/dist/acorn.js src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/lighthouse/lighthouse-dt-bundle.js @@ -85,8 +86,8 @@ License: LGPL-3 or GPL-2 Files: debian/* Copyright: 2016-2019 Scarlett Moore 2016-2017 Sandro Knauß - 2017-2023 Dmitry Shachnev - 2023 Soren Stoutner + 2017-2024 Dmitry Shachnev + 2023-2024 Soren Stoutner License: LGPL-3 Files: config.tests/* @@ -112,6 +113,21 @@ Files: src/3rdparty/chromium/* Copyright: 2015-2021 The Chromium Authors License: BSD-3-clause +Files: src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/* +Copyright: 2013-2014 Yahoo! Inc. + 2012 Andreas Lind Petersen + 2019 Oath Inc. +License: BSD-3-clause + +Files: src/3rdparty/chromium/third_party/ukey2/* +Copyright: 2018-2020 Google LLC +License: Apache-2.0 + +Files: src/3rdparty/chromium/third_party/ukey2/BUILD.gn + src/3rdparty/chromium/third_party/ukey2/fuzzers/BUILD.gn +Copyright: 2020 The Chromium Authors +License: BSD-3-clause + Files: src/3rdparty/gn/* Copyright: 2015-2020 The Chromium Authors License: BSD-3-clause @@ -536,10 +552,6 @@ Files: src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_p Copyright: i18n developers License: Apache-2.0 -Files: src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/* -Copyright: intl-messageformat developers -License: BSD-3-clause - Files: src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/lighthouse/* Copyright: lighthouse developers License: Apache-2.0 @@ -1277,10 +1289,6 @@ Files: src/3rdparty/chromium/third_party/ub-uiautomator/* Copyright: uiautomator (unbundled) developers License: Apache-2.0 -Files: src/3rdparty/chromium/third_party/ukey2/* -Copyright: Ukey2 developers -License: Apache-2.0 - Files: src/3rdparty/chromium/third_party/usb_ids/* Copyright: usb-ids developers License: BSD-3-clause @@ -1865,48 +1873,48 @@ License: bitstream-vera License: BSD-2-clause Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, INC. OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: BSD-3-clause Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - . - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Neither the name of the authors nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + 3. Neither the name of the authors nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: BSL-1.0 Permission is hereby granted, free of charge, to any person or organization diff --git a/debian/libqt5pdf5.symbols b/debian/libqt5pdf5.symbols index e79bfe6ba6..a2fc676f07 100644 --- a/debian/libqt5pdf5.symbols +++ b/debian/libqt5pdf5.symbols @@ -1,4 +1,4 @@ -# SymbolsHelper-Confirmed: 5.15.15 amd64 arm64 armhf i386 mips64el +# SymbolsHelper-Confirmed: 5.15.16 amd64 libQt5Pdf.so.5 libqt5pdf5 #MINVER# * Build-Depends-Package: qtpdf5-dev Qt_5.0@Qt_5.0 5.15.1 @@ -178,9 +178,7 @@ libQt5Pdf.so.5 libqt5pdf5 #MINVER# (optional=templinst|subst)_ZNSt11_Deque_baseIjSaIjEE17_M_initialize_mapE{size_t}@Qt_5 5.15.1 (optional=templinst)_ZNSt11_Deque_baseIjSaIjEED1Ev@Qt_5 5.15.1 (optional=templinst)_ZNSt11_Deque_baseIjSaIjEED2Ev@Qt_5 5.15.1 - (optional=templinst)_ZNSt5dequeIN11CFX_XMLNode4TypeESaIS1_EE12emplace_backIJS1_EEEvDpOT_@Qt_5 5.15.1 (optional=templinst|subst)_ZNSt5dequeIjSaIjEE17_M_reallocate_mapE{size_t}b@Qt_5 5.15.1 - (optional=templinst)_ZNSt5dequeIwSaIwEE12emplace_backIJwEEEvDpOT_@Qt_5 5.15.1 (optional=templinst)_ZNSt6vectorI18UnsupportedFeatureSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_@Qt_5 5.15.1 (optional=templinst)_ZNSt6vectorIN10CPDF_Annot7SubtypeESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.2 (optional=templinst)_ZNSt6vectorISt4pairIiiESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.1 diff --git a/debian/libqt5webengine5.symbols b/debian/libqt5webengine5.symbols index ba3ec78432..376ff0be4f 100644 --- a/debian/libqt5webengine5.symbols +++ b/debian/libqt5webengine5.symbols @@ -1,6 +1,6 @@ # SymbolsHelper-Confirmed: 5.15.5 amd64 libQt5WebEngine.so.5 libqt5webengine5 #MINVER# -| libqt5webengine5 #MINVER#, qtwebengine-abi-5-15-15 +| libqt5webengine5 #MINVER#, qtwebengine-abi-5-15-17 * Build-Depends-Package: qtwebengine5-dev Qt_5.0@Qt_5.0 5.7.1 Qt_5.10@Qt_5.10 5.10.1 diff --git a/debian/libqt5webenginecore5.symbols b/debian/libqt5webenginecore5.symbols index ad3cefe579..17f1ec3ce9 100644 --- a/debian/libqt5webenginecore5.symbols +++ b/debian/libqt5webenginecore5.symbols @@ -1,6 +1,6 @@ -# SymbolsHelper-Confirmed: 5.15.15 amd64 arm64 armhf i386 mips64el +# SymbolsHelper-Confirmed: 5.15.17 armhf i386 libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# -| libqt5webenginecore5 #MINVER#, qtwebengine-abi-5-15-15 +| libqt5webenginecore5 #MINVER#, qtwebengine-abi-5-15-17 * Build-Depends-Package: qtwebengine5-dev (optional=gold)Qt_5.0@Qt_5.0 5.7.1 (optional=gold)Qt_5.10@Qt_5.10 5.10.1 @@ -100,7 +100,7 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# _ZN15QtWebEngineCore14ProfileAdapter19visitedLinksManagerEv@Qt_5 5.12.2 _ZN15QtWebEngineCore14ProfileAdapter20setSpellCheckEnabledEb@Qt_5 5.12.2 _ZN15QtWebEngineCore14ProfileAdapter21defaultProfileAdapterEv@Qt_5 5.12.2 - _ZN15QtWebEngineCore14ProfileAdapter21determineDownloadPathERK7QStringS3_RKl@Qt_5 5.14.1 + (subst)_ZN15QtWebEngineCore14ProfileAdapter21determineDownloadPathERK7QStringS3_RK{time_t}@Qt_5 5.14.1 _ZN15QtWebEngineCore14ProfileAdapter21setHttpAcceptLanguageERK7QString@Qt_5 5.12.2 _ZN15QtWebEngineCore14ProfileAdapter21setRequestInterceptorEP31QWebEngineUrlRequestInterceptor@Qt_5 5.12.2 _ZN15QtWebEngineCore14ProfileAdapter21setVisitedLinksPolicyENS0_18VisitedLinksPolicyE@Qt_5 5.12.2 @@ -572,11 +572,20 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# _ZN40QWebEngineRegisterProtocolHandlerRequestC2E14QSharedPointerIN15QtWebEngineCore40RegisterProtocolHandlerRequestControllerEE@Qt_5 5.11.1 (optional=templinst)_ZN5blink8SetPixelIL13J_COLOR_SPACE2EEEvPjPPhi@Qt_5 5.10.1 (optional=templinst)_ZN5blink8SetPixelIL13J_COLOR_SPACE4EEEvPjPPhi@Qt_5 5.10.1 + (optional=templinst)_ZN6webrtc19ParseTypedParameterINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt8optionalIT_ES6_@Qt_5 5.15.16 + (optional=templinst)_ZN6webrtc19ParseTypedParameterISt8optionalIbEEES1_IT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Qt_5 5.15.16 + (optional=templinst)_ZN6webrtc19ParseTypedParameterISt8optionalIdEEES1_IT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Qt_5 5.15.16 + (optional=templinst)_ZN6webrtc19ParseTypedParameterISt8optionalIiEEES1_IT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Qt_5 5.15.16 + (optional=templinst)_ZN6webrtc19ParseTypedParameterISt8optionalIjEEES1_IT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Qt_5 5.15.16 + (optional=templinst)_ZN6webrtc19ParseTypedParameterIbEESt8optionalIT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Qt_5 5.15.16 + (optional=templinst)_ZN6webrtc19ParseTypedParameterIdEESt8optionalIT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Qt_5 5.15.16 + (optional=templinst)_ZN6webrtc19ParseTypedParameterIiEESt8optionalIT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Qt_5 5.15.16 + (optional=templinst)_ZN6webrtc19ParseTypedParameterIjEESt8optionalIT_ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Qt_5 5.15.16 (optional=templinst|subst)_ZN6webrtc24DownmixInterleavedToMonoIsEEvPKT_{size_t}iPS1_@Qt_5 5.14.1 - _ZN7sandbox18localtime_overrideEPKl@Qt_5 5.12.2 - _ZN7sandbox20localtime64_overrideEPKl@Qt_5 5.12.2 - _ZN7sandbox20localtime_r_overrideEPKlP2tm@Qt_5 5.12.2 - _ZN7sandbox22localtime64_r_overrideEPKlP2tm@Qt_5 5.12.2 + (subst)_ZN7sandbox18localtime_overrideEPK{time_t}@Qt_5 5.12.2 + (subst)_ZN7sandbox20localtime64_overrideEPK{time_t}@Qt_5 5.12.2 + (subst)_ZN7sandbox20localtime_r_overrideEPK{time_t}P2tm@Qt_5 5.12.2 + (subst)_ZN7sandbox22localtime64_r_overrideEPK{time_t}P2tm@Qt_5 5.12.2 (optional=templinst|subst)_ZN8perfetto6legacy15ConvertThreadIdINS0_29PerfettoLegacyCurrentThreadIdEEEbRKT_P{uint64_t}PiS7_@Qt_5 5.15.2 _ZNK15QtWebEngineCore10UserScript10sourceCodeEv@Qt_5 5.7.1 _ZNK15QtWebEngineCore10UserScript14injectionPointEv@Qt_5 5.7.1 @@ -732,11 +741,22 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# _ZNK32QWebEngineClientCertificateStore12certificatesEv@Qt_5 5.14.1 _ZNK40QWebEngineRegisterProtocolHandlerRequest6originEv@Qt_5 5.11.1 _ZNK40QWebEngineRegisterProtocolHandlerRequest6schemeEv@Qt_5 5.11.1 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE19_M_find_before_nodeE{size_t}RKS5_{size_t}@Qt_5 5.15.16 (optional=templinst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE4findERKS5_@Qt_5 5.15.10 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3gpu5gles212ProgramCache19LinkedProgramStatusEESaISC_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSE_18_Mod_range_hashingENSE_20_Default_ranged_hashENSE_20_Prime_rehash_policyENSE_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N5media8EmeCodecEESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N6device5mojom10SensorTypeEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 (optional=templinst|arch=!i386 !mipsel)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N6device5mojom10SensorTypeEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_@Qt_5 5.15.10 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_PKvESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 (optional=templinst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_@Qt_5 5.15.10 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIS5_SaIS5_EEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 (optional=templinst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIS5_SaIS5_EEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_@Qt_5 5.15.10 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIiSaIiEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_bESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 (optional=templinst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_@Qt_5 5.15.10 + (optional=templinst|subst)_ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_jESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeE{size_t}RS7_{size_t}@Qt_5 5.15.16 (optional=templinst|arch=i386)_ZNKSt10_HashtableIxxSaIxENSt8__detail9_IdentityESt8equal_toIxESt4hashIxENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE4findERKx@Qt_5 5.15.15 (optional=templinst|arch=armhf i386)_ZNKSt6bitsetILj64EE17_M_copy_to_stringIcSt11char_traitsIcESaIcEEEvRNSt7__cxx1112basic_stringIT_T0_T1_EES7_S7_@Qt_5 5.15.14 (optional=templinst)_ZNKSt7__cxx1112regex_traitsIcE16lookup_classnameIPKcEENS1_10_RegexMaskET_S6_b@Qt_5 5.14.1 @@ -757,12 +777,8 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt10_HashtableIN2ax5mojom15StringAttributeESt4pairIKS2_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE5clearEv@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt10_HashtableIN2ax5mojom16IntListAttributeESt4pairIKS2_St6vectorIiSaIiEEESaIS8_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNSA_10_Hash_nodeIS8_Lb1EEE{size_t}@Qt_5 5.15.6 (optional=templinst)_ZNSt10_HashtableIN2ax5mojom16IntListAttributeESt4pairIKS2_St6vectorIiSaIiEEESaIS8_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE5clearEv@Qt_5 5.14.1 - (optional=templinst)_ZNSt10_HashtableIN2ax5mojom16IntListAttributeESt4pairIKS2_St6vectorIiSaIiEEESaIS8_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED1Ev@Qt_5 5.15.15 - (optional=templinst)_ZNSt10_HashtableIN2ax5mojom16IntListAttributeESt4pairIKS2_St6vectorIiSaIiEEESaIS8_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev@Qt_5 5.15.15 (optional=templinst|subst)_ZNSt10_HashtableIN2ax5mojom19StringListAttributeESt4pairIKS2_St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEESaISE_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSG_18_Mod_range_hashingENSG_20_Default_ranged_hashENSG_20_Prime_rehash_policyENSG_17_Hashtable_traitsILb1ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNSG_10_Hash_nodeISE_Lb1EEE{size_t}@Qt_5 5.15.6 (optional=templinst)_ZNSt10_HashtableIN2ax5mojom19StringListAttributeESt4pairIKS2_St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEESaISE_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSG_18_Mod_range_hashingENSG_20_Default_ranged_hashENSG_20_Prime_rehash_policyENSG_17_Hashtable_traitsILb1ELb0ELb1EEEE5clearEv@Qt_5 5.14.1 - (optional=templinst)_ZNSt10_HashtableIN2ax5mojom19StringListAttributeESt4pairIKS2_St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEESaISE_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSG_18_Mod_range_hashingENSG_20_Default_ranged_hashENSG_20_Prime_rehash_policyENSG_17_Hashtable_traitsILb1ELb0ELb1EEEED1Ev@Qt_5 5.15.15 - (optional=templinst)_ZNSt10_HashtableIN2ax5mojom19StringListAttributeESt4pairIKS2_St6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEESaISE_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENSG_18_Mod_range_hashingENSG_20_Default_ranged_hashENSG_20_Prime_rehash_policyENSG_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev@Qt_5 5.15.15 (optional=templinst|subst)_ZNSt10_HashtableIN4quic13QuicErrorCodeESt4pairIKS1_{size_t}ESaIS4_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS6_10_Hash_nodeIS4_Lb0EEE{size_t}@Qt_5 5.15.6 (optional=templinst|subst)_ZNSt10_HashtableIN4quic13QuicErrorCodeESt4pairIKS1_{size_t}ESaIS4_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEED1Ev@Qt_5 5.15.15 (optional=templinst|subst)_ZNSt10_HashtableIN4quic13QuicErrorCodeESt4pairIKS1_{size_t}ESaIS4_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev@Qt_5 5.15.15 @@ -784,8 +800,8 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|subst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIS5_SaIS5_EEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNSD_10_Hash_nodeISB_Lb1EEE{size_t}@Qt_5 5.15.6 (optional=templinst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIS5_SaIS5_EEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE5clearEv@Qt_5 5.10.1 (optional=templinst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIiSaIiEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE5clearEv@Qt_5 5.14.1 - (optional=templinst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_dESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE18_M_assign_elementsIRKSL_EEvOT_@Qt_5 5.15.1 (optional=templinst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_dESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_@Qt_5 5.15.10 + (optional=templinst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_dESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE9_M_assignIRKSL_NSA_17_ReuseOrAllocNodeISaINSA_10_Hash_nodeIS8_Lb1EEEEEEEEvOT_RKT0_@Qt_5 5.15.16 (optional=templinst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_dESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED1Ev@Qt_5 5.15.15 (optional=templinst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_dESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev@Qt_5 5.15.15 (optional=templinst|subst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNSA_10_Hash_nodeIS8_Lb1EEE{size_t}@Qt_5 5.15.6 @@ -796,11 +812,8 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev@Qt_5 5.15.15 (optional=templinst|arch=!i386 !mipsel)_ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_jESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_@Qt_5 5.15.10 (optional=templinst|subst)_ZNSt10_HashtableIPvS0_SaIS0_ENSt8__detail9_IdentityESt8equal_toIS0_ESt4hashIS0_ENS2_18_Mod_range_hashingENS2_20_Default_ranged_hashENS2_20_Prime_rehash_policyENS2_17_Hashtable_traitsILb0ELb1ELb1EEEE8_M_eraseE{size_t}PNS2_15_Hash_node_baseEPNS2_10_Hash_nodeIS0_Lb0EEE@Qt_5 5.14.1 - (optional=templinst|subst|arch=!i386 !mipsel)_ZNSt10_HashtableIPvSt4pairIKS0_{size_t}ESaIS3_ENSt8__detail10_Select1stESt8equal_toIS0_ESt4hashIS0_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS5_10_Hash_nodeIS3_Lb0EEE{size_t}@Qt_5 5.15.6 (optional=templinst)_ZNSt10_HashtableIiSt4pairIKiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaIS8_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb0ELb0ELb1EEEED1Ev@Qt_5 5.15.15 (optional=templinst)_ZNSt10_HashtableIiSt4pairIKiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaIS8_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev@Qt_5 5.15.15 - (optional=templinst|subst)_ZNSt10_HashtableIiSt4pairIKiSt6vectorIiSaIiEEESaIS5_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS7_10_Hash_nodeIS5_Lb0EEE{size_t}@Qt_5 5.15.6 - (optional=templinst|subst)_ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS4_10_Hash_nodeIS2_Lb0EEE{size_t}@Qt_5 5.15.6 (optional=templinst)_ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED1Ev@Qt_5 5.15.15 (optional=templinst)_ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev@Qt_5 5.15.15 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt10_HashtableIiSt4pairIKijESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeEjjPNS4_10_Hash_nodeIS2_Lb0EEEj@Qt_5 5.15.7 @@ -831,12 +844,11 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|subst)_ZNSt10_HashtableIjjSaIjENSt8__detail9_IdentityESt8equal_toIjESt4hashIjENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE8_M_eraseE{size_t}PNS1_15_Hash_node_baseEPNS1_10_Hash_nodeIjLb0EEE@Qt_5 5.14.1 (optional=templinst|subst|arch=armhf)_ZNSt10_HashtableIjjSaIjENSt8__detail9_IdentityESt8equal_toIjESt4hashIjENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEEC1IPKjEET_SG_{size_t}RKS6_RKS7_RKS8_RKS4_RKS2_RKS0_@Qt_5 5.14.1 (optional=templinst|subst|arch=armhf)_ZNSt10_HashtableIjjSaIjENSt8__detail9_IdentityESt8equal_toIjESt4hashIjENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEEC2IPKjEET_SG_{size_t}RKS6_RKS7_RKS8_RKS4_RKS2_RKS0_@Qt_5 5.14.1 - (optional=templinst|arch=!armhf !i386 !mipsel)_ZNSt10_HashtableImSt4pairIKmmESaIS2_ENSt8__detail10_Select1stESt8equal_toImESt4hashImENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeEmmPNS4_10_Hash_nodeIS2_Lb0EEEm@Qt_5 5.15.6 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt10_HashtableImmSaImENSt8__detail9_IdentityESt8equal_toImESt4hashImENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE8_M_eraseEmPNS1_15_Hash_node_baseEPNS1_10_Hash_nodeImLb0EEE@Qt_5 5.14.1 (optional=templinst)_ZNSt10_HashtableItSt4pairIKtSt6vectorIhSaIhEEESaIS5_ENSt8__detail10_Select1stESt8equal_toItESt4hashItENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb0ELb0ELb1EEEE5clearEv@Qt_5 5.9.0 - (optional=templinst|arch=!amd64 !arm64 !i386|subst)_ZNSt10_HashtableI{int64_t}{int64_t}SaI{int64_t}ENSt8__detail9_IdentityESt8equal_toI{int64_t}ESt4hashI{int64_t}ENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS1_10_Hash_nodeI{int64_t}Lb0EEE{size_t}@Qt_5 5.15.10 + (optional=templinst|arch=i386)_ZNSt10_HashtableIySt4pairIKyiESaIS2_ENSt8__detail10_Select1stESt8equal_toIyESt4hashIyENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_@Qt_5 5.15.16 + (optional=templinst|arch=!i386|subst)_ZNSt10_HashtableI{int64_t}{int64_t}SaI{int64_t}ENSt8__detail9_IdentityESt8equal_toI{int64_t}ESt4hashI{int64_t}ENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS1_10_Hash_nodeI{int64_t}Lb0EEE{size_t}@Qt_5 5.15.10 (subst)_ZNSt10_HashtableI{size_t}St4pairIK{size_t}St10unique_ptrIA_cSt14default_deleteIS3_EEESaIS7_ENSt8__detail10_Select1stESt8equal_toI{size_t}ESt4hashI{size_t}ENS9_18_Mod_range_hashingENS9_20_Default_ranged_hashENS9_20_Prime_rehash_policyENS9_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS9_10_Hash_nodeIS7_Lb0EEE{size_t}@Qt_5 5.15.7 - (optional=templinst|subst)_ZNSt10_HashtableI{size_t}St4pairIK{size_t}St6vectorI{size_t}SaI{size_t}EEESaIS5_ENSt8__detail10_Select1stESt8equal_toI{size_t}ESt4hashI{size_t}ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb0ELb0ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS7_10_Hash_nodeIS5_Lb0EEE{size_t}@Qt_5 5.15.6 (optional=templinst|subst)_ZNSt10_HashtableI{uint64_t}St4pairIK{uint64_t}NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaIS8_ENSt8__detail10_Select1stESt8equal_toI{uint64_t}ESt4hashI{uint64_t}ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb0ELb0ELb1EEEE5clearEv@Qt_5 5.15.15 (optional=templinst|subst)_ZNSt10_HashtableI{uint64_t}{uint64_t}SaI{uint64_t}ENSt8__detail9_IdentityESt8equal_toI{uint64_t}ESt4hashI{uint64_t}ENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE21_M_insert_unique_nodeE{size_t}{size_t}PNS1_10_Hash_nodeI{uint64_t}Lb0EEE{size_t}@Qt_5 5.15.15 (optional=templinst|subst)_ZNSt10_HashtableI{uint64_t}{uint64_t}SaI{uint64_t}ENSt8__detail9_IdentityESt8equal_toI{uint64_t}ESt4hashI{uint64_t}ENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEEC1IN9__gnu_cxx17__normal_iteratorIP{uint64_t}St6vectorI{uint64_t}S0_EEEEET_SK_{size_t}RKS6_RKS4_RKS0_St17integral_constantIbLb1EE@Qt_5 5.15.15 @@ -859,7 +871,7 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt11_Deque_baseIjSaIjEE17_M_initialize_mapEm@Qt_5 5.7.1 (optional=templinst)_ZNSt11_Deque_baseIjSaIjEED1Ev@Qt_5 5.7.1 (optional=templinst)_ZNSt11_Deque_baseIjSaIjEED2Ev@Qt_5 5.7.1 - (optional=templinst|subst|arch=i386 mips64el mipsel)_ZNSt11_Deque_baseIlSaIlEE17_M_initialize_mapE{size_t}@Qt_5 5.14.1 + (optional=templinst|subst|arch=i386 mipsel)_ZNSt11_Deque_baseIlSaIlEE17_M_initialize_mapE{size_t}@Qt_5 5.14.1 (optional=templinst)_ZNSt11_Deque_baseIlSaIlEED1Ev@Qt_5 5.14.1 (optional=templinst)_ZNSt11_Deque_baseIlSaIlEED2Ev@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt11_Deque_baseImSaImEED1Ev@Qt_5 5.11.1 @@ -916,46 +928,30 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=i386)_ZNSt23mersenne_twister_engineIyLj64ELj312ELj156ELj31ELy13043109905998158313ELj29ELy6148914691236517205ELj17ELy8202884508482404352ELj37ELy18444473444759240704ELj43ELy6364136223846793005EE11_M_gen_randEv@Qt_5 5.15.10 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt23mersenne_twister_engineIyLj64ELj312ELj156ELj31ELy13043109905998158313ELj29ELy6148914691236517205ELj17ELy8202884508482404352ELj37ELy18444473444759240704ELj43ELy6364136223846793005EEclEv@Qt_5 5.15.7 (optional=templinst|subst)_ZNSt23mersenne_twister_engineI{size_t}L{size_t}32EL{size_t}624EL{size_t}397EL{size_t}31EL{size_t}2567483615EL{size_t}11EL{size_t}4294967295EL{size_t}7EL{size_t}2636928640EL{size_t}15EL{size_t}4022730752EL{size_t}18EL{size_t}1812433253EE11_M_gen_randEv@Qt_5 5.14.2 - (optional=templinst)_ZNSt5dequeIN11CFX_XMLNode4TypeESaIS1_EE12emplace_backIJS1_EEEvDpOT_@Qt_5 5.14.1 - (optional=templinst)_ZNSt5dequeIN3net19HostResolverManager8TaskTypeESaIS2_EE12emplace_backIJS2_EEEvDpOT_@Qt_5 5.14.1 (optional=templinst)_ZNSt5dequeIN3net19HostResolverManager8TaskTypeESaIS2_EE17_M_push_front_auxIJS2_EEEvDpOT_@Qt_5 5.15.1 (optional=templinst|subst)_ZNSt5dequeIN3net19HostResolverManager8TaskTypeESaIS2_EE17_M_reallocate_mapE{size_t}b@Qt_5 5.14.1 (optional=templinst)_ZNSt5dequeIN3net19HostResolverManager8TaskTypeESaIS2_EE8_M_eraseESt15_Deque_iteratorIS2_RS2_PS2_E@Qt_5 5.14.1 (optional=templinst|arch=armhf)_ZNSt5dequeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE16_M_push_back_auxIJS5_EEEvDpOT_@Qt_5 5.15.1 - (optional=templinst)_ZNSt5dequeINSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEEESaIS5_EE12emplace_backIJS5_EEEvDpOT_@Qt_5 5.14.1 (optional=templinst)_ZNSt5dequeINSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEEESaIS5_EE16_M_push_back_auxIJRKS5_EEEvDpOT_@Qt_5 5.14.1 (optional=templinst|arch=armhf mips64el mipsel)_ZNSt5dequeINSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEEESaIS5_EE16_M_push_back_auxIJS5_EEEvDpOT_@Qt_5 5.14.2 (optional=templinst|subst)_ZNSt5dequeINSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEEESaIS5_EE17_M_reallocate_mapE{size_t}b@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt5dequeISt4pairI{int64_t}iESaIS1_EE8_M_eraseESt15_Deque_iteratorIS1_RS1_PS1_ES7_@Qt_5 5.14.1 - (optional=templinst|subst)_ZNSt5dequeISt4pairI{size_t}{size_t}ESaIS1_EE12emplace_backIJS1_EEEvDpOT_@Qt_5 5.15.3 - (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt5dequeIdSaIdEE12emplace_backIJEEEvDpOT_@Qt_5 5.15.7 - (optional=templinst)_ZNSt5dequeIdSaIdEE12emplace_backIJdEEEvDpOT_@Qt_5 5.12.2 (optional=templinst|arch=i386)_ZNSt5dequeIdSaIdEE13_M_insert_auxIJRKdEEESt15_Deque_iteratorIdRdPdES8_DpOT_@Qt_5 5.15.2 (optional=templinst|subst)_ZNSt5dequeIdSaIdEE17_M_reallocate_mapE{size_t}b@Qt_5 5.15.2 (optional=templinst|subst)_ZNSt5dequeIfSaIfEE17_M_reallocate_mapE{size_t}b@Qt_5 5.14.1 - (optional=templinst)_ZNSt5dequeIiSaIiEE12emplace_backIJiEEEvDpOT_@Qt_5 5.7.1 (optional=templinst)_ZNSt5dequeIiSaIiEE16_M_push_back_auxIJRKiEEEvDpOT_@Qt_5 5.7.1 - (optional=templinst)_ZNSt5dequeIiSaIiEE16_M_push_back_auxIJRiEEEvDpOT_@Qt_5 5.15.1 (optional=templinst|arch=armhf i386 mipsel)_ZNSt5dequeIiSaIiEE17_M_reallocate_mapEjb@Qt_5 5.7.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt5dequeIiSaIiEE17_M_reallocate_mapEmb@Qt_5 5.7.1 - (optional=templinst)_ZNSt5dequeIjSaIjEE12emplace_backIJRjEEEvDpOT_@Qt_5 5.15.1 (optional=templinst)_ZNSt5dequeIjSaIjEE16_M_push_back_auxIJEEEvDpOT_@Qt_5 5.15.3 (optional=templinst)_ZNSt5dequeIjSaIjEE16_M_push_back_auxIJRKjEEEvDpOT_@Qt_5 5.7.1 - (optional=templinst)_ZNSt5dequeIjSaIjEE16_M_push_back_auxIJRjEEEvDpOT_@Qt_5 5.15.1 (optional=templinst|arch=armhf i386 mipsel)_ZNSt5dequeIjSaIjEE17_M_reallocate_mapEjb@Qt_5 5.11.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt5dequeIjSaIjEE17_M_reallocate_mapEmb@Qt_5 5.11.1 (optional=templinst)_ZNSt5dequeIlSaIlEE16_M_push_back_auxIJRKlEEEvDpOT_@Qt_5 5.14.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt5dequeIlSaIlEE16_M_push_back_auxIJlEEEvDpOT_@Qt_5 5.15.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt5dequeImSaImEE16_M_push_back_auxIJRKmEEEvDpOT_@Qt_5 5.15.3 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt5dequeImSaImEE17_M_reallocate_mapEmb@Qt_5 5.14.2 - (optional=templinst)_ZNSt5dequeIwSaIwEE12emplace_backIJwEEEvDpOT_@Qt_5 5.12.2 - (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt5dequeIxSaIxEE12emplace_backIJEEEvDpOT_@Qt_5 5.15.7 - (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt5dequeIxSaIxEE12emplace_backIJxEEEvDpOT_@Qt_5 5.15.1 (optional=templinst|arch=i386)_ZNSt5dequeIxSaIxEE13_M_insert_auxIJRKxEEESt15_Deque_iteratorIxRxPxES8_DpOT_@Qt_5 5.15.1 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt5dequeIxSaIxEE16_M_push_back_auxIJRKxEEEvDpOT_@Qt_5 5.15.1 (optional=templinst|arch=armhf mipsel)_ZNSt5dequeIxSaIxEE16_M_push_back_auxIJRxEEEvDpOT_@Qt_5 5.15.2 - (optional=templinst|arch=i386)_ZNSt5dequeIxSaIxEE16_M_push_back_auxIJxEEEvDpOT_@Qt_5 5.15.10 - (optional=templinst|subst)_ZNSt5dequeI{int64_t}SaI{int64_t}EE12emplace_backIJR{int64_t}EEEvDpOT_@Qt_5 5.15.1 (optional=templinst|subst)_ZNSt5dequeI{int64_t}SaI{int64_t}EE16_M_push_back_auxIJEEEvDpOT_@Qt_5 5.15.6 (optional=templinst|subst)_ZNSt5dequeI{int64_t}SaI{int64_t}EE17_M_reallocate_mapE{size_t}b@Qt_5 5.15.1 (optional=templinst|subst)_ZNSt6vectorI11PP_FileTypeSaIS0_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 @@ -1062,10 +1058,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorIN8perfetto15trace_processor18ThreadNamePriorityESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_@Qt_5 5.15.3 (optional=templinst)_ZNSt6vectorIN8perfetto6protos3gen21ObservableEvents_TypeESaIS3_EE17_M_realloc_insertIJEEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.15.2 (optional=templinst)_ZNSt6vectorIN8perfetto6protos3gen21ObservableEvents_TypeESaIS3_EE17_M_realloc_insertIJRS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.15.2 - (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJPcEEEvDpOT_@Qt_5 5.15.3 - (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRA_KcEEEvDpOT_@Qt_5 5.15.3 - (optional=templinst|arch=!armhf)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRKS5_EEEvDpOT_@Qt_5 5.15.3 - (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRN4base16BasicStringPieceIS5_EEEEEvDpOT_@Qt_5 5.15.1 (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEEvDpOT_@Qt_5 5.7.1 (optional=templinst)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_insert_auxIS5_EEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEOT_@Qt_5 5.11.1 (optional=templinst|arch=armhf)_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE14_M_emplace_auxIJRKS5_EEEN9__gnu_cxx17__normal_iteratorIPS5_S7_EENSC_IPS9_S7_EEDpOT_@Qt_5 5.14.1 @@ -1090,9 +1082,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorINSt8__detail6_StateIcEESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorIPFPKciESaIS3_EE17_M_realloc_insertIJRKS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.12.2 (optional=templinst)_ZNSt6vectorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE17_M_realloc_insertIJS7_EEEvN9__gnu_cxx17__normal_iteratorIPS7_S9_EEDpOT_@Qt_5 5.12.2 - (optional=templinst)_ZNSt6vectorIPKcSaIS1_EE12emplace_backIJRA18_S0_EEEvDpOT_@Qt_5 5.14.1 - (optional=templinst)_ZNSt6vectorIPKcSaIS1_EE12emplace_backIJRA20_S0_EEEvDpOT_@Qt_5 5.14.1 - (optional=templinst)_ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEEvDpOT_@Qt_5 5.10.1 (optional=templinst|subst)_ZNSt6vectorIPKcSaIS1_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorIPKcSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst)_ZNSt6vectorIPKcSaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 @@ -1110,14 +1099,12 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorIPhSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_@Qt_5 5.9.1 (optional=templinst|subst)_ZNSt6vectorIPhSaIS0_EE7reserveE{size_t}@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt6vectorIPsSaIS0_EE17_M_default_appendE{size_t}@Qt_5 5.15.2 - (optional=templinst)_ZNSt6vectorIPvSaIS0_EE12emplace_backIJS0_EEEvDpOT_@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt6vectorIPvSaIS0_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorIPvSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_@Qt_5 5.9.1 (optional=templinst)_ZNSt6vectorIPvSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_@Qt_5 5.11.1 (optional=templinst|subst)_ZNSt6vectorIPvSaIS0_EE7reserveE{size_t}@Qt_5 5.15.1 (optional=templinst|subst)_ZNSt6vectorIP{size_t}SaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE17_M_realloc_insertIJRKS7_EEEvN9__gnu_cxx17__normal_iteratorIPS7_S9_EEDpOT_@Qt_5 5.9.1 - (optional=templinst)_ZNSt6vectorIS_IcSaIcEESaIS1_EE12emplace_backIJS1_EEEvDpOT_@Qt_5 5.15.6 (optional=templinst|subst)_ZNSt6vectorIS_IcSaIcEESaIS1_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorIS_IcSaIcEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst)_ZNSt6vectorIS_IfSaIfEESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.15 @@ -1129,6 +1116,7 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorIS_IhSaIhEESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst|subst)_ZNSt6vectorIS_IhSaIhEESaIS1_EE17_M_realloc_insertIJ{size_t}EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.3 (optional=templinst|subst)_ZNSt6vectorIS_IiSaIiEESaIS1_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 + (optional=templinst)_ZNSt6vectorIS_IiSaIiEESaIS1_EE17_M_realloc_insertIJEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.16 (optional=templinst|subst)_ZNSt6vectorIS_IjSaIjEESaIS1_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorIS_IjSaIjEESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst)_ZNSt6vectorIS_ItSaItEESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.10 @@ -1136,12 +1124,13 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorISt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS6_EESaIS9_EE17_M_realloc_insertIJPS6_EEEvN9__gnu_cxx17__normal_iteratorIPS9_SB_EEDpOT_@Qt_5 5.15.2 (optional=templinst)_ZNSt6vectorISt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS6_EESaIS9_EE17_M_realloc_insertIJS9_EEEvN9__gnu_cxx17__normal_iteratorIPS9_SB_EEDpOT_@Qt_5 5.15.6 (optional=templinst)_ZNSt6vectorISt10unique_ptrIS_IcSaIcEESt14default_deleteIS2_EESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_@Qt_5 5.15.6 - (optional=templinst)_ZNSt6vectorISt10unique_ptrIS_IdSaIdEESt14default_deleteIS2_EESaIS5_EE12emplace_backIJS5_EEEvDpOT_@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorISt10unique_ptrIS_IdSaIdEESt14default_deleteIS2_EESaIS5_EE17_M_realloc_insertIJEEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_@Qt_5 5.15.3 (optional=templinst)_ZNSt6vectorISt10unique_ptrIS_IdSaIdEESt14default_deleteIS2_EESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorISt10unique_ptrIS_IiSaIiEESt14default_deleteIS2_EESaIS5_EE17_M_realloc_insertIJEEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_@Qt_5 5.15.3 (optional=templinst)_ZNSt6vectorISt10unique_ptrIS_IiSaIiEESt14default_deleteIS2_EESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt6vectorISt10unique_ptrISt5arrayIhL{size_t}65536EESt14default_deleteIS2_EESaIS5_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 + (optional=templinst|arch=armhf mips64el|subst)_ZNSt6vectorISt17basic_string_viewIcSt11char_traitsIcEESaIS3_EE17_M_realloc_insertIJPKcRK{size_t}EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt6vectorISt17basic_string_viewIcSt11char_traitsIcEESaIS3_EE17_M_realloc_insertIJRKS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt6vectorISt4pairIN10variations5mojom19GoogleWebVisibilityENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EE17_M_realloc_insertIJSA_EEEvN9__gnu_cxx17__normal_iteratorIPSA_SC_EEDpOT_@Qt_5 5.15.3 (optional=templinst|subst)_ZNSt6vectorISt4pairIN2ax5mojom12IntAttributeEiESaIS4_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorISt4pairIN2ax5mojom12IntAttributeEiESaIS4_EE17_M_realloc_insertIJS4_EEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_@Qt_5 5.12.2 @@ -1176,8 +1165,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorISt4pairIN5blink5mojom21DocumentPolicyFeatureENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EE17_M_realloc_insertIJSA_EEEvN9__gnu_cxx17__normal_iteratorIPSA_SC_EEDpOT_@Qt_5 5.15.2 (optional=templinst)_ZNSt6vectorISt4pairIN5blink5mojom23EffectiveConnectionTypeEiESaIS4_EE17_M_realloc_insertIJS4_EEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_@Qt_5 5.15.3 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIN5blink9scheduler26WebSchedulerTrackedFeatureEiESaIS4_EE17_M_realloc_insertIJRKS3_iEEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_@Qt_5 5.15.7 - (optional=templinst|arch=i386)_ZNSt6vectorISt4pairIN6webrtc14Vp8FrameConfig18Vp8BufferReferenceEjESaIS4_EE12emplace_backIJS3_RjEEEvDpOT_@Qt_5 5.15.10 - (optional=templinst|arch=amd64 arm64)_ZNSt6vectorISt4pairIN6webrtc14Vp8FrameConfig18Vp8BufferReferenceEmESaIS4_EE12emplace_backIJS3_RmEEEvDpOT_@Qt_5 5.15.6 (optional=templinst|subst|arch=armhf mips64el mipsel)_ZNSt6vectorISt4pairIN6webrtc14Vp8FrameConfig18Vp8BufferReferenceE{size_t}ESaIS4_EE17_M_realloc_insertIJS3_R{size_t}EEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorISt4pairIN7content14PermissionTypeEN5blink5mojom16PermissionStatusEESaIS6_EE13_M_insert_auxIS6_EEvN9__gnu_cxx17__normal_iteratorIPS6_S8_EEOT_@Qt_5 5.15.1 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIN7content14PermissionTypeEN5blink5mojom16PermissionStatusEESaIS6_EE17_M_realloc_insertIJRKS2_S5_EEEvN9__gnu_cxx17__normal_iteratorIPS6_S8_EEDpOT_@Qt_5 5.15.7 @@ -1186,8 +1173,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorISt4pairIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESB_ESaISC_EE17_M_realloc_insertIJSC_EEEvNS2_IPSC_SE_EEDpOT_@Qt_5 5.9.1 (optional=templinst)_ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5blink5mojom21DocumentPolicyFeatureEESaISA_EE17_M_realloc_insertIJSA_EEEvN9__gnu_cxx17__normal_iteratorIPSA_SC_EEDpOT_@Qt_5 5.15.2 (optional=templinst)_ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7network5mojom18WebClientHintsTypeEESaISA_EE17_M_realloc_insertIJSA_EEEvN9__gnu_cxx17__normal_iteratorIPSA_SC_EEDpOT_@Qt_5 5.15.3 - (optional=templinst)_ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EE12emplace_backIJS6_S6_EEEvDpOT_@Qt_5 5.11.1 - (optional=templinst)_ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EE12emplace_backIJS7_EEEvDpOT_@Qt_5 5.7.1 (optional=templinst)_ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EE14_M_emplace_auxIJRKS6_S6_EEEN9__gnu_cxx17__normal_iteratorIPS7_S9_EENSE_IPKS7_S9_EEDpOT_@Qt_5 5.14.2 (optional=templinst)_ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EE14_M_insert_rvalEN9__gnu_cxx17__normal_iteratorIPKS7_S9_EEOS7_@Qt_5 5.11.1 (optional=templinst|subst)_ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EE17_M_default_appendE{size_t}@Qt_5 5.14.1 @@ -1223,6 +1208,8 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorISt4pairIPvS1_ESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorISt4pairIS0_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EbESaIS8_EE17_M_realloc_insertIJS7_bEEEvN9__gnu_cxx17__normal_iteratorIPS8_SA_EEDpOT_@Qt_5 5.15.1 (optional=templinst)_ZNSt6vectorISt4pairIS_IhSaIhEEtESaIS3_EE17_M_realloc_insertIJRKS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.9.1 + (optional=templinst)_ZNSt6vectorISt4pairISt17basic_string_viewIcSt11char_traitsIcEES4_ESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt6vectorISt4pairISt17basic_string_viewIcSt11char_traitsIcEES4_ESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_@Qt_5 5.15.16 (optional=templinst|subst)_ZNSt6vectorISt4pairISt5arrayIhL{size_t}32EES_IhSaIhEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_@Qt_5 5.15.3 (optional=templinst)_ZNSt6vectorISt4pairIccESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.14.1 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIcjESaIS1_EE17_M_realloc_insertIJRKcjEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.7 @@ -1246,6 +1233,7 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIibESaIS1_EE17_M_realloc_insertIJRiRbEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.7 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIiiESaIS1_EE17_M_realloc_insertIJRKiRiEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.7 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIiiESaIS1_EE17_M_realloc_insertIJRiRKiEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.7 + (optional=templinst|arch=armhf)_ZNSt6vectorISt4pairIiiESaIS1_EE17_M_realloc_insertIJRiS5_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt6vectorISt4pairIiiESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst)_ZNSt6vectorISt4pairIiiESaIS1_EE17_M_realloc_insertIJiiEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.7 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIijESaIS1_EE17_M_realloc_insertIJRKijEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.7 @@ -1256,10 +1244,8 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=armhf i386 mipsel)_ZNSt6vectorISt4pairIjN3gfx4Font6WeightEESaIS4_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS4_S6_EESA_@Qt_5 5.9.0 (optional=templinst)_ZNSt6vectorISt4pairIjN3net13AddressFamilyEESaIS3_EE17_M_realloc_insertIJS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.12.2 (optional=templinst|arch=armhf i386 mipsel)_ZNSt6vectorISt4pairIjbESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EES7_@Qt_5 5.9.0 - (optional=templinst|arch=!mips64el !mipsel)_ZNSt6vectorISt4pairIjhESaIS1_EE12emplace_backIJS1_EEEvDpOT_@Qt_5 5.7.1 (optional=templinst)_ZNSt6vectorISt4pairIjhESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorISt4pairIjiESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 - (optional=templinst|arch=!armhf !mipsel)_ZNSt6vectorISt4pairIjjESaIS1_EE12emplace_backIJRjS5_EEEvDpOT_@Qt_5 5.15.6 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorISt4pairIjjESaIS1_EE14_M_insert_rvalEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EEOS1_@Qt_5 5.9.1 (optional=templinst|arch=armhf mipsel)_ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJRjS5_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.1 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorISt4pairIjjESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 @@ -1272,10 +1258,8 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIjyESaIS1_EE17_M_realloc_insertIJRKjyEEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.14.2 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorISt4pairIjyESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.12.2 (optional=templinst|arch=mips64el)_ZNSt6vectorISt4pairIlN7content13LevelDBScopes18StartupCleanupTypeEESaIS4_EE17_M_realloc_insertIJRlS3_EEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_@Qt_5 5.15.6 - (optional=templinst|arch=!i386)_ZNSt6vectorISt4pairIlS_INSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS1_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISD_EEESaISG_EE12emplace_backIJRlRKSF_EEEvDpOT_@Qt_5 5.14.2 (optional=templinst)_ZNSt6vectorISt4pairIlS_INSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS1_12basic_stringIcSt11char_traitsIcESaIcEEEEEEESaISD_EEESaISG_EE17_M_realloc_insertIJRlRKSF_EEEvNS4_IPSG_SI_EEDpOT_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorISt4pairIlS_IhSaIhEEESaIS3_EE17_M_realloc_insertIJRlS2_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.15.3 - (optional=templinst|arch=amd64 arm64)_ZNSt6vectorISt4pairIllESaIS1_EE12emplace_backIJS1_EEEvDpOT_@Qt_5 5.15.6 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorISt4pairIllESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorISt4pairIllESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorISt4pairImN3gfx13BaselineStyleEESaIS3_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS3_S5_EES9_@Qt_5 5.7.1 @@ -1299,7 +1283,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorISt4pairIttESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIxN7content13LevelDBScopes18StartupCleanupTypeEESaIS4_EE17_M_realloc_insertIJRxS3_EEEvN9__gnu_cxx17__normal_iteratorIPS4_S6_EEDpOT_@Qt_5 5.15.1 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorISt4pairIxS_IhSaIhEEESaIS3_EE17_M_realloc_insertIJRxS2_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.15.3 - (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorISt4pairIxxESaIS1_EE12emplace_backIJS1_EEEvDpOT_@Qt_5 5.14.2 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorISt4pairIxxESaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorISt4pairIxxESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.9.1 (optional=templinst|arch=!amd64 !arm64 !i386 !mips64el)_ZNSt6vectorISt4pairIxxESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_@Qt_5 5.14.2 @@ -1324,16 +1307,14 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|subst)_ZNSt6vectorISt5arrayIhL{size_t}16EESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_@Qt_5 5.15.1 (optional=templinst|subst)_ZNSt6vectorISt5arrayIsL{size_t}160EESaIS1_EE17_M_default_appendE{size_t}@Qt_5 5.15.1 (optional=templinst)_ZNSt6vectorISt5tupleIJttN6device10XInputTypeEEESaIS3_EE17_M_realloc_insertIJS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_@Qt_5 5.14.1 - (optional=templinst|arch=amd64 arm64 i386)_ZNSt6vectorISt8functionIFvN2v88internal4wasm16CompilationEventEEESaIS6_EE12emplace_backIJS6_EEEvDpOT_@Qt_5 5.15.6 (optional=templinst|arch=!amd64 !arm64 !i386)_ZNSt6vectorISt8functionIFvN2v88internal4wasm16CompilationEventEEESaIS6_EE17_M_realloc_insertIJS6_EEEvN9__gnu_cxx17__normal_iteratorIPS6_S8_EEDpOT_@Qt_5 5.15.8 (optional=templinst)_ZNSt6vectorISt8functionIFvvEESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_@Qt_5 5.15.2 (optional=templinst)_ZNSt6vectorISt8functionIFvvEESaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_@Qt_5 5.15.3 (optional=templinst|subst)_ZNSt6vectorIaSaIaEE17_M_default_appendE{size_t}@Qt_5 5.14.1 - (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorIbSaIbEE13_M_insert_auxESt13_Bit_iteratorb@Qt_5 5.14.2 + (optional=templinst)_ZNSt6vectorIbSaIbEE13_M_insert_auxESt13_Bit_iteratorb@Qt_5 5.14.2 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt6vectorIbSaIbEE13_M_reallocateEj@Qt_5 5.11.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorIbSaIbEE13_M_reallocateEm@Qt_5 5.14.2 + (optional=templinst|arch=amd64 arm64)_ZNSt6vectorIbSaIbEE13_M_reallocateEm@Qt_5 5.14.2 (optional=templinst|subst)_ZNSt6vectorIbSaIbEE14_M_fill_insertESt13_Bit_iterator{size_t}b@Qt_5 5.14.1 - (optional=templinst)_ZNSt6vectorIcSaIcEE12emplace_backIJcEEEvDpOT_@Qt_5 5.7.1 (optional=templinst|subst)_ZNSt6vectorIcSaIcEE17_M_default_appendE{size_t}@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorIcSaIcEE17_M_realloc_insertIJRKcEEEvN9__gnu_cxx17__normal_iteratorIPcS1_EEDpOT_@Qt_5 5.14.2 (optional=templinst)_ZNSt6vectorIcSaIcEE17_M_realloc_insertIJcEEEvN9__gnu_cxx17__normal_iteratorIPcS1_EEDpOT_@Qt_5 5.12.5 @@ -1351,7 +1332,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorIfSaIfEE17_M_default_appendEm@Qt_5 5.7.1 (optional=templinst)_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJRKfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_@Qt_5 5.9.1 (optional=templinst)_ZNSt6vectorIfSaIfEE17_M_realloc_insertIJfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_@Qt_5 5.9.1 - (optional=templinst)_ZNSt6vectorIhSaIhEE12emplace_backIJhEEEvDpOT_@Qt_5 5.7.1 (optional=templinst|subst)_ZNSt6vectorIhSaIhEE14_M_fill_assignE{size_t}RKh@Qt_5 5.14.2 (optional=templinst|subst)_ZNSt6vectorIhSaIhEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPhS1_EE{size_t}RKh@Qt_5 5.14.1 (optional=templinst|arch=!i386 !mipsel)_ZNSt6vectorIhSaIhEE14_M_insert_rvalEN9__gnu_cxx17__normal_iteratorIPKhS1_EEOh@Qt_5 5.15.1 @@ -1359,9 +1339,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt6vectorIhSaIhEE17_M_realloc_insertIJRKhEEEvN9__gnu_cxx17__normal_iteratorIPhS1_EEDpOT_@Qt_5 5.9.1 (optional=templinst)_ZNSt6vectorIhSaIhEE17_M_realloc_insertIJhEEEvN9__gnu_cxx17__normal_iteratorIPhS1_EEDpOT_@Qt_5 5.9.1 (optional=templinst|subst)_ZNSt6vectorIhSaIhEE7reserveE{size_t}@Qt_5 5.14.1 - (optional=templinst)_ZNSt6vectorIiSaIiEE12emplace_backIJRKjEEEvDpOT_@Qt_5 5.14.1 - (optional=templinst)_ZNSt6vectorIiSaIiEE12emplace_backIJRiEEEvDpOT_@Qt_5 5.11.1 - (optional=templinst)_ZNSt6vectorIiSaIiEE12emplace_backIJiEEEvDpOT_@Qt_5 5.7.1 (optional=templinst)_ZNSt6vectorIiSaIiEE14_M_emplace_auxIJRKiEEEN9__gnu_cxx17__normal_iteratorIPiS1_EENS6_IPS3_S1_EEDpOT_@Qt_5 5.11.1 (optional=templinst|subst)_ZNSt6vectorIiSaIiEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPiS1_EE{size_t}RKi@Qt_5 5.14.1 (optional=templinst)_ZNSt6vectorIiSaIiEE14_M_insert_rvalEN9__gnu_cxx17__normal_iteratorIPKiS1_EEOi@Qt_5 5.14.2 @@ -1369,6 +1346,7 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorIiSaIiEE17_M_default_appendEm@Qt_5 5.11.1 (optional=templinst)_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_@Qt_5 5.15.3 (optional=templinst)_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_@Qt_5 5.9.1 + (optional=templinst)_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKjEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_@Qt_5 5.11.1 (optional=templinst)_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRjEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_@Qt_5 5.15.3 (optional=templinst)_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_@Qt_5 5.9.1 @@ -1376,8 +1354,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=!i386 !mipsel)_ZNSt6vectorIiSaIiEE6insertEN9__gnu_cxx17__normal_iteratorIPKiS1_EERS4_@Qt_5 5.15.2 (optional=templinst|arch=armhf i386 mipsel)_ZNSt6vectorIiSaIiEE7reserveEj@Qt_5 5.7.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorIiSaIiEE7reserveEm@Qt_5 5.7.1 - (optional=templinst)_ZNSt6vectorIjSaIjEE12emplace_backIJRjEEEvDpOT_@Qt_5 5.15.2 - (optional=templinst)_ZNSt6vectorIjSaIjEE12emplace_backIJjEEEvDpOT_@Qt_5 5.7.1 (optional=templinst|subst)_ZNSt6vectorIjSaIjEE14_M_fill_assignE{size_t}RKj@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt6vectorIjSaIjEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPjS1_EE{size_t}RKj@Qt_5 5.14.1 (optional=templinst|arch=armhf i386 mipsel)_ZNSt6vectorIjSaIjEE17_M_default_appendEj@Qt_5 5.7.1 @@ -1392,7 +1368,6 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorIlSaIlEE17_M_default_appendEm@Qt_5 5.11.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorIlSaIlEE17_M_realloc_insertIJRKlEEEvN9__gnu_cxx17__normal_iteratorIPlS1_EEDpOT_@Qt_5 5.9.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorIlSaIlEE17_M_realloc_insertIJlEEEvN9__gnu_cxx17__normal_iteratorIPlS1_EEDpOT_@Qt_5 5.9.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorImSaImEE12emplace_backIJmEEEvDpOT_@Qt_5 5.7.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorImSaImEE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPmS1_EEmRKm@Qt_5 5.9.0 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorImSaImEE17_M_default_appendEm@Qt_5 5.11.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt6vectorImSaImEE17_M_realloc_insertIJRKmEEEvN9__gnu_cxx17__normal_iteratorIPmS1_EEDpOT_@Qt_5 5.9.1 @@ -1422,12 +1397,16 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|subst)_ZNSt7__cxx1112basic_stringItSt11char_traitsItESaItEE9_M_mutateE{size_t}{size_t}PKt{size_t}@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIS6_S5_ESt10_Select1stIS8_ESt4lessIS6_ESaIS8_EE24_M_get_insert_unique_posERS6_@Qt_5 5.9.0 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIS6_S5_ESt10_Select1stIS8_ESt4lessIS6_ESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS6_@Qt_5 5.9.0 + (optional=templinst)_ZNSt8_Rb_treeIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIS6_S6_ESt10_Select1stIS8_ESt4lessIS6_ESaIS8_EE22_M_emplace_hint_uniqueIJS7_IS5_S5_EEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIS6_S6_ESt10_Select1stIS8_ESt4lessIS6_ESaIS8_EE24_M_get_insert_unique_posERS6_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIS6_S6_ESt10_Select1stIS8_ESt4lessIS6_ESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS6_@Qt_5 5.15.16 (optional=templinst|arch=!armhf !i386 !mipsel)_ZNSt8_Rb_treeIN10extensions12PreloadCheck5ErrorES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE16_M_insert_uniqueIS2_EESt4pairISt17_Rb_tree_iteratorIS2_EbEOT_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIN10extensions3api10automation9EventTypeES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EE16_M_insert_uniqueIRKS3_EESt4pairISt17_Rb_tree_iteratorIS3_EbEOT_@Qt_5 5.15.3 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIN16device_event_log7LogTypeES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE16_M_insert_uniqueIRKS1_EESt4pairISt17_Rb_tree_iteratorIS1_EbEOT_@Qt_5 5.10.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIN2ui12KeyboardCodeES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE16_M_insert_uniqueIRKS1_EESt4pairISt17_Rb_tree_iteratorIS1_EbEOT_@Qt_5 5.7.1 + (optional=templinst)_ZNSt8_Rb_treeIN3net23EffectiveConnectionTypeESt4pairIKS1_iESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJS2_IS1_iEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=!armhf !i386 !mips64el !mipsel)_ZNSt8_Rb_treeIN3net8HttpAuth6SchemeES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE16_M_insert_uniqueIRKS2_EESt4pairISt17_Rb_tree_iteratorIS2_EbEOT_@Qt_5 5.14.2 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIN3rtc6Socket6OptionESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE17_M_emplace_uniqueIJS3_IS2_iEEEES3_ISt17_Rb_tree_iteratorIS5_EbEDpOT_@Qt_5 5.11.2 + (optional=templinst)_ZNSt8_Rb_treeIN3rtc6Socket6OptionESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE22_M_emplace_hint_uniqueIJS3_IS2_iEEEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIN4base11UkmSourceId4TypeESt4pairIKS2_iESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE24_M_get_insert_unique_posERS4_@Qt_5 5.15.15 (optional=templinst|arch=amd64 arm64)_ZNSt8_Rb_treeIN4base11trace_event23MemoryDumpLevelOfDetailES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE16_M_insert_uniqueIS2_EESt4pairISt17_Rb_tree_iteratorIS2_EbEOT_@Qt_5 5.9.0 (optional=templinst)_ZNSt8_Rb_treeIN5blink5mojom10WebFeatureES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE16_M_insert_uniqueIRKS2_EESt4pairISt17_Rb_tree_iteratorIS2_EbEOT_@Qt_5 5.11.1 @@ -1443,9 +1422,9 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE4findERKS5_@Qt_5 5.7.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE4swapERSB_@Qt_5 5.9.0 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE5eraseERKS5_@Qt_5 5.7.1 - (optional=templinst|arch=amd64 arm64 armhf i386 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N10extensions13RulesRegistry24ProcessChangedRulesStateEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE17_M_emplace_uniqueIJS6_IS5_SA_EEEES6_ISt17_Rb_tree_iteratorISB_EbEDpOT_@Qt_5 5.14.1 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N10extensions13RulesRegistry24ProcessChangedRulesStateEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE22_M_emplace_hint_uniqueIJS6_IS5_SA_EEEESt17_Rb_tree_iteratorISB_ESt23_Rb_tree_const_iteratorISB_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N10extensions13RulesRegistry24ProcessChangedRulesStateEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE24_M_get_insert_unique_posERS7_@Qt_5 5.14.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N10extensions13RulesRegistry24ProcessChangedRulesStateEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISB_ERS7_@Qt_5 5.14.1 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N10extensions13RulesRegistry24ProcessChangedRulesStateEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISB_ERS7_@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N10extensions3api5power5LevelEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE11equal_rangeERS7_@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N10extensions3api5power5LevelEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE24_M_get_insert_unique_posERS7_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N10extensions3api5power5LevelEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISC_ERS7_@Qt_5 5.14.1 @@ -1472,17 +1451,21 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3gpu11DomainGuiltEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE11equal_rangeERS7_@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3gpu11DomainGuiltEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE24_M_get_insert_unique_posERS7_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3gpu11DomainGuiltEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISA_ERS7_@Qt_5 5.14.1 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3x114AtomEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE22_M_emplace_hint_uniqueIJRS7_RS9_EEESt17_Rb_tree_iteratorISA_ESt23_Rb_tree_const_iteratorISA_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3x114AtomEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE24_M_get_insert_unique_posERS7_@Qt_5 5.15.3 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3x114AtomEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISA_ERS7_@Qt_5 5.15.3 - (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N5media14CdmSessionTypeEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE17_M_emplace_uniqueIJRS7_RS9_EEES6_ISt17_Rb_tree_iteratorISA_EbEDpOT_@Qt_5 5.10.1 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N3x114AtomEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISA_ERS7_@Qt_5 5.15.3 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N5media14CdmSessionTypeEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE22_M_emplace_hint_uniqueIJRS7_RS9_EEESt17_Rb_tree_iteratorISA_ESt23_Rb_tree_const_iteratorISA_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N5media14CdmSessionTypeEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE24_M_get_insert_unique_posERS7_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N5media14CdmSessionTypeEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISA_ERS7_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N5media14CdmSessionTypeEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE4findERS7_@Qt_5 5.10.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N6webrtc18InterLayerPredModeEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE24_M_get_insert_unique_posERS7_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N6webrtc18InterLayerPredModeEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISA_ERS7_@Qt_5 5.14.1 (optional=templinst|arch=!mipsel)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7content23BackForwardCacheMetrics17NotRestoredReasonEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE11equal_rangeERS7_@Qt_5 5.15.2 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7content23BackForwardCacheMetrics17NotRestoredReasonEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE24_M_get_insert_unique_posERS7_@Qt_5 5.15.2 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7content23BackForwardCacheMetrics17NotRestoredReasonEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISB_ERS7_@Qt_5 5.15.2 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7content30ChildProcessSecurityPolicyImpl13SecurityState19CommitRequestPolicyEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE22_M_emplace_hint_uniqueIJRS7_SB_EEESt17_Rb_tree_iteratorISC_ESt23_Rb_tree_const_iteratorISC_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7content30ChildProcessSecurityPolicyImpl13SecurityState19CommitRequestPolicyEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE24_M_get_insert_unique_posERS7_@Qt_5 5.12.2 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7content30ChildProcessSecurityPolicyImpl13SecurityState19CommitRequestPolicyEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISC_ERS7_@Qt_5 5.12.2 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7content30ChildProcessSecurityPolicyImpl13SecurityState19CommitRequestPolicyEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISC_ERS7_@Qt_5 5.12.2 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7content30ChildProcessSecurityPolicyImpl13SecurityState19CommitRequestPolicyEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE4findERS7_@Qt_5 5.12.2 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8download15DownloadContentEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE24_M_get_insert_unique_posERS7_@Qt_5 5.12.2 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8download15DownloadContentEESt10_Select1stISA_ESt4lessIS5_ESaISA_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISA_ERS7_@Qt_5 5.12.2 @@ -1498,8 +1481,8 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE16_M_assign_uniqueIPKS8_EEvT_SI_@Qt_5 5.14.1 (optional=templinst|arch=!i386 !mipsel)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE16_M_emplace_equalIJS6_IS5_S5_EEEESt17_Rb_tree_iteratorIS8_EDpOT_@Qt_5 5.11.2 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE17_M_emplace_uniqueIJRS7_SG_EEES6_ISt17_Rb_tree_iteratorIS8_EbEDpOT_@Qt_5 5.15.10 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE17_M_emplace_uniqueIJS5_S5_EEES6_ISt17_Rb_tree_iteratorIS8_EbEDpOT_@Qt_5 5.12.2 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE17_M_emplace_uniqueIJS6_IS5_S5_EEEES6_ISt17_Rb_tree_iteratorIS8_EbEDpOT_@Qt_5 5.11.2 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE22_M_emplace_hint_uniqueIJS5_S5_EEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE22_M_emplace_hint_uniqueIJS6_IS5_S5_EEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE24_M_get_insert_unique_posERS7_@Qt_5 5.7.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_@Qt_5 5.7.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_@Qt_5 5.7.1 @@ -1512,13 +1495,14 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_IiiEESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE4findERS7_@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_IjjEESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE24_M_get_insert_unique_posERS7_@Qt_5 5.7.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_IjjEESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS9_ERS7_@Qt_5 5.7.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_ImmEESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE17_M_emplace_uniqueIJS6_IS5_S8_EEEES6_ISt17_Rb_tree_iteratorIS9_EbEDpOT_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_ImmEESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS9_ERS7_@Qt_5 5.15.3 - (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_IyyEESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE17_M_emplace_uniqueIJS6_IS5_S8_EEEES6_ISt17_Rb_tree_iteratorIS9_EbEDpOT_@Qt_5 5.14.2 + (optional=templinst|subst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_I{uint64_t}{uint64_t}EESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE22_M_emplace_hint_uniqueIJS6_IS5_S8_EEEESt17_Rb_tree_iteratorIS9_ESt23_Rb_tree_const_iteratorIS9_EDpOT_@Qt_5 5.15.16 (optional=templinst|subst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_I{uint64_t}{uint64_t}EESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EE24_M_get_insert_unique_posERS7_@Qt_5 5.15.3 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEESt10_Select1stISF_ESt4lessIS5_ESaISF_EE11equal_rangeERS7_@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEESt10_Select1stISF_ESt4lessIS5_ESaISF_EE12_M_erase_auxESt23_Rb_tree_const_iteratorISF_ESN_@Qt_5 5.14.2 - (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEESt10_Select1stISF_ESt4lessIS5_ESaISF_EE17_M_emplace_uniqueIJS6_IS5_SE_EEEES6_ISt17_Rb_tree_iteratorISF_EbEDpOT_@Qt_5 5.14.1 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEESt10_Select1stISF_ESt4lessIS5_ESaISF_EE22_M_emplace_hint_uniqueIJS6_IS5_SE_EEEESt17_Rb_tree_iteratorISF_ESt23_Rb_tree_const_iteratorISF_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEESt10_Select1stISF_ESt4lessIS5_ESaISF_EE24_M_get_insert_unique_posERS7_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEESt10_Select1stISF_ESt4lessIS5_ESaISF_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISF_ERS7_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEESt10_Select1stISF_ESt4lessIS5_ESaISF_EE4findERS7_@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEESt10_Select1stISF_ESt4lessIS5_ESaISF_EE4swapERSL_@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St3mapIS5_S5_St4lessIS5_ESaIS6_IS7_S5_EEEESt10_Select1stISE_ESA_SaISE_EE11equal_rangeERS7_@Qt_5 5.14.1 @@ -1541,9 +1525,11 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIS6_IS5_S5_ESaIS9_EEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISC_ERS7_@Qt_5 5.14.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIhSaIhEEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE24_M_get_insert_unique_posERS7_@Qt_5 5.9.0 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St6vectorIhSaIhEEESt10_Select1stISB_ESt4lessIS5_ESaISB_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorISB_ERS7_@Qt_5 5.9.0 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_bESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE17_M_emplace_uniqueIJRS7_bEEES6_ISt17_Rb_tree_iteratorIS8_EbEDpOT_@Qt_5 5.14.1 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_bESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE22_M_emplace_hint_uniqueIJRS7_bEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_bESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE24_M_get_insert_unique_posERS7_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_bESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE11equal_rangeERS7_@Qt_5 5.7.1 - (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE17_M_emplace_uniqueIJS6_IS5_iEEEES6_ISt17_Rb_tree_iteratorIS8_EbEDpOT_@Qt_5 5.14.1 + (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE22_M_emplace_hint_uniqueIJS6_IS5_iEEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE24_M_get_insert_unique_posERS7_@Qt_5 5.7.1 (optional=templinst|arch=amd64 arm64 i386 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_@Qt_5 5.7.1 (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_@Qt_5 5.7.1 @@ -1557,16 +1543,23 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_tESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE24_M_get_insert_unique_posERS7_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_tESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS7_@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_{int64_t}ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE24_M_get_insert_unique_posERS7_@Qt_5 5.14.1 - (optional=templinst|subst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_{size_t}ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE17_M_emplace_uniqueIJS6_IS5_{size_t}EEEES6_ISt17_Rb_tree_iteratorIS8_EbEDpOT_@Qt_5 5.14.1 + (optional=templinst|subst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_{size_t}ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE22_M_emplace_hint_uniqueIJS6_IS5_{size_t}EEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 (optional=templinst|subst)_ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_{size_t}ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_@Qt_5 5.14.1 - (optional=templinst|subst)_ZNSt8_Rb_treeIPKcSt4pairIKS1_{size_t}ESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_emplace_uniqueIJS2_IS1_{size_t}EEEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_@Qt_5 5.15.2 - (optional=templinst|subst)_ZNSt8_Rb_treeIPKcSt4pairIKS1_{uint64_t}ESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_emplace_uniqueIJRS1_iEEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_@Qt_5 5.15.2 + (optional=templinst|arch=armhf)_ZNSt8_Rb_treeIPKcSt4pairIKS1_yESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJRS1_iEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_@Qt_5 5.15.16 + (optional=templinst|subst)_ZNSt8_Rb_treeIPKcSt4pairIKS1_{size_t}ESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJS2_IS1_{size_t}EEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=amd64 arm64)_ZNSt8_Rb_treeIPKhS1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE16_M_insert_uniqueIRKS1_EESt4pairISt17_Rb_tree_iteratorIS1_EbEOT_@Qt_5 5.11.1 - (optional=templinst)_ZNSt8_Rb_treeIPvSt4pairIKS0_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS9_ESt4lessIS0_ESaIS9_EE17_M_emplace_uniqueIJRS0_S8_EEES1_ISt17_Rb_tree_iteratorIS9_EbEDpOT_@Qt_5 5.15.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIPvSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE17_M_emplace_uniqueIJS1_IPhiEEEES1_ISt17_Rb_tree_iteratorIS3_EbEDpOT_@Qt_5 5.11.2 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIPvSt4pairIKS0_jESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE17_M_emplace_uniqueIJS1_IS0_jEEEES1_ISt17_Rb_tree_iteratorIS3_EbEDpOT_@Qt_5 5.14.2 - (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt8_Rb_treeISt4pairIN2cc18PaintCacheDataTypeEjES0_IKS3_St14_List_iteratorIS0_IS3_jEEESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE11equal_rangeERS4_@Qt_5 5.14.2 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt4pairIN2cc18PaintCacheDataTypeEjES0_IKS3_St14_List_iteratorIS0_IS3_mEEESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE11equal_rangeERS4_@Qt_5 5.14.1 + (optional=templinst)_ZNSt8_Rb_treeIPvSt4pairIKS0_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS9_ESt4lessIS0_ESaIS9_EE22_M_emplace_hint_uniqueIJRS0_S8_EEESt17_Rb_tree_iteratorIS9_ESt23_Rb_tree_const_iteratorIS9_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=mips64el)_ZNSt8_Rb_treeIPvSt4pairIKS0_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS9_ESt4lessIS0_ESaIS9_EE24_M_get_insert_unique_posERS2_@Qt_5 5.15.16 + (optional=templinst|arch=mips64el)_ZNSt8_Rb_treeIPvSt4pairIKS0_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS9_ESt4lessIS0_ESaIS9_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS9_ERS2_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIPvSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE22_M_emplace_hint_uniqueIJS1_IPhiEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=mips64el)_ZNSt8_Rb_treeIPvSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE24_M_get_insert_unique_posERS2_@Qt_5 5.15.16 + (optional=templinst|arch=mips64el)_ZNSt8_Rb_treeIPvSt4pairIKS0_iESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS2_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIPvSt4pairIKS0_jESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE22_M_emplace_hint_uniqueIJS1_IS0_jEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=mips64el)_ZNSt8_Rb_treeIPvSt4pairIKS0_jESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE24_M_get_insert_unique_posERS2_@Qt_5 5.15.16 + (optional=templinst|arch=mips64el)_ZNSt8_Rb_treeIPvSt4pairIKS0_jESt10_Select1stIS3_ESt4lessIS0_ESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS2_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64)_ZNSt8_Rb_treeISt4pairIN2cc18PaintCacheDataTypeEjES0_IKS3_St14_List_iteratorIS0_IS3_mEEESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE11equal_rangeERS4_@Qt_5 5.14.1 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt4pairIN2cc18PaintCacheDataTypeEjES0_IKS3_St14_List_iteratorIS0_IS3_mEEESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS8_ERS4_@Qt_5 5.15.16 + (optional=templinst|subst)_ZNSt8_Rb_treeISt4pairIN2cc18PaintCacheDataTypeEjES0_IKS3_St14_List_iteratorIS0_IS3_{size_t}EEESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE22_M_emplace_hint_uniqueIJRS4_S7_EEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 (optional=templinst|subst)_ZNSt8_Rb_treeISt4pairIN2cc18PaintCacheDataTypeEjES0_IKS3_St14_List_iteratorIS0_IS3_{size_t}EEESt10_Select1stIS8_ESt4lessIS3_ESaIS8_EE4findERS4_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt4pairIN2cc22TransferCacheEntryTypeEjES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EE16_M_insert_uniqueIRKS3_EES0_ISt17_Rb_tree_iteratorIS3_EbEOT_@Qt_5 5.12.2 (optional=templinst)_ZNSt8_Rb_treeISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5blink5mojom11StorageTypeEESA_St9_IdentityISA_ESt4lessISA_ESaISA_EE11equal_rangeERKSA_@Qt_5 5.11.1 @@ -1587,12 +1580,13 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt4pairIiiES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE17_M_emplace_uniqueIJRtS9_EEES0_ISt17_Rb_tree_iteratorIS1_EbEDpOT_@Qt_5 5.15.1 (optional=templinst|subst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt4pairIi{uint64_t}ES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE16_M_insert_uniqueIS1_EES0_ISt17_Rb_tree_iteratorIS1_EbEOT_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt4pairIjjES0_IKS1_St6vectorIjSaIjEEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS6_ERS2_@Qt_5 5.14.1 - (optional=templinst)_ZNSt8_Rb_treeISt4pairIjjES0_IKS1_jESt10_Select1stIS3_ESt4lessIS1_ESaIS3_EE17_M_emplace_uniqueIJS1_RjEEES0_ISt17_Rb_tree_iteratorIS3_EbEDpOT_@Qt_5 5.15.2 + (optional=templinst)_ZNSt8_Rb_treeISt4pairIjjES0_IKS1_jESt10_Select1stIS3_ESt4lessIS1_ESaIS3_EE22_M_emplace_hint_uniqueIJS1_RjEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt4pairIjjES0_IKS1_jESt10_Select1stIS3_ESt4lessIS1_ESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS2_@Qt_5 5.9.0 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt8_Rb_treeISt4pairIjjES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE16_M_insert_uniqueIS1_EES0_ISt17_Rb_tree_iteratorIS1_EbEOT_@Qt_5 5.14.2 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt4pairIttES0_IKS1_jESt10_Select1stIS3_ESt4lessIS1_ESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS2_@Qt_5 5.14.1 - (optional=templinst|subst)_ZNSt8_Rb_treeISt5tupleIJtj{size_t}{size_t}EESt4pairIKS1_{size_t}ESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE17_M_emplace_uniqueIJS2_IS1_{size_t}EEEES2_ISt17_Rb_tree_iteratorIS4_EbEDpOT_@Qt_5 5.14.1 - (optional=templinst|subst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt5tupleIJtj{size_t}{size_t}EESt4pairIKS1_{size_t}ESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE24_M_get_insert_unique_posERS3_@Qt_5 5.14.2 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt5tupleIJtjmmEESt4pairIKS1_mESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS4_ERS3_@Qt_5 5.15.16 + (optional=templinst|subst)_ZNSt8_Rb_treeISt5tupleIJtj{size_t}{size_t}EESt4pairIKS1_{size_t}ESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE22_M_emplace_hint_uniqueIJS2_IS1_{size_t}EEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_@Qt_5 5.15.16 + (optional=templinst|subst)_ZNSt8_Rb_treeISt5tupleIJtj{size_t}{size_t}EESt4pairIKS1_{size_t}ESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE24_M_get_insert_unique_posERS3_@Qt_5 5.14.2 (optional=templinst|subst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt5tupleIJ{uint64_t}{uint64_t}jEES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE17_M_emplace_uniqueIJRK{uint64_t}SA_RKjEEESt4pairISt17_Rb_tree_iteratorIS1_EbEDpOT_@Qt_5 5.15.1 (optional=templinst)_ZNSt8_Rb_treeISt6vectorIhSaIhEES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EE24_M_get_insert_unique_posERKS2_@Qt_5 5.11.1 (optional=templinst)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stISB_ESt4lessIS2_ESaISB_EE24_M_get_insert_unique_posERS4_@Qt_5 5.15.1 @@ -1601,65 +1595,84 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_S2_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE24_M_get_insert_unique_posERS4_@Qt_5 5.9.0 (optional=templinst)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_S2_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_@Qt_5 5.9.0 (optional=templinst)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_S2_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE4findERS4_@Qt_5 5.9.0 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_mESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE17_M_emplace_uniqueIJS3_IS2_mEEEES3_ISt17_Rb_tree_iteratorIS5_EbEDpOT_@Qt_5 5.14.2 + (optional=templinst|arch=armhf i386)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_jESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_@Qt_5 5.15.16 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_mESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS4_@Qt_5 5.11.1 + (optional=templinst|subst)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_{size_t}ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE22_M_emplace_hint_uniqueIJS3_IS2_{size_t}EEEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_@Qt_5 5.15.16 (optional=templinst|subst)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_{size_t}ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE24_M_get_insert_unique_posERS4_@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt8_Rb_treeISt6vectorIhSaIhEESt4pairIKS2_{size_t}ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE4findERS4_@Qt_5 5.14.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIffSt9_IdentityIfESt4lessIfESaIfEE16_M_insert_uniqueIfEESt4pairISt17_Rb_tree_iteratorIfEbEOT_@Qt_5 5.14.1 + (optional=templinst)_ZNSt8_Rb_treeIhSt4pairIKhSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_St4lessIS8_ESaIS0_IKS8_S8_EEEESt10_Select1stISF_ES9_IhESaISF_EE22_M_emplace_hint_uniqueIJRhRKSE_EEESt17_Rb_tree_iteratorISF_ESt23_Rb_tree_const_iteratorISF_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIhhSt9_IdentityIhESt4lessIhESaIhEE16_M_insert_uniqueIhEESt4pairISt17_Rb_tree_iteratorIhEbEOT_@Qt_5 5.14.2 - (optional=templinst|arch=!armhf)_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE17_M_emplace_uniqueIJRS2_EEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.10 - (optional=templinst|arch=amd64 arm64)_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE17_M_emplace_uniqueIJS0_IiiEEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.6 + (optional=templinst)_ZNSt8_Rb_treeIiSt4pairIKiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIiESaIS8_EE22_M_emplace_hint_uniqueIJS0_IiS7_EEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIiSt4pairIKiS0_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEESt10_Select1stIS9_ESt4lessIiESaIS9_EE22_M_emplace_hint_uniqueIJS0_IiS8_EEEESt17_Rb_tree_iteratorIS9_ESt23_Rb_tree_const_iteratorIS9_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=armhf mips64el)_ZNSt8_Rb_treeIiSt4pairIKiSt6vectorIS0_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_ESaIS9_EEESt10_Select1stISC_ESt4lessIiESaISC_EE22_M_emplace_hint_uniqueIJRiRSB_EEESt17_Rb_tree_iteratorISC_ESt23_Rb_tree_const_iteratorISC_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJRS2_EEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIiSt4pairIKiiESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJS0_IiiEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeIiSt4pairIKijESt10_Select1stIS2_ESt4lessIiESaIS2_EE16_M_insert_uniqueIS2_EES0_ISt17_Rb_tree_iteratorIS2_EbEOT_@Qt_5 5.15.3 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIiSt4pairIKimESt10_Select1stIS2_ESt4lessIiESaIS2_EE16_M_insert_uniqueIS2_EES0_ISt17_Rb_tree_iteratorIS2_EbEOT_@Qt_5 5.15.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIiSt4pairIKimESt10_Select1stIS2_ESt4lessIiESaIS2_EE17_M_emplace_uniqueIJiRKmEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.3 + (optional=templinst|subst)_ZNSt8_Rb_treeIiSt4pairIKi{uint64_t}ESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJRiRK{uint64_t}EEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst|subst)_ZNSt8_Rb_treeIiSt4pairIKi{uint64_t}ESt10_Select1stIS2_ESt4lessIiESaIS2_EE22_M_emplace_hint_uniqueIJiRK{uint64_t}EEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=!i386 !mipsel)_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE15_M_insert_equalIRKiEESt17_Rb_tree_iteratorIiEOT_@Qt_5 5.7.1 (optional=templinst)_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueIRKiEESt4pairISt17_Rb_tree_iteratorIiEbEOT_@Qt_5 5.7.1 (optional=templinst)_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE16_M_insert_uniqueIiEESt4pairISt17_Rb_tree_iteratorIiEbEOT_@Qt_5 5.7.1 (optional=templinst|arch=amd64 arm64 armhf mips64el)_ZNSt8_Rb_treeIiiSt9_IdentityIiESt4lessIiESaIiEE17_M_emplace_uniqueIJRKiEEESt4pairISt17_Rb_tree_iteratorIiEbEDpOT_@Qt_5 5.14.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIjSt4pairIKjN7content22PepperVideoDecoderHost18PictureBufferStateEESt10_Select1stIS5_ESt4lessIjESaIS5_EE17_M_emplace_uniqueIJS0_IjS4_EEEES0_ISt17_Rb_tree_iteratorIS5_EbEDpOT_@Qt_5 5.11.2 + (optional=templinst)_ZNSt8_Rb_treeIjSt4pairIKjN7content22PepperVideoDecoderHost18PictureBufferStateEESt10_Select1stIS5_ESt4lessIjESaIS5_EE22_M_emplace_hint_uniqueIJS0_IjS4_EEEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeIjSt4pairIKjN7content22PepperVideoDecoderHost18PictureBufferStateEESt10_Select1stIS5_ESt4lessIjESaIS5_EE4swapERSB_@Qt_5 5.10.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIjSt4pairIKjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIjESaIS8_EE17_M_emplace_uniqueIJS0_IjS7_EEEES0_ISt17_Rb_tree_iteratorIS8_EbEDpOT_@Qt_5 5.14.1 - (optional=templinst|arch=amd64 arm64)_ZNSt8_Rb_treeIjSt4pairIKjS0_IjjEESt10_Select1stIS3_ESt4lessIjESaIS3_EE17_M_emplace_uniqueIJRjS2_EEES0_ISt17_Rb_tree_iteratorIS3_EbEDpOT_@Qt_5 5.15.10 - (optional=templinst)_ZNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE17_M_emplace_uniqueIJRjSA_EEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.2 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE17_M_emplace_uniqueIJS0_IjjEEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.11.2 - (optional=templinst)_ZNSt8_Rb_treeIjSt4pairIKjtESt10_Select1stIS2_ESt4lessIjESaIS2_EE17_M_emplace_uniqueIJS0_IjtEEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.1 - (optional=templinst|subst)_ZNSt8_Rb_treeIjSt4pairIKj{uint64_t}ESt10_Select1stIS2_ESt4lessIjESaIS2_EE17_M_emplace_uniqueIJS0_Ij{uint64_t}EEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.2 + (optional=templinst)_ZNSt8_Rb_treeIjSt4pairIKjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIjESaIS8_EE22_M_emplace_hint_uniqueIJS0_IjS7_EEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=armhf)_ZNSt8_Rb_treeIjSt4pairIKjS0_IjjEESt10_Select1stIS3_ESt4lessIjESaIS3_EE22_M_emplace_hint_uniqueIJRjS2_EEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 armhf mips64el)_ZNSt8_Rb_treeIjSt4pairIKjSt6vectorIjSaIjEEESt10_Select1stIS5_ESt4lessIjESaIS5_EE22_M_emplace_hint_uniqueIJiS4_EEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 armhf mips64el)_ZNSt8_Rb_treeIjSt4pairIKjiESt10_Select1stIS2_ESt4lessIjESaIS2_EE22_M_emplace_hint_uniqueIJS0_IjiEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE22_M_emplace_hint_uniqueIJRjSA_EEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIjSt4pairIKjjESt10_Select1stIS2_ESt4lessIjESaIS2_EE22_M_emplace_hint_uniqueIJS0_IjjEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIjSt4pairIKjmESt10_Select1stIS2_ESt4lessIjESaIS2_EE22_M_emplace_hint_uniqueIJS0_IjmEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeIjSt4pairIKjtESt10_Select1stIS2_ESt4lessIjESaIS2_EE22_M_emplace_hint_uniqueIJS0_IjtEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=armhf i386)_ZNSt8_Rb_treeIjSt4pairIKjyESt10_Select1stIS2_ESt4lessIjESaIS2_EE22_M_emplace_hint_uniqueIJS0_IjyEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE16_M_insert_uniqueIRKjEESt4pairISt17_Rb_tree_iteratorIjEbEOT_@Qt_5 5.7.1 (optional=templinst)_ZNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE16_M_insert_uniqueIjEESt4pairISt17_Rb_tree_iteratorIjEbEOT_@Qt_5 5.10.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIlSt4pairIKlSt5arrayIlLm5EEESt10_Select1stIS4_ESt4lessIlESaIS4_EE17_M_emplace_uniqueIJRlRS3_EEES0_ISt17_Rb_tree_iteratorIS4_EbEDpOT_@Qt_5 5.15.3 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIlSt4pairIKliESt10_Select1stIS2_ESt4lessIlESaIS2_EE17_M_emplace_uniqueIJRS2_EEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.10 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIlSt4pairIKllESt10_Select1stIS2_ESt4lessIlESaIS2_EE17_M_emplace_uniqueIJS0_IllEEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.10 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIlSt4pairIKlNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIlESaIS8_EE22_M_emplace_hint_uniqueIJS0_IlS7_EEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIlSt4pairIKliESt10_Select1stIS2_ESt4lessIlESaIS2_EE22_M_emplace_hint_uniqueIJRS2_EEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIlSt4pairIKliESt10_Select1stIS2_ESt4lessIlESaIS2_EE22_M_emplace_hint_uniqueIJS0_IliEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIlSt4pairIKllESt10_Select1stIS2_ESt4lessIlESaIS2_EE22_M_emplace_hint_uniqueIJS0_IllEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIllSt9_IdentityIlESt4lessIlESaIlEE16_M_insert_uniqueIlEESt4pairISt17_Rb_tree_iteratorIlEbEOT_@Qt_5 5.11.1 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeImSt4pairIKmSt6vectorIiSaIiEEESt10_Select1stIS5_ESt4lessImESaIS5_EE17_M_emplace_uniqueIJRmS4_EEES0_ISt17_Rb_tree_iteratorIS5_EbEDpOT_@Qt_5 5.15.10 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeImmSt9_IdentityImESt4lessImESaImEE16_M_insert_uniqueIRKmEESt4pairISt17_Rb_tree_iteratorImEbEOT_@Qt_5 5.7.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeImmSt9_IdentityImESt4lessImESaImEE16_M_insert_uniqueImEESt4pairISt17_Rb_tree_iteratorImEbEOT_@Qt_5 5.11.1 - (optional=templinst)_ZNSt8_Rb_treeItSt4pairIKthESt10_Select1stIS2_ESt4lessItESaIS2_EE17_M_emplace_uniqueIJS0_IthEEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.11.2 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeItSt4pairIKtjESt10_Select1stIS2_ESt4lessItESaIS2_EE17_M_emplace_uniqueIJRS2_EEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.12.2 - (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeItSt4pairIKtjESt10_Select1stIS2_ESt4lessItESaIS2_EE17_M_emplace_uniqueIJS0_ItjEEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.6 - (optional=templinst|arch=!armhf !i386 !mipsel)_ZNSt8_Rb_treeItSt4pairIKttESt10_Select1stIS2_ESt4lessItESaIS2_EE17_M_emplace_uniqueIJRS1_RtEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.1 + (optional=templinst)_ZNSt8_Rb_treeItSt4pairIKthESt10_Select1stIS2_ESt4lessItESaIS2_EE22_M_emplace_hint_uniqueIJS0_IthEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeItSt4pairIKtjESt10_Select1stIS2_ESt4lessItESaIS2_EE22_M_emplace_hint_uniqueIJRS2_EEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeItSt4pairIKtjESt10_Select1stIS2_ESt4lessItESaIS2_EE22_M_emplace_hint_uniqueIJS0_ItjEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst)_ZNSt8_Rb_treeItSt4pairIKttESt10_Select1stIS2_ESt4lessItESaIS2_EE22_M_emplace_hint_uniqueIJRS1_RtEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIttSt9_IdentityItESt4lessItESaItEE16_M_insert_uniqueIRKtEESt4pairISt17_Rb_tree_iteratorItEbEOT_@Qt_5 5.7.1 (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8_Rb_treeIttSt9_IdentityItESt4lessItESaItEE16_M_insert_uniqueItEESt4pairISt17_Rb_tree_iteratorItEbEOT_@Qt_5 5.14.1 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxN7content27IndexedDBActiveBlobRegistry9BlobStateEESt10_Select1stIS5_ESt4lessIxESaIS5_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.15 + (optional=templinst|arch=armhf i386)_ZNSt8_Rb_treeIxSt4pairIKxNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIxESaIS8_EE22_M_emplace_hint_uniqueIJS0_IxS7_EEEESt17_Rb_tree_iteratorIS8_ESt23_Rb_tree_const_iteratorIS8_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIxESaIS8_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.16 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxSt3mapIxN7content27IndexedDBActiveBlobRegistry9BlobStateESt4lessIxESaIS0_IS1_S5_EEEESt10_Select1stISB_ES7_SaISB_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.15 - (optional=templinst|arch=i386 mipsel)_ZNSt8_Rb_treeIxSt4pairIKxSt5arrayIxLj5EEESt10_Select1stIS4_ESt4lessIxESaIS4_EE17_M_emplace_uniqueIJRxRS3_EEES0_ISt17_Rb_tree_iteratorIS4_EbEDpOT_@Qt_5 5.15.10 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxSt5arrayIxLj5EEESt10_Select1stIS4_ESt4lessIxESaIS4_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.15 - (optional=templinst|arch=armhf i386)_ZNSt8_Rb_treeIxSt4pairIKxiESt10_Select1stIS2_ESt4lessIxESaIS2_EE17_M_emplace_uniqueIJRS2_EEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.15.10 + (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxSt5arrayIxLj5EEESt10_Select1stIS4_ESt4lessIxESaIS4_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS4_ERS1_@Qt_5 5.15.16 + (optional=templinst|arch=armhf i386)_ZNSt8_Rb_treeIxSt4pairIKxiESt10_Select1stIS2_ESt4lessIxESaIS2_EE22_M_emplace_hint_uniqueIJRS2_EEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst|arch=armhf i386)_ZNSt8_Rb_treeIxSt4pairIKxiESt10_Select1stIS2_ESt4lessIxESaIS2_EE22_M_emplace_hint_uniqueIJS0_IxiEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=i386 mipsel)_ZNSt8_Rb_treeIxSt4pairIKxiESt10_Select1stIS2_ESt4lessIxESaIS2_EE24_M_get_insert_unique_posERS1_@Qt_5 5.7.1 + (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxiESt10_Select1stIS2_ESt4lessIxESaIS2_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS2_ERS1_@Qt_5 5.15.16 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxjESt10_Select1stIS2_ESt4lessIxESaIS2_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.15 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxtESt10_Select1stIS2_ESt4lessIxESaIS2_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.15 + (optional=templinst|arch=armhf i386)_ZNSt8_Rb_treeIxSt4pairIKxxESt10_Select1stIS2_ESt4lessIxESaIS2_EE22_M_emplace_hint_uniqueIJS0_IxxEEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst|arch=i386 mipsel)_ZNSt8_Rb_treeIxSt4pairIKxxESt10_Select1stIS2_ESt4lessIxESaIS2_EE24_M_get_insert_unique_posERS1_@Qt_5 5.7.1 + (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxSt4pairIKxxESt10_Select1stIS2_ESt4lessIxESaIS2_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS2_ERS1_@Qt_5 5.15.16 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIxxSt9_IdentityIxESt4lessIxESaIxEE24_M_get_insert_unique_posERKx@Qt_5 5.15.15 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIySt4pairIKyNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIyESaIS8_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.15 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIySt4pairIKyPKcESt10_Select1stIS4_ESt4lessIyESaIS4_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.15 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIySt4pairIKySt6vectorIiSaIiEEESt10_Select1stIS5_ESt4lessIyESaIS5_EE24_M_get_insert_unique_posERS1_@Qt_5 5.15.15 + (optional=templinst|arch=i386)_ZNSt8_Rb_treeIySt4pairIKySt6vectorIiSaIiEEESt10_Select1stIS5_ESt4lessIyESaIS5_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS5_ERS1_@Qt_5 5.15.16 (optional=templinst|arch=i386 mipsel)_ZNSt8_Rb_treeIySt4pairIKyiESt10_Select1stIS2_ESt4lessIyESaIS2_EE24_M_get_insert_unique_posERS1_@Qt_5 5.11.1 (optional=templinst|arch=i386 mipsel)_ZNSt8_Rb_treeIySt4pairIKyyESt10_Select1stIS2_ESt4lessIyESaIS2_EE24_M_get_insert_unique_posERS1_@Qt_5 5.9.0 (optional=templinst|arch=i386)_ZNSt8_Rb_treeIyySt9_IdentityIyESt4lessIyESaIyEE24_M_get_insert_unique_posERKy@Qt_5 5.15.15 - (optional=templinst|subst)_ZNSt8_Rb_treeI{int64_t}St4pairIK{int64_t}iESt10_Select1stIS2_ESt4lessI{int64_t}ESaIS2_EE17_M_emplace_uniqueIJR{int64_t}SA_EEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.14.1 - (optional=templinst|subst)_ZNSt8_Rb_treeI{int64_t}St4pairIK{int64_t}iESt10_Select1stIS2_ESt4lessI{int64_t}ESaIS2_EE17_M_emplace_uniqueIJS0_I{int64_t}iEEEES0_ISt17_Rb_tree_iteratorIS2_EbEDpOT_@Qt_5 5.14.1 + (optional=templinst|arch=amd64 arm64 armhf mips64el|subst)_ZNSt8_Rb_treeI{int64_t}St4pairIK{int64_t}St5arrayI{int64_t}L{size_t}5EEESt10_Select1stIS4_ESt4lessI{int64_t}ESaIS4_EE22_M_emplace_hint_uniqueIJR{int64_t}RS3_EEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_@Qt_5 5.15.16 + (optional=templinst|subst)_ZNSt8_Rb_treeI{int64_t}St4pairIK{int64_t}iESt10_Select1stIS2_ESt4lessI{int64_t}ESaIS2_EE22_M_emplace_hint_uniqueIJR{int64_t}SA_EEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst|subst)_ZNSt8_Rb_treeI{int64_t}St4pairIK{int64_t}{int64_t}ESt10_Select1stIS2_ESt4lessI{int64_t}ESaIS2_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS2_ESA_@Qt_5 5.14.1 + (optional=templinst|subst)_ZNSt8_Rb_treeI{int64_t}St4pairIK{int64_t}{size_t}ESt10_Select1stIS2_ESt4lessI{int64_t}ESaIS2_EE22_M_emplace_hint_uniqueIJRS0_I{int64_t}{size_t}EEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 + (optional=templinst|subst)_ZNSt8_Rb_treeI{int64_t}St4pairIK{int64_t}{size_t}ESt10_Select1stIS2_ESt4lessI{int64_t}ESaIS2_EE22_M_emplace_hint_uniqueIJS0_I{int64_t}{size_t}EEEESt17_Rb_tree_iteratorIS2_ESt23_Rb_tree_const_iteratorIS2_EDpOT_@Qt_5 5.15.16 (optional=templinst|subst)_ZNSt8_Rb_treeI{int64_t}{int64_t}St9_IdentityI{int64_t}ESt4lessI{int64_t}ESaI{int64_t}EE12_M_erase_auxESt23_Rb_tree_const_iteratorI{int64_t}ES7_@Qt_5 5.14.1 (optional=templinst|subst)_ZNSt8_Rb_treeI{int64_t}{int64_t}St9_IdentityI{int64_t}ESt4lessI{int64_t}ESaI{int64_t}EE16_M_insert_uniqueIRK{int64_t}EESt4pairISt17_Rb_tree_iteratorI{int64_t}EbEOT_@Qt_5 5.14.1 + (optional=templinst|subst)_ZNSt8_Rb_treeI{uint64_t}St4pairIK{uint64_t}St6vectorIiSaIiEEESt10_Select1stIS5_ESt4lessI{uint64_t}ESaIS5_EE22_M_emplace_hint_uniqueIJR{uint64_t}S4_EEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_@Qt_5 5.15.16 (optional=templinst)_ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb@Qt_5 5.15.10 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt8__detail18__to_chars_10_implIjEEvPcjT_@Qt_5 5.14.2 (optional=templinst)_ZNSt8__detail8_ScannerIcE12_M_eat_classEc@Qt_5 5.14.1 @@ -1669,8 +1682,8 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt8__detail8_ScannerIcE18_M_eat_escape_ecmaEv@Qt_5 5.14.1 (optional=templinst)_ZNSt8__detail8_ScannerIcE18_M_scan_in_bracketEv@Qt_5 5.14.1 (optional=templinst)_ZNSt8__detail8_ScannerIcE19_M_eat_escape_posixEv@Qt_5 5.14.1 - (optional=templinst|arch=!arm64 !mips64el !mipsel)_ZNSt8__detail8_ScannerIcEC1EPKcS3_NSt15regex_constants18syntax_option_typeESt6locale@Qt_5 5.14.1 - (optional=templinst|arch=!arm64 !mips64el !mipsel)_ZNSt8__detail8_ScannerIcEC2EPKcS3_NSt15regex_constants18syntax_option_typeESt6locale@Qt_5 5.14.1 + (optional=templinst)_ZNSt8__detail8_ScannerIcEC1EPKcS3_NSt15regex_constants18syntax_option_typeESt6locale@Qt_5 5.14.1 + (optional=templinst)_ZNSt8__detail8_ScannerIcEC2EPKcS3_NSt15regex_constants18syntax_option_typeESt6locale@Qt_5 5.14.1 (optional=templinst)_ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEE11_M_try_charEv@Qt_5 5.14.1 (optional=templinst)_ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEE12_M_assertionEv@Qt_5 5.14.1 (optional=templinst)_ZNSt8__detail9_CompilerINSt7__cxx1112regex_traitsIcEEE13_M_quantifierEv@Qt_5 5.14.1 @@ -1709,6 +1722,7 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst)_ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N5media8EmeCodecEESaISB_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_@Qt_5 5.14.1 (optional=templinst)_ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N6device5mojom10SensorTypeEESaISC_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_@Qt_5 5.10.1 (optional=templinst)_ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_S6_ESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixEOS6_@Qt_5 5.15.3 + (optional=templinst)_ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_S6_ESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_@Qt_5 5.15.16 (optional=templinst)_ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_St6vectorIS6_SaIS6_EEESaISC_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixEOS6_@Qt_5 5.15.15 (optional=templinst)_ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_St6vectorIS6_SaIS6_EEESaISC_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_@Qt_5 5.11.1 (optional=templinst)_ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_iESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixEOS6_@Qt_5 5.10.1 @@ -1730,6 +1744,7 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=amd64 arm64 mips64el)_ZNSt8__detail9_Map_baseImSt4pairIKmiESaIS3_ENS_10_Select1stESt8equal_toImESt4hashImENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixEOm@Qt_5 5.15.2 (optional=templinst|arch=!amd64 !arm64 !mips64el)_ZNSt8__detail9_Map_baseIxSt4pairIKxjESaIS3_ENS_10_Select1stESt8equal_toIxESt4hashIxENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_@Qt_5 5.11.1 (subst)_ZNSt8__detail9_Map_baseI{size_t}St4pairIK{size_t}St10unique_ptrIA_cSt14default_deleteIS4_EEESaIS8_ENS_10_Select1stESt8equal_toI{size_t}ESt4hashI{size_t}ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_@Qt_5 5.14.1 + (optional=templinst|subst)_ZNSt8__detail9_Map_baseI{uint64_t}St4pairIK{uint64_t}iESaIS3_ENS_10_Select1stESt8equal_toI{uint64_t}ESt4hashI{uint64_t}ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_@Qt_5 5.15.16 (optional=templinst|subst|arch=amd64 arm64 mips64el)_ZNSt8__detail9_Map_baseI{uint64_t}St4pairIK{uint64_t}{uint64_t}ESaIS3_ENS_10_Select1stESt8equal_toI{uint64_t}ESt4hashI{uint64_t}ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_@Qt_5 5.15.1 (optional=templinst)_ZNSt8__detail9_StateSeqINSt7__cxx1112regex_traitsIcEEE8_M_cloneEv@Qt_5 5.14.1 (optional=templinst)_ZSt13binary_searchIN9__gnu_cxx17__normal_iteratorIPKcSt6vectorIcSaIcEEEEcEbT_S8_RKT0_@Qt_5 5.14.1 @@ -1757,6 +1772,7 @@ libQt5WebEngineCore.so.5 libqt5webenginecore5 #MINVER# (optional=templinst|arch=i386)_ZSt17__rotate_adaptiveIN9__gnu_cxx17__normal_iteratorIPSt4pairIyxESt6vectorIS3_SaIS3_EEEES4_iET_S9_S9_S9_T1_SA_T0_SA_@Qt_5 5.15.10 (optional=templinst|arch=armhf i386 mipsel)_ZSt17__rotate_adaptiveIN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEES2_iET_S7_S7_S7_T1_S8_T0_S8_@Qt_5 5.14.2 (optional=templinst|arch=amd64 arm64 mips64el)_ZSt17__rotate_adaptiveIN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEES2_lET_S7_S7_S7_T1_S8_T0_S8_@Qt_5 5.14.2 + _ZSt19piecewise_construct@Qt_5 5.15.16 (optional=templinst)_ZSt23__copy_move_backward_a1ILb1EPN3net19HostResolverManager8TaskTypeES2_EN9__gnu_cxx11__enable_ifIXsrSt23__is_random_access_iterIT0_NSt15iterator_traitsIS7_E17iterator_categoryEE7__valueESt15_Deque_iteratorIT1_RSD_PSD_EE6__typeES7_S7_SG_@Qt_5 5.14.2 (optional=templinst|subst)_ZSt23__copy_move_backward_a1ILb1EPSt4pairI{int64_t}iES1_EN9__gnu_cxx11__enable_ifIXsrSt23__is_random_access_iterIT0_NSt15iterator_traitsIS6_E17iterator_categoryEE7__valueESt15_Deque_iteratorIT1_RSC_PSC_EE6__typeES6_S6_SF_@Qt_5 5.14.2 (optional=templinst)_ZSt23__copy_move_backward_a1ILb1EPddEN9__gnu_cxx11__enable_ifIXsrSt23__is_random_access_iterIT0_NSt15iterator_traitsIS4_E17iterator_categoryEE7__valueESt15_Deque_iteratorIT1_RSA_PSA_EE6__typeES4_S4_SD_@Qt_5 5.15.2 diff --git a/debian/libqt5webenginewidgets5.symbols b/debian/libqt5webenginewidgets5.symbols index 7e80fbd6c4..7f6e010284 100644 --- a/debian/libqt5webenginewidgets5.symbols +++ b/debian/libqt5webenginewidgets5.symbols @@ -1,6 +1,6 @@ # SymbolsHelper-Confirmed: 5.15.3 amd64 mips64el libQt5WebEngineWidgets.so.5 libqt5webenginewidgets5 #MINVER# -| libqt5webenginewidgets5 #MINVER#, qtwebengine-abi-5-15-15 +| libqt5webenginewidgets5 #MINVER#, qtwebengine-abi-5-15-17 * Build-Depends-Package: qtwebengine5-dev Qt_5.0@Qt_5.0 5.7.1 Qt_5.10@Qt_5.10 5.10.1 diff --git a/debian/patches/Port-for-loongarch64.patch b/debian/patches/Port-for-loongarch64.patch index 2f3215abc8..31b5efa2f3 100644 --- a/debian/patches/Port-for-loongarch64.patch +++ b/debian/patches/Port-for-loongarch64.patch @@ -1,220 +1,15 @@ From da5633efd7cc01759b9d77efb6c12100dbf12944 Mon Sep 17 00:00:00 2001 From: Mu Tao -Date: Wed, 26 Jun 2024 14:17:54 +0800 +From: lichenggang +Date: Mon, 28 Aug 2024 08:44:28 +0800 Subject: [PATCH] Port for loongarch64 -01. port qt building procedure -02. port gn -03. port 'chromium/build' -04. port 'chromium/base' -05. port 'chromium/v8' -06. port 'chromium/third_party/webrtc' -07. port 'chromium/third_party/swiftshader' -08. port 'chromium/third_party/dav1d' -09. port 'chromium/third_party/ffmpeg' -10. port 'chromium/third_party/abseil-cpp' -11. port 'chromium/third_party/angle' -12. port 'chromium/third_party/blink' -13. port 'chromium/third_party/boringssl' -14. port 'chromium/sandbox' -15. port 'chromium/skia' -16. port 'chromium/third_party/lss' -17. port 'chromium/third_party/breakpad' -18. port 'chromium/third_party/crashpad' -19. port 'chromium/third_party/pdfium' ---- - configure.pri | 1 + - mkspecs/features/functions.prf | 1 + - .../page_allocator_constants.h | 2 +- - .../partition_alloc_constants.h | 2 +- - .../partition_allocator/yield_processor.h | 2 + - .../chromium/base/process/launch_posix.cc | 2 +- - .../double-conversion/utils.h | 3 +- - src/3rdparty/chromium/build/build_config.h | 12 +- - .../chromium/build/toolchain/linux/BUILD.gn | 24 + - src/3rdparty/chromium/sandbox/features.gni | 3 +- - .../linux/bpf_dsl/linux_syscall_ranges.h | 7 + - .../sandbox/linux/bpf_dsl/seccomp_macros.h | 46 + - .../seccomp-bpf-helpers/baseline_policy.cc | 8 +- - .../seccomp-bpf-helpers/sigsys_handlers.cc | 2 + - .../syscall_parameters_restrictions.cc | 3 +- - .../linux/seccomp-bpf-helpers/syscall_sets.cc | 66 +- - .../linux/seccomp-bpf-helpers/syscall_sets.h | 11 +- - .../sandbox/linux/seccomp-bpf/syscall.cc | 33 +- - .../sandbox/linux/services/credentials.cc | 2 +- - .../linux/services/syscall_wrappers.cc | 67 +- - .../linux/syscall_broker/broker_process.cc | 18 +- - .../linux/system_headers/linux_seccomp.h | 8 + - .../linux/system_headers/linux_signal.h | 11 +- - .../sandbox/linux/system_headers/linux_stat.h | 65 + - .../linux/system_headers/linux_syscalls.h | 4 + - .../loongarch64_linux_syscalls.h | 851 +++ - .../linux/bpf_cros_amd_gpu_policy_linux.cc | 2 +- - .../policy/linux/bpf_gpu_policy_linux.cc | 2 +- - src/3rdparty/chromium/skia/BUILD.gn | 2 + - .../absl/debugging/internal/examine_stack.cc | 2 + - .../chromium/third_party/angle/gni/angle.gni | 2 +- - .../blink/renderer/platform/heap/asm/BUILD.gn | 2 + - .../heap/asm/SaveRegisters_loongarch64.S | 41 + - .../boringssl/src/include/openssl/base.h | 3 + - .../dump_writer_common/raw_context_cpu.h | 2 + - .../linux/dump_writer_common/thread_info.cc | 10 + - .../linux/dump_writer_common/thread_info.h | 11 + - .../client/linux/handler/exception_handler.cc | 11 +- - .../client/linux/handler/exception_handler.h | 2 +- - .../microdump_writer/microdump_writer.cc | 8 +- - .../minidump_writer/linux_core_dumper.cc | 14 +- - .../linux/minidump_writer/linux_dumper.h | 1 + - .../minidump_writer/linux_ptrace_dumper.cc | 21 + - .../linux/minidump_writer/minidump_writer.cc | 68 +- - .../linux/minidump_writer/minidump_writer.h | 2 +- - .../src/common/linux/memory_mapped_file.cc | 1 + - .../common/minidump_cpu_loong64.h | 60 + - .../google_breakpad/common/minidump_format.h | 2 + - .../crashpad/crashpad/util/linux/ptracer.cc | 41 + - .../crashpad/util/linux/thread_info.h | 24 +- - .../chromium/third_party/dav1d/BUILD.gn | 8 +- - .../config/linux-noasm/loongarch64/config.h | 38 + - .../config/Chrome/linux/loongarch64/config.h | 2626 ++++++++ - .../linux/loongarch64/libavcodec/bsf_list.c | 3 + - .../linux/loongarch64/libavcodec/codec_list.c | 20 + - .../loongarch64/libavcodec/parser_list.c | 11 + - .../loongarch64/libavformat/demuxer_list.c | 9 + - .../loongarch64/libavformat/muxer_list.c | 2 + - .../loongarch64/libavformat/protocol_list.c | 2 + - .../linux/loongarch64/libavutil/avconfig.h | 6 + - .../linux/loongarch64/libavutil/ffversion.h | 5 + - .../ffmpeg/chromium/scripts/build_ffmpeg.py | 26 +- - .../ffmpeg/chromium/scripts/copy_config.sh | 2 +- - .../ffmpeg/chromium/scripts/generate_gn.py | 2 +- - .../chromium/third_party/ffmpeg/configure | 17 +- - .../third_party/lss/linux_syscall_support.h | 332 +- - .../page_allocator_constants.h | 2 +- - .../partition_alloc_constants.h | 2 +- - .../third_party/llvm-10.0/BUILD.gn | 2 + - .../modules/desktop_capture/differ_block.cc | 3 +- - .../third_party/webrtc/rtc_base/system/arch.h | 4 + - src/3rdparty/chromium/v8/BUILD.gn | 44 + - .../chromium/v8/gni/snapshot_toolchain.gni | 3 +- - .../chromium/v8/src/base/build_config.h | 19 +- - .../v8/src/base/platform/platform-posix.cc | 8 + - .../chromium/v8/src/builtins/builtins.cc | 2 +- - .../loongarch64/builtins-loongarch64.cc | 3549 +++++++++++ - .../chromium/v8/src/codegen/assembler-arch.h | 2 + - .../chromium/v8/src/codegen/assembler-inl.h | 2 + - .../chromium/v8/src/codegen/assembler.h | 3 +- - .../chromium/v8/src/codegen/constants-arch.h | 2 + - .../chromium/v8/src/codegen/cpu-features.h | 3 + - .../v8/src/codegen/external-reference.cc | 2 + - .../v8/src/codegen/interface-descriptors.cc | 6 +- - .../loongarch64/assembler-loongarch64-inl.h | 267 + - .../loongarch64/assembler-loongarch64.cc | 2689 ++++++++ - .../loongarch64/assembler-loongarch64.h | 1138 ++++ - .../loongarch64/constants-loongarch64.cc | 100 + - .../loongarch64/constants-loongarch64.h | 1340 ++++ - .../codegen/loongarch64/cpu-loongarch64.cc | 38 + - .../interface-descriptors-loongarch64.cc | 357 ++ - .../macro-assembler-loongarch64.cc | 4021 ++++++++++++ - .../loongarch64/macro-assembler-loongarch64.h | 1110 ++++ - .../loongarch64/register-loongarch64.h | 330 + - .../chromium/v8/src/codegen/macro-assembler.h | 3 + - .../chromium/v8/src/codegen/register-arch.h | 2 + - .../v8/src/codegen/register-configuration.cc | 2 + - .../chromium/v8/src/codegen/reloc-info.cc | 3 +- - src/3rdparty/chromium/v8/src/common/globals.h | 3 + - .../src/compiler/backend/instruction-codes.h | 2 + - .../compiler/backend/instruction-selector.cc | 9 +- - .../loongarch64/code-generator-loongarch64.cc | 2846 +++++++++ - .../instruction-codes-loongarch64.h | 432 ++ - .../instruction-scheduler-loongarch64.cc | 1554 +++++ - .../instruction-selector-loongarch64.cc | 3170 ++++++++++ - .../chromium/v8/src/compiler/c-linkage.cc | 12 + - .../chromium/v8/src/debug/debug-evaluate.cc | 2 +- - .../debug/loongarch64/debug-loongarch64.cc | 55 + - .../loongarch64/deoptimizer-loongarch64.cc | 241 + - .../chromium/v8/src/diagnostics/gdb-jit.cc | 2 + - .../loongarch64/disasm-loongarch64.cc | 1694 +++++ - .../chromium/v8/src/diagnostics/perf-jit.h | 3 + - .../v8/src/execution/frame-constants.h | 2 + - .../frame-constants-loongarch64.cc | 32 + - .../loongarch64/frame-constants-loongarch64.h | 77 + - .../loongarch64/simulator-loongarch64.cc | 5564 +++++++++++++++++ - .../loongarch64/simulator-loongarch64.h | 646 ++ - .../v8/src/execution/simulator-base.h | 2 +- - .../chromium/v8/src/execution/simulator.h | 2 + - .../chromium/v8/src/flags/flag-definitions.h | 2 +- - .../asm/loongarch64/push_registers_asm.cc | 48 + - .../src/interpreter/interpreter-assembler.cc | 2 +- - .../chromium/v8/src/libsampler/sampler.cc | 4 + - src/3rdparty/chromium/v8/src/logging/log.cc | 2 + - .../chromium/v8/src/objects/backing-store.cc | 2 +- - src/3rdparty/chromium/v8/src/objects/code.cc | 2 +- - src/3rdparty/chromium/v8/src/objects/code.h | 2 + - .../chromium/v8/src/profiler/tick-sample.cc | 2 +- - .../regexp-macro-assembler-loongarch64.cc | 1270 ++++ - .../regexp-macro-assembler-loongarch64.h | 211 + - .../src/regexp/regexp-macro-assembler-arch.h | 2 + - .../regexp/regexp-macro-assembler-tracer.cc | 2 +- - .../v8/src/regexp/regexp-macro-assembler.h | 1 + - src/3rdparty/chromium/v8/src/regexp/regexp.cc | 3 + - .../v8/src/runtime/runtime-atomics.cc | 3 +- - .../chromium/v8/src/snapshot/deserializer.h | 1 + - .../platform-embedded-file-writer-generic.cc | 3 +- - .../wasm/baseline/liftoff-assembler-defs.h | 10 +- - .../v8/src/wasm/baseline/liftoff-assembler.h | 2 + - .../liftoff-assembler-loongarch64.h | 2080 ++++++ - .../v8/src/wasm/jump-table-assembler.cc | 31 + - .../v8/src/wasm/jump-table-assembler.h | 6 + - .../chromium/v8/src/wasm/wasm-linkage.h | 9 + - src/3rdparty/gn/tools/gn/args.cc | 3 + - src/3rdparty/gn/util/build_config.h | 9 + - src/buildtools/config/support.pri | 2 +- - 146 files changed, 39663 insertions(+), 156 deletions(-) - create mode 100644 src/3rdparty/chromium/sandbox/linux/system_headers/loongarch64_linux_syscalls.h - create mode 100644 src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/SaveRegisters_loongarch64.S - create mode 100644 src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_loong64.h - create mode 100644 src/3rdparty/chromium/third_party/dav1d/config/linux-noasm/loongarch64/config.h - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/config.h - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/bsf_list.c - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/codec_list.c - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/parser_list.c - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/demuxer_list.c - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/muxer_list.c - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/protocol_list.c - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/avconfig.h - create mode 100644 src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/ffversion.h - create mode 100644 src/3rdparty/chromium/v8/src/builtins/loongarch64/builtins-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64-inl.h - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.h - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.h - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/cpu-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/interface-descriptors-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.h - create mode 100644 src/3rdparty/chromium/v8/src/codegen/loongarch64/register-loongarch64.h - create mode 100644 src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/code-generator-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-codes-loongarch64.h - create mode 100644 src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-scheduler-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-selector-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/debug/loongarch64/debug-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/deoptimizer/loongarch64/deoptimizer-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/diagnostics/loongarch64/disasm-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.h - create mode 100644 src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.h - create mode 100644 src/3rdparty/chromium/v8/src/heap/base/asm/loongarch64/push_registers_asm.cc - create mode 100644 src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.cc - create mode 100644 src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.h - create mode 100644 src/3rdparty/chromium/v8/src/wasm/baseline/loongarch64/liftoff-assembler-loongarch64.h -diff --git a/configure.pri b/configure.pri -index 080f582b7..cb01399b4 100644 ---- a/configure.pri -+++ b/configure.pri -@@ -123,6 +123,7 @@ defineTest(qtConfTest_detectArch) { +Signed-off-by: lichenggang + +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/configure.pri ++++ qtwebengine-opensource-src-5.15.17+dfsg/configure.pri +@@ -157,6 +157,7 @@ defineTest(qtConfTest_detectArch) { contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true) contains(QT_ARCH, "mips"): return(true) contains(QT_ARCH, "mips64"): return(true) @@ -222,10 +17,593 @@ index 080f582b7..cb01399b4 100644 qtLog("Architecture not supported.") return(false) } -diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf -index 951f4d277..3514a299e 100644 ---- a/mkspecs/features/functions.prf -+++ b/mkspecs/features/functions.prf +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/configure.pri.orig +@@ -0,0 +1,569 @@ ++include(src/buildtools/config/support.pri) ++include(src/buildtools/config/functions.pri) ++ ++# this must be done outside any function ++QTWEBENGINE_SOURCE_TREE = $$PWD ++ ++equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe ++ ++defineTest(isPythonVersionSupported) { ++ python = $$system_quote($$system_path($$1)) ++ python_version = $$system('$$python -c "import sys; print(sys.version_info[0:3])"') ++ python_version ~= s/[()]//g ++ python_version = $$split(python_version, ',') ++ python_major_version = $$first(python_version) ++ python_minor_version = $$member(python_version, 1) ++ python_patch_version = $$member(python_version, 2) ++ greaterThan(python_major_version, 2): greaterThan(python_minor_version, 7): return(true) ++ greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true) ++ qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.") ++ return(false) ++} ++ ++defineTest(qtConfTest_detectJumboBuild) { ++ mergeLimit = $$eval(config.input.merge_limit) ++ mergeLimit = $$find(mergeLimit, "\\d") ++ isEmpty(mergeLimit) { ++ win32: mergeLimit = 0 ++ else: mergeLimit = 8 ++ } ++ qtLog("Setting jumbo build merge batch limit to $${mergeLimit}.") ++ $${1}.merge_limit = $$mergeLimit ++ export($${1}.merge_limit) ++ $${1}.cache += merge_limit ++ export($${1}.cache) ++ ++ return(true) ++} ++ ++defineTest(qtConfReport_skipBuildWarning) { ++ $${1}() ++ !isEmpty(skipBuildReason):qtConfAddWarning($${skipBuildReason}) ++} ++ ++defineTest(qtConfReport_jumboBuild) { ++ mergeLimit = $$eval(cache.webengine-jumbo-build.merge_limit) ++ isEmpty(mergeLimit)|!greaterThan(mergeLimit,0) { ++ mergeLimit = "no" ++ } ++ qtConfReportPadded($${1}, $$mergeLimit) ++} ++ ++defineTest(qtConfTest_detectPython2) { ++ pythonOverride = $$eval(config.input.python_override) ++ !isEmpty(pythonOverride) { ++ python = $$qtConfFindInPath("$$pythonOverride$$EXE_SUFFIX") ++ isEmpty(python) { ++ qtLog("User selected '$$pythonOverride$$EXE_SUFFIX' was not found in PATH. Giving up.") ++ return(false) ++ } ++ } ++ ++ win32 { ++ # the default name of the python 2 executable on windows is just ++ # python, so try that first ++ isEmpty(python):python = $$qtConfFindInPath("python$$EXE_SUFFIX") ++ isEmpty(python):python = $$qtConfFindInPath("python2$$EXE_SUFFIX") ++ isEmpty(python):python = $$qtConfFindInPath("python3$$EXE_SUFFIX") ++ } else { ++ isEmpty(python):python = $$qtConfFindInPath("python2$$EXE_SUFFIX") ++ isEmpty(python):python = $$qtConfFindInPath("python3$$EXE_SUFFIX") ++ isEmpty(python):python = $$qtConfFindInPath("python$$EXE_SUFFIX") ++ } ++ ++ isEmpty(python) { ++ qtLog("Python not found in PATH. Giving up.") ++ return(false) ++ } ++ !isPythonVersionSupported($$python) { ++ qtLog("A suitable Python executable could not be located.") ++ return(false) ++ } ++ ++ # Make tests.python.location available in configure.json. ++ $${1}.location = $$clean_path($$python) ++ export($${1}.location) ++ $${1}.cache += location ++ export($${1}.cache) ++ ++ return(true) ++} ++ ++defineReplace(qtConfFindGnuTool) { ++ equals(QMAKE_HOST.os, Windows) { ++ gnuwin32bindir = $$absolute_path($$QTWEBENGINE_SOURCE_TREE/../gnuwin32/bin) ++ gnuwin32toolpath = "$$gnuwin32bindir/$${1}" ++ exists($$gnuwin32toolpath): \ ++ return($$gnuwin32toolpath) ++ } ++ return($$qtConfFindInPath($$1)) ++} ++ ++defineTest(qtConfTest_detectGperf) { ++ gperf = $$qtConfFindGnuTool("gperf$$EXE_SUFFIX") ++ isEmpty(gperf) { ++ qtLog("Required gperf could not be found.") ++ return(false) ++ } ++ qtLog("Found gperf from path: $$gperf") ++ return(true) ++} ++ ++defineTest(qtConfTest_detectBison) { ++ bison = $$qtConfFindGnuTool("bison$$EXE_SUFFIX") ++ isEmpty(bison) { ++ qtLog("Required bison could not be found.") ++ return(false) ++ } ++ qtLog("Found bison from path: $$bison") ++ return(true) ++} ++ ++defineTest(qtwebengine_platformError) { ++ platformError = $$1 ++ export(platformError) ++} ++ ++defineTest(qtConfTest_detectPlatform) { ++ QT_FOR_CONFIG += gui-private ++ ++ linux:qtwebengine_isLinuxPlatformSupported() { ++ $${1}.platform = "linux" ++ } ++ win32:qtwebengine_isWindowsPlatformSupported() { ++ $${1}.platform = "windows" ++ } ++ macos:qtwebengine_isMacOsPlatformSupported() { ++ $${1}.platform = "macos" ++ } ++ ios:qtwebengine_isMacOsPlatformSupported() { ++ $${1}.platform = "ios" ++ } ++ ++ !isEmpty(platformError) { ++ qtLog("Platform not supported.") ++ $${1}.platformSupport = $$platformError ++ export($${1}.platformSupport) ++ $${1}.cache += platformSupport ++ export($${1}.cache) ++ return(false) ++ } ++ export($${1}.platformSupport) ++ return(true) ++} ++ ++defineTest(qtConfTest_detectArch) { ++ contains(QT_ARCH, "i386")|contains(QT_ARCH, "x86_64"): return(true) ++ contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true) ++ contains(QT_ARCH, "mips"): return(true) ++ contains(QT_ARCH, "mips64"): return(true) ++ qtLog("Architecture not supported.") ++ return(false) ++} ++ ++defineTest(qtConfTest_detectFlex) { ++ flex = $$qtConfFindGnuTool("flex$$EXE_SUFFIX") ++ isEmpty(flex) { ++ qtLog("Required flex could not be found.") ++ return(false) ++ } ++ qtLog("Found flex from path: $$flex") ++ return(true) ++} ++ ++defineTest(qtConfTest_detectNinja) { ++ ninja = $$qtConfFindInPath("ninja$$EXE_SUFFIX") ++ !isEmpty(ninja) { ++ qtLog("Found ninja from path: $$ninja") ++ qtRunLoggedCommand("$$ninja --version", version)|return(false) ++ contains(version, "1\.([7-9]|1[0-9])\..*"): return(true) ++ qtLog("Ninja version too old") ++ } ++ qtLog("Building own ninja") ++ return(false) ++} ++ ++defineTest(qtConfTest_detectGn) { ++ gn = $$qtConfFindInPath("gn$$EXE_SUFFIX") ++ !isEmpty(gn) { ++ qtRunLoggedCommand("$$gn --version", version)|return(false) ++ #accept all for now ++ contains(version, ".*"): return(true) ++ qtLog("Gn version too old") ++ } ++ qtLog("Building own gn") ++ return(false) ++} ++ ++defineTest(qtConfTest_detectNodeJS) { ++ nodejs = $$qtConfFindInPath("nodejs$$EXE_SUFFIX") ++ isEmpty(nodejs) { ++ qtLog("'nodejs$$EXE_SUFFIX' not found in PATH. Checking for 'node$$EXE_SUFFIX'.") ++ nodejs = $$qtConfFindInPath("node$$EXE_SUFFIX") ++ isEmpty(nodejs) { ++ qtLog("'node$$EXE_SUFFIX' not found in PATH. Giving up.") ++ return(false) ++ } ++ } ++ nodejs = $$system_quote($$system_path($$nodejs)) ++ !qtRunLoggedCommand("$$nodejs --version", version) { ++ qtLog("'$$nodejs' didn't run.") ++ return(false) ++ } ++ # at least version 10 ++ version10 = false ++ contains(version, "v([1-9][0-9])\..*"): version10 = true ++ ++ $${1}.version10 = $$version10 ++ export($${1}.version10) ++ $${1}.cache += version10 ++ export($${1}.cache) ++ return(true) ++} ++ ++defineTest(qtConfTest_detectEmbedded) { ++ lessThan(QT_MINOR_VERSION, 9) { ++ cross_compile: return(true) ++ return(false) ++ } ++ $$qtConfEvaluate("features.cross_compile"): return(true) ++ return(false) ++} ++ ++defineTest(qtConfTest_detectHostPkgConfig) { ++ PKG_CONFIG = $$qtConfPkgConfig(true) ++ isEmpty(PKG_CONFIG) { ++ qtLog("Could not find host pkg-config") ++ return(false) ++ } ++ qtLog("Found host pkg-config: $$PKG_CONFIG") ++ $${1}.path = $$PKG_CONFIG ++ export($${1}.path) ++ $${1}.cache += path ++ export($${1}.cache) ++ return(true) ++} ++ ++defineTest(qtConfTest_isSanitizerSupported) { ++ sanitizer_combo_supported = true ++ ++ sanitize_address { ++ asan_supported = false ++ linux-clang-libc++:isSanitizerSupportedOnLinux() { ++ asan_supported = true ++ } else:macos:isSanitizerSupportedOnMacOS() { ++ asan_supported = true ++ } ++ !$$asan_supported { ++ sanitizer_combo_supported = false ++ qtLog("An address sanitizer-enabled Qt WebEngine build can only be built on Linux or macOS using Clang and libc++.") ++ } ++ } ++ ++ sanitize_memory { ++ sanitizer_combo_supported = false ++ qtLog("A memory sanitizer-enabled Qt WebEngine build is not supported.") ++ } ++ ++ sanitize_undefined { ++ ubsan_supported = false ++ CONFIG(release, debug|release):!debug_and_release { ++ linux-clang-libc++:isSanitizerSupportedOnLinux() { ++ ubsan_supported = true ++ } else:macos:isSanitizerSupportedOnMacOS() { ++ ubsan_supported = true ++ } ++ } ++ !$$ubsan_supported { ++ sanitizer_combo_supported = false ++ qtLog("An undefined behavior sanitizer-enabled Qt WebEngine build can only be built on Linux or macOS using Clang and libc++ in release mode.") ++ } ++ } ++ ++ sanitize_thread { ++ tsan_supported = false ++ linux-clang-libc++:isSanitizerSupportedOnLinux() { ++ tsan_supported = true ++ } ++ !$$tsan_supported { ++ sanitizer_combo_supported = false ++ qtLog("A thread sanitizer-enabled Qt WebEngine build can only be built on Linux using Clang and libc++.") ++ } ++ } ++ ++ $$sanitizer_combo_supported: return(true) ++ return(false) ++} ++ ++defineTest(isSanitizerSupportedOnLinux) { ++ isSanitizerLinuxClangVersionSupported(): return(true) ++ return(false) ++} ++ ++defineTest(isSanitizerSupportedOnMacOS) { ++ isEmpty(QMAKE_APPLE_CLANG_MAJOR_VERSION) { ++ QTWEBENGINE_CLANG_IS_APPLE = false ++ } else { ++ QTWEBENGINE_CLANG_IS_APPLE = true ++ } ++ ++ $$QTWEBENGINE_CLANG_IS_APPLE:isSanitizerMacOSAppleClangVersionSupported(): return(true) ++ else:isSanitizerMacOSClangVersionSupported(): return(true) ++ return(false) ++} ++ ++defineTest(isSanitizerMacOSAppleClangVersionSupported) { ++ # Clang sanitizer suppression attributes work from Apple Clang version 7.3.0+. ++ greaterThan(QMAKE_APPLE_CLANG_MAJOR_VERSION, 7): return(true) ++ greaterThan(QMAKE_APPLE_CLANG_MINOR_VERSION, 2): return(true) ++ ++ qtLog("Using Apple Clang version $${QMAKE_APPLE_CLANG_MAJOR_VERSION}.$${QMAKE_APPLE_CLANG_MINOR_VERSION}.$${QMAKE_APPLE_CLANG_PATCH_VERSION}, but at least Apple Clang version 7.3.0 is required to build a sanitizer-enabled Qt WebEngine.") ++ return(false) ++} ++ ++defineTest(isSanitizerMacOSClangVersionSupported) { ++ # Clang sanitizer suppression attributes work from non-apple Clang version 3.7+. ++ greaterThan(QMAKE_CLANG_MAJOR_VERSION, 3): return(true) ++ greaterThan(QMAKE_CLANG_MINOR_VERSION, 6): return(true) ++ ++ qtLog("Using Clang version $${QMAKE_CLANG_MAJOR_VERSION}.$${QMAKE_CLANG_MINOR_VERSION}, but at least Clang version 3.7 is required to build a sanitizer-enabled Qt WebEngine.") ++ return(false) ++} ++ ++defineTest(isSanitizerLinuxClangVersionSupported) { ++ # Clang sanitizer suppression attributes work from Clang version 3.7+. ++ greaterThan(QMAKE_CLANG_MAJOR_VERSION, 3): return(true) ++ greaterThan(QMAKE_CLANG_MINOR_VERSION, 6): return(true) ++ ++ qtLog("Using Clang version $${QMAKE_CLANG_MAJOR_VERSION}.$${QMAKE_CLANG_MINOR_VERSION}, but at least Clang version 3.7 is required to build a sanitizer-enabled Qt WebEngine.") ++ return(false) ++} ++ ++defineReplace(qtConfFunc_isTestsInBuildParts) { ++ contains(QT_BUILD_PARTS, tests): return(true) ++ return(false) ++} ++ ++defineReplace(webEngineGetMacOSVersion) { ++ value = $$system("sw_vers -productVersion 2>/dev/null") ++ return($$value) ++} ++ ++defineReplace(webEngineGetMacOSSDKVersion) { ++ value = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null") ++ return($$value) ++} ++ ++defineReplace(webEngineGetMacOSClangVerboseVersion) { ++ output = $$system("$$QMAKE_CXX --version 2>/dev/null", lines) ++ value = $$first(output) ++ return($$value) ++} ++ ++defineTest(qtConfReport_macosToolchainVersion) { ++ arg = $$2 ++ contains(arg, "macosVersion"): report_message = $$webEngineGetMacOSVersion() ++ contains(arg, "xcodeVersion"): report_message = "$$QMAKE_XCODE_VERSION" ++ contains(arg, "clangVersion"): report_message = $$webEngineGetMacOSClangVerboseVersion() ++ contains(arg, "sdkVersion"): report_message = $$webEngineGetMacOSSDKVersion() ++ contains(arg, "deploymentTarget"): report_message = "$$QMAKE_MACOSX_DEPLOYMENT_TARGET" ++ !isEmpty(report_message): qtConfReportPadded($$1, $$report_message) ++} ++ ++defineTest(qtConfTest_isWindowsHostCompiler64) { ++ win_host_arch = $$(VSCMD_ARG_HOST_ARCH) ++ isEmpty(win_host_arch): return(true) ++ contains(win_host_arch,"x64"): return(true) ++ qtLog("Required 64-bit cross-building or native toolchain was not detected.") ++ return(false) ++} ++ ++# Fixme QTBUG-71772 ++defineTest(qtConfTest_hasThumbFlag) { ++ FLAG = $$qtwebengine_extractCFlag("-mthumb") ++ !isEmpty(FLAG): return(true) ++ FLAG = $$qtwebengine_extractCFlag("-marm") ++ !isEmpty(FLAG): return(false) ++ ++ MARCH = $$qtwebengine_extractCFlag("-march=.*") ++ MARMV = $$replace(MARCH, "armv",) ++ !isEmpty(MARMV) { ++ MARMV = $$split(MARMV,) ++ MARMV = $$member(MARMV, 0) ++ } ++ if (isEmpty(MARMV) | lessThan(MARMV, 7)): return(false) ++ # no flag assume mthumb ++ return(true) ++} ++ ++defineTest(qtConfTest_detectSubmodule) { ++ isEmpty(QTWEBENGINE_ROOT) { ++ # topLevel build , add poor man's workaround ++ QTWEBENGINE_ROOT=$$PWD/../../../qtwebengine ++ } ++ !exists($$QTWEBENGINE_ROOT/src/3rdparty/chromium):return(false) ++ return(true) ++} ++ ++defineTest(qtConfTest_detectNoWhitespace) { ++ WSPC = $$find(OUT_PWD, \\s) ++ !isEmpty(WSPC):return(false) ++ return(true) ++} ++ ++defineTest(qtwebengine_confCheckWebEngineCoreError) { ++ QT_FOR_CONFIG += buildtools-private gui-private ++ return($$qtwebengine_checkWebEngineCoreError()) ++} ++ ++defineTest(qtwebengine_confCheckPdfError) { ++ QT_FOR_CONFIG += buildtools-private gui-private ++ return($$qtwebengine_checkPdfError()) ++} ++ ++defineTest(qtwebengine_isLinuxPlatformSupported) { ++ !gcc|intel_icc { ++ qtwebengine_platformError("requires clang or GCC.") ++ return(false) ++ } ++ gcc:!clang:!qtwebengine_isGCCVersionSupported(): return(false) ++ gcc:!qtConfig(c++14) { ++ qtwebengine_platformError("requires c++14 support.") ++ return(false) ++ } ++ return(true) ++} ++ ++defineTest(qtwebengine_isWindowsPlatformSupported) { ++ winrt { ++ qtwebengine_platformError("for WinRT is not supported.") ++ return(false) ++ } ++ qtwebengine_isBuildingOnWin32() { ++ qtwebengine_platformError("must be built on a 64-bit machine.") ++ return(false) ++ } ++ !msvc|intel_icl { ++ qtwebengine_platformError("requires MSVC or Clang (MSVC mode).") ++ return(false) ++ } ++ !qtwebengine_isMinWinSDKVersion(10, 19041): { ++ qtwebengine_platformError("requires a Windows SDK version 10.0.19041 or newer.") ++ return(false) ++ } ++ return(true) ++} ++ ++defineTest(qtwebengine_isMacOsPlatformSupported) { ++ !qtwebengine_isMinXcodeVersion(10, 0, 0) { ++ qtwebengine_platformError("requires at least version 10.0.0, but using Xcode version $${QMAKE_XCODE_VERSION}.") ++ return(false) ++ } ++ !clang|intel_icc { ++ qtwebengine_platformError("requires Clang.") ++ return(false) ++ } ++ # We require macOS 10.13 (darwin version 17.0.0) or newer. ++ darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0) ++ lessThan(darwin_major_version, 17) { ++ qtwebengine_platformError("requires macOS version 10.13 or newer.") ++ return(false) ++ } ++ !qtwebengine_isMinOSXSDKVersion(10, 13): { ++ qtwebengine_platformError("requires a macOS SDK version of 10.13 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.") ++ return(false) ++ } ++ CONFIG(debug, debug|release):isUniversal(){ ++ qtwebengine_platformError("Universal builds can not be done with debug configuration due to large binary size.") ++ return(false) ++ } ++ return(true) ++} ++ ++defineTest(qtwebengine_isGCCVersionSupported) { ++ # Keep in sync with src/webengine/doc/src/qtwebengine-platform-notes.qdoc ++ lessThan(QMAKE_GCC_MAJOR_VERSION, 5) { ++ qtwebengine_platformError("requires at least gcc version 5, but using gcc version $${QMAKE_GCC_MAJOR_VERSION}.$${QMAKE_GCC_MINOR_VERSION}.") ++ return(false) ++ } ++ ++ equals(QMAKE_GCC_MAJOR_VERSION, 5): equals(QMAKE_GCC_MINOR_VERSION, 4): equals(QMAKE_GCC_PATCH_VERSION, 0) { ++ qtwebengine_platformError("gcc version 5.4.0 is blacklisted due to internal compiler errors.") ++ return(false) ++ } ++ ++ return(true) ++} ++ ++defineTest(qtwebengine_isBuildingOnWin32) { ++ # The check below is ugly, but necessary, as it seems to be the only reliable way to detect if the host ++ # architecture is 32 bit. QMAKE_HOST.arch does not work as it returns the architecture that the toolchain ++ # is building for, not the system's actual architecture. ++ PROGRAM_FILES_X86 = $$(ProgramW6432) ++ isEmpty(PROGRAM_FILES_X86): return(true) ++ return(false) ++} ++ ++defineTest(qtwebengine_isMinOSXSDKVersion) { ++ requested_major = $$1 ++ requested_minor = $$2 ++ requested_patch = $$3 ++ isEmpty(requested_patch): requested_patch = 0 ++ WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null") ++ export(WEBENGINE_OSX_SDK_PRODUCT_VERSION) ++ isEmpty(WEBENGINE_OSX_SDK_PRODUCT_VERSION) { ++ qtwebengine_platformError("requires SDK product version, but could not resolve it for \'$$QMAKE_MAC_SDK\'.") ++ return(false) ++ } ++ major_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 0, 0) ++ minor_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 1, 1) ++ patch_version = $$section(WEBENGINE_OSX_SDK_PRODUCT_VERSION, ., 2, 2) ++ isEmpty(patch_version): patch_version = 0 ++ ++ greaterThan(major_version, $$requested_major):return(true) ++ equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true) ++ equals(major_version, $$requested_major):equals(minor_version, $$requested_minor):!lessThan(patch_version, $$requested_patch):return(true) ++ ++ return(false) ++} ++ ++defineTest(qtwebengine_isMinXcodeVersion) { ++ requested_major = $$1 ++ requested_minor = $$2 ++ requested_patch = $$3 ++ isEmpty(requested_minor): requested_minor = 0 ++ isEmpty(requested_patch): requested_patch = 0 ++ target_var = QMAKE_XCODE_VERSION ++ major_version = $$section($$target_var, ., 0, 0) ++ minor_version = $$section($$target_var, ., 1, 1) ++ patch_version = $$section($$target_var, ., 2, 2) ++ isEmpty(minor_version): minor_version = 0 ++ isEmpty(patch_version): patch_version = 0 ++ ++ greaterThan(major_version, $$requested_major):return(true) ++ equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true) ++ equals(major_version, $$requested_major):equals(minor_version, $$requested_minor):!lessThan(patch_version, $$requested_patch):return(true) ++ ++ return(false) ++} ++ ++defineTest(qtwebengine_isMinWinSDKVersion) { ++ requested_major = $$1 ++ requested_minor = $$2 ++ WIN_SDK_VERSION = $$(WindowsSDKVersion) ++ ++ isEmpty(WIN_SDK_VERSION)|equals(WIN_SDK_VERSION, "\\") { ++ qtwebengine_platformError("requires Windows SDK version, but could not detect it (\'WindowsSDKVersion\' environment variable is not set).") ++ return(false) ++ } ++ ++ # major.0.minor ++ major_version = $$section(WIN_SDK_VERSION, ., 0, 0) ++ minor_version = $$section(WIN_SDK_VERSION, ., 2, 2) ++ ++ greaterThan(major_version, $$requested_major):return(true) ++ equals(major_version, $$requested_major):greaterThan(minor_version, $$requested_minor):return(true) ++ equals(major_version, $$requested_major):equals(minor_version, $$requested_minor)::return(true) ++ ++ return(false) ++} +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/configure.pri.rej +@@ -0,0 +1,10 @@ ++--- configure.pri +++++ configure.pri ++@@ -123,6 +123,7 @@ defineTest(qtConfTest_detectArch) { ++ contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true) ++ contains(QT_ARCH, "mips"): return(true) ++ contains(QT_ARCH, "mips64"): return(true) +++ contains(QT_ARCH, "loongarch64"): return(true) ++ qtLog("Architecture not supported.") ++ return(false) ++ } +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/mkspecs/features/functions.prf ++++ qtwebengine-opensource-src-5.15.17+dfsg/mkspecs/features/functions.prf @@ -112,6 +112,7 @@ defineReplace(gnArch) { contains(qtArch, "mips"): return(mipsel) contains(qtArch, "mips64"): return(mips64el) @@ -234,23 +612,206 @@ index 951f4d277..3514a299e 100644 return(unknown) } -diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h -index c42fe2835..a7aee4943 100644 ---- a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h -+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h -@@ -47,7 +47,7 @@ constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/mkspecs/features/functions.prf.rej +@@ -0,0 +1,10 @@ ++--- mkspecs/features/functions.prf +++++ mkspecs/features/functions.prf ++@@ -112,6 +112,7 @@ defineReplace(gnArch) { ++ contains(qtArch, "mips"): return(mipsel) ++ contains(qtArch, "mips64"): return(mips64el) ++ contains(qtArch, "mips64el"): return(mips64el) +++ contains(qtArch, "loongarch64"): return(loongarch64) ++ return(unknown) ++ } ++ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h +@@ -73,7 +73,7 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEX // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice // here. return 16; // 64kB -#elif defined(_MIPS_ARCH_LOONGSON) +#elif defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_LOONGARCH64) return 14; // 16kB - #else - return 12; // 4kB -diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h -index c8268ec30..fd00eb375 100644 ---- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h -+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h + #elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h.orig +@@ -0,0 +1,157 @@ ++// Copyright (c) 2018 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_PAGE_ALLOCATOR_CONSTANTS_H_ ++#define BASE_ALLOCATOR_PARTITION_ALLOCATOR_PAGE_ALLOCATOR_CONSTANTS_H_ ++ ++#include ++ ++#include "base/compiler_specific.h" ++#include "build/build_config.h" ++ ++#if defined(OS_APPLE) ++ ++#include ++ ++// Although page allocator constants are not constexpr, they are run-time ++// constant. Because the underlying variables they access, such as vm_page_size, ++// are not marked const, the compiler normally has no way to know that they ++// don’t change and must obtain their values whenever it can't prove that they ++// haven't been modified, even if they had already been obtained previously. ++// Attaching __attribute__((const)) to these declarations allows these redundant ++// accesses to be omitted under optimization such as common subexpression ++// elimination. ++#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) ++ ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++// This should work for all POSIX (if needed), but currently all other ++// supported OS/architecture combinations use either hard-coded values ++// (such as x86) or have means to determine these values without needing ++// atomics (such as macOS on arm64). ++ ++// Page allocator constants are run-time constant ++#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) ++ ++#include ++#include ++ ++namespace base::internal { ++ ++// Holds the current page size and shift, where size = 1 << shift ++// Use PageAllocationGranularity(), PageAllocationGranularityShift() ++// to initialize and retrieve these values safely. ++struct PageCharacteristics { ++ std::atomic size; ++ std::atomic shift; ++}; ++extern PageCharacteristics page_characteristics; ++ ++} // namespace base::internal ++ ++#else ++ ++// When defined, page size constants are fixed at compile time. When not ++// defined, they may vary at run time. ++#define PAGE_ALLOCATOR_CONSTANTS_ARE_CONSTEXPR 1 ++ ++// Use this macro to declare a function as constexpr or not based on whether ++// PAGE_ALLOCATOR_CONSTANTS_ARE_CONSTEXPR is defined. ++#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR constexpr ++ ++#endif ++ ++namespace base { ++// Forward declaration, implementation below ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularity(); ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PageAllocationGranularityShift() { ++#if defined(OS_WIN) || defined(ARCH_CPU_PPC64) ++ // Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page ++ // sizes. Since 64kB is the de facto standard on the platform and binaries ++ // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice ++ // here. ++ return 16; // 64kB ++#elif defined(_MIPS_ARCH_LOONGSON) ++ return 14; // 16kB ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) ++ // page sizes. Retrieve from or initialize cache. ++ int shift = base::internal::page_characteristics.shift.load(std::memory_order_relaxed); ++ if (UNLIKELY(shift == 0)) { ++ shift = __builtin_ctz((int)base::PageAllocationGranularity()); ++ base::internal::page_characteristics.shift.store(shift, std::memory_order_relaxed); ++ } ++ return shift; ++#elif defined(OS_APPLE) ++ return vm_page_shift; ++#else ++ return 12; // 4kB ++#endif ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularity() { ++#if defined(OS_APPLE) ++ // This is literally equivalent to |1 << PageAllocationGranularityShift()| ++ // below, but was separated out for OS_APPLE to avoid << on a non-constexpr. ++ return vm_page_size; ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or ++ // initialize cache. ++ int size = internal::page_characteristics.size.load(std::memory_order_relaxed); ++ if (UNLIKELY(size == 0)) { ++ size = getpagesize(); ++ internal::page_characteristics.size.store(size, std::memory_order_relaxed); ++ } ++ return size; ++#else ++ return 1ULL << PageAllocationGranularityShift(); ++#endif ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularityOffsetMask() { ++ return PageAllocationGranularity() - 1; ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularityBaseMask() { ++ return ~PageAllocationGranularityOffsetMask(); ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++SystemPageSize() { ++#if defined(OS_WIN) ++ return 4096; ++#else ++ return PageAllocationGranularity(); ++#endif ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++SystemPageOffsetMask() { ++ return SystemPageSize() - 1; ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++SystemPageBaseMask() { ++ return ~SystemPageOffsetMask(); ++} ++ ++static constexpr size_t kPageMetadataShift = 5; // 32 bytes per partition page. ++static constexpr size_t kPageMetadataSize = 1 << kPageMetadataShift; ++ ++// See DecommitSystemPages(), this is not guaranteed to be synchronous on all ++// platforms. ++static constexpr bool kDecommittedPagesAreAlwaysZeroed = ++#if defined(OS_APPLE) ++ false; ++#else ++ true; ++#endif ++ ++} // namespace base ++ ++#endif // BASE_ALLOCATOR_PARTITION_ALLOCATOR_PAGE_ALLOCATOR_CONSTANTS_H_ +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h +++++ src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h ++@@ -47,7 +47,7 @@ constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { ++ // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice ++ // here. ++ return 16; // 64kB ++-#elif defined(_MIPS_ARCH_LOONGSON) +++#elif defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_LOONGARCH64) ++ return 14; // 16kB ++ #else ++ return 12; // 4kB +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h @@ -47,7 +47,7 @@ static_assert(sizeof(void*) != 8, ""); // other constant values, we pack _all_ `PartitionRoot::Alloc` sizes perfectly // up against the end of a system page. @@ -260,10 +821,22 @@ index c8268ec30..fd00eb375 100644 PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PartitionPageShift() { return 16; // 64 KiB -diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h b/src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h -index dd9fbfccb..31560faba 100644 ---- a/src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h -+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +++++ src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h ++@@ -47,7 +47,7 @@ static_assert(sizeof(void*) != 8, ""); ++ // other constant values, we pack _all_ `PartitionRoot::Alloc` sizes perfectly ++ // up against the end of a system page. ++ ++-#if defined(_MIPS_ARCH_LOONGSON) +++#if defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_LOONGARCH64) ++ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int ++ PartitionPageShift() { ++ return 16; // 64 KiB +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h @@ -29,6 +29,8 @@ // Don't bother doing using .word here since r2 is the lowest supported mips64 // that Chromium supports. @@ -273,11 +846,23 @@ index dd9fbfccb..31560faba 100644 #elif defined(ARCH_CPU_PPC64_FAMILY) #define YIELD_PROCESSOR __asm__ __volatile__("or 31,31,31") #elif defined(ARCH_CPU_S390_FAMILY) -diff --git a/src/3rdparty/chromium/base/process/launch_posix.cc b/src/3rdparty/chromium/base/process/launch_posix.cc -index a8b1f0bdf..19da244e4 100644 ---- a/src/3rdparty/chromium/base/process/launch_posix.cc -+++ b/src/3rdparty/chromium/base/process/launch_posix.cc -@@ -704,7 +704,7 @@ NOINLINE pid_t CloneAndLongjmpInChild(unsigned long flags, +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h +++++ src/3rdparty/chromium/base/allocator/partition_allocator/yield_processor.h ++@@ -29,6 +29,8 @@ ++ // Don't bother doing using .word here since r2 is the lowest supported mips64 ++ // that Chromium supports. ++ #define YIELD_PROCESSOR __asm__ __volatile__("pause") +++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) +++#define YIELD_PROCESSOR __asm__ __volatile__("nop") ++ #elif defined(ARCH_CPU_PPC64_FAMILY) ++ #define YIELD_PROCESSOR __asm__ __volatile__("or 31,31,31") ++ #elif defined(ARCH_CPU_S390_FAMILY) +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/base/process/launch_posix.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/process/launch_posix.cc +@@ -704,7 +704,7 @@ NOINLINE pid_t CloneAndLongjmpInChild(un alignas(16) char stack_buf[PTHREAD_STACK_MIN]; #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_S390_FAMILY) || \ @@ -286,10 +871,22 @@ index a8b1f0bdf..19da244e4 100644 // The stack grows downward. void* stack = stack_buf + sizeof(stack_buf); #else -diff --git a/src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h b/src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h -index 471c3da84..3122c600c 100644 ---- a/src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h -+++ b/src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/process/launch_posix.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/base/process/launch_posix.cc +++++ src/3rdparty/chromium/base/process/launch_posix.cc ++@@ -704,7 +704,7 @@ NOINLINE pid_t CloneAndLongjmpInChild(unsigned long flags, ++ alignas(16) char stack_buf[PTHREAD_STACK_MIN]; ++ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ ++ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_S390_FAMILY) || \ ++- defined(ARCH_CPU_PPC64_FAMILY) +++ defined(ARCH_CPU_PPC64_FAMILY) || defined(ARCH_CPU_LOONGARCH_FAMILY) ++ // The stack grows downward. ++ void* stack = stack_buf + sizeof(stack_buf); ++ #else +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h @@ -110,7 +110,8 @@ int main(int argc, char** argv) { defined(__riscv) || defined(__e2k__) || \ defined(__or1k__) || defined(__arc__) || \ @@ -300,10 +897,23 @@ index 471c3da84..3122c600c 100644 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 #elif defined(__mc68000__) || \ defined(__pnacl__) || defined(__native_client__) -diff --git a/src/3rdparty/chromium/build/build_config.h b/src/3rdparty/chromium/build/build_config.h -index 2c3e81ee1..2886e294f 100644 ---- a/src/3rdparty/chromium/build/build_config.h -+++ b/src/3rdparty/chromium/build/build_config.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h +++++ src/3rdparty/chromium/base/third_party/double_conversion/double-conversion/utils.h ++@@ -110,7 +110,8 @@ int main(int argc, char** argv) { ++ defined(__riscv) || defined(__e2k__) || \ ++ defined(__or1k__) || defined(__arc__) || \ ++ defined(__microblaze__) || defined(__XTENSA__) || \ ++- defined(__EMSCRIPTEN__) || defined(__wasm32__) +++ defined(__EMSCRIPTEN__) || defined(__wasm32__) || \ +++ defined(__loongarch__) ++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 ++ #elif defined(__mc68000__) || \ ++ defined(__pnacl__) || defined(__native_client__) +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/build/build_config.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/build/build_config.h @@ -22,13 +22,14 @@ // Processor: // ARCH_CPU_ARM64 / ARCH_CPU_ARMEL / ARCH_CPU_MIPS / ARCH_CPU_MIPS64 / @@ -336,11 +946,46 @@ index 2c3e81ee1..2886e294f 100644 #else #error Please add support for your architecture in build/build_config.h #endif -diff --git a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -index fa8b17e9d..bd757b4e9 100644 ---- a/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -+++ b/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn -@@ -298,3 +298,27 @@ gcc_toolchain("mips64") { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/build/build_config.h.rej +@@ -0,0 +1,34 @@ ++--- src/3rdparty/chromium/build/build_config.h +++++ src/3rdparty/chromium/build/build_config.h ++@@ -22,13 +22,14 @@ ++ // Processor: ++ // ARCH_CPU_ARM64 / ARCH_CPU_ARMEL / ARCH_CPU_MIPS / ARCH_CPU_MIPS64 / ++ // ARCH_CPU_MIPS64EL / ARCH_CPU_MIPSEL / ARCH_CPU_PPC64 / ARCH_CPU_S390 / ++-// ARCH_CPU_S390X / ARCH_CPU_X86 / ARCH_CPU_X86_64 +++// ARCH_CPU_S390X / ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_LOONGARCH64 ++ // Processor family: ++ // ARCH_CPU_ARM_FAMILY: ARMEL or ARM64 ++ // ARCH_CPU_MIPS_FAMILY: MIPS64EL or MIPSEL or MIPS64 or MIPS ++ // ARCH_CPU_PPC64_FAMILY: PPC64 ++ // ARCH_CPU_S390_FAMILY: S390 or S390X ++ // ARCH_CPU_X86_FAMILY: X86 or X86_64 +++// ARCH_CPU_LOONGARCH_FAMILY: LOONGARCH64 ++ // Processor features: ++ // ARCH_CPU_31_BITS / ARCH_CPU_32_BITS / ARCH_CPU_64_BITS ++ // ARCH_CPU_BIG_ENDIAN / ARCH_CPU_LITTLE_ENDIAN ++@@ -193,6 +194,15 @@ ++ #define ARCH_CPU_32_BITS 1 ++ #define ARCH_CPU_BIG_ENDIAN 1 ++ #endif +++#elif defined(__loongarch__) +++#if defined(__loongarch_lp64) +++#define ARCH_CPU_LOONGARCH_FAMILY 1 +++#define ARCH_CPU_LOONGARCH64 1 +++#define ARCH_CPU_64_BITS 1 +++#define ARCH_CPU_LITTLE_ENDIAN 1 +++#else +++#error Only lp64 been supported on loongarch architecture! +++#endif ++ #else ++ #error Please add support for your architecture in build/build_config.h ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn +@@ -298,3 +298,99 @@ gcc_toolchain("mips64") { is_clang = false } } @@ -368,10 +1013,455 @@ index fa8b17e9d..bd757b4e9 100644 + is_clang = false + } +} -diff --git a/src/3rdparty/chromium/sandbox/features.gni b/src/3rdparty/chromium/sandbox/features.gni -index db30ae6d6..5f1e32f0b 100644 ---- a/src/3rdparty/chromium/sandbox/features.gni -+++ b/src/3rdparty/chromium/sandbox/features.gni ++ ++clang_toolchain("clang_loongarch64") { ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = true ++ } ++} ++ ++gcc_toolchain("loongarch64") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++clang_toolchain("clang_loongarch64") { ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = true ++ } ++} ++ ++gcc_toolchain("loongarch64") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++clang_toolchain("clang_loongarch64") { ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = true ++ } ++} ++ ++gcc_toolchain("loongarch64") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = false ++ } ++} +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn.orig +@@ -0,0 +1,372 @@ ++# Copyright 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/sysroot.gni") ++import("//build/toolchain/gcc_toolchain.gni") ++ ++clang_toolchain("clang_ppc64") { ++ enable_linker_map = true ++ toolchain_args = { ++ current_cpu = "ppc64" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_arm") { ++ toolprefix = "arm-linux-gnueabihf-" ++ toolchain_args = { ++ current_cpu = "arm" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_arm64") { ++ toolprefix = "aarch64-linux-gnu-" ++ toolchain_args = { ++ current_cpu = "arm64" ++ current_os = "linux" ++ } ++} ++ ++gcc_toolchain("arm64") { ++ toolprefix = "aarch64-linux-gnu-" ++ ++ cc = "${toolprefix}gcc" ++ cxx = "${toolprefix}g++" ++ ++ ar = "${toolprefix}ar" ++ ld = cxx ++ readelf = "${toolprefix}readelf" ++ nm = "${toolprefix}nm" ++ ++ toolchain_args = { ++ current_cpu = "arm64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++gcc_toolchain("arm") { ++ toolprefix = "arm-linux-gnueabihf-" ++ ++ cc = "${toolprefix}gcc" ++ cxx = "${toolprefix}g++" ++ ++ ar = "${toolprefix}ar" ++ ld = cxx ++ readelf = "${toolprefix}readelf" ++ nm = "${toolprefix}nm" ++ ++ toolchain_args = { ++ current_cpu = "arm" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++clang_toolchain("clang_x86") { ++ # Output linker map files for binary size analysis. ++ enable_linker_map = true ++ ++ toolchain_args = { ++ current_cpu = "x86" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_x86_v8_arm") { ++ toolchain_args = { ++ current_cpu = "x86" ++ v8_current_cpu = "arm" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_x86_v8_mipsel") { ++ toolchain_args = { ++ current_cpu = "x86" ++ v8_current_cpu = "mipsel" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_x86_v8_mips") { ++ toolchain_args = { ++ current_cpu = "x86" ++ v8_current_cpu = "mips" ++ current_os = "linux" ++ } ++} ++ ++gcc_toolchain("x86") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ # Output linker map files for binary size analysis. ++ enable_linker_map = true ++ ++ toolchain_args = { ++ current_cpu = "x86" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++clang_toolchain("clang_x64") { ++ # Output linker map files for binary size analysis. ++ enable_linker_map = true ++ ++ toolchain_args = { ++ current_cpu = "x64" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_x64_v8_arm64") { ++ toolchain_args = { ++ current_cpu = "x64" ++ v8_current_cpu = "arm64" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_x64_v8_mips64el") { ++ toolchain_args = { ++ current_cpu = "x64" ++ v8_current_cpu = "mips64el" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_x64_v8_mips64") { ++ toolchain_args = { ++ current_cpu = "x64" ++ v8_current_cpu = "mips64" ++ current_os = "linux" ++ } ++} ++ ++gcc_toolchain("x64") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ # Output linker map files for binary size analysis. ++ enable_linker_map = true ++ ++ toolchain_args = { ++ current_cpu = "x64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++clang_toolchain("clang_mipsel") { ++ toolchain_args = { ++ current_cpu = "mipsel" ++ current_os = "linux" ++ } ++} ++ ++clang_toolchain("clang_mips64el") { ++ toolchain_args = { ++ current_cpu = "mips64el" ++ current_os = "linux" ++ } ++} ++ ++gcc_toolchain("mipsel") { ++ toolprefix = "mipsel-linux-gnu-" ++ ++ cc = "${toolprefix}gcc" ++ cxx = " ${toolprefix}g++" ++ ar = "${toolprefix}ar" ++ ld = cxx ++ readelf = "${toolprefix}readelf" ++ nm = "${toolprefix}nm" ++ ++ toolchain_args = { ++ cc_wrapper = "" ++ current_cpu = "mipsel" ++ current_os = "linux" ++ is_clang = false ++ use_goma = false ++ } ++} ++ ++gcc_toolchain("mips64el") { ++ toolprefix = "mips64el-linux-gnuabi64-" ++ ++ cc = "${toolprefix}gcc" ++ cxx = "${toolprefix}g++" ++ ar = "${toolprefix}ar" ++ ld = cxx ++ readelf = "${toolprefix}readelf" ++ nm = "${toolprefix}nm" ++ ++ toolchain_args = { ++ cc_wrapper = "" ++ current_cpu = "mips64el" ++ current_os = "linux" ++ is_clang = false ++ use_goma = false ++ } ++} ++ ++clang_toolchain("clang_s390x") { ++ toolchain_args = { ++ current_cpu = "s390x" ++ current_os = "linux" ++ is_clang = true ++ } ++} ++ ++gcc_toolchain("s390x") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "s390x" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++gcc_toolchain("ppc64") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "ppc64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++gcc_toolchain("mips") { ++ toolprefix = "mips-linux-gnu-" ++ ++ cc = "${toolprefix}gcc" ++ cxx = "${toolprefix}g++" ++ ++ readelf = "${toolprefix}readelf" ++ nm = "${toolprefix}nm" ++ ar = "${toolprefix}ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "mips" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++gcc_toolchain("mips64") { ++ toolprefix = "mips64-linux-gnuabi64-" ++ ++ cc = "${toolprefix}gcc" ++ cxx = "${toolprefix}g++" ++ ++ readelf = "${toolprefix}readelf" ++ nm = "${toolprefix}nm" ++ ar = "${toolprefix}ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "mips64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++clang_toolchain("clang_loongarch64") { ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = true ++ } ++} ++ ++gcc_toolchain("loongarch64") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++clang_toolchain("clang_loongarch64") { ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = true ++ } ++} ++ ++gcc_toolchain("loongarch64") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = false ++ } ++} ++ ++clang_toolchain("clang_loongarch64") { ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = true ++ } ++} ++ ++gcc_toolchain("loongarch64") { ++ cc = "gcc" ++ cxx = "g++" ++ ++ readelf = "readelf" ++ nm = "nm" ++ ar = "ar" ++ ld = cxx ++ ++ toolchain_args = { ++ current_cpu = "loongarch64" ++ current_os = "linux" ++ is_clang = false ++ } ++} +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/features.gni ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/features.gni @@ -11,7 +11,8 @@ import("//build/config/nacl/config.gni") use_seccomp_bpf = (is_linux || is_chromeos || is_android) && (current_cpu == "x86" || current_cpu == "x64" || @@ -382,14 +1472,48 @@ index db30ae6d6..5f1e32f0b 100644 use_seccomp_bpf = use_seccomp_bpf || is_nacl_nonsfi -diff --git a/src/3rdparty/chromium/sandbox/linux/bpf_dsl/linux_syscall_ranges.h b/src/3rdparty/chromium/sandbox/linux/bpf_dsl/linux_syscall_ranges.h -index 642ceddae..62f64a93b 100644 ---- a/src/3rdparty/chromium/sandbox/linux/bpf_dsl/linux_syscall_ranges.h -+++ b/src/3rdparty/chromium/sandbox/linux/bpf_dsl/linux_syscall_ranges.h -@@ -49,6 +49,13 @@ +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/features.gni.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/sandbox/features.gni +++++ src/3rdparty/chromium/sandbox/features.gni ++@@ -11,7 +11,8 @@ import("//build/config/nacl/config.gni") ++ use_seccomp_bpf = (is_linux || is_chromeos || is_android) && ++ (current_cpu == "x86" || current_cpu == "x64" || ++ current_cpu == "arm" || current_cpu == "arm64" || ++- current_cpu == "mipsel" || current_cpu == "mips64el") +++ current_cpu == "mipsel" || current_cpu == "mips64el" || +++ current_cpu == "loongarch64") ++ ++ use_seccomp_bpf = use_seccomp_bpf || is_nacl_nonsfi ++ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/bpf_dsl/linux_syscall_ranges.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/bpf_dsl/linux_syscall_ranges.h +@@ -49,6 +49,34 @@ #define MAX_PUBLIC_SYSCALL __NR_syscalls #define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++#elif defined(__loongarch64) ++ ++#include ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL __NR_syscalls ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(__loongarch64) ++ ++#include ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL __NR_syscalls ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(__loongarch64) ++ ++#include ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL __NR_syscalls ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ +#elif defined(__loongarch64) + +#include @@ -400,10 +1524,95 @@ index 642ceddae..62f64a93b 100644 #else #error "Unsupported architecture" #endif -diff --git a/src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h b/src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h -index 1a407b952..10780b4be 100644 ---- a/src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h -+++ b/src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/bpf_dsl/linux_syscall_ranges.h.orig +@@ -0,0 +1,84 @@ ++// Copyright 2015 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef SANDBOX_LINUX_BPF_DSL_LINUX_SYSCALL_RANGES_H_ ++#define SANDBOX_LINUX_BPF_DSL_LINUX_SYSCALL_RANGES_H_ ++ ++#include "build/build_config.h" ++ ++#if defined(__x86_64__) ++ ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL 1024u ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(__i386__) ++ ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL 1024u ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(__arm__) && (defined(__thumb__) || defined(__ARM_EABI__)) ++ ++// ARM EABI includes "ARM private" system calls starting at |__ARM_NR_BASE|, ++// and a "ghost syscall private to the kernel", cmpxchg, ++// at |__ARM_NR_BASE+0x00fff0|. ++// See in the Linux kernel. ++ ++// __NR_SYSCALL_BASE is 0 in thumb and ARM EABI. ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL (MIN_SYSCALL + 1024u) ++// __ARM_NR_BASE is __NR_SYSCALL_BASE + 0xf0000u ++#define MIN_PRIVATE_SYSCALL 0xf0000u ++#define MAX_PRIVATE_SYSCALL (MIN_PRIVATE_SYSCALL + 16u) ++#define MIN_GHOST_SYSCALL (MIN_PRIVATE_SYSCALL + 0xfff0u) ++#define MAX_SYSCALL (MIN_GHOST_SYSCALL + 4u) ++ ++#elif defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS) ++ ++#include // for __NR_O32_Linux and __NR_Linux_syscalls ++#define MIN_SYSCALL __NR_O32_Linux ++#define MAX_PUBLIC_SYSCALL (MIN_SYSCALL + __NR_Linux_syscalls) ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS) ++ ++#include // for __NR_64_Linux and __NR_64_Linux_syscalls ++#define MIN_SYSCALL __NR_64_Linux ++#define MAX_PUBLIC_SYSCALL (MIN_SYSCALL + __NR_64_Linux_syscalls) ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(__aarch64__) ++ ++#include ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL __NR_syscalls ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(__loongarch64) ++ ++#include ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL __NR_syscalls ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(__loongarch64) ++ ++#include ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL __NR_syscalls ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#elif defined(__loongarch64) ++ ++#include ++#define MIN_SYSCALL 0u ++#define MAX_PUBLIC_SYSCALL __NR_syscalls ++#define MAX_SYSCALL MAX_PUBLIC_SYSCALL ++ ++#else ++#error "Unsupported architecture" ++#endif ++ ++#endif // SANDBOX_LINUX_BPF_DSL_LINUX_SYSCALL_RANGES_H_ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h @@ -346,6 +346,52 @@ struct regs_struct { #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3] #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4] @@ -457,11 +1666,67 @@ index 1a407b952..10780b4be 100644 #else #error Unsupported target platform -diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -index a340f579e..cfde6ebda 100644 ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -@@ -181,7 +181,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h.rej +@@ -0,0 +1,55 @@ ++--- src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h +++++ src/3rdparty/chromium/sandbox/linux/bpf_dsl/seccomp_macros.h ++@@ -346,6 +346,52 @@ struct regs_struct { ++ #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3] ++ #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4] ++ #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5] +++ +++#elif defined(__loongarch64) +++struct regs_struct // TODO:MT +++{ +++ uint64_t regs[32]; +++ uint64_t orig_a0; +++ uint64_t csr_era; +++ uint64_t csr_badv; +++ uint64_t reserved[10]; +++}; +++ +++#define SECCOMP_ARCH AUDIT_ARCH_LOONGARCH64 +++ +++#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.__gregs[_reg]) +++ +++#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 4) +++#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 11) +++#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.__pc +++#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 4) +++#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 5) +++#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 6) +++#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, 7) +++#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, 8) +++#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, 9) +++ +++#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr)) +++#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch)) +++#define SECCOMP_IP_MSB_IDX \ +++ (offsetof(struct arch_seccomp_data, instruction_pointer) + 4) +++#define SECCOMP_IP_LSB_IDX \ +++ (offsetof(struct arch_seccomp_data, instruction_pointer) + 0) +++#define SECCOMP_ARG_MSB_IDX(nr) \ +++ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4) +++#define SECCOMP_ARG_LSB_IDX(nr) \ +++ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0) +++ +++#define SECCOMP_PT_RESULT(_regs) (_regs).regs[4] +++#define SECCOMP_PT_SYSCALL(_regs) (_regs).regs[11] +++#define SECCOMP_PT_IP(_regs) (_regs).csr_era +++#define SECCOMP_PT_PARM1(_regs) (_regs).regs[4] +++#define SECCOMP_PT_PARM2(_regs) (_regs).regs[5] +++#define SECCOMP_PT_PARM3(_regs) (_regs).regs[6] +++#define SECCOMP_PT_PARM4(_regs) (_regs).regs[7] +++#define SECCOMP_PT_PARM5(_regs) (_regs).regs[8] +++#define SECCOMP_PT_PARM6(_regs) (_regs).regs[9] +++ ++ #else ++ #error Unsupported target platform ++ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +@@ -181,7 +181,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de return RestrictFcntlCommands(); #endif @@ -470,7 +1735,7 @@ index a340f579e..cfde6ebda 100644 // fork() is never used as a system call (clone() is used instead), but we // have seen it in fallback code on Android. if (sysno == __NR_fork) { -@@ -231,7 +231,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, +@@ -231,7 +231,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de } #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -479,7 +1744,7 @@ index a340f579e..cfde6ebda 100644 if (sysno == __NR_mmap) return RestrictMmapFlags(); #endif -@@ -249,7 +249,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, +@@ -249,7 +249,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de return RestrictPrctl(); #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -488,7 +1753,7 @@ index a340f579e..cfde6ebda 100644 if (sysno == __NR_socketpair) { // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen. static_assert(AF_UNIX == PF_UNIX, -@@ -269,12 +269,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, +@@ -269,12 +269,14 @@ ResultExpr EvaluateSyscallImpl(int fs_de return RestrictKillTarget(current_pid, sysno); } @@ -503,11 +1768,420 @@ index a340f579e..cfde6ebda 100644 // The statx syscall is a filesystem syscall, which will be denied below with // fs_denied_errno. However, on some platforms, glibc will default to statx -diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc -index 13e71801f..a03107de6 100644 ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc -@@ -359,6 +359,7 @@ intptr_t SIGSYSSchedHandler(const struct arch_seccomp_data& args, +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.orig +@@ -0,0 +1,361 @@ ++// Copyright (c) 2013 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "base/check_op.h" ++#include "base/clang_profiling_buildflags.h" ++#include "build/build_config.h" ++#include "sandbox/linux/bpf_dsl/bpf_dsl.h" ++#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h" ++#include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h" ++#include "sandbox/linux/seccomp-bpf-helpers/syscall_sets.h" ++#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" ++#include "sandbox/linux/services/syscall_wrappers.h" ++#include "sandbox/linux/system_headers/linux_stat.h" ++#include "sandbox/linux/system_headers/linux_syscalls.h" ++ ++#if !defined(SO_PEEK_OFF) ++#define SO_PEEK_OFF 42 ++#endif ++ ++// Changing this implementation will have an effect on *all* policies. ++// Currently this means: Renderer/Worker, GPU, Flash and NaCl. ++ ++using sandbox::bpf_dsl::Allow; ++using sandbox::bpf_dsl::Arg; ++using sandbox::bpf_dsl::Error; ++using sandbox::bpf_dsl::If; ++using sandbox::bpf_dsl::ResultExpr; ++ ++namespace sandbox { ++ ++namespace { ++ ++bool IsBaselinePolicyAllowed(int sysno) { ++ return SyscallSets::IsAllowedAddressSpaceAccess(sysno) || ++ SyscallSets::IsAllowedBasicScheduler(sysno) || ++ SyscallSets::IsAllowedEpoll(sysno) || ++ SyscallSets::IsAllowedFileSystemAccessViaFd(sysno) || ++ SyscallSets::IsAllowedFutex(sysno) || ++ SyscallSets::IsAllowedGeneralIo(sysno) || ++ SyscallSets::IsAllowedGetOrModifySocket(sysno) || ++ SyscallSets::IsAllowedGettime(sysno) || ++ SyscallSets::IsAllowedProcessStartOrDeath(sysno) || ++ SyscallSets::IsAllowedSignalHandling(sysno) || ++ SyscallSets::IsGetSimpleId(sysno) || ++ SyscallSets::IsKernelInternalApi(sysno) || ++#if defined(__arm__) ++ SyscallSets::IsArmPrivate(sysno) || ++#endif ++#if defined(__mips__) ++ SyscallSets::IsMipsPrivate(sysno) || ++#endif ++ SyscallSets::IsAllowedOperationOnFd(sysno); ++} ++ ++// System calls that will trigger the crashing SIGSYS handler. ++bool IsBaselinePolicyWatched(int sysno) { ++ return SyscallSets::IsAdminOperation(sysno) || ++ SyscallSets::IsAdvancedScheduler(sysno) || ++ SyscallSets::IsAdvancedTimer(sysno) || ++ SyscallSets::IsAsyncIo(sysno) || ++ SyscallSets::IsDebug(sysno) || ++ SyscallSets::IsEventFd(sysno) || ++ SyscallSets::IsExtendedAttributes(sysno) || ++ SyscallSets::IsFaNotify(sysno) || ++ SyscallSets::IsFsControl(sysno) || ++ SyscallSets::IsGlobalFSViewChange(sysno) || ++ SyscallSets::IsGlobalProcessEnvironment(sysno) || ++ SyscallSets::IsGlobalSystemStatus(sysno) || ++ SyscallSets::IsInotify(sysno) || ++ SyscallSets::IsKernelModule(sysno) || ++ SyscallSets::IsKeyManagement(sysno) || ++ SyscallSets::IsKill(sysno) || ++ SyscallSets::IsMessageQueue(sysno) || ++ SyscallSets::IsMisc(sysno) || ++#if defined(__x86_64__) ++ SyscallSets::IsNetworkSocketInformation(sysno) || ++#endif ++ SyscallSets::IsNuma(sysno) || ++ SyscallSets::IsPrctl(sysno) || ++ SyscallSets::IsProcessGroupOrSession(sysno) || ++#if defined(__i386__) || \ ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++ SyscallSets::IsSocketCall(sysno) || ++#endif ++#if defined(__arm__) ++ SyscallSets::IsArmPciConfig(sysno) || ++#endif ++#if defined(__mips__) ++ SyscallSets::IsMipsMisc(sysno) || ++#endif ++ SyscallSets::IsTimer(sysno); ++} ++ ++// |fs_denied_errno| is the errno return for denied filesystem access. ++ResultExpr EvaluateSyscallImpl(int fs_denied_errno, ++ pid_t current_pid, ++ int sysno) { ++#if defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || \ ++ defined(MEMORY_SANITIZER) ++ // TCGETS is required by the sanitizers on failure. ++ if (sysno == __NR_ioctl) { ++ return RestrictIoctl(); ++ } ++ ++ if (sysno == __NR_sched_getaffinity) { ++ return Allow(); ++ } ++ ++ // Used when RSS limiting is enabled in sanitizers. ++ if (sysno == __NR_getrusage) { ++ return RestrictGetrusage(); ++ } ++ ++ if (sysno == __NR_sigaltstack) { ++ // Required for better stack overflow detection in ASan. Disallowed in ++ // non-ASan builds. ++ return Allow(); ++ } ++#endif // defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || ++ // defined(MEMORY_SANITIZER) ++ ++#if BUILDFLAG(CLANG_PROFILING_INSIDE_SANDBOX) ++ if (SyscallSets::IsPrctl(sysno)) { ++ return Allow(); ++ } ++ ++ if (sysno == __NR_ftruncate) { ++ return Allow(); ++ } ++#endif ++ ++ if (IsBaselinePolicyAllowed(sysno)) { ++ return Allow(); ++ } ++ ++#if defined(OS_ANDROID) ++ // Needed for thread creation. ++ if (sysno == __NR_sigaltstack) ++ return Allow(); ++#endif ++ ++#if defined(__NR_rseq) && !defined(OS_ANDROID) ++ // See https://crbug.com/1104160. Rseq can only be disabled right before an ++ // execve, because glibc registers it with the kernel and so far it's unclear ++ // whether shared libraries (which, during initialization, may observe that ++ // rseq is already registered) should have to deal with deregistration. ++ if (sysno == __NR_rseq) ++ return Allow(); ++#endif ++ ++ if (SyscallSets::IsClockApi(sysno)) { ++ return RestrictClockID(); ++ } ++ ++ if (sysno == __NR_clone) { ++ return RestrictCloneToThreadsAndEPERMFork(); ++ } ++ ++ // clone3 takes a pointer argument which we cannot examine, so return ENOSYS ++ // to force the libc to use clone. See https://crbug.com/1213452. ++ if (sysno == __NR_clone3) { ++ return Error(ENOSYS); ++ } ++ ++ if (sysno == __NR_fcntl) ++ return RestrictFcntlCommands(); ++ ++#if defined(__i386__) || defined(__arm__) || \ ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++ if (sysno == __NR_fcntl64) ++ return RestrictFcntlCommands(); ++#endif ++ ++#if !defined(__aarch64__) ++ // fork() is never used as a system call (clone() is used instead), but we ++ // have seen it in fallback code on Android. ++ if (sysno == __NR_fork) { ++ return Error(EPERM); ++ } ++#endif ++ ++#if defined(__NR_vfork) ++ // vfork() is almost never used as a system call, but some libc versions (e.g. ++ // older versions of bionic) might use it in a posix_spawn() implementation, ++ // which is used by system(); ++ if (sysno == __NR_vfork) { ++ return Error(EPERM); ++ } ++#endif ++ ++ if (sysno == __NR_futex) ++ return RestrictFutex(); ++ ++ if (sysno == __NR_set_robust_list) ++ return Error(EPERM); ++ ++ if (sysno == __NR_getpriority || sysno ==__NR_setpriority) ++ return RestrictGetSetpriority(current_pid); ++ ++ if (sysno == __NR_getrandom) { ++ return RestrictGetRandom(); ++ } ++ ++ if (sysno == __NR_madvise) { ++ // Only allow MADV_DONTNEED, MADV_RANDOM, MADV_NORMAL and MADV_FREE. ++ const Arg advice(2); ++ return If(AnyOf(advice == MADV_DONTNEED, ++ advice == MADV_RANDOM, ++ advice == MADV_NORMAL ++#if defined(MADV_FREE) ++ // MADV_FREE was introduced in Linux 4.5 and started being ++ // defined in glibc 2.24. ++ , advice == MADV_FREE ++#endif ++ ), Allow()).Else(Error(EPERM)); ++ } ++ ++#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ ++ defined(__aarch64__) ++ if (sysno == __NR_mmap) ++ return RestrictMmapFlags(); ++#endif ++ ++#if defined(__i386__) || defined(__arm__) || \ ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++ if (sysno == __NR_mmap2) ++ return RestrictMmapFlags(); ++#endif ++ ++ if (sysno == __NR_mprotect) ++ return RestrictMprotectFlags(); ++ ++ if (sysno == __NR_prctl) ++ return RestrictPrctl(); ++ ++#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ ++ defined(__aarch64__) ++ if (sysno == __NR_socketpair) { ++ // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen. ++ static_assert(AF_UNIX == PF_UNIX, ++ "af_unix and pf_unix should not be different"); ++ const Arg domain(0); ++ return If(domain == AF_UNIX, Allow()).Else(CrashSIGSYS()); ++ } ++#endif ++ ++ // On Android, for https://crbug.com/701137. ++ // On Desktop, for https://crbug.com/741984. ++ if (sysno == __NR_mincore) { ++ return Allow(); ++ } ++ ++ if (SyscallSets::IsKill(sysno)) { ++ return RestrictKillTarget(current_pid, sysno); ++ } ++ ++ // The fstatat syscalls are file system syscalls, which will be denied below ++ // with fs_denied_errno. However some allowed fstat syscalls are rewritten by ++ // libc implementations to fstatat syscalls, and we need to rewrite them back. ++ if (sysno == __NR_fstatat_default) { ++ return RewriteFstatatSIGSYS(fs_denied_errno); ++ } ++ ++ // The statx syscall is a filesystem syscall, which will be denied below with ++ // fs_denied_errno. However, on some platforms, glibc will default to statx ++ // for normal stat-family calls. Unfortunately there's no way to rewrite statx ++ // to something safe using a signal handler. Returning ENOSYS will cause glibc ++ // to fallback to old stat paths. ++ if (sysno == __NR_statx) { ++ const Arg mask(3); ++ return If(mask == STATX_BASIC_STATS, Error(ENOSYS)) ++ .Else(Error(fs_denied_errno)); ++ } ++ ++ if (SyscallSets::IsFileSystem(sysno) || ++ SyscallSets::IsCurrentDirectory(sysno)) { ++ return Error(fs_denied_errno); ++ } ++ ++ if (SyscallSets::IsSeccomp(sysno)) ++ return Error(EPERM); ++ ++ if (SyscallSets::IsAnySystemV(sysno)) { ++ return Error(EPERM); ++ } ++ ++ if (SyscallSets::IsUmask(sysno) || ++ SyscallSets::IsDeniedFileSystemAccessViaFd(sysno) || ++ SyscallSets::IsDeniedGetOrModifySocket(sysno) || ++ SyscallSets::IsProcessPrivilegeChange(sysno)) { ++ return Error(EPERM); ++ } ++ ++#if defined(__i386__) || \ ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++ if (SyscallSets::IsSocketCall(sysno)) ++ return RestrictSocketcallCommand(); ++#endif ++ ++#if !defined(__i386__) ++ if (sysno == __NR_getsockopt || sysno ==__NR_setsockopt) { ++ // Used by Mojo EDK to catch a message pipe being sent over itself. ++ const Arg level(1); ++ const Arg optname(2); ++ return If(AllOf(level == SOL_SOCKET, optname == SO_PEEK_OFF), Allow()) ++ .Else(CrashSIGSYS()); ++ } ++#endif ++ ++ if (IsBaselinePolicyWatched(sysno)) { ++ // Previously unseen syscalls. TODO(jln): some of these should ++ // be denied gracefully right away. ++ return CrashSIGSYS(); ++ } ++ ++ // In any other case crash the program with our SIGSYS handler. ++ return CrashSIGSYS(); ++} ++ ++} // namespace. ++ ++BaselinePolicy::BaselinePolicy() : BaselinePolicy(EPERM) { ++ // Allocate crash keys set by Seccomp signal handlers. ++ AllocateCrashKeys(); ++} ++ ++BaselinePolicy::BaselinePolicy(int fs_denied_errno) ++ : fs_denied_errno_(fs_denied_errno), policy_pid_(sys_getpid()) { ++} ++ ++BaselinePolicy::~BaselinePolicy() { ++ // Make sure that this policy is created, used and destroyed by a single ++ // process. ++ DCHECK_EQ(sys_getpid(), policy_pid_); ++} ++ ++ResultExpr BaselinePolicy::EvaluateSyscall(int sysno) const { ++ // Sanity check that we're only called with valid syscall numbers. ++ DCHECK(SandboxBPF::IsValidSyscallNumber(sysno)); ++ // Make sure that this policy is used in the creating process. ++ if (1 == sysno) { ++ DCHECK_EQ(sys_getpid(), policy_pid_); ++ } ++ return EvaluateSyscallImpl(fs_denied_errno_, policy_pid_, sysno); ++} ++ ++ResultExpr BaselinePolicy::InvalidSyscall() const { ++ return CrashSIGSYS(); ++} ++ ++} // namespace sandbox. +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.rej +@@ -0,0 +1,44 @@ ++--- src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +++++ src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++@@ -181,7 +181,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, ++ return RestrictFcntlCommands(); ++ #endif ++ ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ // fork() is never used as a system call (clone() is used instead), but we ++ // have seen it in fallback code on Android. ++ if (sysno == __NR_fork) { ++@@ -231,7 +231,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, ++ } ++ ++ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ if (sysno == __NR_mmap) ++ return RestrictMmapFlags(); ++ #endif ++@@ -249,7 +249,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, ++ return RestrictPrctl(); ++ ++ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ if (sysno == __NR_socketpair) { ++ // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen. ++ static_assert(AF_UNIX == PF_UNIX, ++@@ -269,12 +269,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, ++ return RestrictKillTarget(current_pid, sysno); ++ } ++ +++#if !defined(__loongarch64) ++ // The fstatat syscalls are file system syscalls, which will be denied below ++ // with fs_denied_errno. However some allowed fstat syscalls are rewritten by ++ // libc implementations to fstatat syscalls, and we need to rewrite them back. ++ if (sysno == __NR_fstatat_default) { ++ return RewriteFstatatSIGSYS(fs_denied_errno); ++ } +++#endif ++ ++ // The statx syscall is a filesystem syscall, which will be denied below with ++ // fs_denied_errno. However, on some platforms, glibc will default to statx +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc +@@ -359,6 +359,7 @@ intptr_t SIGSYSSchedHandler(const struct intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, void* fs_denied_errno) { @@ -515,7 +2189,7 @@ index 13e71801f..a03107de6 100644 if (args.nr == __NR_fstatat_default) { if (*reinterpret_cast(args.args[1]) == '\0' && args.args[3] == static_cast(AT_EMPTY_PATH)) { -@@ -367,6 +368,7 @@ intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, +@@ -367,6 +368,7 @@ intptr_t SIGSYSFstatatHandler(const stru } return -reinterpret_cast(fs_denied_errno); } @@ -523,10 +2197,29 @@ index 13e71801f..a03107de6 100644 CrashSIGSYS_Handler(args, fs_denied_errno); -diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -index da22c8f1a..121505922 100644 ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc.rej +@@ -0,0 +1,18 @@ ++--- src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc +++++ src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc ++@@ -359,6 +359,7 @@ intptr_t SIGSYSSchedHandler(const struct arch_seccomp_data& args, ++ ++ intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, ++ void* fs_denied_errno) { +++#if !defined(__loongarch64) ++ if (args.nr == __NR_fstatat_default) { ++ if (*reinterpret_cast(args.args[1]) == '\0' && ++ args.args[3] == static_cast(AT_EMPTY_PATH)) { ++@@ -367,6 +368,7 @@ intptr_t SIGSYSFstatatHandler(const struct arch_seccomp_data& args, ++ } ++ return -reinterpret_cast(fs_denied_errno); ++ } +++#endif ++ ++ CrashSIGSYS_Handler(args, fs_denied_errno); ++ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc @@ -37,7 +37,8 @@ #include #include @@ -537,10 +2230,23 @@ index da22c8f1a..121505922 100644 // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA. // asm/ptrace-abi.h doesn't exist on arm32 and PTRACE_GET_THREAD_AREA isn't -diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index d1ea8e99a..73dd369c5 100644 ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +++++ src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++@@ -37,7 +37,8 @@ ++ #include ++ #include ++ #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(__arm__) && \ ++- !defined(__aarch64__) && !defined(PTRACE_GET_THREAD_AREA) +++ !defined(__aarch64__) && !defined(__loongarch__) && \ +++ !defined(PTRACE_GET_THREAD_AREA) ++ // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance ++ // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA. ++ // asm/ptrace-abi.h doesn't exist on arm32 and PTRACE_GET_THREAD_AREA isn't +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc @@ -86,7 +86,7 @@ bool SyscallSets::IsUmask(int sysno) { // Both EPERM and ENOENT are valid errno unless otherwise noted in comment. bool SyscallSets::IsFileSystem(int sysno) { @@ -550,7 +2256,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_access: // EPERM not a valid errno. case __NR_chmod: case __NR_chown: -@@ -174,10 +174,15 @@ bool SyscallSets::IsFileSystem(int sysno) { +@@ -174,11 +174,16 @@ bool SyscallSets::IsFileSystem(int sysno bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) { switch (sysno) { @@ -560,13 +2266,14 @@ index d1ea8e99a..73dd369c5 100644 #if defined(__i386__) || defined(__arm__) || \ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) case __NR_fstat64: -+#endif + #endif +#if defined(__loongarch64) + case __NR_statx: - #endif ++#endif return true; // TODO(jln): these should be denied gracefully as well (moved below). -@@ -202,7 +207,7 @@ bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) { + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) +@@ -202,7 +207,7 @@ bool SyscallSets::IsAllowedFileSystemAcc case __NR_oldfstat: #endif #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -575,7 +2282,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_sync_file_range: // EPERM not a valid errno. #elif defined(__arm__) case __NR_arm_sync_file_range: // EPERM not a valid errno. -@@ -226,7 +231,7 @@ bool SyscallSets::IsDeniedFileSystemAccessViaFd(int sysno) { +@@ -226,7 +231,7 @@ bool SyscallSets::IsDeniedFileSystemAcce (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) case __NR_ftruncate64: #endif @@ -584,7 +2291,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_getdents: // EPERM not a valid errno. #endif case __NR_getdents64: // EPERM not a valid errno. -@@ -305,7 +310,7 @@ bool SyscallSets::IsProcessPrivilegeChange(int sysno) { +@@ -305,7 +310,7 @@ bool SyscallSets::IsProcessPrivilegeChan bool SyscallSets::IsProcessGroupOrSession(int sysno) { switch (sysno) { case __NR_setpgid: @@ -593,7 +2300,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_getpgrp: #endif case __NR_setsid: -@@ -334,7 +339,7 @@ bool SyscallSets::IsAllowedSignalHandling(int sysno) { +@@ -334,7 +339,7 @@ bool SyscallSets::IsAllowedSignalHandlin case __NR_rt_sigsuspend: case __NR_rt_tgsigqueueinfo: case __NR_sigaltstack: @@ -602,7 +2309,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_signalfd: #endif case __NR_signalfd4: -@@ -358,12 +363,12 @@ bool SyscallSets::IsAllowedOperationOnFd(int sysno) { +@@ -358,12 +363,12 @@ bool SyscallSets::IsAllowedOperationOnFd switch (sysno) { case __NR_close: case __NR_dup: @@ -617,7 +2324,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_shutdown: #endif return true; -@@ -402,7 +407,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { +@@ -402,7 +407,7 @@ bool SyscallSets::IsAllowedProcessStartO return true; case __NR_clone: // Should be parameter-restricted. case __NR_setns: // Privileged. @@ -626,7 +2333,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_fork: #endif #if defined(__i386__) || defined(__x86_64__) -@@ -413,7 +418,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { +@@ -413,7 +418,7 @@ bool SyscallSets::IsAllowedProcessStartO #endif case __NR_set_tid_address: case __NR_unshare: @@ -635,7 +2342,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_vfork: #endif default: -@@ -434,7 +439,7 @@ bool SyscallSets::IsAllowedFutex(int sysno) { +@@ -434,7 +439,7 @@ bool SyscallSets::IsAllowedFutex(int sys bool SyscallSets::IsAllowedEpoll(int sysno) { switch (sysno) { @@ -644,7 +2351,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_epoll_create: case __NR_epoll_wait: #endif -@@ -455,7 +460,7 @@ bool SyscallSets::IsAllowedEpoll(int sysno) { +@@ -455,7 +460,7 @@ bool SyscallSets::IsAllowedEpoll(int sys bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { switch (sysno) { @@ -653,7 +2360,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_pipe: #endif case __NR_pipe2: -@@ -472,7 +477,7 @@ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { +@@ -472,7 +477,7 @@ bool SyscallSets::IsAllowedGetOrModifySo bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) { switch (sysno) { #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -662,7 +2369,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_accept: case __NR_accept4: case __NR_bind: -@@ -501,7 +506,8 @@ bool SyscallSets::IsSocketCall(int sysno) { +@@ -501,7 +506,8 @@ bool SyscallSets::IsSocketCall(int sysno } #endif @@ -672,7 +2379,7 @@ index d1ea8e99a..73dd369c5 100644 bool SyscallSets::IsNetworkSocketInformation(int sysno) { switch (sysno) { case __NR_getpeername: -@@ -526,7 +532,7 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { +@@ -526,7 +532,7 @@ bool SyscallSets::IsAllowedAddressSpaceA case __NR_mincore: case __NR_mlockall: #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -681,7 +2388,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_mmap: #endif #if defined(__i386__) || defined(__arm__) || \ -@@ -559,7 +565,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { +@@ -559,7 +565,7 @@ bool SyscallSets::IsAllowedGeneralIo(int (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) case __NR__llseek: #endif @@ -690,7 +2397,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_poll: #endif case __NR_ppoll: -@@ -572,7 +578,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { +@@ -572,7 +578,7 @@ bool SyscallSets::IsAllowedGeneralIo(int case __NR_recv: #endif #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -699,7 +2406,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_recvfrom: // Could specify source. case __NR_recvmsg: // Could specify source. #endif -@@ -587,7 +593,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { +@@ -587,7 +593,7 @@ bool SyscallSets::IsAllowedGeneralIo(int case __NR_send: #endif #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -726,7 +2433,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_migrate_pages: #endif case __NR_move_pages: -@@ -750,7 +756,7 @@ bool SyscallSets::IsGlobalProcessEnvironment(int sysno) { +@@ -750,7 +756,7 @@ bool SyscallSets::IsGlobalProcessEnviron switch (sysno) { case __NR_acct: // Privileged. #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -744,7 +2451,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR__sysctl: case __NR_sysfs: #endif -@@ -803,7 +809,7 @@ bool SyscallSets::IsGlobalSystemStatus(int sysno) { +@@ -803,7 +809,7 @@ bool SyscallSets::IsGlobalSystemStatus(i bool SyscallSets::IsEventFd(int sysno) { switch (sysno) { @@ -753,7 +2460,7 @@ index d1ea8e99a..73dd369c5 100644 case __NR_eventfd: #endif case __NR_eventfd2: -@@ -839,7 +845,8 @@ bool SyscallSets::IsKeyManagement(int sysno) { +@@ -839,7 +845,8 @@ bool SyscallSets::IsKeyManagement(int sy } #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ @@ -763,7 +2470,7 @@ index d1ea8e99a..73dd369c5 100644 bool SyscallSets::IsSystemVSemaphores(int sysno) { switch (sysno) { case __NR_semctl: -@@ -855,7 +862,8 @@ bool SyscallSets::IsSystemVSemaphores(int sysno) { +@@ -855,7 +862,8 @@ bool SyscallSets::IsSystemVSemaphores(in #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ defined(__aarch64__) || \ @@ -773,7 +2480,7 @@ index d1ea8e99a..73dd369c5 100644 // These give a lot of ambient authority and bypass the setuid sandbox. bool SyscallSets::IsSystemVSharedMemory(int sysno) { switch (sysno) { -@@ -871,7 +879,8 @@ bool SyscallSets::IsSystemVSharedMemory(int sysno) { +@@ -871,7 +879,8 @@ bool SyscallSets::IsSystemVSharedMemory( #endif #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ @@ -783,7 +2490,7 @@ index d1ea8e99a..73dd369c5 100644 bool SyscallSets::IsSystemVMessageQueue(int sysno) { switch (sysno) { case __NR_msgctl: -@@ -902,7 +911,8 @@ bool SyscallSets::IsSystemVIpc(int sysno) { +@@ -902,7 +911,8 @@ bool SyscallSets::IsSystemVIpc(int sysno bool SyscallSets::IsAnySystemV(int sysno) { #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ @@ -793,7 +2500,7 @@ index d1ea8e99a..73dd369c5 100644 return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) || IsSystemVSharedMemory(sysno); #elif defined(__i386__) || \ -@@ -935,7 +945,7 @@ bool SyscallSets::IsAdvancedScheduler(int sysno) { +@@ -935,7 +945,7 @@ bool SyscallSets::IsAdvancedScheduler(in bool SyscallSets::IsInotify(int sysno) { switch (sysno) { case __NR_inotify_add_watch: @@ -811,10 +2518,283 @@ index d1ea8e99a..73dd369c5 100644 case __NR_vserver: #endif return true; -diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h -index 0fc7b2b9c..9bebc2b34 100644 ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.rej +@@ -0,0 +1,272 @@ ++--- src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +++++ src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++@@ -86,7 +86,7 @@ bool SyscallSets::IsUmask(int sysno) { ++ // Both EPERM and ENOENT are valid errno unless otherwise noted in comment. ++ bool SyscallSets::IsFileSystem(int sysno) { ++ switch (sysno) { ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_access: // EPERM not a valid errno. ++ case __NR_chmod: ++ case __NR_chown: ++@@ -174,10 +174,15 @@ bool SyscallSets::IsFileSystem(int sysno) { ++ ++ bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) { ++ switch (sysno) { +++#if !defined(__loongarch64) ++ case __NR_fstat: +++#endif ++ #if defined(__i386__) || defined(__arm__) || \ ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++ case __NR_fstat64: +++#endif +++#if defined(__loongarch64) +++ case __NR_statx: ++ #endif ++ return true; ++ // TODO(jln): these should be denied gracefully as well (moved below). ++@@ -202,7 +207,7 @@ bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) { ++ case __NR_oldfstat: ++ #endif ++ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ case __NR_sync_file_range: // EPERM not a valid errno. ++ #elif defined(__arm__) ++ case __NR_arm_sync_file_range: // EPERM not a valid errno. ++@@ -226,7 +231,7 @@ bool SyscallSets::IsDeniedFileSystemAccessViaFd(int sysno) { ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++ case __NR_ftruncate64: ++ #endif ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_getdents: // EPERM not a valid errno. ++ #endif ++ case __NR_getdents64: // EPERM not a valid errno. ++@@ -305,7 +310,7 @@ bool SyscallSets::IsProcessPrivilegeChange(int sysno) { ++ bool SyscallSets::IsProcessGroupOrSession(int sysno) { ++ switch (sysno) { ++ case __NR_setpgid: ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_getpgrp: ++ #endif ++ case __NR_setsid: ++@@ -334,7 +339,7 @@ bool SyscallSets::IsAllowedSignalHandling(int sysno) { ++ case __NR_rt_sigsuspend: ++ case __NR_rt_tgsigqueueinfo: ++ case __NR_sigaltstack: ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_signalfd: ++ #endif ++ case __NR_signalfd4: ++@@ -358,12 +363,12 @@ bool SyscallSets::IsAllowedOperationOnFd(int sysno) { ++ switch (sysno) { ++ case __NR_close: ++ case __NR_dup: ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_dup2: ++ #endif ++ case __NR_dup3: ++ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ case __NR_shutdown: ++ #endif ++ return true; ++@@ -402,7 +407,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { ++ return true; ++ case __NR_clone: // Should be parameter-restricted. ++ case __NR_setns: // Privileged. ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_fork: ++ #endif ++ #if defined(__i386__) || defined(__x86_64__) ++@@ -413,7 +418,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { ++ #endif ++ case __NR_set_tid_address: ++ case __NR_unshare: ++-#if !defined(__mips__) && !defined(__aarch64__) +++#if !defined(__mips__) && !defined(__aarch64__) && !defined(__loongarch__) ++ case __NR_vfork: ++ #endif ++ default: ++@@ -434,7 +439,7 @@ bool SyscallSets::IsAllowedFutex(int sysno) { ++ ++ bool SyscallSets::IsAllowedEpoll(int sysno) { ++ switch (sysno) { ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_epoll_create: ++ case __NR_epoll_wait: ++ #endif ++@@ -455,7 +460,7 @@ bool SyscallSets::IsAllowedEpoll(int sysno) { ++ ++ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { ++ switch (sysno) { ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_pipe: ++ #endif ++ case __NR_pipe2: ++@@ -472,7 +477,7 @@ bool SyscallSets::IsAllowedGetOrModifySocket(int sysno) { ++ bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) { ++ switch (sysno) { ++ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ case __NR_accept: ++ case __NR_accept4: ++ case __NR_bind: ++@@ -501,7 +506,8 @@ bool SyscallSets::IsSocketCall(int sysno) { ++ } ++ #endif ++ ++-#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) +++#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ +++ defined(__loongarch__) ++ bool SyscallSets::IsNetworkSocketInformation(int sysno) { ++ switch (sysno) { ++ case __NR_getpeername: ++@@ -526,7 +532,7 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { ++ case __NR_mincore: ++ case __NR_mlockall: ++ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ case __NR_mmap: ++ #endif ++ #if defined(__i386__) || defined(__arm__) || \ ++@@ -559,7 +565,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++ case __NR__llseek: ++ #endif ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_poll: ++ #endif ++ case __NR_ppoll: ++@@ -572,7 +578,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { ++ case __NR_recv: ++ #endif ++ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ case __NR_recvfrom: // Could specify source. ++ case __NR_recvmsg: // Could specify source. ++ #endif ++@@ -587,7 +593,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { ++ case __NR_send: ++ #endif ++ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ case __NR_sendmsg: // Could specify destination. ++ case __NR_sendto: // Could specify destination. ++ #endif ++@@ -637,7 +643,7 @@ bool SyscallSets::IsSeccomp(int sysno) { ++ bool SyscallSets::IsAllowedBasicScheduler(int sysno) { ++ switch (sysno) { ++ case __NR_sched_yield: ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_pause: ++ #endif ++ case __NR_nanosleep: ++@@ -721,7 +727,7 @@ bool SyscallSets::IsNuma(int sysno) { ++ case __NR_getcpu: ++ case __NR_mbind: ++ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ case __NR_migrate_pages: ++ #endif ++ case __NR_move_pages: ++@@ -750,7 +756,7 @@ bool SyscallSets::IsGlobalProcessEnvironment(int sysno) { ++ switch (sysno) { ++ case __NR_acct: // Privileged. ++ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ case __NR_getrlimit: ++ #endif ++ #if defined(__i386__) || defined(__arm__) ++@@ -785,7 +791,7 @@ bool SyscallSets::IsDebug(int sysno) { ++ ++ bool SyscallSets::IsGlobalSystemStatus(int sysno) { ++ switch (sysno) { ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR__sysctl: ++ case __NR_sysfs: ++ #endif ++@@ -803,7 +809,7 @@ bool SyscallSets::IsGlobalSystemStatus(int sysno) { ++ ++ bool SyscallSets::IsEventFd(int sysno) { ++ switch (sysno) { ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_eventfd: ++ #endif ++ case __NR_eventfd2: ++@@ -839,7 +845,8 @@ bool SyscallSets::IsKeyManagement(int sysno) { ++ } ++ ++ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ ++- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) +++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ +++ defined(__loongarch64) ++ bool SyscallSets::IsSystemVSemaphores(int sysno) { ++ switch (sysno) { ++ case __NR_semctl: ++@@ -855,7 +862,8 @@ bool SyscallSets::IsSystemVSemaphores(int sysno) { ++ ++ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ ++ defined(__aarch64__) || \ ++- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) +++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ +++ defined(__loongarch64) ++ // These give a lot of ambient authority and bypass the setuid sandbox. ++ bool SyscallSets::IsSystemVSharedMemory(int sysno) { ++ switch (sysno) { ++@@ -871,7 +879,8 @@ bool SyscallSets::IsSystemVSharedMemory(int sysno) { ++ #endif ++ ++ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ ++- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) +++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ +++ defined(__loongarch64) ++ bool SyscallSets::IsSystemVMessageQueue(int sysno) { ++ switch (sysno) { ++ case __NR_msgctl: ++@@ -902,7 +911,8 @@ bool SyscallSets::IsSystemVIpc(int sysno) { ++ ++ bool SyscallSets::IsAnySystemV(int sysno) { ++ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ ++- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) +++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ +++ defined(__loongarch64) ++ return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) || ++ IsSystemVSharedMemory(sysno); ++ #elif defined(__i386__) || \ ++@@ -935,7 +945,7 @@ bool SyscallSets::IsAdvancedScheduler(int sysno) { ++ bool SyscallSets::IsInotify(int sysno) { ++ switch (sysno) { ++ case __NR_inotify_add_watch: ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_inotify_init: ++ #endif ++ case __NR_inotify_init1: ++@@ -1066,7 +1076,7 @@ bool SyscallSets::IsMisc(int sysno) { ++ #if defined(__x86_64__) ++ case __NR_tuxcall: ++ #endif ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_vserver: ++ #endif ++ return true; +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h @@ -49,7 +49,7 @@ class SANDBOX_EXPORT SyscallSets { #endif @@ -849,10 +2829,47 @@ index 0fc7b2b9c..9bebc2b34 100644 static bool IsSystemVMessageQueue(int sysno); #endif -diff --git a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc -index e47e98bf5..609ea6588 100644 ---- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc -+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h.rej +@@ -0,0 +1,36 @@ ++--- src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h +++++ src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h ++@@ -49,7 +49,7 @@ class SANDBOX_EXPORT SyscallSets { ++ #endif ++ ++ #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch__) ++ static bool IsNetworkSocketInformation(int sysno); ++ #endif ++ ++@@ -72,18 +72,21 @@ class SANDBOX_EXPORT SyscallSets { ++ static bool IsAsyncIo(int sysno); ++ static bool IsKeyManagement(int sysno); ++ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ ++- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) +++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ +++ defined(__loongarch64) ++ static bool IsSystemVSemaphores(int sysno); ++ #endif ++ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ ++ defined(__aarch64__) || \ ++- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) +++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ +++ defined(__loongarch64) ++ // These give a lot of ambient authority and bypass the setuid sandbox. ++ static bool IsSystemVSharedMemory(int sysno); ++ #endif ++ ++ #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ ++- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) +++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ +++ defined(__loongarch64) ++ static bool IsSystemVMessageQueue(int sysno); ++ #endif ++ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc @@ -18,7 +18,7 @@ namespace sandbox { namespace { @@ -862,7 +2879,7 @@ index e47e98bf5..609ea6588 100644 // Number that's not currently used by any Linux kernel ABIs. const int kInvalidSyscallNumber = 0x351d3; #else -@@ -312,6 +312,25 @@ asm(// We need to be able to tell the kernel exactly where we made a +@@ -312,6 +312,25 @@ asm(// We need to be able to tell the ke "2:ret\n" ".cfi_endproc\n" ".size SyscallAsm, .-SyscallAsm\n" @@ -907,10 +2924,67 @@ index e47e98bf5..609ea6588 100644 #else #error "Unimplemented architecture" #endif -diff --git a/src/3rdparty/chromium/sandbox/linux/services/credentials.cc b/src/3rdparty/chromium/sandbox/linux/services/credentials.cc -index 8be3652fb..38eeeeed2 100644 ---- a/src/3rdparty/chromium/sandbox/linux/services/credentials.cc -+++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc.rej +@@ -0,0 +1,56 @@ ++--- src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc +++++ src/3rdparty/chromium/sandbox/linux/seccomp-bpf/syscall.cc ++@@ -18,7 +18,7 @@ namespace sandbox { ++ namespace { ++ ++ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ ++- defined(ARCH_CPU_MIPS_FAMILY) +++ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_LOONGARCH_FAMILY) ++ // Number that's not currently used by any Linux kernel ABIs. ++ const int kInvalidSyscallNumber = 0x351d3; ++ #else ++@@ -312,6 +312,25 @@ asm(// We need to be able to tell the kernel exactly where we made a ++ "2:ret\n" ++ ".cfi_endproc\n" ++ ".size SyscallAsm, .-SyscallAsm\n" +++#elif defined(__loongarch64) +++ ".text\n" +++ ".global SyscallAsm\n" +++ ".type SyscallAsm, %function\n" +++ "SyscallAsm:\n" +++ "bge $a0, $zero, 1f\n" +++ "la.pcrel $a0, 2f\n" +++ "b 2f\n" +++ "1:ld.d $a5, $a6, 40\n" +++ "ld.d $a4, $a6, 32\n" +++ "ld.d $a3, $a6, 24\n" +++ "ld.d $a2, $a6, 16\n" +++ "ld.d $a1, $a6, 8\n" +++ "move $a7, $a0\n" +++ "ld.d $a0, $a6, 0\n" +++ // Enter the kernel +++ "syscall 0\n" +++ "2:jirl $zero, $ra, 0\n" +++ ".size SyscallAsm, .-SyscallAsm\n" ++ #endif ++ ); // asm ++ ++@@ -429,6 +448,18 @@ intptr_t Syscall::Call(int nr, ++ ret = inout; ++ } ++ +++#elif defined(__loongarch64) +++ intptr_t ret; +++ { +++ register intptr_t inout __asm__("$r4") = nr; +++ register const intptr_t* data __asm__("$r10") = args; +++ asm volatile("bl SyscallAsm\n" +++ : "=r"(inout) +++ : "0"(inout), "r"(data) +++ : "memory", "$r5", "$r6", "$r7", "$r8", "$r9", "$r11", "$r1"); +++ ret = inout; +++ } +++ ++ #else ++ #error "Unimplemented architecture" ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/services/credentials.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/services/credentials.cc @@ -81,7 +81,7 @@ bool ChrootToSafeEmptyDir() { pid_t pid = -1; alignas(16) char stack_buf[PTHREAD_STACK_MIN]; @@ -920,10 +2994,22 @@ index 8be3652fb..38eeeeed2 100644 // The stack grows downward. void* stack = stack_buf + sizeof(stack_buf); #else -diff --git a/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc b/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc -index 3bec18a14..179e13902 100644 ---- a/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc -+++ b/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/services/credentials.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/sandbox/linux/services/credentials.cc +++++ src/3rdparty/chromium/sandbox/linux/services/credentials.cc ++@@ -81,7 +81,7 @@ bool ChrootToSafeEmptyDir() { ++ pid_t pid = -1; ++ alignas(16) char stack_buf[PTHREAD_STACK_MIN]; ++ #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ ++- defined(ARCH_CPU_MIPS_FAMILY) +++ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_LOONGARCH_FAMILY) ++ // The stack grows downward. ++ void* stack = stack_buf + sizeof(stack_buf); ++ #else +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc @@ -61,7 +61,7 @@ long sys_clone(unsigned long flags, #if defined(ARCH_CPU_X86_64) return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls); @@ -996,7 +3082,7 @@ index 3bec18a14..179e13902 100644 res = syscall(__NR_stat, path, stat_buf); #endif if (res == 0) -@@ -279,8 +329,17 @@ int sys_stat(const char* path, struct kernel_stat* stat_buf) { +@@ -279,8 +329,17 @@ int sys_stat(const char* path, struct ke int sys_lstat(const char* path, struct kernel_stat* stat_buf) { int res; #if !defined(__NR_lstat) @@ -1016,11 +3102,106 @@ index 3bec18a14..179e13902 100644 res = syscall(__NR_lstat, path, stat_buf); #endif if (res == 0) -diff --git a/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc b/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc -index 36df5e4b1..4534ca336 100644 ---- a/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc -+++ b/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc -@@ -128,43 +128,45 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc.rej +@@ -0,0 +1,94 @@ ++--- src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc +++++ src/3rdparty/chromium/sandbox/linux/services/syscall_wrappers.cc ++@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags, ++ #if defined(ARCH_CPU_X86_64) ++ return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls); ++ #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \ ++- defined(ARCH_CPU_MIPS_FAMILY) +++ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_LOONGARCH_FAMILY) ++ // CONFIG_CLONE_BACKWARDS defined. ++ return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid); ++ #endif ++@@ -264,11 +264,61 @@ int sys_sigaction(int signum, ++ ++ #endif // !defined(OS_NACL_NONSFI) ++ +++ +++#if defined(ARCH_CPU_LOONGARCH_FAMILY) && defined(ARCH_CPU_64_BITS) +++void statx_to_stat(struct kernel_stat* to, struct kernel_statx* from) { +++ memset(to, 0, sizeof(struct kernel_stat)); +++ to->st_dev = ((from->stx_dev_minor & 0xff) | (from->stx_dev_major << 8) | +++ ((from->stx_dev_minor & ~0xff) << 12)); +++ to->st_rdev = ((from->stx_rdev_minor & 0xff) | (from->stx_rdev_major << 8) | +++ ((from->stx_rdev_minor & ~0xff) << 12)); +++ to->st_ino = from->stx_ino; +++ to->st_mode = from->stx_mode; +++ to->st_nlink = from->stx_nlink; +++ to->st_uid = from->stx_uid; +++ to->st_gid = from->stx_gid; +++ to->st_atime_ = from->stx_atime.tv_sec; +++ to->st_atime_nsec_ = from->stx_atime.tv_nsec; +++ to->st_mtime_ = from->stx_mtime.tv_sec; +++ to->st_mtime_nsec_ = from->stx_mtime.tv_nsec; +++ to->st_ctime_ = from->stx_ctime.tv_sec; +++ to->st_ctime_nsec_ = from->stx_ctime.tv_nsec; +++ to->st_size = from->stx_size; +++ to->st_blocks = from->stx_blocks; +++ to->st_blksize = from->stx_blksize; +++} +++ +++int sys_statx(int fd, +++ const char* path, +++ int flags, +++ unsigned int mask, +++ struct kernel_statx* statx_buf) { +++#if defined(__NR_statx) +++ int res; +++ res = syscall(__NR_statx, fd, path, flags, mask, statx_buf); +++ if (res == 0) +++ MSAN_UNPOISON(stat_buf, sizeof(*stat_buf)); +++ return res; +++#else // defined(__NR_statx) +++ RAW_CHECK(false); +++ return (int)-ENOSYS; +++#endif +++} +++#endif // defined(ARCH_CPU_LOONGARCH_FAMILY) && defined(ARCH_CPU_64_BITS) +++ ++ int sys_stat(const char* path, struct kernel_stat* stat_buf) { ++ int res; ++ #if !defined(__NR_stat) +++#if defined(__NR_statx) && defined(ARCH_CPU_LOONGARCH_FAMILY) && defined(ARCH_CPU_64_BITS) +++ kernel_statx statx_buf; +++ res = sys_statx(AT_FDCWD, path, AT_STATX_SYNC_AS_STAT, STATX_BASIC_STATS, +++ &statx_buf); +++ if (res == 0) +++ statx_to_stat(stat_buf, &statx_buf); +++#else // defined(__NR_statx) && defined(ARCH_CPU_LOONGARCH_FAMILY) && defined(ARCH_CPU_64_BITS) ++ res = syscall(__NR_newfstatat, AT_FDCWD, path, stat_buf, 0); ++-#else +++#endif +++#else // !defined(__NR_stat) ++ res = syscall(__NR_stat, path, stat_buf); ++ #endif ++ if (res == 0) ++@@ -279,8 +329,17 @@ int sys_stat(const char* path, struct kernel_stat* stat_buf) { ++ int sys_lstat(const char* path, struct kernel_stat* stat_buf) { ++ int res; ++ #if !defined(__NR_lstat) ++- res = syscall(__NR_newfstatat, AT_FDCWD, path, stat_buf, AT_SYMLINK_NOFOLLOW); ++-#else +++#if defined(__NR_statx) && defined(ARCH_CPU_LOONGARCH_FAMILY) && defined(ARCH_CPU_64_BITS) +++ kernel_statx statx_buf; +++ int flag = 0; +++ flag = AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW; +++ res = sys_statx(AT_FDCWD, path, flag, STATX_BASIC_STATS, &statx_buf); +++ if (res == 0) +++ statx_to_stat(stat_buf, &statx_buf); +++#else // defined(__NR_statx) && defined(ARCH_CPU_LOONGARCH_FAMILY) && defined(ARCH_CPU_64_BITS) +++ res = syscall(__NR_newfstatat, AT_FDCWD, path, stat_buf, AT_SYMLINK_NOFOLLOW); +++#endif +++#else // !defined(__NR_lstat) ++ res = syscall(__NR_lstat, path, stat_buf); ++ #endif ++ if (res == 0) +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc +@@ -128,43 +128,45 @@ bool BrokerProcess::IsSyscallBrokerable( // and are default disabled in Android. So, we should refuse to broker them // to be consistent with the platform's restrictions. switch (sysno) { @@ -1073,7 +3254,7 @@ index 36df5e4b1..4534ca336 100644 case __NR_stat: case __NR_lstat: #endif -@@ -189,7 +191,7 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { +@@ -189,7 +191,7 @@ bool BrokerProcess::IsSyscallBrokerable( return !fast_check || allowed_command_set_.test(COMMAND_STAT); #endif @@ -1082,10 +3263,75 @@ index 36df5e4b1..4534ca336 100644 case __NR_unlink: return !fast_check || allowed_command_set_.test(COMMAND_UNLINK); #endif -diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h -index 1fa47ed09..b3686e378 100644 ---- a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h -+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc.rej +@@ -0,0 +1,64 @@ ++--- src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc +++++ src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_process.cc ++@@ -128,43 +128,45 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { ++ // and are default disabled in Android. So, we should refuse to broker them ++ // to be consistent with the platform's restrictions. ++ switch (sysno) { ++-#if !defined(__aarch64__) && !defined(OS_ANDROID) +++#if !defined(__aarch64__) && !defined(OS_ANDROID) && !defined(__loongarch64) ++ case __NR_access: ++ #endif ++ case __NR_faccessat: ++ return !fast_check || allowed_command_set_.test(COMMAND_ACCESS); ++ ++-#if !defined(__aarch64__) && !defined(OS_ANDROID) +++#if !defined(__aarch64__) && !defined(OS_ANDROID) && !defined(__loongarch64) ++ case __NR_mkdir: ++ #endif ++ case __NR_mkdirat: ++ return !fast_check || allowed_command_set_.test(COMMAND_MKDIR); ++ ++-#if !defined(__aarch64__) && !defined(OS_ANDROID) +++#if !defined(__aarch64__) && !defined(OS_ANDROID) && !defined(__loongarch64) ++ case __NR_open: ++ #endif ++ case __NR_openat: ++ return !fast_check || allowed_command_set_.test(COMMAND_OPEN); ++ ++-#if !defined(__aarch64__) && !defined(OS_ANDROID) +++#if !defined(__aarch64__) && !defined(OS_ANDROID) && !defined(__loongarch64) ++ case __NR_readlink: ++ #endif ++ case __NR_readlinkat: ++ return !fast_check || allowed_command_set_.test(COMMAND_READLINK); ++ ++-#if !defined(__aarch64__) && !defined(OS_ANDROID) +++#if !defined(__aarch64__) && !defined(OS_ANDROID) && !defined(__loongarch64) ++ case __NR_rename: ++ #endif +++#if !defined(__loongarch64) ++ case __NR_renameat: +++#endif ++ case __NR_renameat2: ++ return !fast_check || allowed_command_set_.test(COMMAND_RENAME); ++ ++-#if !defined(__aarch64__) && !defined(OS_ANDROID) +++#if !defined(__aarch64__) && !defined(OS_ANDROID) && !defined(__loongarch64) ++ case __NR_rmdir: ++ return !fast_check || allowed_command_set_.test(COMMAND_RMDIR); ++ #endif ++ ++-#if !defined(__aarch64__) && !defined(OS_ANDROID) +++#if !defined(__aarch64__) && !defined(OS_ANDROID) && !defined(__loongarch64) ++ case __NR_stat: ++ case __NR_lstat: ++ #endif ++@@ -189,7 +191,7 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { ++ return !fast_check || allowed_command_set_.test(COMMAND_STAT); ++ #endif ++ ++-#if !defined(__aarch64__) && !defined(OS_ANDROID) +++#if !defined(__aarch64__) && !defined(OS_ANDROID) && !defined(__loongarch64) ++ case __NR_unlink: ++ return !fast_check || allowed_command_set_.test(COMMAND_UNLINK); ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h @@ -42,6 +42,10 @@ #define EM_AARCH64 183 #endif @@ -1108,10 +3354,35 @@ index 1fa47ed09..b3686e378 100644 // For prctl.h #ifndef PR_SET_SECCOMP #define PR_SET_SECCOMP 22 -diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h -index f5a736761..9c3b1a62f 100644 ---- a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h -+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h.rej +@@ -0,0 +1,24 @@ ++--- src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h +++++ src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h ++@@ -42,6 +42,10 @@ ++ #define EM_AARCH64 183 ++ #endif ++ +++#ifndef EM_LOONGARCH +++#define EM_LOONGARCH 258 +++#endif +++ ++ #ifndef __AUDIT_ARCH_64BIT ++ #define __AUDIT_ARCH_64BIT 0x80000000 ++ #endif ++@@ -74,6 +78,10 @@ ++ #define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) ++ #endif ++ +++#ifndef AUDIT_ARCH_LOONGARCH64 +++#define AUDIT_ARCH_LOONGARCH64 (EM_LOONGARCH | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE) +++#endif +++ ++ // For prctl.h ++ #ifndef PR_SET_SECCOMP ++ #define PR_SET_SECCOMP 22 +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h @@ -13,7 +13,7 @@ // (not undefined, but defined different values and in different memory // layouts). So, fill the gap here. @@ -1145,10 +3416,46 @@ index f5a736761..9c3b1a62f 100644 LinuxSigSet sa_mask; }; #endif -diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h -index 5f49a9584..65a9606fd 100644 ---- a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h -+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h.rej +@@ -0,0 +1,35 @@ ++--- src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h +++++ src/3rdparty/chromium/sandbox/linux/system_headers/linux_signal.h ++@@ -13,7 +13,7 @@ ++ // (not undefined, but defined different values and in different memory ++ // layouts). So, fill the gap here. ++ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ ++- defined(__aarch64__) +++ defined(__aarch64__) || defined(__loongarch64) ++ ++ #define LINUX_SIGHUP 1 ++ #define LINUX_SIGINT 2 ++@@ -127,6 +127,13 @@ struct LinuxSigSet { ++ struct LinuxSigSet { ++ unsigned long sig[_NSIG_WORDS]; ++ }; +++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) && defined(ARCH_CPU_64_BITS) +++#if !defined(_NSIG_WORDS) +++#define _NSIG_WORDS 1 +++#endif +++struct LinuxSigSet { +++ unsigned long sig[_NSIG_WORDS]; +++}; ++ #else ++ typedef uint64_t LinuxSigSet; ++ #endif ++@@ -142,7 +149,9 @@ struct LinuxSigAction { ++ struct LinuxSigAction { ++ void (*kernel_handler)(int); ++ uint32_t sa_flags; +++#if !defined(ARCH_CPU_LOONGARCH_FAMILY) || defined(SA_RESTORER) ++ void (*sa_restorer)(void); +++#endif ++ LinuxSigSet sa_mask; ++ }; ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h @@ -173,6 +173,57 @@ struct kernel_stat { unsigned int __unused4; unsigned int __unused5; @@ -1207,7 +3514,7 @@ index 5f49a9584..65a9606fd 100644 #endif #if !defined(AT_EMPTY_PATH) -@@ -207,6 +258,20 @@ using default_stat_struct = struct kernel_stat; +@@ -207,6 +258,20 @@ using default_stat_struct = struct kerne #define __NR_fstatat_default __NR_newfstatat #define __NR_fstat_default __NR_fstat @@ -1228,10 +3535,291 @@ index 5f49a9584..65a9606fd 100644 #else #error "one of fstatat64 and newfstatat must be defined" #endif -diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h -index 2b78a0cc3..e9efd8ecb 100644 ---- a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h -+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h.orig +@@ -0,0 +1,196 @@ ++// Copyright 2021 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_STAT_H_ ++#define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_STAT_H_ ++ ++#include ++ ++#include "build/build_config.h" ++#include "sandbox/linux/system_headers/linux_syscalls.h" ++ ++#if defined(ARCH_CPU_MIPS_FAMILY) ++#if defined(ARCH_CPU_64_BITS) ++struct kernel_stat { ++#else ++struct kernel_stat64 { ++#endif ++ unsigned st_dev; ++ unsigned __pad0[3]; ++ unsigned long long st_ino; ++ unsigned st_mode; ++ unsigned st_nlink; ++ unsigned st_uid; ++ unsigned st_gid; ++ unsigned st_rdev; ++ unsigned __pad1[3]; ++ long long st_size; ++ unsigned st_atime_; ++ unsigned st_atime_nsec_; ++ unsigned st_mtime_; ++ unsigned st_mtime_nsec_; ++ unsigned st_ctime_; ++ unsigned st_ctime_nsec_; ++ unsigned st_blksize; ++ unsigned __pad2; ++ unsigned long long st_blocks; ++}; ++#else ++struct kernel_stat64 { ++ unsigned long long st_dev; ++ unsigned char __pad0[4]; ++ unsigned __st_ino; ++ unsigned st_mode; ++ unsigned st_nlink; ++ unsigned st_uid; ++ unsigned st_gid; ++ unsigned long long st_rdev; ++ unsigned char __pad3[4]; ++ long long st_size; ++ unsigned st_blksize; ++ unsigned long long st_blocks; ++ unsigned st_atime_; ++ unsigned st_atime_nsec_; ++ unsigned st_mtime_; ++ unsigned st_mtime_nsec_; ++ unsigned st_ctime_; ++ unsigned st_ctime_nsec_; ++ unsigned long long st_ino; ++}; ++#endif ++ ++#if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) ++struct kernel_stat { ++ /* The kernel headers suggest that st_dev and st_rdev should be 32bit ++ * quantities encoding 12bit major and 20bit minor numbers in an interleaved ++ * format. In reality, we do not see useful data in the top bits. So, ++ * we'll leave the padding in here, until we find a better solution. ++ */ ++ unsigned short st_dev; ++ short pad1; ++ unsigned st_ino; ++ unsigned short st_mode; ++ unsigned short st_nlink; ++ unsigned short st_uid; ++ unsigned short st_gid; ++ unsigned short st_rdev; ++ short pad2; ++ unsigned st_size; ++ unsigned st_blksize; ++ unsigned st_blocks; ++ unsigned st_atime_; ++ unsigned st_atime_nsec_; ++ unsigned st_mtime_; ++ unsigned st_mtime_nsec_; ++ unsigned st_ctime_; ++ unsigned st_ctime_nsec_; ++ unsigned __unused4; ++ unsigned __unused5; ++}; ++#elif defined(__x86_64__) ++struct kernel_stat { ++ uint64_t st_dev; ++ uint64_t st_ino; ++ uint64_t st_nlink; ++ unsigned st_mode; ++ unsigned st_uid; ++ unsigned st_gid; ++ unsigned __pad0; ++ uint64_t st_rdev; ++ int64_t st_size; ++ int64_t st_blksize; ++ int64_t st_blocks; ++ uint64_t st_atime_; ++ uint64_t st_atime_nsec_; ++ uint64_t st_mtime_; ++ uint64_t st_mtime_nsec_; ++ uint64_t st_ctime_; ++ uint64_t st_ctime_nsec_; ++ int64_t __unused4[3]; ++}; ++#elif (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++struct kernel_stat { ++ unsigned st_dev; ++ int st_pad1[3]; ++ unsigned st_ino; ++ unsigned st_mode; ++ unsigned st_nlink; ++ unsigned st_uid; ++ unsigned st_gid; ++ unsigned st_rdev; ++ int st_pad2[2]; ++ long st_size; ++ int st_pad3; ++ long st_atime_; ++ long st_atime_nsec_; ++ long st_mtime_; ++ long st_mtime_nsec_; ++ long st_ctime_; ++ long st_ctime_nsec_; ++ int st_blksize; ++ int st_blocks; ++ int st_pad4[14]; ++}; ++#elif defined(__aarch64__) ++struct kernel_stat { ++ unsigned long st_dev; ++ unsigned long st_ino; ++ unsigned int st_mode; ++ unsigned int st_nlink; ++ unsigned int st_uid; ++ unsigned int st_gid; ++ unsigned long st_rdev; ++ unsigned long __pad1; ++ long st_size; ++ int st_blksize; ++ int __pad2; ++ long st_blocks; ++ long st_atime_; ++ unsigned long st_atime_nsec_; ++ long st_mtime_; ++ unsigned long st_mtime_nsec_; ++ long st_ctime_; ++ unsigned long st_ctime_nsec_; ++ unsigned int __unused4; ++ unsigned int __unused5; ++}; ++#endif ++ ++#if !defined(AT_EMPTY_PATH) ++#define AT_EMPTY_PATH 0x1000 ++#endif ++ ++#if !defined(STATX_BASIC_STATS) ++#define STATX_BASIC_STATS 0x000007ffU ++#endif ++ ++// On 32-bit systems, we default to the 64-bit stat struct like libc ++// implementations do. Otherwise we default to the normal stat struct which is ++// already 64-bit. ++// These defines make it easy to call the right syscall to fill out a 64-bit ++// stat struct, which is the default in libc implementations but requires ++// different syscall names on 32 and 64-bit platforms. ++#if defined(__NR_fstatat64) ++ ++namespace sandbox { ++using default_stat_struct = struct kernel_stat64; ++} // namespace sandbox ++ ++#define __NR_fstatat_default __NR_fstatat64 ++#define __NR_fstat_default __NR_fstat64 ++ ++#elif defined(__NR_newfstatat) ++ ++namespace sandbox { ++using default_stat_struct = struct kernel_stat; ++} // namespace sandbox ++ ++#define __NR_fstatat_default __NR_newfstatat ++#define __NR_fstat_default __NR_fstat ++ ++#else ++#error "one of fstatat64 and newfstatat must be defined" ++#endif ++ ++#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_STAT_H_ +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h.rej +@@ -0,0 +1,81 @@ ++--- src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h +++++ src/3rdparty/chromium/sandbox/linux/system_headers/linux_stat.h ++@@ -173,6 +173,57 @@ struct kernel_stat { ++ unsigned int __unused4; ++ unsigned int __unused5; ++ }; +++#elif defined(__loongarch64) +++struct kernel_stat { +++ unsigned long st_dev; +++ unsigned long st_ino; +++ unsigned int st_mode; +++ unsigned int st_nlink; +++ unsigned int st_uid; +++ unsigned int st_gid; +++ unsigned long st_rdev; +++ unsigned long __pad1; +++ long st_size; +++ int st_blksize; +++ int __pad2; +++ long st_blocks; +++ long st_atime_; +++ unsigned long st_atime_nsec_; +++ long st_mtime_; +++ unsigned long st_mtime_nsec_; +++ long st_ctime_; +++ unsigned long st_ctime_nsec_; +++ unsigned int __unused4; +++ unsigned int __unused5; +++}; +++struct kernel_statx_timestamp { +++ long tv_sec; +++ unsigned int tv_nsec; +++ int __reserved; +++}; +++struct kernel_statx { +++ unsigned int stx_mask; +++ unsigned int stx_blksize; +++ unsigned long stx_attributes; +++ unsigned int stx_nlink; +++ unsigned int stx_uid; +++ unsigned int stx_gid; +++ unsigned short stx_mode; +++ unsigned short __spare0[1]; +++ unsigned long stx_ino; +++ unsigned long stx_size; +++ unsigned long stx_blocks; +++ unsigned long stx_attributes_mask; +++ struct kernel_statx_timestamp stx_atime; +++ struct kernel_statx_timestamp stx_btime; +++ struct kernel_statx_timestamp stx_ctime; +++ struct kernel_statx_timestamp stx_mtime; +++ unsigned int stx_rdev_major; +++ unsigned int stx_rdev_minor; +++ unsigned int stx_dev_major; +++ unsigned int stx_dev_minor; +++ unsigned long __spare2[14]; +++}; ++ #endif ++ ++ #if !defined(AT_EMPTY_PATH) ++@@ -207,6 +258,20 @@ using default_stat_struct = struct kernel_stat; ++ #define __NR_fstatat_default __NR_newfstatat ++ #define __NR_fstat_default __NR_fstat ++ +++#elif defined(__NR_statx) // loongarch64 +++ +++namespace sandbox { +++using default_stat_struct = struct kernel_statx; +++} // namespace sandbox +++ +++#define AT_STATX_SYNC_TYPE 0x6000 +++#define AT_STATX_SYNC_AS_STAT 0x0000 +++#define AT_STATX_FORCE_SYNC 0x2000 +++#define AT_STATX_DONT_SYNC 0x4000 +++#define STATX_ALL 0x00000fffU +++ +++#define __NR_statx_default __NR_statx +++ ++ #else ++ #error "one of fstatat64 and newfstatat must be defined" ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h @@ -31,6 +31,10 @@ #include "sandbox/linux/system_headers/mips64_linux_syscalls.h" #endif @@ -1243,11 +3831,24 @@ index 2b78a0cc3..e9efd8ecb 100644 #if defined(__aarch64__) #include "sandbox/linux/system_headers/arm64_linux_syscalls.h" #endif -diff --git a/src/3rdparty/chromium/sandbox/linux/system_headers/loongarch64_linux_syscalls.h b/src/3rdparty/chromium/sandbox/linux/system_headers/loongarch64_linux_syscalls.h -new file mode 100644 -index 000000000..65bd0ac8e --- /dev/null -+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/loongarch64_linux_syscalls.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h.rej +@@ -0,0 +1,13 @@ ++--- src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h +++++ src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h ++@@ -31,6 +31,10 @@ ++ #include "sandbox/linux/system_headers/mips64_linux_syscalls.h" ++ #endif ++ +++#if defined(ARCH_CPU_LOONGARCH_FAMILY) && defined(ARCH_CPU_64_BITS) +++#include "sandbox/linux/system_headers/loongarch64_linux_syscalls.h" +++#endif +++ ++ #if defined(__aarch64__) ++ #include "sandbox/linux/system_headers/arm64_linux_syscalls.h" ++ #endif +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/linux/system_headers/loongarch64_linux_syscalls.h @@ -0,0 +1,851 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -2100,11 +4701,9 @@ index 000000000..65bd0ac8e +#define __NR_clone3 435 +#endif +#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LOONGARCH64_LINUX_SYSCALLS_H_ -diff --git a/src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc b/src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc -index 0f86af559..bf436c59d 100644 ---- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc -+++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc -@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::EvaluateSyscall(int sysno) const { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc +@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::Eval case __NR_sched_setscheduler: case __NR_sysinfo: case __NR_uname: @@ -2113,11 +4712,23 @@ index 0f86af559..bf436c59d 100644 case __NR_readlink: case __NR_stat: #endif -diff --git a/src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc b/src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc -index 0b672bb88..729cf9af4 100644 ---- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc -+++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc -@@ -70,7 +70,7 @@ ResultExpr GpuProcessPolicy::EvaluateSyscall(int sysno) const { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc +++++ src/3rdparty/chromium/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc ++@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::EvaluateSyscall(int sysno) const { ++ case __NR_sched_setscheduler: ++ case __NR_sysinfo: ++ case __NR_uname: ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_readlink: ++ case __NR_stat: ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc +@@ -70,7 +70,7 @@ ResultExpr GpuProcessPolicy::EvaluateSys (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) case __NR_ftruncate64: #endif @@ -2126,10 +4737,22 @@ index 0b672bb88..729cf9af4 100644 case __NR_getdents: #endif case __NR_getdents64: -diff --git a/src/3rdparty/chromium/skia/BUILD.gn b/src/3rdparty/chromium/skia/BUILD.gn -index 6a107a51a..a198a362b 100644 ---- a/src/3rdparty/chromium/skia/BUILD.gn -+++ b/src/3rdparty/chromium/skia/BUILD.gn +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc +++++ src/3rdparty/chromium/sandbox/policy/linux/bpf_gpu_policy_linux.cc ++@@ -70,7 +70,7 @@ ResultExpr GpuProcessPolicy::EvaluateSyscall(int sysno) const { ++ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) ++ case __NR_ftruncate64: ++ #endif ++-#if !defined(__aarch64__) +++#if !defined(__aarch64__) && !defined(__loongarch64) ++ case __NR_getdents: ++ #endif ++ case __NR_getdents64: +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/skia/BUILD.gn ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/skia/BUILD.gn @@ -821,6 +821,8 @@ skia_source_set("skia_opts") { sources = skia_opts.none_sources } else if (current_cpu == "s390x") { @@ -2139,10 +4762,22 @@ index 6a107a51a..a198a362b 100644 } else { assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") } -diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc b/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc -index 6e5ff1fbd..e6a621ade 100644 ---- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc -+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/skia/BUILD.gn.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/skia/BUILD.gn +++++ src/3rdparty/chromium/skia/BUILD.gn ++@@ -821,6 +821,8 @@ skia_source_set("skia_opts") { ++ sources = skia_opts.none_sources ++ } else if (current_cpu == "s390x") { ++ sources = skia_opts.none_sources +++ } else if (current_cpu == "loongarch64") { +++ sources = skia_opts.none_sources ++ } else { ++ assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp") ++ } +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc @@ -66,6 +66,8 @@ void* GetProgramCounter(void* vuc) { #elif defined(__x86_64__) if (16 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) @@ -2152,10 +4787,22 @@ index 6e5ff1fbd..e6a621ade 100644 #else #error "Undefined Architecture." #endif -diff --git a/src/3rdparty/chromium/third_party/angle/gni/angle.gni b/src/3rdparty/chromium/third_party/angle/gni/angle.gni -index c4fe8c83b..bfb63142b 100644 ---- a/src/3rdparty/chromium/third_party/angle/gni/angle.gni -+++ b/src/3rdparty/chromium/third_party/angle/gni/angle.gni +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc +++++ src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc ++@@ -66,6 +66,8 @@ void* GetProgramCounter(void* vuc) { ++ #elif defined(__x86_64__) ++ if (16 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) ++ return reinterpret_cast(context->uc_mcontext.gregs[16]); +++#elif defined(__loongarch__) +++ return reinterpret_cast(context->uc_mcontext.__pc); ++ #else ++ #error "Undefined Architecture." ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/angle/gni/angle.gni ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/angle/gni/angle.gni @@ -54,7 +54,7 @@ angle_data_dir = "angledata" declare_args() { if (current_cpu == "arm64" || current_cpu == "x64" || @@ -2165,11 +4812,23 @@ index c4fe8c83b..bfb63142b 100644 angle_64bit_current_cpu = true } else if (current_cpu == "arm" || current_cpu == "x86" || current_cpu == "mipsel" || current_cpu == "s390" || -diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn b/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn -index fe44daf27..b5baa8c17 100644 ---- a/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn -+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn -@@ -36,6 +36,8 @@ if (current_cpu == "x86" || current_cpu == "x64") { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/angle/gni/angle.gni.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/angle/gni/angle.gni +++++ src/3rdparty/chromium/third_party/angle/gni/angle.gni ++@@ -54,7 +54,7 @@ angle_data_dir = "angledata" ++ declare_args() { ++ if (current_cpu == "arm64" || current_cpu == "x64" || ++ current_cpu == "mips64el" || current_cpu == "s390x" || ++- current_cpu == "ppc64") { +++ current_cpu == "ppc64" || current_cpu == "loongarch64") { ++ angle_64bit_current_cpu = true ++ } else if (current_cpu == "arm" || current_cpu == "x86" || ++ current_cpu == "mipsel" || current_cpu == "s390" || +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn +@@ -36,6 +36,8 @@ if (current_cpu == "x86" || current_cpu sources = [ "SaveRegisters_mips.S" ] } else if (current_cpu == "mips64el") { sources = [ "SaveRegisters_mips64.S" ] @@ -2178,11 +4837,22 @@ index fe44daf27..b5baa8c17 100644 } else if (current_cpu == "ppc64") { sources = [ "SaveRegisters_ppc64.S" ] } -diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/SaveRegisters_loongarch64.S b/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/SaveRegisters_loongarch64.S -new file mode 100644 -index 000000000..f95546f0d --- /dev/null -+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/SaveRegisters_loongarch64.S ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn +++++ src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn ++@@ -36,6 +36,8 @@ if (current_cpu == "x86" || current_cpu == "x64") { ++ sources = [ "SaveRegisters_mips.S" ] ++ } else if (current_cpu == "mips64el") { ++ sources = [ "SaveRegisters_mips64.S" ] +++ } else if (current_cpu == "loongarch64") { +++ sources = [ "SaveRegisters_loongarch64.S" ] ++ } else if (current_cpu == "ppc64") { ++ sources = [ "SaveRegisters_ppc64.S" ] ++ } +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/SaveRegisters_loongarch64.S @@ -0,0 +1,41 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -2225,10 +4895,8 @@ index 000000000..f95546f0d + ld.d $ra, $sp, 64 + addi.d $sp, $sp, 80 + jirl $r0, $ra, 0 -diff --git a/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h b/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h -index d681bdf81..9087b4c1d 100644 ---- a/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h -+++ b/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h @@ -114,6 +114,9 @@ extern "C" { #define OPENSSL_32_BIT #elif defined(__myriad2__) @@ -2239,10 +4907,23 @@ index d681bdf81..9087b4c1d 100644 #else // Note BoringSSL only supports standard 32-bit and 64-bit two's-complement, // little-endian architectures. Functions will not produce the correct answer -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h -index 07d9171a0..cbbccdeaf 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h +++++ src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h ++@@ -114,6 +114,9 @@ extern "C" { ++ #define OPENSSL_32_BIT ++ #elif defined(__myriad2__) ++ #define OPENSSL_32_BIT +++#elif defined(__loongarch__) && defined(__loongarch_lp64) +++#define OPENSSL_64_BIT +++#define OPENSSL_LOONGARCH64 ++ #else ++ // Note BoringSSL only supports standard 32-bit and 64-bit two's-complement, ++ // little-endian architectures. Functions will not produce the correct answer +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h @@ -44,6 +44,8 @@ typedef MDRawContextARM RawContextCPU; typedef MDRawContextARM64_Old RawContextCPU; #elif defined(__mips__) @@ -2252,11 +4933,23 @@ index 07d9171a0..cbbccdeaf 100644 #else #error "This code has not been ported to your platform yet." #endif -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -index aae1dc13b..545f4df5f 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc -@@ -279,6 +279,11 @@ void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h ++@@ -44,6 +44,8 @@ typedef MDRawContextARM RawContextCPU; ++ typedef MDRawContextARM64_Old RawContextCPU; ++ #elif defined(__mips__) ++ typedef MDRawContextMIPS RawContextCPU; +++#elif defined(__loongarch64) +++typedef MDRawContextLOONG64 RawContextCPU; ++ #else ++ #error "This code has not been ported to your platform yet." ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc +@@ -279,6 +279,11 @@ void ThreadInfo::GetGeneralPurposeRegist *gp_regs = mcontext.gregs; if (size) *size = sizeof(mcontext.gregs); @@ -2268,7 +4961,7 @@ index aae1dc13b..545f4df5f 100644 #else if (gp_regs) *gp_regs = ®s; -@@ -294,6 +299,11 @@ void ThreadInfo::GetFloatingPointRegisters(void** fp_regs, size_t* size) { +@@ -294,6 +299,11 @@ void ThreadInfo::GetFloatingPointRegiste *fp_regs = &mcontext.fpregs; if (size) *size = sizeof(mcontext.fpregs); @@ -2280,10 +4973,37 @@ index aae1dc13b..545f4df5f 100644 #else if (fp_regs) *fp_regs = &fpregs; -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h -index fb216fa6d..9658fda17 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc.rej +@@ -0,0 +1,26 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc ++@@ -279,6 +279,11 @@ void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) { ++ *gp_regs = mcontext.gregs; ++ if (size) ++ *size = sizeof(mcontext.gregs); +++#elif defined(__loongarch64) +++ if (gp_regs) +++ *gp_regs = &_gpregs; +++ if (size) +++ *size = sizeof(_gpregs); ++ #else ++ if (gp_regs) ++ *gp_regs = ®s; ++@@ -294,6 +299,11 @@ void ThreadInfo::GetFloatingPointRegisters(void** fp_regs, size_t* size) { ++ *fp_regs = &mcontext.fpregs; ++ if (size) ++ *size = sizeof(mcontext.fpregs); +++#elif defined(__loongarch64) +++ if (fp_regs) +++ *fp_regs = &_fpregs; +++ if (size) +++ *size = sizeof(_fpregs); ++ #else ++ if (fp_regs) ++ *fp_regs = &fpregs; +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h @@ -32,6 +32,9 @@ #include @@ -2309,11 +5029,39 @@ index fb216fa6d..9658fda17 100644 #endif // Returns the instruction pointer (platform-dependent impl.). -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -index 5cdabcf64..f08a3b52c 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc -@@ -461,7 +461,7 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h.rej +@@ -0,0 +1,27 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h ++@@ -32,6 +32,9 @@ ++ ++ #include ++ #include +++#if defined(__loongarch64) +++#include +++#endif ++ ++ #include "client/linux/dump_writer_common/raw_context_cpu.h" ++ #include "common/memory_allocator.h" ++@@ -71,6 +74,14 @@ struct ThreadInfo { ++ #elif defined(__mips__) ++ // Use the structure defined in . ++ mcontext_t mcontext; +++#elif defined(__loongarch64) +++ // Use the structure defined in . +++ struct user_pt_regs _gpregs; +++ int32_t uc_mctxflags; +++ int32_t fp_lp64_width; // 0: unknown, 1: fp, 2: lsx, 4: lasx +++ struct user_lasx_state _fpregs; +++ uint64_t fcc; +++ uint32_t fcsr; ++ #endif ++ ++ // Returns the instruction pointer (platform-dependent impl.). +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +@@ -461,7 +461,7 @@ bool ExceptionHandler::HandleSignal(int memcpy(&g_crash_context_.float_state, fp_ptr, sizeof(g_crash_context_.float_state)); } @@ -2322,7 +5070,7 @@ index 5cdabcf64..f08a3b52c 100644 // FP state is not part of user ABI on ARM Linux. // In case of MIPS Linux FP state is already part of ucontext_t // and 'float_state' is not a member of CrashContext. -@@ -471,6 +471,8 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) { +@@ -471,6 +471,8 @@ bool ExceptionHandler::HandleSignal(int sizeof(g_crash_context_.float_state)); } #endif @@ -2356,10 +5104,56 @@ index 5cdabcf64..f08a3b52c 100644 #else #error "This code has not been ported to your platform yet." #endif -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h -index f80843ea7..7e2e0f217 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.rej +@@ -0,0 +1,45 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc ++@@ -461,7 +461,7 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) { ++ memcpy(&g_crash_context_.float_state, fp_ptr, ++ sizeof(g_crash_context_.float_state)); ++ } ++-#elif !defined(__ARM_EABI__) && !defined(__mips__) +++#elif !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ // FP state is not part of user ABI on ARM Linux. ++ // In case of MIPS Linux FP state is already part of ucontext_t ++ // and 'float_state' is not a member of CrashContext. ++@@ -471,6 +471,8 @@ bool ExceptionHandler::HandleSignal(int /*sig*/, siginfo_t* info, void* uc) { ++ sizeof(g_crash_context_.float_state)); ++ } ++ #endif +++// TODO:MT loongarch64 floating-point registers +++ ++ g_crash_context_.tid = syscall(__NR_gettid); ++ if (crash_handler_ != NULL) { ++ if (crash_handler_(&g_crash_context_, sizeof(g_crash_context_), ++@@ -701,11 +703,13 @@ bool ExceptionHandler::WriteMinidump() { ++ } ++ #endif ++ ++-#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__) +++#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__) && \ +++ !defined(__loongarch64) ++ // FPU state is not part of ARM EABI ucontext_t. ++ memcpy(&context.float_state, context.context.uc_mcontext.fpregs, ++ sizeof(context.float_state)); ++ #endif +++// TODO:MT loongarch64 floating-point registers ++ context.tid = sys_gettid(); ++ ++ // Add an exception stream to the minidump for better reporting. ++@@ -726,6 +730,9 @@ bool ExceptionHandler::WriteMinidump() { ++ #elif defined(__mips__) ++ context.siginfo.si_addr = ++ reinterpret_cast(context.context.uc_mcontext.pc); +++#elif defined(__loongarch64) +++ context.siginfo.si_addr = +++ reinterpret_cast(context.context.uc_mcontext.__pc); ++ #else ++ #error "This code has not been ported to your platform yet." ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h @@ -192,7 +192,7 @@ class ExceptionHandler { siginfo_t siginfo; pid_t tid; // the crashing thread. @@ -2369,10 +5163,22 @@ index f80843ea7..7e2e0f217 100644 // #ifdef this out because FP state is not part of user ABI for Linux ARM. // In case of MIPS Linux FP state is already part of ucontext_t so // 'float_state' is not required. -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc -index fa3c1713a..7a66cb454 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h ++@@ -192,7 +192,7 @@ class ExceptionHandler { ++ siginfo_t siginfo; ++ pid_t tid; // the crashing thread. ++ ucontext_t context; ++-#if !defined(__ARM_EABI__) && !defined(__mips__) +++#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ // #ifdef this out because FP state is not part of user ABI for Linux ARM. ++ // In case of MIPS Linux FP state is already part of ucontext_t so ++ // 'float_state' is not required. +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc @@ -138,7 +138,7 @@ class MicrodumpWriter { const MicrodumpExtraInfo& microdump_extra_info, LinuxDumper* dumper) @@ -2409,10 +5215,49 @@ index fa3c1713a..7a66cb454 100644 const google_breakpad::fpstate_t* const float_state_; #endif LinuxDumper* dumper_; -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc -index 415068983..6c999ffcd 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc.rej +@@ -0,0 +1,38 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc ++@@ -138,7 +138,7 @@ class MicrodumpWriter { ++ const MicrodumpExtraInfo& microdump_extra_info, ++ LinuxDumper* dumper) ++ : ucontext_(context ? &context->context : NULL), ++-#if !defined(__ARM_EABI__) && !defined(__mips__) +++#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ float_state_(context ? &context->float_state : NULL), ++ #endif ++ dumper_(dumper), ++@@ -337,6 +337,8 @@ class MicrodumpWriter { ++ # else ++ # error "This mips ABI is currently not supported (n32)" ++ #endif +++#elif defined(__loongarch64) +++ const char kArch[] = "loongarch64"; ++ #else ++ #error "This code has not been ported to your platform yet" ++ #endif ++@@ -409,7 +411,7 @@ class MicrodumpWriter { ++ void DumpCPUState() { ++ RawContextCPU cpu; ++ my_memset(&cpu, 0, sizeof(RawContextCPU)); ++-#if !defined(__ARM_EABI__) && !defined(__mips__) +++#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ UContextReader::FillCPUContext(&cpu, ucontext_, float_state_); ++ #else ++ UContextReader::FillCPUContext(&cpu, ucontext_); ++@@ -605,7 +607,7 @@ class MicrodumpWriter { ++ void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); } ++ ++ const ucontext_t* const ucontext_; ++-#if !defined(__ARM_EABI__) && !defined(__mips__) +++#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ const google_breakpad::fpstate_t* const float_state_; ++ #endif ++ LinuxDumper* dumper_; +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc @@ -38,7 +38,7 @@ #include #include @@ -2422,7 +5267,7 @@ index 415068983..6c999ffcd 100644 // To get register definitions. #include #endif -@@ -112,6 +112,9 @@ bool LinuxCoreDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { +@@ -112,6 +112,9 @@ bool LinuxCoreDumper::GetThreadInfoByInd #elif defined(__mips__) stack_pointer = reinterpret_cast(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]); @@ -2432,7 +5277,7 @@ index 415068983..6c999ffcd 100644 #else #error "This code hasn't been ported to your platform yet." #endif -@@ -208,7 +211,13 @@ bool LinuxCoreDumper::EnumerateThreads() { +@@ -208,7 +211,13 @@ bool LinuxCoreDumper::EnumerateThreads() info.mcontext.mdlo = status->pr_reg[EF_LO]; info.mcontext.mdhi = status->pr_reg[EF_HI]; info.mcontext.pc = status->pr_reg[EF_CP0_EPC]; @@ -2447,7 +5292,7 @@ index 415068983..6c999ffcd 100644 memcpy(&info.regs, status->pr_reg, sizeof(info.regs)); #endif // __mips__ if (first_thread) { -@@ -263,6 +272,7 @@ bool LinuxCoreDumper::EnumerateThreads() { +@@ -263,6 +272,7 @@ bool LinuxCoreDumper::EnumerateThreads() break; } #if defined(__i386) || defined(__x86_64) @@ -2455,10 +5300,55 @@ index 415068983..6c999ffcd 100644 case NT_FPREGSET: { if (thread_infos_.empty()) return false; -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h -index 7bee160f1..fa54118af 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc.rej +@@ -0,0 +1,44 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc ++@@ -38,7 +38,7 @@ ++ #include ++ #include ++ #include ++-#if defined(__mips__) && defined(__ANDROID__) +++#if defined(__mips__) && defined(__ANDROID__) || defined(__loongarch64) ++ // To get register definitions. ++ #include ++ #endif ++@@ -112,6 +112,9 @@ bool LinuxCoreDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { ++ #elif defined(__mips__) ++ stack_pointer = ++ reinterpret_cast(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]); +++#elif defined(__loongarch64) +++ stack_pointer = +++ reinterpret_cast(info->_gpregs.regs[MD_CONTEXT_LOONG64_REG_SP]); ++ #else ++ #error "This code hasn't been ported to your platform yet." ++ #endif ++@@ -208,7 +211,13 @@ bool LinuxCoreDumper::EnumerateThreads() { ++ info.mcontext.mdlo = status->pr_reg[EF_LO]; ++ info.mcontext.mdhi = status->pr_reg[EF_HI]; ++ info.mcontext.pc = status->pr_reg[EF_CP0_EPC]; ++-#else // __mips__ +++#elif defined(__loongarch64) +++ // TODO:MT +++ for (int i = LOONGARCH_EF_R0; i <= LOONGARCH_EF_R31; ++i) +++ info._gpregs.regs[i-LOONGARCH_EF_R0] = status->pr_reg[i]; +++ info._gpregs.csr_era = status->pr_reg[LOONGARCH_EF_CSR_ERA]; +++ info._gpregs.csr_badv = status->pr_reg[LOONGARCH_EF_CSR_BADV]; +++#else ++ memcpy(&info.regs, status->pr_reg, sizeof(info.regs)); ++ #endif // __mips__ ++ if (first_thread) { ++@@ -263,6 +272,7 @@ bool LinuxCoreDumper::EnumerateThreads() { ++ break; ++ } ++ #if defined(__i386) || defined(__x86_64) +++ // TODO:MT FPU ++ case NT_FPREGSET: { ++ if (thread_infos_.empty()) ++ return false; +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h @@ -63,6 +63,7 @@ namespace google_breakpad { (defined(__mips__) && _MIPS_SIM == _ABIO32) typedef Elf32_auxv_t elf_aux_entry; @@ -2467,11 +5357,22 @@ index 7bee160f1..fa54118af 100644 (defined(__mips__) && _MIPS_SIM != _ABIO32) typedef Elf64_auxv_t elf_aux_entry; #endif -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -index e3ddb81a6..1a0e6651f 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc -@@ -162,6 +162,24 @@ bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid) +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h.rej +@@ -0,0 +1,10 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h ++@@ -63,6 +63,7 @@ namespace google_breakpad { ++ (defined(__mips__) && _MIPS_SIM == _ABIO32) ++ typedef Elf32_auxv_t elf_aux_entry; ++ #elif defined(__x86_64) || defined(__aarch64__) || \ +++ defined(__loongarch64) || \ ++ (defined(__mips__) && _MIPS_SIM != _ABIO32) ++ typedef Elf64_auxv_t elf_aux_entry; ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +@@ -162,6 +162,24 @@ bool LinuxPtraceDumper::ReadRegisterSet( if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) { return false; } @@ -2496,7 +5397,7 @@ index e3ddb81a6..1a0e6651f 100644 return true; #else return false; -@@ -298,6 +316,9 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { +@@ -298,6 +316,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI #elif defined(__mips__) stack_pointer = reinterpret_cast(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]); @@ -2506,10 +5407,48 @@ index e3ddb81a6..1a0e6651f 100644 #else #error "This code hasn't been ported to your platform yet." #endif -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc -index 32634ef00..2949c354d 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc.rej +@@ -0,0 +1,37 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc ++@@ -162,6 +162,24 @@ bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid) ++ if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) { ++ return false; ++ } +++ +++// TODO:MT +++#if defined(__loongarch64) +++ info->fp_lp64_width = 1; +++// user_fp_state *_fp_state = (struct user_fp_state*)io.iov_base; +++// info->fcc = _fp_state->fcc; +++// info->fcsr = _fp_state->fcsr; +++// +++// if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_LOONGARCH_LASX, (void*)&io) == -1) { +++// if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_LOONGARCH_LSX, (void*)&io) == -1) { +++// } else { +++// info->fp_lp64_width = 2; +++// } +++// } else { +++// info->fp_lp64_width = 4; +++// } +++#endif // defined(__loongarch64) +++ ++ return true; ++ #else ++ return false; ++@@ -298,6 +316,9 @@ bool LinuxPtraceDumper::GetThreadInfoByIndex(size_t index, ThreadInfo* info) { ++ #elif defined(__mips__) ++ stack_pointer = ++ reinterpret_cast(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]); +++#elif defined(__loongarch64) +++ stack_pointer = +++ reinterpret_cast(info->_gpregs.regs[MD_CONTEXT_LOONG64_REG_SP]); ++ #else ++ #error "This code hasn't been ported to your platform yet." ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc @@ -136,7 +136,7 @@ class MinidumpWriter { : fd_(minidump_fd), path_(minidump_path), @@ -2606,10 +5545,109 @@ index 32634ef00..2949c354d 100644 const google_breakpad::fpstate_t* const float_state_; // ditto #endif LinuxDumper* dumper_; -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -index e3b0b16da..f99555ed0 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc.rej +@@ -0,0 +1,98 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc ++@@ -136,7 +136,7 @@ class MinidumpWriter { ++ : fd_(minidump_fd), ++ path_(minidump_path), ++ ucontext_(context ? &context->context : NULL), ++-#if !defined(__ARM_EABI__) && !defined(__mips__) +++#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ float_state_(context ? &context->float_state : NULL), ++ #endif ++ dumper_(dumper), ++@@ -468,7 +468,7 @@ class MinidumpWriter { ++ if (!cpu.Allocate()) ++ return false; ++ my_memset(cpu.get(), 0, sizeof(RawContextCPU)); ++-#if !defined(__ARM_EABI__) && !defined(__mips__) +++#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_); ++ #else ++ UContextReader::FillCPUContext(cpu.get(), ucontext_); ++@@ -1205,6 +1205,68 @@ class MinidumpWriter { ++ ++ return true; ++ } +++#elif defined(__loongarch64) +++ bool WriteCPUInformation(MDRawSystemInfo* sys_info) { +++ // TODO:MT +++ struct CpuInfoEntry { +++ const char* info_name; +++ int value; +++ bool found; +++ } cpu_info_table[] = { +++ { "processor", -1, false }, +++ }; +++ +++ // processor_architecture should always be set, do this first +++ sys_info->processor_architecture = MD_CPU_ARCHITECTURE_LOONG64; +++ +++ const int fd = sys_open("/proc/cpuinfo", O_RDONLY, 0); +++ if (fd < 0) +++ return false; +++ +++ { +++ PageAllocator allocator; +++ ProcCpuInfoReader* const reader = new(allocator) ProcCpuInfoReader(fd); +++ const char* field; +++ while (reader->GetNextField(&field)) { +++ bool is_first_entry = true; +++ for (CpuInfoEntry& entry : cpu_info_table) { +++ if (!is_first_entry && entry.found) { +++ // except for the 'processor' field, ignore repeated values. +++ continue; +++ } +++ is_first_entry = false; +++ if (!my_strcmp(field, entry.info_name)) { +++ size_t value_len; +++ const char* value = reader->GetValueAndLen(&value_len); +++ if (value_len == 0) +++ continue; +++ +++ uintptr_t val; +++ if (my_read_decimal_ptr(&val, value) == value) +++ continue; +++ +++ entry.value = static_cast(val); +++ entry.found = true; +++ } +++ } +++ } +++ sys_close(fd); +++ } +++ // make sure we got everything we wanted +++ for (const CpuInfoEntry& entry : cpu_info_table) { +++ if (!entry.found) { +++ return false; +++ } +++ } +++ // cpu_info_table[0] holds the last cpu id listed in /proc/cpuinfo, +++ // assuming this is the highest id, change it to the number of CPUs +++ // by adding one. +++ cpu_info_table[0].value++; +++ +++ sys_info->number_of_processors = cpu_info_table[0].value; +++ +++ return true; +++ } ++ #else ++ # error "Unsupported CPU" ++ #endif ++@@ -1333,7 +1395,7 @@ class MinidumpWriter { ++ const char* path_; // Path to the file where the minidum should be written. ++ ++ const ucontext_t* const ucontext_; // also from the signal handler ++-#if !defined(__ARM_EABI__) && !defined(__mips__) +++#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ const google_breakpad::fpstate_t* const float_state_; // ditto ++ #endif ++ LinuxDumper* dumper_; +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h @@ -48,7 +48,7 @@ class ExceptionHandler; #if defined(__aarch64__) @@ -2619,11 +5657,23 @@ index e3b0b16da..f99555ed0 100644 typedef std::remove_pointer::type fpstate_t; #endif -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc -index 99362945c..a2e0bda48 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc -@@ -65,6 +65,7 @@ bool MemoryMappedFile::Map(const char* path, size_t offset) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h ++@@ -48,7 +48,7 @@ class ExceptionHandler; ++ ++ #if defined(__aarch64__) ++ typedef struct fpsimd_context fpstate_t; ++-#elif !defined(__ARM_EABI__) && !defined(__mips__) +++#elif !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__loongarch64) ++ typedef std::remove_pointer::type fpstate_t; ++ #endif ++ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc +@@ -65,6 +65,7 @@ bool MemoryMappedFile::Map(const char* p } #if defined(__x86_64__) || defined(__aarch64__) || \ @@ -2631,11 +5681,21 @@ index 99362945c..a2e0bda48 100644 (defined(__mips__) && _MIPS_SIM == _ABI64) struct kernel_stat st; -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_loong64.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_loong64.h -new file mode 100644 -index 000000000..3267db963 --- /dev/null -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_loong64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc.rej +@@ -0,0 +1,10 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc ++@@ -65,6 +65,7 @@ bool MemoryMappedFile::Map(const char* path, size_t offset) { ++ } ++ ++ #if defined(__x86_64__) || defined(__aarch64__) || \ +++ defined(__loongarch64) || \ ++ (defined(__mips__) && _MIPS_SIM == _ABI64) ++ ++ struct kernel_stat st; +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_loong64.h @@ -0,0 +1,60 @@ +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_LOONG64_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_LOONG64_H__ @@ -2697,10 +5757,8 @@ index 000000000..3267db963 +#define MD_CONTEXT_LOONG64_LASX (MD_CONTEXT_LOONG64 | 0x00000008) + +#endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_LOONG64_H__ -diff --git a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h -index 7b36d1127..52eb2ac91 100644 ---- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h -+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h @@ -115,6 +115,7 @@ typedef struct { #include "minidump_cpu_amd64.h" #include "minidump_cpu_arm.h" @@ -2717,14 +5775,115 @@ index 7b36d1127..52eb2ac91 100644 MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */ } MDCPUArchitecture; -diff --git a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc -index 557e0d363..c75fb0061 100644 ---- a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc -+++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc -@@ -398,6 +398,47 @@ bool GetThreadArea64(pid_t tid, +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h.rej +@@ -0,0 +1,18 @@ ++--- src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h +++++ src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h ++@@ -115,6 +115,7 @@ typedef struct { ++ #include "minidump_cpu_amd64.h" ++ #include "minidump_cpu_arm.h" ++ #include "minidump_cpu_arm64.h" +++#include "minidump_cpu_loong64.h" ++ #include "minidump_cpu_mips.h" ++ #include "minidump_cpu_ppc.h" ++ #include "minidump_cpu_ppc64.h" ++@@ -660,6 +661,7 @@ typedef enum { ++ MD_CPU_ARCHITECTURE_PPC64 = 0x8002, /* Breakpad-defined value for PPC64 */ ++ MD_CPU_ARCHITECTURE_ARM64_OLD = 0x8003, /* Breakpad-defined value for ARM64 */ ++ MD_CPU_ARCHITECTURE_MIPS64 = 0x8004, /* Breakpad-defined value for MIPS64 */ +++ MD_CPU_ARCHITECTURE_LOONG64 = 0x8007, /* Breakpad-defined value for LOONG64 */ ++ MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */ ++ } MDCPUArchitecture; ++ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc +@@ -398,6 +398,129 @@ bool GetThreadArea64(pid_t tid, return true; } ++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) ++bool GetFloatingPointRegisters32(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ return false; ++} ++ ++bool GetFloatingPointRegisters64(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = context; ++ iov.iov_len = sizeof(*context); ++ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast(NT_PRFPREG), &iov) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ if (iov.iov_len != sizeof(context->f64)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << iov.iov_len ++ << " != " << sizeof(context->f64); ++ return false; ++ } ++ ++ return true; ++} ++ ++bool GetThreadArea32(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ return false; ++} ++ ++bool GetThreadArea64(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ *address = context.t64.regs[2]; ++ return true; ++} ++ ++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) ++bool GetFloatingPointRegisters32(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ return false; ++} ++ ++bool GetFloatingPointRegisters64(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = context; ++ iov.iov_len = sizeof(*context); ++ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast(NT_PRFPREG), &iov) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ if (iov.iov_len != sizeof(context->f64)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << iov.iov_len ++ << " != " << sizeof(context->f64); ++ return false; ++ } ++ ++ return true; ++} ++ ++bool GetThreadArea32(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ return false; ++} ++ ++bool GetThreadArea64(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ *address = context.t64.regs[2]; ++ return true; ++} ++ +#elif defined(ARCH_CPU_LOONGARCH_FAMILY) +bool GetFloatingPointRegisters32(pid_t tid, + FloatContext* context, @@ -2769,10 +5928,678 @@ index 557e0d363..c75fb0061 100644 #else #error Port. #endif // ARCH_CPU_X86_FAMILY -diff --git a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h -index 5b55c24a7..8beb982e9 100644 ---- a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h -+++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc.orig +@@ -0,0 +1,667 @@ ++// Copyright 2017 The Crashpad Authors. All rights reserved. ++// ++// Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 ++// ++// Unless required by applicable law or agreed to in writing, software ++// distributed under the License is distributed on an "AS IS" BASIS, ++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++// See the License for the specific language governing permissions and ++// limitations under the License. ++ ++#include "util/linux/ptracer.h" ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "base/logging.h" ++#include "build/build_config.h" ++#include "util/misc/from_pointer_cast.h" ++ ++#if defined(ARCH_CPU_X86_FAMILY) ++#include ++#endif ++ ++namespace crashpad { ++ ++namespace { ++ ++#if defined(ARCH_CPU_X86_FAMILY) ++ ++template ++bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) { ++ iovec iov; ++ iov.iov_base = dest; ++ iov.iov_len = sizeof(*dest); ++ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast(set), &iov) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ if (iov.iov_len != sizeof(*dest)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << iov.iov_len ++ << " != " << sizeof(*dest); ++ return false; ++ } ++ return true; ++} ++ ++bool GetFloatingPointRegisters32(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ return GetRegisterSet(tid, NT_PRXFPREG, &context->f32.fxsave, can_log); ++} ++ ++bool GetFloatingPointRegisters64(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ return GetRegisterSet(tid, NT_PRFPREG, &context->f64.fxsave, can_log); ++} ++ ++bool GetThreadArea32(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ size_t index = (context.t32.xgs & 0xffff) >> 3; ++ user_desc desc; ++ if (ptrace( ++ PTRACE_GET_THREAD_AREA, tid, reinterpret_cast(index), &desc) != ++ 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ ++ *address = desc.base_addr; ++ return true; ++} ++ ++bool GetThreadArea64(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ *address = context.t64.fs_base; ++ return true; ++} ++ ++#elif defined(ARCH_CPU_ARM_FAMILY) ++ ++#if defined(ARCH_CPU_ARMEL) ++// PTRACE_GETREGSET, introduced in Linux 2.6.34 (2225a122ae26), requires kernel ++// support enabled by HAVE_ARCH_TRACEHOOK. This has been set for x86 (including ++// x86_64) since Linux 2.6.28 (99bbc4b1e677a), but for ARM only since ++// Linux 3.5.0 (0693bf68148c4). Older Linux kernels support PTRACE_GETREGS, ++// PTRACE_GETFPREGS, and PTRACE_GETVFPREGS instead, which don't allow checking ++// the size of data copied. ++// ++// Fortunately, 64-bit ARM support only appeared in Linux 3.7.0, so if ++// PTRACE_GETREGSET fails on ARM with EIO, indicating that the request is not ++// supported, the kernel must be old enough that 64-bit ARM isn’t supported ++// either. ++// ++// TODO(mark): Once helpers to interpret the kernel version are available, add ++// a DCHECK to ensure that the kernel is older than 3.5. ++ ++bool GetGeneralPurposeRegistersLegacy(pid_t tid, ++ ThreadContext* context, ++ bool can_log) { ++ if (ptrace(PTRACE_GETREGS, tid, nullptr, &context->t32) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ return true; ++} ++ ++bool GetFloatingPointRegistersLegacy(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ if (ptrace(PTRACE_GETFPREGS, tid, nullptr, &context->f32.fpregs) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ context->f32.have_fpregs = true; ++ ++ if (ptrace(PTRACE_GETVFPREGS, tid, nullptr, &context->f32.vfp) != 0) { ++ switch (errno) { ++ case EINVAL: ++ // These registers are optional on 32-bit ARM cpus ++ break; ++ default: ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ } else { ++ context->f32.have_vfp = true; ++ } ++ return true; ++} ++#endif // ARCH_CPU_ARMEL ++ ++// Normally, the Linux kernel will copy out register sets according to the size ++// of the struct that contains them. Tracing a 32-bit ARM process running in ++// compatibility mode on a 64-bit ARM cpu will only copy data for the number of ++// registers times the size of the register, which won't include any possible ++// trailing padding in the struct. These are the sizes of the register data, not ++// including any possible padding. ++constexpr size_t kArmVfpSize = 32 * 8 + 4; ++ ++// Target is 32-bit ++bool GetFloatingPointRegisters32(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ context->f32.have_fpregs = false; ++ context->f32.have_vfp = false; ++ ++ iovec iov; ++ iov.iov_base = &context->f32.fpregs; ++ iov.iov_len = sizeof(context->f32.fpregs); ++ if (ptrace( ++ PTRACE_GETREGSET, tid, reinterpret_cast(NT_PRFPREG), &iov) != ++ 0) { ++ switch (errno) { ++#if defined(ARCH_CPU_ARMEL) ++ case EIO: ++ return GetFloatingPointRegistersLegacy(tid, context, can_log); ++#endif // ARCH_CPU_ARMEL ++ case EINVAL: ++ // A 32-bit process running on a 64-bit CPU doesn't have this register ++ // set. It should have a VFP register set instead. ++ break; ++ default: ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ } else { ++ if (iov.iov_len != sizeof(context->f32.fpregs)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << iov.iov_len ++ << " != " << sizeof(context->f32.fpregs); ++ return false; ++ } ++ context->f32.have_fpregs = true; ++ } ++ ++ iov.iov_base = &context->f32.vfp; ++ iov.iov_len = sizeof(context->f32.vfp); ++ if (ptrace( ++ PTRACE_GETREGSET, tid, reinterpret_cast(NT_ARM_VFP), &iov) != ++ 0) { ++ switch (errno) { ++ case EINVAL: ++ // VFP may not be present on 32-bit ARM cpus. ++ break; ++ default: ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ } else { ++ if (iov.iov_len != kArmVfpSize && iov.iov_len != sizeof(context->f32.vfp)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << iov.iov_len ++ << " != " << sizeof(context->f32.vfp); ++ return false; ++ } ++ context->f32.have_vfp = true; ++ } ++ ++ if (!(context->f32.have_fpregs || context->f32.have_vfp)) { ++ LOG_IF(ERROR, can_log) << "Unable to collect registers"; ++ return false; ++ } ++ return true; ++} ++ ++bool GetFloatingPointRegisters64(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = context; ++ iov.iov_len = sizeof(*context); ++ if (ptrace( ++ PTRACE_GETREGSET, tid, reinterpret_cast(NT_PRFPREG), &iov) != ++ 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ if (iov.iov_len != sizeof(context->f64)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << iov.iov_len ++ << " != " << sizeof(context->f64); ++ return false; ++ } ++ return true; ++} ++ ++bool GetThreadArea32(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++#if defined(ARCH_CPU_ARMEL) ++ void* result; ++ if (ptrace(PTRACE_GET_THREAD_AREA, tid, nullptr, &result) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ *address = FromPointerCast(result); ++ return true; ++#else ++ // TODO(jperaza): it doesn't look like there is a way for a 64-bit ARM process ++ // to get the thread area for a 32-bit ARM process with ptrace. ++ LOG_IF(WARNING, can_log) ++ << "64-bit ARM cannot trace TLS area for a 32-bit process"; ++ return false; ++#endif // ARCH_CPU_ARMEL ++} ++ ++bool GetThreadArea64(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = address; ++ iov.iov_len = sizeof(*address); ++ if (ptrace( ++ PTRACE_GETREGSET, tid, reinterpret_cast(NT_ARM_TLS), &iov) != ++ 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ if (iov.iov_len != 8) { ++ LOG_IF(ERROR, can_log) << "address size mismatch"; ++ return false; ++ } ++ return true; ++} ++#elif defined(ARCH_CPU_MIPS_FAMILY) ++// PTRACE_GETREGSET, introduced in Linux 2.6.34 (2225a122ae26), requires kernel ++// support enabled by HAVE_ARCH_TRACEHOOK. This has been set for x86 (including ++// x86_64) since Linux 2.6.28 (99bbc4b1e677a), but for MIPS only since ++// Linux 3.13 (c0ff3c53d4f99). Older Linux kernels support PTRACE_GETREGS, ++// and PTRACE_GETFPREGS instead, which don't allow checking the size of data ++// copied. Also, PTRACE_GETREGS assumes register size of 64 bits even for 32 bit ++// MIPS CPU (contrary to PTRACE_GETREGSET behavior), so we need buffer ++// structure here. ++ ++bool GetGeneralPurposeRegistersLegacy(pid_t tid, ++ ThreadContext* context, ++ bool can_log) { ++ ThreadContext context_buffer; ++ if (ptrace(PTRACE_GETREGS, tid, nullptr, &context_buffer.t64) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++// Bitness of target process can't be determined through ptrace here, so we ++// assume target process has the same as current process, making cross-bit ++// ptrace unsupported on MIPS for kernels older than 3.13 ++#if defined(ARCH_CPU_MIPSEL) ++#define THREAD_CONTEXT_FIELD t32 ++#elif defined(ARCH_CPU_MIPS64EL) ++#define THREAD_CONTEXT_FIELD t64 ++#endif ++ for (size_t reg = 0; reg < 32; ++reg) { ++ context->THREAD_CONTEXT_FIELD.regs[reg] = context_buffer.t64.regs[reg]; ++ } ++ context->THREAD_CONTEXT_FIELD.lo = context_buffer.t64.lo; ++ context->THREAD_CONTEXT_FIELD.hi = context_buffer.t64.hi; ++ context->THREAD_CONTEXT_FIELD.cp0_epc = context_buffer.t64.cp0_epc; ++ context->THREAD_CONTEXT_FIELD.cp0_badvaddr = context_buffer.t64.cp0_badvaddr; ++ context->THREAD_CONTEXT_FIELD.cp0_status = context_buffer.t64.cp0_status; ++ context->THREAD_CONTEXT_FIELD.cp0_cause = context_buffer.t64.cp0_cause; ++#undef THREAD_CONTEXT_FIELD ++ return true; ++} ++ ++bool GetFloatingPointRegistersLegacy(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ if (ptrace(PTRACE_GETFPREGS, tid, nullptr, &context->f32.fpregs) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ return true; ++} ++ ++bool GetFloatingPointRegisters32(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = &context->f32.fpregs; ++ iov.iov_len = sizeof(context->f32.fpregs); ++ if (ptrace(PTRACE_GETFPREGS, tid, nullptr, &context->f32.fpregs) != 0) { ++ switch (errno) { ++ case EINVAL: ++ // fp may not be present ++ break; ++ case EIO: ++ return GetFloatingPointRegistersLegacy(tid, context, can_log); ++ default: ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ } ++ return true; ++} ++ ++bool GetFloatingPointRegisters64(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = &context->f64.fpregs; ++ iov.iov_len = sizeof(context->f64.fpregs); ++ if (ptrace(PTRACE_GETFPREGS, tid, nullptr, &context->f64.fpregs) != 0) { ++ switch (errno) { ++ case EINVAL: ++ // fp may not be present ++ break; ++ case EIO: ++ return GetFloatingPointRegistersLegacy(tid, context, can_log); ++ default: ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ } ++ return true; ++} ++ ++bool GetThreadArea32(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++#if defined(ARCH_CPU_MIPSEL) ++ void* result; ++ if (ptrace(PTRACE_GET_THREAD_AREA, tid, nullptr, &result) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ *address = FromPointerCast(result); ++ return true; ++#else ++ return false; ++#endif ++} ++ ++bool GetThreadArea64(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ void* result; ++#if defined(ARCH_CPU_MIPSEL) ++ if (ptrace(PTRACE_GET_THREAD_AREA_3264, tid, nullptr, &result) != 0) { ++#else ++ if (ptrace(PTRACE_GET_THREAD_AREA, tid, nullptr, &result) != 0) { ++#endif ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ *address = FromPointerCast(result); ++ return true; ++} ++ ++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) ++bool GetFloatingPointRegisters32(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ return false; ++} ++ ++bool GetFloatingPointRegisters64(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = context; ++ iov.iov_len = sizeof(*context); ++ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast(NT_PRFPREG), &iov) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ if (iov.iov_len != sizeof(context->f64)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << iov.iov_len ++ << " != " << sizeof(context->f64); ++ return false; ++ } ++ ++ return true; ++} ++ ++bool GetThreadArea32(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ return false; ++} ++ ++bool GetThreadArea64(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ *address = context.t64.regs[2]; ++ return true; ++} ++ ++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) ++bool GetFloatingPointRegisters32(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ return false; ++} ++ ++bool GetFloatingPointRegisters64(pid_t tid, ++ FloatContext* context, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = context; ++ iov.iov_len = sizeof(*context); ++ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast(NT_PRFPREG), &iov) != 0) { ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return false; ++ } ++ if (iov.iov_len != sizeof(context->f64)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << iov.iov_len ++ << " != " << sizeof(context->f64); ++ return false; ++ } ++ ++ return true; ++} ++ ++bool GetThreadArea32(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ return false; ++} ++ ++bool GetThreadArea64(pid_t tid, ++ const ThreadContext& context, ++ LinuxVMAddress* address, ++ bool can_log) { ++ *address = context.t64.regs[2]; ++ return true; ++} ++ ++#else ++#error Port. ++#endif // ARCH_CPU_X86_FAMILY ++ ++size_t GetGeneralPurposeRegistersAndLength(pid_t tid, ++ ThreadContext* context, ++ bool can_log) { ++ iovec iov; ++ iov.iov_base = context; ++ iov.iov_len = sizeof(*context); ++ if (ptrace( ++ PTRACE_GETREGSET, tid, reinterpret_cast(NT_PRSTATUS), &iov) != ++ 0) { ++ switch (errno) { ++#if defined(ARCH_CPU_ARMEL) || defined(ARCH_CPU_MIPS_FAMILY) ++ case EIO: ++ return GetGeneralPurposeRegistersLegacy(tid, context, can_log) ++ ? sizeof(context->t32) ++ : 0; ++#endif // ARCH_CPU_ARMEL ++ default: ++ PLOG_IF(ERROR, can_log) << "ptrace"; ++ return 0; ++ } ++ } ++ return iov.iov_len; ++} ++ ++bool GetGeneralPurposeRegisters32(pid_t tid, ++ ThreadContext* context, ++ bool can_log) { ++ size_t length = GetGeneralPurposeRegistersAndLength(tid, context, can_log); ++ if (length != sizeof(context->t32)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << length ++ << " != " << sizeof(context->t32); ++ return false; ++ } ++ return true; ++} ++ ++bool GetGeneralPurposeRegisters64(pid_t tid, ++ ThreadContext* context, ++ bool can_log) { ++ size_t length = GetGeneralPurposeRegistersAndLength(tid, context, can_log); ++ if (length != sizeof(context->t64)) { ++ LOG_IF(ERROR, can_log) << "Unexpected registers size " << length ++ << " != " << sizeof(context->t64); ++ return false; ++ } ++ return true; ++} ++ ++} // namespace ++ ++Ptracer::Ptracer(bool can_log) ++ : is_64_bit_(false), can_log_(can_log), initialized_() {} ++ ++Ptracer::Ptracer(bool is_64_bit, bool can_log) ++ : is_64_bit_(is_64_bit), can_log_(can_log), initialized_() { ++ INITIALIZATION_STATE_SET_INITIALIZING(initialized_); ++ INITIALIZATION_STATE_SET_VALID(initialized_); ++} ++ ++Ptracer::~Ptracer() {} ++ ++bool Ptracer::Initialize(pid_t pid) { ++ INITIALIZATION_STATE_SET_INITIALIZING(initialized_); ++ ++ ThreadContext context; ++ size_t length = GetGeneralPurposeRegistersAndLength(pid, &context, can_log_); ++ if (length == sizeof(context.t64)) { ++ is_64_bit_ = true; ++ } else if (length == sizeof(context.t32)) { ++ is_64_bit_ = false; ++ } else { ++ LOG_IF(ERROR, can_log_) ++ << "Unexpected registers size " << length ++ << " != " << sizeof(context.t64) << ", " << sizeof(context.t32); ++ return false; ++ } ++ ++ INITIALIZATION_STATE_SET_VALID(initialized_); ++ return true; ++} ++ ++bool Ptracer::Is64Bit() { ++ INITIALIZATION_STATE_DCHECK_VALID(initialized_); ++ return is_64_bit_; ++} ++ ++bool Ptracer::GetThreadInfo(pid_t tid, ThreadInfo* info) { ++ INITIALIZATION_STATE_DCHECK_VALID(initialized_); ++ ++ if (is_64_bit_) { ++ return GetGeneralPurposeRegisters64(tid, &info->thread_context, can_log_) && ++ GetFloatingPointRegisters64(tid, &info->float_context, can_log_) && ++ GetThreadArea64(tid, ++ info->thread_context, ++ &info->thread_specific_data_address, ++ can_log_); ++ } ++ ++ return GetGeneralPurposeRegisters32(tid, &info->thread_context, can_log_) && ++ GetFloatingPointRegisters32(tid, &info->float_context, can_log_) && ++ GetThreadArea32(tid, ++ info->thread_context, ++ &info->thread_specific_data_address, ++ can_log_); ++} ++ ++ssize_t Ptracer::ReadUpTo(pid_t pid, ++ LinuxVMAddress address, ++ size_t size, ++ char* buffer) { ++ size_t bytes_read = 0; ++ while (size > 0) { ++ errno = 0; ++ ++ if (size >= sizeof(long)) { ++ *reinterpret_cast(buffer) = ++ ptrace(PTRACE_PEEKDATA, pid, address, nullptr); ++ ++ if (errno == EIO) { ++ ssize_t last_bytes = ReadLastBytes(pid, address, size, buffer); ++ return last_bytes >= 0 ? bytes_read + last_bytes : -1; ++ } ++ ++ if (errno != 0) { ++ PLOG_IF(ERROR, can_log_) << "ptrace"; ++ return -1; ++ } ++ ++ size -= sizeof(long); ++ buffer += sizeof(long); ++ address += sizeof(long); ++ bytes_read += sizeof(long); ++ } else { ++ long word = ptrace(PTRACE_PEEKDATA, pid, address, nullptr); ++ ++ if (errno == 0) { ++ memcpy(buffer, reinterpret_cast(&word), size); ++ return bytes_read + size; ++ } ++ ++ if (errno == EIO) { ++ ssize_t last_bytes = ReadLastBytes(pid, address, size, buffer); ++ return last_bytes >= 0 ? bytes_read + last_bytes : -1; ++ } ++ ++ PLOG_IF(ERROR, can_log_); ++ return -1; ++ } ++ } ++ ++ return bytes_read; ++} ++ ++// Handles an EIO by reading at most size bytes from address into buffer if ++// address was within a word of a possible page boundary, by aligning to read ++// the last word of the page and extracting the desired bytes. ++ssize_t Ptracer::ReadLastBytes(pid_t pid, ++ LinuxVMAddress address, ++ size_t size, ++ char* buffer) { ++ LinuxVMAddress aligned = ((address + 4095) & ~4095) - sizeof(long); ++ if (aligned >= address || aligned == address - sizeof(long)) { ++ PLOG_IF(ERROR, can_log_) << "ptrace"; ++ return -1; ++ } ++ DCHECK_GT(aligned, address - sizeof(long)); ++ ++ errno = 0; ++ long word = ptrace(PTRACE_PEEKDATA, pid, aligned, nullptr); ++ if (errno != 0) { ++ PLOG_IF(ERROR, can_log_) << "ptrace"; ++ return -1; ++ } ++ ++ size_t bytes_read = address - aligned; ++ size_t last_bytes = std::min(sizeof(long) - bytes_read, size); ++ memcpy(buffer, reinterpret_cast(&word) + bytes_read, last_bytes); ++ return last_bytes; ++} ++ ++} // namespace crashpad +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h @@ -79,6 +79,8 @@ union ThreadContext { uint32_t cp0_status; uint32_t cp0_cause; @@ -2844,10 +6671,84 @@ index 5b55c24a7..8beb982e9 100644 #else #error Port. #endif // ARCH_CPU_X86 -diff --git a/src/3rdparty/chromium/third_party/dav1d/BUILD.gn b/src/3rdparty/chromium/third_party/dav1d/BUILD.gn -index 7616b7f3f..fddb4fb9f 100644 ---- a/src/3rdparty/chromium/third_party/dav1d/BUILD.gn -+++ b/src/3rdparty/chromium/third_party/dav1d/BUILD.gn +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h.rej +@@ -0,0 +1,73 @@ ++--- src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h +++++ src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h ++@@ -79,6 +79,8 @@ union ThreadContext { ++ uint32_t cp0_status; ++ uint32_t cp0_cause; ++ uint32_t padding1_; +++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) +++ // nothing ++ #else ++ #error Port. ++ #endif // ARCH_CPU_X86_FAMILY ++@@ -132,12 +134,20 @@ union ThreadContext { ++ uint64_t cp0_badvaddr; ++ uint64_t cp0_status; ++ uint64_t cp0_cause; +++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) +++ // Reflects user_regs_struct in sys/user.h +++ uint64_t regs[32]; +++ uint64_t orig_a0; +++ uint64_t csr_era; +++ uint64_t csr_badv; +++ uint64_t reserved[10]; ++ #else ++ #error Port. ++ #endif // ARCH_CPU_X86_FAMILY ++ } t64; ++ ++-#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM64) +++#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM64) || \ +++ defined(ARCH_CPU_LOONGARCH_FAMILY) ++ using NativeThreadContext = user_regs_struct; ++ #elif defined(ARCH_CPU_ARMEL) ++ using NativeThreadContext = user_regs; ++@@ -145,7 +155,7 @@ union ThreadContext { ++ // No appropriate NativeThreadsContext type available for MIPS ++ #else ++ #error Port. ++-#endif // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64 +++#endif // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64 || ARCH_CPU_LOONGARCH_FAMILY ++ ++ #if !defined(ARCH_CPU_MIPS_FAMILY) ++ #if defined(ARCH_CPU_32_BITS) ++@@ -218,6 +228,8 @@ union FloatContext { ++ } fpregs[32]; ++ uint32_t fpcsr; ++ uint32_t fpu_id; +++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) +++ // nothing ++ #else ++ #error Port. ++ #endif // ARCH_CPU_X86_FAMILY ++@@ -252,6 +264,10 @@ union FloatContext { ++ double fpregs[32]; ++ uint32_t fpcsr; ++ uint32_t fpu_id; +++#elif defined(ARCH_CPU_LOONGARCH_FAMILY) +++ uint64_t fvregs[32*4]; +++ uint64_t fcc; +++ uint32_t fcsr; ++ #else ++ #error Port. ++ #endif // ARCH_CPU_X86_FAMILY ++@@ -278,8 +294,8 @@ union FloatContext { ++ #endif ++ #elif defined(ARCH_CPU_ARM64) ++ static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch"); ++-#elif defined(ARCH_CPU_MIPS_FAMILY) ++-// No appropriate floating point context native type for available MIPS. +++#elif defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_LOONGARCH_FAMILY) +++// No appropriate floating point context native type for available MIPS and LOONGARCH. ++ #else ++ #error Port. ++ #endif // ARCH_CPU_X86 +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/dav1d/BUILD.gn ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/dav1d/BUILD.gn @@ -18,8 +18,12 @@ if (is_win) { "Only Linux X64 MSAN is supported") platform_config_root = "config/linux-noasm/$current_cpu" @@ -2863,11 +6764,28 @@ index 7616b7f3f..fddb4fb9f 100644 } # Clang LTO doesn't respect stack alignment and clang-cl doesn't support setting -diff --git a/src/3rdparty/chromium/third_party/dav1d/config/linux-noasm/loongarch64/config.h b/src/3rdparty/chromium/third_party/dav1d/config/linux-noasm/loongarch64/config.h -new file mode 100644 -index 000000000..0bf4191db --- /dev/null -+++ b/src/3rdparty/chromium/third_party/dav1d/config/linux-noasm/loongarch64/config.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/dav1d/BUILD.gn.rej +@@ -0,0 +1,17 @@ ++--- src/3rdparty/chromium/third_party/dav1d/BUILD.gn +++++ src/3rdparty/chromium/third_party/dav1d/BUILD.gn ++@@ -18,8 +18,12 @@ if (is_win) { ++ "Only Linux X64 MSAN is supported") ++ platform_config_root = "config/linux-noasm/$current_cpu" ++ } else { ++- # Linux configuration files seem to work on Mac, so just reuse them. ++- platform_config_root = "config/linux/$current_cpu" +++ if (current_cpu == "loongarch64") { +++ platform_config_root = "config/linux-noasm/$current_cpu" +++ } else { +++ # Linux configuration files seem to work on Mac, so just reuse them. +++ platform_config_root = "config/linux/$current_cpu" +++ } ++ } ++ ++ # Clang LTO doesn't respect stack alignment and clang-cl doesn't support setting +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/dav1d/config/linux-noasm/loongarch64/config.h @@ -0,0 +1,38 @@ +/* + * Autogenerated by the Meson build system. @@ -2907,11 +6825,8 @@ index 000000000..0bf4191db +#define HAVE_POSIX_MEMALIGN 1 + +#define HAVE_UNISTD_H 1 -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/config.h b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/config.h -new file mode 100644 -index 000000000..ae8c2ba9b --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/config.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/config.h @@ -0,0 +1,2626 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_H @@ -5539,20 +9454,14 @@ index 000000000..ae8c2ba9b +#define CONFIG_LIBSMBCLIENT_PROTOCOL 0 +#define CONFIG_LIBZMQ_PROTOCOL 0 +#endif /* FFMPEG_CONFIG_H */ -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/bsf_list.c b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/bsf_list.c -new file mode 100644 -index 000000000..d31ece942 --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/bsf_list.c ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/bsf_list.c @@ -0,0 +1,3 @@ +static const AVBitStreamFilter * const bitstream_filters[] = { + &ff_null_bsf, + NULL }; -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/codec_list.c b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/codec_list.c -new file mode 100644 -index 000000000..49f757b2d --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/codec_list.c ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/codec_list.c @@ -0,0 +1,20 @@ +static const AVCodec * const codec_list[] = { + &ff_h264_decoder, @@ -5574,11 +9483,8 @@ index 000000000..49f757b2d + &ff_pcm_u8_decoder, + &ff_libopus_decoder, + NULL }; -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/parser_list.c b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/parser_list.c -new file mode 100644 -index 000000000..50acddb28 --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/parser_list.c ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavcodec/parser_list.c @@ -0,0 +1,11 @@ +static const AVCodecParser * const parser_list[] = { + &ff_aac_parser, @@ -5591,11 +9497,8 @@ index 000000000..50acddb28 + &ff_vp8_parser, + &ff_vp9_parser, + NULL }; -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/demuxer_list.c b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/demuxer_list.c -new file mode 100644 -index 000000000..920b22bfa --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/demuxer_list.c ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/demuxer_list.c @@ -0,0 +1,9 @@ +static const AVInputFormat * const demuxer_list[] = { + &ff_aac_demuxer, @@ -5606,27 +9509,18 @@ index 000000000..920b22bfa + &ff_ogg_demuxer, + &ff_wav_demuxer, + NULL }; -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/muxer_list.c b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/muxer_list.c -new file mode 100644 -index 000000000..f36d9499c --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/muxer_list.c ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/muxer_list.c @@ -0,0 +1,2 @@ +static const AVOutputFormat * const muxer_list[] = { + NULL }; -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/protocol_list.c b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/protocol_list.c -new file mode 100644 -index 000000000..247e1e4c3 --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/protocol_list.c ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavformat/protocol_list.c @@ -0,0 +1,2 @@ +static const URLProtocol * const url_protocols[] = { + NULL }; -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/avconfig.h b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/avconfig.h -new file mode 100644 -index 000000000..c289fbb55 --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/avconfig.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/avconfig.h @@ -0,0 +1,6 @@ +/* Generated by ffmpeg configure */ +#ifndef AVUTIL_AVCONFIG_H @@ -5634,21 +9528,16 @@ index 000000000..c289fbb55 +#define AV_HAVE_BIGENDIAN 0 +#define AV_HAVE_FAST_UNALIGNED 1 +#endif /* AVUTIL_AVCONFIG_H */ -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/ffversion.h b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/ffversion.h -new file mode 100644 -index 000000000..86446e843 --- /dev/null -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/ffversion.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/config/Chrome/linux/loongarch64/libavutil/ffversion.h @@ -0,0 +1,5 @@ +/* Automatically generated by version.sh, do not manually edit! */ +#ifndef AVUTIL_FFVERSION_H +#define AVUTIL_FFVERSION_H +#define FFMPEG_VERSION "git-2024-04-23-445820325" +#endif /* AVUTIL_FFVERSION_H */ -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py b/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py -index 75333a2c9..5db77aab9 100755 ---- a/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py @@ -36,7 +36,7 @@ BRANDINGS = [ ARCH_MAP = { 'android': ['ia32', 'x64', 'arm-neon', 'arm64'], @@ -5667,7 +9556,7 @@ index 75333a2c9..5db77aab9 100755 elif platform.machine() == 'mips32': host_arch = 'mipsel' elif platform.machine() == 'mips64': -@@ -820,6 +822,11 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, +@@ -820,6 +822,11 @@ def ConfigureAndBuild(target_arch, targe '--extra-cflags=--target=mips64el-linux-gnuabi64', '--extra-ldflags=--target=mips64el-linux-gnuabi64', ]) @@ -5679,7 +9568,7 @@ index 75333a2c9..5db77aab9 100755 else: print( 'Error: Unknown target arch %r for target OS %r!' % (target_arch, -@@ -834,18 +841,21 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, +@@ -834,18 +841,21 @@ def ConfigureAndBuild(target_arch, targe ]) if 'win' not in target_os: @@ -5708,11 +9597,73 @@ index 75333a2c9..5db77aab9 100755 configure_flags['Common'].append('--extra-ldflags=-fuse-ld=lld') # Should be run on Mac, unless we're cross-compiling on Linux. -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh b/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh -index 0e5159d6f..ee640403d 100755 ---- a/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh -@@ -10,7 +10,7 @@ for os in android linux linux-noasm mac win; do +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py.rej +@@ -0,0 +1,61 @@ ++--- src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py +++++ src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py ++@@ -36,7 +36,7 @@ BRANDINGS = [ ++ ARCH_MAP = { ++ 'android': ['ia32', 'x64', 'arm-neon', 'arm64'], ++ 'linux': [ ++- 'ia32', 'x64', 'mipsel', 'mips64el', 'noasm-x64', 'arm', 'arm-neon', +++ 'ia32', 'x64', 'mipsel', 'mips64el', 'loongarch64', 'noasm-x64', 'arm', 'arm-neon', ++ 'arm64' ++ ], ++ 'mac': ['x64', 'arm64'], ++@@ -133,6 +133,8 @@ def DetermineHostOsAndArch(): ++ host_arch = 'x64' ++ elif platform.machine() == 'aarch64': ++ host_arch = 'arm64' +++ elif platform.machine() == 'loongarch64': +++ host_arch = 'loongarch64' ++ elif platform.machine() == 'mips32': ++ host_arch = 'mipsel' ++ elif platform.machine() == 'mips64': ++@@ -820,6 +822,11 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, ++ '--extra-cflags=--target=mips64el-linux-gnuabi64', ++ '--extra-ldflags=--target=mips64el-linux-gnuabi64', ++ ]) +++ elif target_arch == 'loongarch64': +++ if target_os == 'linux': +++ configure_flags['Common'].extend([ +++ '--arch=loongarch64', +++ ]) ++ else: ++ print( ++ 'Error: Unknown target arch %r for target OS %r!' % (target_arch, ++@@ -834,18 +841,21 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, ++ ]) ++ ++ if 'win' not in target_os: ++- configure_flags['Common'].extend([ ++- '--enable-pic', ++- '--cc=clang', ++- '--cxx=clang++', ++- '--ld=clang', ++- ]) +++ if target_arch != 'loongarch64': +++ configure_flags['Common'].extend([ +++ '--enable-pic', +++ '--cc=clang', +++ '--cxx=clang++', +++ '--ld=clang', +++ ]) +++ else: +++ configure_flags['Common'].extend(['--enable-pic']) ++ ++ # Clang Linux will use the first 'ld' it finds on the path, which will ++ # typically be the system one, so explicitly configure use of Clang's ++ # ld.lld, to ensure that things like cross-compilation and LTO work. ++ # This does not work for ia32 and is always used on mac. ++- if target_arch != 'ia32' and target_os != 'mac': +++ if target_arch != 'ia32' and target_os != 'mac' and target_arch != 'loongarch64': ++ configure_flags['Common'].append('--extra-ldflags=-fuse-ld=lld') ++ ++ # Should be run on Mac, unless we're cross-compiling on Linux. +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh +@@ -10,7 +10,7 @@ for os in android linux linux-noasm mac # Copy config files for various architectures: # - ia32/x64 have config.asm, config.h # - arm/arm-neon have config.h @@ -5721,10 +9672,22 @@ index 0e5159d6f..ee640403d 100755 # Don't waste time on non-existent configs, if no config.h then skip. [ ! -e "build.$arch.$os/$target/config.h" ] && continue for f in config.h config.asm libavutil/avconfig.h libavutil/ffversion.h libavcodec/bsf_list.c libavcodec/codec_list.c libavcodec/parser_list.c libavformat/demuxer_list.c libavformat/muxer_list.c libavformat/protocol_list.c; do -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py b/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py -index 0f606dfae..ca6b9ae84 100755 ---- a/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py -+++ b/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh +++++ src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/copy_config.sh ++@@ -10,7 +10,7 @@ for os in android linux linux-noasm mac win; do ++ # Copy config files for various architectures: ++ # - ia32/x64 have config.asm, config.h ++ # - arm/arm-neon have config.h ++- for arch in arm arm-neon arm64 ia32 x64 mipsel mips64el; do +++ for arch in arm arm-neon arm64 ia32 x64 mipsel mips64el loongarch64; do ++ # Don't waste time on non-existent configs, if no config.h then skip. ++ [ ! -e "build.$arch.$os/$target/config.h" ] && continue ++ for f in config.h config.asm libavutil/avconfig.h libavutil/ffversion.h libavcodec/bsf_list.c libavcodec/codec_list.c libavcodec/parser_list.c libavformat/demuxer_list.c libavformat/muxer_list.c libavformat/protocol_list.c; do +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py @@ -77,7 +77,7 @@ GN_SOURCE_END = """] Attr = enum('ARCHITECTURE', 'TARGET', 'PLATFORM') SUPPORT_MATRIX = { @@ -5734,10 +9697,22 @@ index 0f606dfae..ca6b9ae84 100755 Attr.TARGET: set(['Chromium', 'Chrome', 'ChromeOS']), Attr.PLATFORM: -diff --git a/src/3rdparty/chromium/third_party/ffmpeg/configure b/src/3rdparty/chromium/third_party/ffmpeg/configure -index f09efe19a..53e24f34c 100755 ---- a/src/3rdparty/chromium/third_party/ffmpeg/configure -+++ b/src/3rdparty/chromium/third_party/ffmpeg/configure +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py +++++ src/3rdparty/chromium/third_party/ffmpeg/chromium/scripts/generate_gn.py ++@@ -77,7 +77,7 @@ GN_SOURCE_END = """] ++ Attr = enum('ARCHITECTURE', 'TARGET', 'PLATFORM') ++ SUPPORT_MATRIX = { ++ Attr.ARCHITECTURE: ++- set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon', 'mipsel', 'mips64el']), +++ set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon', 'mipsel', 'mips64el', 'loongarch64']), ++ Attr.TARGET: ++ set(['Chromium', 'Chrome', 'ChromeOS']), ++ Attr.PLATFORM: +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/ffmpeg/configure ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/configure @@ -1984,6 +1984,7 @@ ARCH_LIST=" avr32_uc bfin @@ -5746,7 +9721,7 @@ index f09efe19a..53e24f34c 100755 m68k mips mips64 -@@ -2596,10 +2597,10 @@ for ext in $(filter_out mmx $ARCH_EXT_LIST_X86_SIMD); do +@@ -2596,10 +2597,10 @@ for ext in $(filter_out mmx $ARCH_EXT_LI eval ${ext}_suggest='"${ext}_external ${ext}_inline"' done @@ -5783,10 +9758,58 @@ index f09efe19a..53e24f34c 100755 mips) check_64bit mips mips64 '_MIPS_SIM > 1' enabled shared && enable_weak pic -diff --git a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h -index e67df4123..2cef1c3e6 100644 ---- a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h -+++ b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/ffmpeg/configure.rej +@@ -0,0 +1,47 @@ ++--- src/3rdparty/chromium/third_party/ffmpeg/configure +++++ src/3rdparty/chromium/third_party/ffmpeg/configure ++@@ -1984,6 +1984,7 @@ ARCH_LIST=" ++ avr32_uc ++ bfin ++ ia64 +++ loongarch64 ++ m68k ++ mips ++ mips64 ++@@ -2596,10 +2597,10 @@ for ext in $(filter_out mmx $ARCH_EXT_LIST_X86_SIMD); do ++ eval ${ext}_suggest='"${ext}_external ${ext}_inline"' ++ done ++ ++-aligned_stack_if_any="aarch64 ppc x86" ++-fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64" ++-fast_clz_if_any="aarch64 alpha avr32 mips ppc x86" ++-fast_unaligned_if_any="aarch64 ppc x86" +++aligned_stack_if_any="aarch64 ppc x86 loongarch64" +++fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64 loongarch64" +++fast_clz_if_any="aarch64 alpha avr32 mips ppc x86 loongarch64" +++fast_unaligned_if_any="aarch64 ppc x86 loongarch64" ++ simd_align_16_if_any="altivec neon sse" ++ simd_align_32_if_any="avx" ++ simd_align_64_if_any="avx512" ++@@ -4871,6 +4872,9 @@ case "$arch" in ++ arm*|iPad*|iPhone*) ++ arch="arm" ++ ;; +++ loongarch64) +++ arch="loongarch64" +++ ;; ++ mips*|IP*) ++ case "$arch" in ++ *el) ++@@ -5278,6 +5282,11 @@ case "$arch" in ++ aarch64|alpha|ia64) ++ enabled shared && enable_weak pic ++ ;; +++ loongarch64) +++ enable loongarch64 +++ enabled loongarch64 +++ enabled shared && enabled_weak pic +++ ;; ++ mips) ++ check_64bit mips mips64 '_MIPS_SIM > 1' ++ enabled shared && enable_weak pic +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h @@ -88,7 +88,7 @@ */ #if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \ @@ -6370,24 +10393,785 @@ index e67df4123..2cef1c3e6 100644 LSS_INLINE pid_t LSS_NAME(fork)(void) { // No fork syscall on aarch64 - implement by means of the clone syscall. // Note that this does not reset glibc's cached view of the PID/TID, so -diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h -index fdc65ac47..7e274a3bc 100644 ---- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h -+++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h -@@ -48,7 +48,7 @@ constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h.rej +@@ -0,0 +1,585 @@ ++--- src/3rdparty/chromium/third_party/lss/linux_syscall_support.h +++++ src/3rdparty/chromium/third_party/lss/linux_syscall_support.h ++@@ -88,7 +88,7 @@ ++ */ ++ #if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \ ++ defined(__mips__) || defined(__PPC__) || defined(__ARM_EABI__) || \ ++- defined(__aarch64__) || defined(__s390__)) \ +++ defined(__aarch64__) || defined(__s390__) || defined(__loongarch64)) \ ++ && (defined(__linux) || defined(__ANDROID__)) ++ ++ #ifndef SYS_CPLUSPLUS ++@@ -266,6 +266,12 @@ struct kernel_timeval { ++ long tv_usec; ++ }; ++ +++/* include/linux/time.h */ +++struct kernel_itimerval { +++ struct kernel_timeval it_interval; +++ struct kernel_timeval it_value; +++}; +++ ++ /* include/linux/resource.h */ ++ struct kernel_rusage { ++ struct kernel_timeval ru_utime; ++@@ -301,8 +307,8 @@ struct kernel_old_sigaction { ++ } __attribute__((packed,aligned(4))); ++ #elif (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) ++ #define kernel_old_sigaction kernel_sigaction ++-#elif defined(__aarch64__) ++- // No kernel_old_sigaction defined for arm64. +++#elif defined(__aarch64__) || defined(__loongarch64) +++ // No kernel_old_sigaction defined for arm64 and loongarch64. ++ #endif ++ ++ /* Some kernel functions (e.g. sigaction() in 2.6.23) require that the ++@@ -341,7 +347,9 @@ struct kernel_sigaction { ++ void (*sa_sigaction_)(int, siginfo_t *, void *); ++ }; ++ unsigned long sa_flags; +++ #if !defined(__loongarch64) ++ void (*sa_restorer)(void); +++ #endif ++ struct kernel_sigset_t sa_mask; ++ #endif ++ }; ++@@ -519,7 +527,7 @@ struct kernel_stat { ++ int st_blocks; ++ int st_pad4[14]; ++ }; ++-#elif defined(__aarch64__) +++#elif defined(__aarch64__) || defined(__loongarch64) ++ struct kernel_stat { ++ unsigned long st_dev; ++ unsigned long st_ino; ++@@ -701,6 +709,37 @@ struct kernel_statfs { ++ }; ++ #endif ++ +++struct kernel_statx_timestamp { +++ int64_t tv_sec; +++ uint32_t tv_nsec; +++ int32_t __reserved; +++}; +++ +++struct kernel_statx { +++ uint32_t stx_mask; +++ uint32_t stx_blksize; +++ uint64_t stx_attributes; +++ uint32_t stx_nlink; +++ uint32_t stx_uid; +++ uint32_t stx_gid; +++ uint16_t stx_mode; +++ uint16_t __spare0[1]; +++ uint64_t stx_ino; +++ uint64_t stx_size; +++ uint64_t stx_blocks; +++ uint64_t stx_attributes_mask; +++ struct kernel_statx_timestamp stx_atime; +++ struct kernel_statx_timestamp stx_btime; +++ struct kernel_statx_timestamp stx_ctime; +++ struct kernel_statx_timestamp stx_mtime; +++ uint32_t stx_rdev_major; +++ uint32_t stx_rdev_minor; +++ uint32_t stx_dev_major; +++ uint32_t stx_dev_minor; +++ uint64_t stx_mnt_id; +++ uint64_t __spare2; +++ uint64_t __spare3[12]; +++}; ++ ++ /* Definitions missing from the standard header files */ ++ #ifndef O_DIRECTORY ++@@ -737,6 +776,18 @@ struct kernel_statfs { ++ #ifndef AT_REMOVEDIR ++ #define AT_REMOVEDIR 0x200 ++ #endif +++#ifndef AT_NO_AUTOMOUNT +++#define AT_NO_AUTOMOUNT 0x800 +++#endif +++#ifndef AT_EMPTY_PATH +++#define AT_EMPTY_PATH 0x1000 +++#endif +++#ifndef STATX_BASIC_STATS +++#define STATX_BASIC_STATS 0x000007ffU +++#endif +++#ifndef AT_STATX_SYNC_AS_STAT +++#define AT_STATX_SYNC_AS_STAT 0x0000 +++#endif ++ #ifndef MREMAP_FIXED ++ #define MREMAP_FIXED 2 ++ #endif ++@@ -1065,7 +1116,7 @@ struct kernel_statfs { ++ #define __NR_getrandom (__NR_SYSCALL_BASE + 384) ++ #endif ++ /* End of ARM 3/EABI definitions */ ++-#elif defined(__aarch64__) +++#elif defined(__aarch64__) || defined(__loongarch64) ++ #ifndef __NR_setxattr ++ #define __NR_setxattr 5 ++ #endif ++@@ -1121,9 +1172,11 @@ struct kernel_statfs { ++ #ifndef __NR_readlinkat ++ #define __NR_readlinkat 78 ++ #endif +++#if !defined(__loongarch64) ++ #ifndef __NR_newfstatat ++ #define __NR_newfstatat 79 ++ #endif +++#endif // __loongarch64 ++ #ifndef __NR_set_tid_address ++ #define __NR_set_tid_address 96 ++ #endif ++@@ -1164,7 +1217,10 @@ struct kernel_statfs { ++ #ifndef __NR_getrandom ++ #define __NR_getrandom 278 ++ #endif ++-/* End of aarch64 definitions */ +++#ifndef __NR_statx +++#define __NR_statx 291 +++#endif +++/* End of aarch64 || __loongarch64 definitions */ ++ #elif defined(__x86_64__) ++ #ifndef __NR_pread64 ++ #define __NR_pread64 17 ++@@ -1880,14 +1936,15 @@ struct kernel_statfs { ++ ++ #undef LSS_RETURN ++ #if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) \ ++- || defined(__ARM_EABI__) || defined(__aarch64__) || defined(__s390__)) +++ || defined(__ARM_EABI__) || defined(__aarch64__) || defined(__s390__) \ +++ || defined(__loongarch64)) ++ /* Failing system calls return a negative result in the range of ++ * -1..-4095. These are "errno" values with the sign inverted. ++ */ ++ #define LSS_RETURN(type, res) \ ++ do { \ ++ if ((unsigned long)(res) >= (unsigned long)(-4095)) { \ ++- LSS_ERRNO = -(res); \ +++ LSS_ERRNO = (int)(-(res)); \ ++ res = -1; \ ++ } \ ++ return (type) (res); \ ++@@ -1980,7 +2037,7 @@ struct kernel_statfs { ++ LSS_ENTRYPOINT \ ++ "pop %%ebx" \ ++ args \ ++- : "memory"); \ +++ : "memory"); \ ++ LSS_RETURN(type,__res) ++ #undef _syscall0 ++ #define _syscall0(type,name) \ ++@@ -2037,7 +2094,7 @@ struct kernel_statfs { ++ : "i" (__NR_##name), "ri" ((long)(arg1)), \ ++ "c" ((long)(arg2)), "d" ((long)(arg3)), \ ++ "S" ((long)(arg4)), "D" ((long)(arg5)) \ ++- : "memory"); \ +++ : "memory"); \ ++ LSS_RETURN(type,__res); \ ++ } ++ #undef _syscall6 ++@@ -2059,7 +2116,7 @@ struct kernel_statfs { ++ : "i" (__NR_##name), "0" ((long)(&__s)), \ ++ "c" ((long)(arg2)), "d" ((long)(arg3)), \ ++ "S" ((long)(arg4)), "D" ((long)(arg5)) \ ++- : "memory"); \ +++ : "memory"); \ ++ LSS_RETURN(type,__res); \ ++ } ++ LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, ++@@ -2241,7 +2298,7 @@ struct kernel_statfs { ++ #define _LSS_RETURN(type, res, cast) \ ++ do { \ ++ if ((uint64_t)(res) >= (uint64_t)(-4095)) { \ ++- LSS_ERRNO = -(res); \ +++ LSS_ERRNO = (int)(-(res)); \ ++ res = -1; \ ++ } \ ++ return (type)(cast)(res); \ ++@@ -3373,6 +3430,134 @@ struct kernel_statfs { ++ } ++ LSS_RETURN(int, __ret); ++ } +++ #elif defined(__loongarch64) +++ /* Most definitions of _syscallX() neglect to mark "memory" as being +++ * clobbered. This causes problems with compilers, that do a better job +++ * at optimizing across __asm__ calls. +++ * So, we just have to redefine all of the _syscallX() macros. +++ */ +++ #undef LSS_REG +++ #define LSS_REG(ar,a) register int64_t __r##ar __asm__("a"#ar) = (int64_t)a +++ /* syscall is like subroutine calls, all caller-saved registers may be +++ * clobbered, we should add them to the |Clobbers| list. +++ * a0 is not included because it's in the output list. +++ */ +++ #define LSS_SYSCALL_CLOBBERS "t0", "t1", "t2", "t3", "t4", "t5", "t6", \ +++ "t7", "t8", "memory" +++ #undef LSS_BODY +++ #define LSS_BODY(type,name,args...) \ +++ register int64_t __res_a0 __asm__("a0"); \ +++ register int64_t __a7 __asm__("a7") = __NR_##name; \ +++ int64_t __res; \ +++ __asm__ __volatile__ ("syscall 0x0\n" \ +++ : "=r"(__res_a0) \ +++ : "r"(__a7), ## args \ +++ : LSS_SYSCALL_CLOBBERS); \ +++ __res = __res_a0; \ +++ LSS_RETURN(type, __res) +++ #undef _syscall0 +++ #define _syscall0(type, name) \ +++ type LSS_NAME(name)(void) { \ +++ LSS_BODY(type, name); \ +++ } +++ #undef _syscall1 +++ #define _syscall1(type, name, type1, arg1) \ +++ type LSS_NAME(name)(type1 arg1) { \ +++ LSS_REG(0, arg1); LSS_BODY(type, name, "r"(__r0)); \ +++ } +++ #undef _syscall2 +++ #define _syscall2(type, name, type1, arg1, type2, arg2) \ +++ type LSS_NAME(name)(type1 arg1, type2 arg2) { \ +++ LSS_REG(0, arg1); LSS_REG(1, arg2); \ +++ LSS_BODY(type, name, "r"(__r0), "r"(__r1)); \ +++ } +++ #undef _syscall3 +++ #define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ +++ type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3) { \ +++ LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ +++ LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2)); \ +++ } +++ #undef _syscall4 +++ #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ +++ type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \ +++ LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ +++ LSS_REG(3, arg4); \ +++ LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3)); \ +++ } +++ #undef _syscall5 +++ #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ +++ type5,arg5) \ +++ type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ +++ type5 arg5) { \ +++ LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ +++ LSS_REG(3, arg4); LSS_REG(4, arg5); \ +++ LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3), \ +++ "r"(__r4)); \ +++ } +++ #undef _syscall6 +++ #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ +++ type5,arg5,type6,arg6) \ +++ type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ +++ type5 arg5, type6 arg6) { \ +++ LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \ +++ LSS_REG(3, arg4); LSS_REG(4, arg5); LSS_REG(5, arg6); \ +++ LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3), \ +++ "r"(__r4), "r"(__r5)); \ +++ } +++ +++ LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, +++ int flags, void *arg, int *parent_tidptr, +++ void *newtls, int *child_tidptr) { +++ int64_t __res; +++ { +++ register int64_t __res_a0 __asm__("a0"); +++ register uint64_t __flags __asm__("a0") = flags; +++ register void *__stack __asm__("a1") = child_stack; +++ register void *__ptid __asm__("a2") = parent_tidptr; +++ register void *__tls __asm__("a3") = newtls; +++ register int *__ctid __asm__("a4") = child_tidptr; +++ __asm__ __volatile__(/* Push "arg" and "fn" onto the stack that will be +++ * used by the child. +++ */ +++ "addi.d %2, %2, -16\n" +++ "st.d %1, %2, 8\n" +++ "st.d %4, %2, 0\n" +++ +++ /* %a0 = syscall(%a0 = flags, +++ * %a1 = child_stack, +++ * %a2 = parent_tidptr, +++ * %a3 = newtls, +++ * %a4 = child_tidptr) +++ */ +++ "li.d $a7, %8\n" +++ "syscall 0x0\n" +++ +++ /* if (%a0 != 0) +++ * return %a0; +++ */ +++ "bnez $a0, 1f\n" +++ +++ /* In the child, now. Call "fn(arg)". +++ */ +++ "ld.d $a0, $sp, 0\n" +++ "ld.d $a1, $sp, 8\n" +++ "addi.d $sp, $sp, 16\n" +++ "jirl $ra, $a1, 0\n" +++ +++ /* Call _exit(%a0). +++ */ +++ "li.d $a7, %9\n" +++ "syscall 0x0\n" +++ "1:\n" +++ : "=r" (__res_a0) +++ : "r"(fn), "r"(__stack), "r"(__flags), "r"(arg), +++ "r"(__ptid), "r"(__tls), "r"(__ctid), +++ "i"(__NR_clone), "i"(__NR_exit) +++ : "a7", LSS_SYSCALL_CLOBBERS); +++ __res = __res_a0; +++ } +++ LSS_RETURN(int, __res); +++ } ++ #endif ++ #define __NR__exit __NR_exit ++ #define __NR__gettid __NR_gettid ++@@ -3403,8 +3588,10 @@ struct kernel_statfs { ++ // fork is polyfilled below when not available. ++ LSS_INLINE _syscall0(pid_t, fork) ++ #endif +++ #if defined(__NR_fstat) ++ LSS_INLINE _syscall2(int, fstat, int, f, ++ struct kernel_stat*, b) +++ #endif ++ LSS_INLINE _syscall2(int, fstatfs, int, f, ++ struct kernel_statfs*, b) ++ #if defined(__x86_64__) ++@@ -3426,6 +3613,8 @@ struct kernel_statfs { ++ struct kernel_dirent64*, d, int, c) ++ LSS_INLINE _syscall0(gid_t, getegid) ++ LSS_INLINE _syscall0(uid_t, geteuid) +++ LSS_INLINE _syscall2(int, getitimer, int, w, +++ struct kernel_itimerval*, c) ++ #if defined(__NR_getpgrp) ++ LSS_INLINE _syscall0(pid_t, getpgrp) ++ #endif ++@@ -3437,10 +3626,10 @@ struct kernel_statfs { ++ gid_t *, e, gid_t *, s) ++ LSS_INLINE _syscall3(int, getresuid, uid_t *, r, ++ uid_t *, e, uid_t *, s) ++-#if !defined(__ARM_EABI__) +++ #if defined(__NR_getrlimit) ++ LSS_INLINE _syscall2(int, getrlimit, int, r, ++ struct kernel_rlimit*, l) ++-#endif +++ #endif ++ LSS_INLINE _syscall1(pid_t, getsid, pid_t, p) ++ LSS_INLINE _syscall0(pid_t, _gettid) ++ LSS_INLINE _syscall2(pid_t, gettimeofday, struct kernel_timeval*, t, ++@@ -3547,6 +3736,9 @@ struct kernel_statfs { ++ LSS_INLINE _syscall1(int, setfsuid, uid_t, u) ++ LSS_INLINE _syscall1(int, setuid, uid_t, u) ++ LSS_INLINE _syscall1(int, setgid, gid_t, g) +++ LSS_INLINE _syscall3(int, setitimer, int, w, +++ const struct kernel_itimerval*, n, +++ struct kernel_itimerval*, o) ++ LSS_INLINE _syscall2(int, setpgid, pid_t, p, ++ pid_t, g) ++ LSS_INLINE _syscall3(int, setpriority, int, a, ++@@ -3555,8 +3747,10 @@ struct kernel_statfs { ++ gid_t, e, gid_t, s) ++ LSS_INLINE _syscall3(int, setresuid, uid_t, r, ++ uid_t, e, uid_t, s) +++ #if defined(__NR_setrlimit) ++ LSS_INLINE _syscall2(int, setrlimit, int, r, ++ const struct kernel_rlimit*, l) +++ #endif ++ LSS_INLINE _syscall0(pid_t, setsid) ++ LSS_INLINE _syscall2(int, sigaltstack, const stack_t*, s, ++ const stack_t*, o) ++@@ -3586,23 +3780,6 @@ struct kernel_statfs { ++ LSS_INLINE _syscall3(long, getcpu, unsigned *, cpu, ++ unsigned *, node, void *, unused) ++ #endif ++- #if defined(__x86_64__) || \ ++- (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI32) ++- LSS_INLINE _syscall3(int, recvmsg, int, s, ++- struct kernel_msghdr*, m, int, f) ++- LSS_INLINE _syscall3(int, sendmsg, int, s, ++- const struct kernel_msghdr*, m, int, f) ++- LSS_INLINE _syscall6(int, sendto, int, s, ++- const void*, m, size_t, l, ++- int, f, ++- const struct kernel_sockaddr*, a, int, t) ++- LSS_INLINE _syscall2(int, shutdown, int, s, ++- int, h) ++- LSS_INLINE _syscall3(int, socket, int, d, ++- int, t, int, p) ++- LSS_INLINE _syscall4(int, socketpair, int, d, ++- int, t, int, p, int*, s) ++- #endif ++ #if defined(__NR_fadvise64) ++ #if defined(__x86_64__) ++ /* Need to make sure loff_t isn't truncated to 32-bits under x32. */ ++@@ -3685,6 +3862,12 @@ struct kernel_statfs { ++ const char *, p, ++ struct kernel_stat*, b, int, f) ++ #endif +++ #if defined(__NR_statx) +++ LSS_INLINE _syscall5(int, statx, int, d, +++ const char *, p, +++ int, f, int, m, +++ struct kernel_statx*, b) +++ #endif ++ #if defined(__x86_64__) || defined(__s390x__) ++ LSS_INLINE int LSS_NAME(getresgid32)(gid_t *rgid, ++ gid_t *egid, ++@@ -4181,23 +4364,30 @@ struct kernel_statfs { ++ LSS_SC_BODY(4, int, 8, d, type, protocol, sv); ++ } ++ #endif ++- #if defined(__ARM_EABI__) || defined (__aarch64__) +++ #if defined(__NR_recvmsg) ++ LSS_INLINE _syscall3(ssize_t, recvmsg, int, s, struct kernel_msghdr*, msg, ++ int, flags) +++ #endif +++ #if defined(__NR_sendmsg) ++ LSS_INLINE _syscall3(ssize_t, sendmsg, int, s, const struct kernel_msghdr*, ++ msg, int, flags) +++ #endif +++ #if defined(__NR_sendto) ++ LSS_INLINE _syscall6(ssize_t, sendto, int, s, const void*, buf, size_t,len, ++ int, flags, const struct kernel_sockaddr*, to, ++ unsigned int, tolen) +++ #endif +++ #if defined(__NR_shutdown) ++ LSS_INLINE _syscall2(int, shutdown, int, s, int, how) +++ #endif +++ #if defined(__NR_socket) ++ LSS_INLINE _syscall3(int, socket, int, domain, int, type, int, protocol) +++ #endif +++ #if defined(__NR_socketpair) ++ LSS_INLINE _syscall4(int, socketpair, int, d, int, type, int, protocol, ++ int*, sv) ++ #endif ++- #if defined(__i386__) || defined(__ARM_ARCH_3__) || \ ++- (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \ ++- defined(__s390__) ++- #define __NR__socketcall __NR_socketcall +++ #if defined(__NR_socketcall) ++ LSS_INLINE _syscall2(int, _socketcall, int, c, ++ va_list, a) ++ LSS_INLINE int LSS_NAME(socketcall)(int op, ...) { ++@@ -4209,37 +4399,49 @@ struct kernel_statfs { ++ return rc; ++ } ++ +++ #if !defined(__NR_recvmsg) ++ LSS_INLINE ssize_t LSS_NAME(recvmsg)(int s,struct kernel_msghdr *msg, ++ int flags){ ++ return (ssize_t)LSS_NAME(socketcall)(17, s, msg, flags); ++ } +++ #endif ++ +++ #if !defined(__NR_sendmsg) ++ LSS_INLINE ssize_t LSS_NAME(sendmsg)(int s, ++ const struct kernel_msghdr *msg, ++ int flags) { ++ return (ssize_t)LSS_NAME(socketcall)(16, s, msg, flags); ++ } +++ #endif ++ +++ #if !defined(__NR_sendto) ++ LSS_INLINE ssize_t LSS_NAME(sendto)(int s, const void *buf, size_t len, ++ int flags, ++ const struct kernel_sockaddr *to, ++ unsigned int tolen) { ++ return (ssize_t)LSS_NAME(socketcall)(11, s, buf, len, flags, to, tolen); ++ } +++ #endif ++ +++ #if !defined(__NR_shutdown) ++ LSS_INLINE int LSS_NAME(shutdown)(int s, int how) { ++ return LSS_NAME(socketcall)(13, s, how); ++ } +++ #endif ++ +++ #if !defined(__NR_socket) ++ LSS_INLINE int LSS_NAME(socket)(int domain, int type, int protocol) { ++ return LSS_NAME(socketcall)(1, domain, type, protocol); ++ } +++ #endif ++ +++ #if !defined(__NR_socketpair) ++ LSS_INLINE int LSS_NAME(socketpair)(int d, int type, int protocol, ++ int sv[2]) { ++ return LSS_NAME(socketcall)(8, d, type, protocol, sv); ++ } ++- #endif +++ #endif +++ #endif // defined(__NR_socketcall) ++ #if defined(__NR_fstatat64) ++ LSS_INLINE _syscall4(int, fstatat64, int, d, ++ const char *, p, ++@@ -4486,10 +4688,64 @@ struct kernel_statfs { ++ } ++ #endif ++ +++#if defined(__NR_statx) +++ /* copy the contents of kernel_statx to the kernel_stat structure. */ +++ LSS_INLINE void LSS_NAME(cp_stat_statx)(struct kernel_stat *to, +++ struct kernel_statx *from) { +++ memset(to, 0, sizeof(struct kernel_stat)); +++ to->st_dev = (unsigned long)((from->stx_dev_minor & 0xff) | +++ ((from->stx_dev_major & 0xfff) << 8) | +++ ((from->stx_dev_minor & ~0xffu) << 12)); +++ to->st_rdev = (unsigned long)((from->stx_rdev_minor & 0xff) | +++ ((from->stx_rdev_major & 0xfff) << 8) | +++ ((from->stx_rdev_minor & ~0xffu) << 12)); +++ to->st_ino = (unsigned long)from->stx_ino; +++ to->st_mode = (unsigned int)from->stx_mode; +++ to->st_nlink = (unsigned int)from->stx_nlink; +++ to->st_uid = (unsigned int)from->stx_uid; +++ to->st_gid = (unsigned int)from->stx_gid; +++ to->st_atime_ = (long)(from->stx_atime.tv_sec); +++ to->st_atime_nsec_ = from->stx_atime.tv_nsec; +++ to->st_mtime_ = (long)(from->stx_mtime.tv_sec); +++ to->st_mtime_nsec_ = from->stx_mtime.tv_nsec; +++ to->st_ctime_ = (long)(from->stx_ctime.tv_sec); +++ to->st_ctime_nsec_ = from->stx_ctime.tv_nsec; +++ to->st_size = (long)(from->stx_size); +++ to->st_blocks = (int)(from->stx_blocks); +++ to->st_blksize = (int)from->stx_blksize; +++ } +++#endif +++ +++#if !defined(__NR_fstat) +++ LSS_INLINE int LSS_NAME(fstat)(int fd, +++ struct kernel_stat *buf) { +++ #if defined(__NR_newfstatat) +++ return LSS_NAME(newfstatat)(fd, "", buf, AT_EMPTY_PATH); +++ #elif defined(__NR_statx) +++ struct kernel_statx stx; +++ int flags = AT_NO_AUTOMOUNT | AT_EMPTY_PATH; +++ int mask = STATX_BASIC_STATS; +++ int res = LSS_NAME(statx)(fd, "", flags, mask, &stx); +++ LSS_NAME(cp_stat_statx)(buf, &stx); +++ return res; +++ #endif +++ } +++#endif +++ +++ ++ #if !defined(__NR_stat) ++ LSS_INLINE int LSS_NAME(stat)(const char *pathname, ++ struct kernel_stat *buf) { +++ #if defined(__NR_newfstatat) ++ return LSS_NAME(newfstatat)(AT_FDCWD, pathname, buf, 0); +++ #elif defined(__NR_statx) +++ struct kernel_statx stx; +++ int flags = AT_NO_AUTOMOUNT | AT_STATX_SYNC_AS_STAT; +++ int mask = STATX_BASIC_STATS; +++ int res = LSS_NAME(statx)(AT_FDCWD, pathname, flags, mask, &stx); +++ LSS_NAME(cp_stat_statx)(buf, &stx); +++ return res; +++ #endif ++ } ++ #endif ++ ++@@ -4503,7 +4759,7 @@ struct kernel_statfs { ++ // TODO: define this in an arch-independant way instead of inlining the clone ++ // syscall body. ++ ++-# if defined(__aarch64__) +++# if defined(__aarch64__) || defined(__loongarch64) ++ LSS_INLINE pid_t LSS_NAME(fork)(void) { ++ // No fork syscall on aarch64 - implement by means of the clone syscall. ++ // Note that this does not reset glibc's cached view of the PID/TID, so +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h +@@ -75,7 +75,7 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEX // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice // here. return 16; // 64kB -#elif defined(_MIPS_ARCH_LOONGSON) +#elif defined(_MIPS_ARCH_LOONGSON) || defined(__loongarch64) return 14; // 16kB - #else - return 12; // 4kB -diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h -index 71d63ba41..e4342dcbb 100644 ---- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h -+++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h -@@ -40,7 +40,7 @@ static const size_t kBucketShift = (kAllocationGranularity == 8) ? 3 : 2; + #elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h.orig +@@ -0,0 +1,160 @@ ++// Copyright (c) 2018 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef THIRD_PARTY_BASE_ALLOCATOR_PARTITION_ALLOCATOR_PAGE_ALLOCATOR_CONSTANTS_H_ ++#define THIRD_PARTY_BASE_ALLOCATOR_PARTITION_ALLOCATOR_PAGE_ALLOCATOR_CONSTANTS_H_ ++ ++#include ++ ++#include "build/build_config.h" ++#include "third_party/base/compiler_specific.h" ++ ++#if defined(OS_APPLE) ++ ++#include ++ ++// Although page allocator constants are not constexpr, they are run-time ++// constant. Because the underlying variables they access, such as vm_page_size, ++// are not marked const, the compiler normally has no way to know that they ++// don’t change and must obtain their values whenever it can't prove that they ++// haven't been modified, even if they had already been obtained previously. ++// Attaching __attribute__((const)) to these declarations allows these redundant ++// accesses to be omitted under optimization such as common subexpression ++// elimination. ++#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) ++ ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++// This should work for all POSIX (if needed), but currently all other ++// supported OS/architecture combinations use either hard-coded values ++// (such as x86) or have means to determine these values without needing ++// atomics (such as macOS on arm64). ++ ++// Page allocator constants are run-time constant ++#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) ++ ++#include ++#include ++ ++namespace pdfium::base::internal { ++ ++// Holds the current page size and shift, where size = 1 << shift ++// Use PageAllocationGranularity(), PageAllocationGranularityShift() ++// to initialize and retrieve these values safely. ++struct PageCharacteristics { ++ std::atomic size; ++ std::atomic shift; ++}; ++extern PageCharacteristics page_characteristics; ++ ++} // namespace base::internal ++ ++#else ++ ++// When defined, page size constants are fixed at compile time. When not ++// defined, they may vary at run time. ++#define PAGE_ALLOCATOR_CONSTANTS_ARE_CONSTEXPR 1 ++ ++// Use this macro to declare a function as constexpr or not based on whether ++// PAGE_ALLOCATOR_CONSTANTS_ARE_CONSTEXPR is defined. ++#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR constexpr ++ ++#endif ++ ++namespace pdfium { ++ ++namespace base { ++// Forward declaration, implementation below ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularity(); ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PageAllocationGranularityShift() { ++#if defined(OS_WIN) || defined(ARCH_CPU_PPC64) ++ // Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page ++ // sizes. Since 64kB is the de facto standard on the platform and binaries ++ // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice ++ // here. ++ return 16; // 64kB ++#elif defined(_MIPS_ARCH_LOONGSON) ++ return 14; // 16kB ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) ++ // page sizes. Retrieve from or initialize cache. ++ int shift = base::internal::page_characteristics.shift.load(std::memory_order_relaxed); ++ if (UNLIKELY(shift == 0)) { ++ shift = __builtin_ctz((int)base::PageAllocationGranularity()); ++ base::internal::page_characteristics.shift.store(shift, std::memory_order_relaxed); ++ } ++ return shift; ++#elif defined(OS_APPLE) ++ return vm_page_shift; ++#else ++ return 12; // 4kB ++#endif ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularity() { ++#if defined(OS_APPLE) ++ // This is literally equivalent to |1 << PageAllocationGranularityShift()| ++ // below, but was separated out for OS_APPLE to avoid << on a non-constexpr. ++ return vm_page_size; ++#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) ++ // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or ++ // initialize cache. ++ int size = internal::page_characteristics.size.load(std::memory_order_relaxed); ++ if (UNLIKELY(size == 0)) { ++ size = getpagesize(); ++ internal::page_characteristics.size.store(size, std::memory_order_relaxed); ++ } ++ return size; ++#else ++ return 1ULL << PageAllocationGranularityShift(); ++#endif ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularityOffsetMask() { ++ return PageAllocationGranularity() - 1; ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++PageAllocationGranularityBaseMask() { ++ return ~PageAllocationGranularityOffsetMask(); ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++SystemPageSize() { ++#if defined(OS_WIN) ++ return 4096; ++#else ++ return PageAllocationGranularity(); ++#endif ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++SystemPageOffsetMask() { ++ return SystemPageSize() - 1; ++} ++ ++PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t ++SystemPageBaseMask() { ++ return ~SystemPageOffsetMask(); ++} ++ ++static constexpr size_t kPageMetadataShift = 5; // 32 bytes per partition page. ++static constexpr size_t kPageMetadataSize = 1 << kPageMetadataShift; ++ ++// See DecommitSystemPages(), this is not guaranteed to be synchronous on all ++// platforms. ++static constexpr bool kDecommittedPagesAreAlwaysZeroed = ++#if defined(OS_APPLE) ++ false; ++#else ++ true; ++#endif ++ ++} // namespace base ++} // namespace pdfium ++ ++#endif // THIRD_PARTY_BASE_ALLOCATOR_PARTITION_ALLOCATOR_PAGE_ALLOCATOR_CONSTANTS_H_ +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h +++++ src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h ++@@ -48,7 +48,7 @@ constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { ++ // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice ++ // here. ++ return 16; // 64kB ++-#elif defined(_MIPS_ARCH_LOONGSON) +++#elif defined(_MIPS_ARCH_LOONGSON) || defined(__loongarch64) ++ return 14; // 16kB ++ #else ++ return 12; // 4kB +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h +@@ -40,7 +40,7 @@ static const size_t kBucketShift = (kAll // other constant values, we pack _all_ `PartitionRootGeneric::Alloc` sizes // perfectly up against the end of a system page. @@ -6396,11 +11180,23 @@ index 71d63ba41..e4342dcbb 100644 PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PartitionPageShift() { return 16; // 64 KiB -diff --git a/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn b/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn -index 70e14c06f..8f0cb668e 100644 ---- a/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn -+++ b/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn -@@ -149,6 +149,8 @@ swiftshader_llvm_source_set("swiftshader_llvm") { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h +++++ src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h ++@@ -40,7 +40,7 @@ static const size_t kBucketShift = (kAllocationGranularity == 8) ? 3 : 2; ++ // other constant values, we pack _all_ `PartitionRootGeneric::Alloc` sizes ++ // perfectly up against the end of a system page. ++ ++-#if defined(_MIPS_ARCH_LOONGSON) +++#if defined(_MIPS_ARCH_LOONGSON) || defined(__loongarch64) ++ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int ++ PartitionPageShift() { ++ return 16; // 64 KiB +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn +@@ -149,6 +149,8 @@ swiftshader_llvm_source_set("swiftshader deps += [ ":swiftshader_llvm_ppc" ] } else if (current_cpu == "x86" || current_cpu == "x64") { deps += [ ":swiftshader_llvm_x86" ] @@ -6409,11 +11205,23 @@ index 70e14c06f..8f0cb668e 100644 } else { assert(false, "Unsupported current_cpu") } -diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc -index 4f0c5430c..db0bdbba1 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc -+++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc -@@ -30,7 +30,8 @@ bool VectorDifference(const uint8_t* image1, const uint8_t* image2) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn +++++ src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn ++@@ -149,6 +149,8 @@ swiftshader_llvm_source_set("swiftshader_llvm") { ++ deps += [ ":swiftshader_llvm_ppc" ] ++ } else if (current_cpu == "x86" || current_cpu == "x64") { ++ deps += [ ":swiftshader_llvm_x86" ] +++ } else if (current_cpu == "loongarch64") { +++ # Do Nothing ++ } else { ++ assert(false, "Unsupported current_cpu") ++ } +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc +@@ -30,7 +30,8 @@ bool VectorDifference(const uint8_t* ima static bool (*diff_proc)(const uint8_t*, const uint8_t*) = nullptr; if (!diff_proc) { @@ -6423,10 +11231,23 @@ index 4f0c5430c..db0bdbba1 100644 // For ARM and MIPS processors, always use C version. // TODO(hclam): Implement a NEON version. diff_proc = &VectorDifference_C; -diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h b/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h -index ed216e660..0352b4888 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h -+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc +++++ src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc ++@@ -30,7 +30,8 @@ bool VectorDifference(const uint8_t* image1, const uint8_t* image2) { ++ static bool (*diff_proc)(const uint8_t*, const uint8_t*) = nullptr; ++ ++ if (!diff_proc) { ++-#if defined(WEBRTC_ARCH_ARM_FAMILY) || defined(WEBRTC_ARCH_MIPS_FAMILY) +++#if defined(WEBRTC_ARCH_ARM_FAMILY) || defined(WEBRTC_ARCH_MIPS_FAMILY) || \ +++ defined(WEBRTC_ARCH_LOONGARCH_FAMILY) ++ // For ARM and MIPS processors, always use C version. ++ // TODO(hclam): Implement a NEON version. ++ diff_proc = &VectorDifference_C; +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h @@ -50,6 +50,10 @@ #elif defined(__EMSCRIPTEN__) #define WEBRTC_ARCH_32_BITS @@ -6438,10 +11259,24 @@ index ed216e660..0352b4888 100644 #else #error Please add support for your architecture in rtc_base/system/arch.h #endif -diff --git a/src/3rdparty/chromium/v8/BUILD.gn b/src/3rdparty/chromium/v8/BUILD.gn -index ba99c7514..06f596ecf 100644 ---- a/src/3rdparty/chromium/v8/BUILD.gn -+++ b/src/3rdparty/chromium/v8/BUILD.gn +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h.rej +@@ -0,0 +1,13 @@ ++--- src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h +++++ src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h ++@@ -50,6 +50,10 @@ ++ #elif defined(__EMSCRIPTEN__) ++ #define WEBRTC_ARCH_32_BITS ++ #define WEBRTC_ARCH_LITTLE_ENDIAN +++#elif defined(__loongarch64) +++#define WEBRTC_ARCH_LOONGARCH_FAMILY +++#define WEBRTC_ARCH_64_BITS +++#define WEBRTC_ARCH_LITTLE_ENDIAN ++ #else ++ #error Please add support for your architecture in rtc_base/system/arch.h ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/BUILD.gn ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/BUILD.gn @@ -794,6 +794,16 @@ config("toolchain") { cflags += [ "-march=z196" ] } @@ -6471,7 +11306,7 @@ index ba99c7514..06f596ecf 100644 } else if (v8_current_cpu == "ppc") { sources += [ ### gcmole(arch:ppc) ### -@@ -3672,6 +3687,33 @@ v8_source_set("v8_base_without_compiler") { +@@ -3672,6 +3687,33 @@ v8_source_set("v8_base_without_compiler" "src/regexp/mips64/regexp-macro-assembler-mips64.h", "src/wasm/baseline/mips64/liftoff-assembler-mips64.h", ] @@ -6514,10 +11349,85 @@ index ba99c7514..06f596ecf 100644 } } else if (is_win) { if (current_cpu == "x64") { -diff --git a/src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni b/src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni -index 5e444efcf..5e51df482 100644 ---- a/src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni -+++ b/src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/BUILD.gn.rej +@@ -0,0 +1,74 @@ ++--- src/3rdparty/chromium/v8/BUILD.gn +++++ src/3rdparty/chromium/v8/BUILD.gn ++@@ -794,6 +794,16 @@ config("toolchain") { ++ cflags += [ "-march=z196" ] ++ } ++ } +++ +++ # loongarch64 simulators. +++ if (target_is_simulator && v8_current_cpu == "loongarch64") { +++ defines += [ "_LOONGARCH64_TARGET_SIMULATOR" ] +++ } +++ +++ if (v8_current_cpu == "loongarch64") { +++ defines += [ "V8_TARGET_ARCH_LOONGARCH64" ] +++ } +++ ++ if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { ++ if (v8_current_cpu == "ppc") { ++ defines += [ "V8_TARGET_ARCH_PPC" ] ++@@ -1873,6 +1883,11 @@ v8_source_set("v8_initializers") { ++ ### gcmole(arch:mips64el) ### ++ "src/builtins/mips64/builtins-mips64.cc", ++ ] +++ } else if (v8_current_cpu == "loongarch64") { +++ sources += [ +++ ### gcmole(arch:loongarch64) ### +++ "src/builtins/loongarch64/builtins-loongarch64.cc", +++ ] ++ } else if (v8_current_cpu == "ppc") { ++ sources += [ ++ ### gcmole(arch:ppc) ### ++@@ -3672,6 +3687,33 @@ v8_source_set("v8_base_without_compiler") { ++ "src/regexp/mips64/regexp-macro-assembler-mips64.h", ++ "src/wasm/baseline/mips64/liftoff-assembler-mips64.h", ++ ] +++ } else if (v8_current_cpu == "loongarch64") { +++ sources += [ ### gcmole(arch:loongarch64) ### +++ "src/codegen/loongarch64/assembler-loongarch64-inl.h", +++ "src/codegen/loongarch64/assembler-loongarch64.cc", +++ "src/codegen/loongarch64/assembler-loongarch64.h", +++ "src/codegen/loongarch64/constants-loongarch64.cc", +++ "src/codegen/loongarch64/constants-loongarch64.h", +++ "src/codegen/loongarch64/cpu-loongarch64.cc", +++ "src/codegen/loongarch64/interface-descriptors-loongarch64.cc", +++ "src/codegen/loongarch64/macro-assembler-loongarch64.cc", +++ "src/codegen/loongarch64/macro-assembler-loongarch64.h", +++ "src/codegen/loongarch64/register-loongarch64.h", +++ "src/compiler/backend/loongarch64/code-generator-loongarch64.cc", +++ "src/compiler/backend/loongarch64/instruction-codes-loongarch64.h", +++ "src/compiler/backend/loongarch64/instruction-scheduler-loongarch64.cc", +++ "src/compiler/backend/loongarch64/instruction-selector-loongarch64.cc", +++ "src/debug/loongarch64/debug-loongarch64.cc", +++ "src/deoptimizer/loongarch64/deoptimizer-loongarch64.cc", +++ "src/diagnostics/loongarch64/disasm-loongarch64.cc", +++ "src/execution/loongarch64/frame-constants-loongarch64.cc", +++ "src/execution/loongarch64/frame-constants-loongarch64.h", +++ "src/execution/loongarch64/simulator-loongarch64.cc", +++ "src/execution/loongarch64/simulator-loongarch64.h", +++ "src/regexp/loongarch64/regexp-macro-assembler-loongarch64.cc", +++ "src/regexp/loongarch64/regexp-macro-assembler-loongarch64.h", +++ "src/wasm/baseline/loongarch64/liftoff-assembler-loongarch64.h", +++ ] ++ } else if (v8_current_cpu == "ppc") { ++ sources += [ ### gcmole(arch:ppc) ### ++ "src/codegen/ppc/assembler-ppc-inl.h", ++@@ -4328,6 +4370,8 @@ v8_source_set("v8_cppgc_shared") { ++ sources += [ "src/heap/base/asm/mips/push_registers_asm.cc" ] ++ } else if (current_cpu == "mips64el") { ++ sources += [ "src/heap/base/asm/mips64/push_registers_asm.cc" ] +++ } else if (current_cpu == "loongarch64") { +++ sources += [ "src/heap/base/asm/loongarch64/push_registers_asm.cc" ] ++ } ++ } else if (is_win) { ++ if (current_cpu == "x64") { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni @@ -79,7 +79,8 @@ if (v8_snapshot_toolchain == "") { if (v8_current_cpu == "x64" || v8_current_cpu == "x86") { @@ -6528,10 +11438,23 @@ index 5e444efcf..5e51df482 100644 if (is_win && v8_current_cpu == "arm64") { # set _cpus to blank for Windows ARM64 so host_toolchain could be # selected as snapshot toolchain later. -diff --git a/src/3rdparty/chromium/v8/src/base/build_config.h b/src/3rdparty/chromium/v8/src/base/build_config.h -index c3a3849f7..b34e69e9b 100644 ---- a/src/3rdparty/chromium/v8/src/base/build_config.h -+++ b/src/3rdparty/chromium/v8/src/base/build_config.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni +++++ src/3rdparty/chromium/v8/gni/snapshot_toolchain.gni ++@@ -79,7 +79,8 @@ if (v8_snapshot_toolchain == "") { ++ ++ if (v8_current_cpu == "x64" || v8_current_cpu == "x86") { ++ _cpus = v8_current_cpu ++- } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el") { +++ } else if (v8_current_cpu == "arm64" || v8_current_cpu == "mips64el" || +++ v8_current_cpu == "loongarch64") { ++ if (is_win && v8_current_cpu == "arm64") { ++ # set _cpus to blank for Windows ARM64 so host_toolchain could be ++ # selected as snapshot toolchain later. +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/base/build_config.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/base/build_config.h @@ -46,6 +46,13 @@ #else #define V8_HOST_ARCH_32_BIT 1 @@ -6593,22 +11516,94 @@ index c3a3849f7..b34e69e9b 100644 #else #error Unknown target architecture endianness #endif -diff --git a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc -index 89173b593..13ec3a436 100644 ---- a/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc -+++ b/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc -@@ -324,6 +324,10 @@ void* OS::GetRandomMmapAddr() { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/base/build_config.h.rej +@@ -0,0 +1,63 @@ ++--- src/3rdparty/chromium/v8/src/base/build_config.h +++++ src/3rdparty/chromium/v8/src/base/build_config.h ++@@ -46,6 +46,13 @@ ++ #else ++ #define V8_HOST_ARCH_32_BIT 1 ++ #endif +++#elif defined(__loongarch__) +++#if defined(__loongarch_lp64) +++#define V8_HOST_ARCH_LOONGARCH64 1 +++#define V8_HOST_ARCH_64_BIT 1 +++#else +++#error "Only lp64 been supported by v8" +++#endif ++ #else ++ #error "Host architecture was not detected as supported by v8" ++ #endif ++@@ -77,7 +84,8 @@ ++ // environment as presented by the compiler. ++ #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \ ++ !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64 && \ ++- !V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390 +++ !V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390 && \ +++ !V8_TARGET_ARCH_LOONGARCH64 ++ #if defined(_M_X64) || defined(__x86_64__) ++ #define V8_TARGET_ARCH_X64 1 ++ #elif defined(_M_IX86) || defined(__i386__) ++@@ -94,6 +102,8 @@ ++ #define V8_TARGET_ARCH_PPC64 1 ++ #elif defined(_ARCH_PPC) ++ #define V8_TARGET_ARCH_PPC 1 +++#elif defined(__loongarch_lp64) +++#define V8_TARGET_ARCH_LOONGARCH64 1 ++ #else ++ #error Target architecture was not detected as supported by v8 ++ #endif ++@@ -128,6 +138,8 @@ ++ #else ++ #define V8_TARGET_ARCH_32_BIT 1 ++ #endif +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#define V8_TARGET_ARCH_64_BIT 1 ++ #else ++ #error Unknown target architecture pointer size ++ #endif ++@@ -156,6 +168,9 @@ ++ #if (V8_TARGET_ARCH_MIPS64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_MIPS64)) ++ #error Target architecture mips64 is only supported on mips64 and x64 host ++ #endif +++#if (V8_TARGET_ARCH_LOONGARCH64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_LOONGARCH64)) +++#error Target architecture loongarch64 is only supported on loongarch64 and x64 host +++#endif ++ ++ // Determine architecture endianness. ++ #if V8_TARGET_ARCH_IA32 ++@@ -190,6 +205,8 @@ ++ #else ++ #define V8_TARGET_BIG_ENDIAN 1 ++ #endif +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#define V8_TARGET_LITTLE_ENDIAN 1 ++ #else ++ #error Unknown target architecture endianness ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc +@@ -324,6 +324,18 @@ void* OS::GetRandomMmapAddr() { // 42 bits of virtual addressing. Truncate to 40 bits to allow kernel chance // to fulfill request. raw_addr &= uint64_t{0xFFFFFF0000}; +#elif V8_TARGET_ARCH_LOONGARCH64 + // 42 bits of virtual addressing. Truncate to 40 bits to allow kernel chance + // to fulfill request. ++ raw_addr &= uint64_t{0xFFFFFF0000}; ++#elif V8_TARGET_ARCH_LOONGARCH64 ++ // 42 bits of virtual addressing. Truncate to 40 bits to allow kernel chance ++ // to fulfill request. ++ raw_addr &= uint64_t{0xFFFFFF0000}; ++#elif V8_TARGET_ARCH_LOONGARCH64 ++ // 42 bits of virtual addressing. Truncate to 40 bits to allow kernel chance ++ // to fulfill request. + raw_addr &= uint64_t{0xFFFFFF0000}; #else raw_addr &= 0x3FFFF000; -@@ -503,6 +507,8 @@ void OS::DebugBreak() { +@@ -503,6 +515,8 @@ void OS::DebugBreak() { asm("break"); #elif V8_HOST_ARCH_MIPS64 asm("break"); @@ -6617,7 +11612,7 @@ index 89173b593..13ec3a436 100644 #elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64 asm("twge 2,2"); #elif V8_HOST_ARCH_IA32 -@@ -512,6 +518,8 @@ void OS::DebugBreak() { +@@ -512,6 +526,8 @@ void OS::DebugBreak() { #elif V8_HOST_ARCH_S390 // Software breakpoint instruction is 0x0001 asm volatile(".word 0x0001"); @@ -6626,11 +11621,1088 @@ index 89173b593..13ec3a436 100644 #else #error Unsupported host architecture. #endif -diff --git a/src/3rdparty/chromium/v8/src/builtins/builtins.cc b/src/3rdparty/chromium/v8/src/builtins/builtins.cc -index 31682f397..3bceeae45 100644 ---- a/src/3rdparty/chromium/v8/src/builtins/builtins.cc -+++ b/src/3rdparty/chromium/v8/src/builtins/builtins.cc -@@ -490,7 +490,7 @@ bool Builtins::CodeObjectIsExecutable(int builtin_index) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.orig +@@ -0,0 +1,1053 @@ ++// Copyright 2012 the V8 project authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// Platform-specific code for POSIX goes here. This is not a platform on its ++// own, but contains the parts which are the same across the POSIX platforms ++// Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX. ++ ++#include ++#include ++#include ++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) ++#include // for pthread_set_name_np ++#endif ++#include // for sched_yield ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__NetBSD__) || defined(__OpenBSD__) ++#include // NOLINT, for sysctl ++#endif ++ ++#if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT) ++#define LOG_TAG "v8" ++#include // NOLINT ++#endif ++ ++#include ++#include ++ ++#include "src/base/platform/platform-posix.h" ++ ++#include "src/base/lazy-instance.h" ++#include "src/base/macros.h" ++#include "src/base/platform/platform.h" ++#include "src/base/platform/time.h" ++#include "src/base/utils/random-number-generator.h" ++ ++#ifdef V8_FAST_TLS_SUPPORTED ++#include ++#endif ++ ++#if V8_OS_MACOSX ++#include ++#include ++#endif ++ ++#if V8_OS_LINUX ++#include // NOLINT, for prctl ++#endif ++ ++#if defined(V8_OS_FUCHSIA) ++#include ++#else ++#include ++#endif ++ ++#if !defined(_AIX) && !defined(V8_OS_FUCHSIA) ++#include ++#endif ++ ++#if V8_OS_FREEBSD || V8_OS_MACOSX || V8_OS_OPENBSD || V8_OS_SOLARIS ++#define MAP_ANONYMOUS MAP_ANON ++#endif ++ ++#if defined(V8_OS_SOLARIS) ++#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__) ++extern "C" int madvise(caddr_t, size_t, int); ++#else ++extern int madvise(caddr_t, size_t, int); ++#endif ++#endif ++ ++#ifndef MADV_FREE ++#define MADV_FREE MADV_DONTNEED ++#endif ++ ++#if defined(V8_LIBC_GLIBC) ++extern "C" void* __libc_stack_end; // NOLINT ++#endif ++ ++namespace v8 { ++namespace base { ++ ++namespace { ++ ++// 0 is never a valid thread id. ++const pthread_t kNoThread = static_cast(0); ++ ++bool g_hard_abort = false; ++ ++const char* g_gc_fake_mmap = nullptr; ++ ++DEFINE_LAZY_LEAKY_OBJECT_GETTER(RandomNumberGenerator, ++ GetPlatformRandomNumberGenerator) ++static LazyMutex rng_mutex = LAZY_MUTEX_INITIALIZER; ++ ++#if !V8_OS_FUCHSIA ++#if V8_OS_MACOSX ++// kMmapFd is used to pass vm_alloc flags to tag the region with the user ++// defined tag 255 This helps identify V8-allocated regions in memory analysis ++// tools like vmmap(1). ++const int kMmapFd = VM_MAKE_TAG(255); ++#else // !V8_OS_MACOSX ++const int kMmapFd = -1; ++#endif // !V8_OS_MACOSX ++ ++#if defined(V8_TARGET_OS_MACOSX) && V8_HOST_ARCH_ARM64 ++// During snapshot generation in cross builds, sysconf() runs on the Intel ++// host and returns host page size, while the snapshot needs to use the ++// target page size. ++constexpr int kAppleArmPageSize = 1 << 14; ++#endif ++ ++const int kMmapFdOffset = 0; ++ ++// TODO(v8:10026): Add the right permission flag to make executable pages ++// guarded. ++int GetProtectionFromMemoryPermission(OS::MemoryPermission access) { ++ switch (access) { ++ case OS::MemoryPermission::kNoAccess: ++ return PROT_NONE; ++ case OS::MemoryPermission::kRead: ++ return PROT_READ; ++ case OS::MemoryPermission::kReadWrite: ++ return PROT_READ | PROT_WRITE; ++ case OS::MemoryPermission::kReadWriteExecute: ++ return PROT_READ | PROT_WRITE | PROT_EXEC; ++ case OS::MemoryPermission::kReadExecute: ++ return PROT_READ | PROT_EXEC; ++ } ++ UNREACHABLE(); ++} ++ ++enum class PageType { kShared, kPrivate }; ++ ++int GetFlagsForMemoryPermission(OS::MemoryPermission access, ++ PageType page_type) { ++ int flags = MAP_ANONYMOUS; ++ flags |= (page_type == PageType::kShared) ? MAP_SHARED : MAP_PRIVATE; ++ if (access == OS::MemoryPermission::kNoAccess) { ++#if !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX ++ flags |= MAP_NORESERVE; ++#endif // !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX ++#if V8_OS_QNX ++ flags |= MAP_LAZY; ++#endif // V8_OS_QNX ++#if V8_OS_MACOSX && V8_HOST_ARCH_ARM64 && defined(MAP_JIT) && \ ++ !defined(V8_OS_IOS) ++ // TODO(jkummerow): using the V8_OS_IOS define is a crude approximation ++ // of the fact that we don't want to set the MAP_JIT flag when ++ // FLAG_jitless == true, as src/base/ doesn't know any flags. ++ // TODO(crbug.com/1117591): This is only needed for code spaces. ++ flags |= MAP_JIT; ++#endif ++ } ++ return flags; ++} ++ ++void* Allocate(void* hint, size_t size, OS::MemoryPermission access, ++ PageType page_type) { ++ int prot = GetProtectionFromMemoryPermission(access); ++ int flags = GetFlagsForMemoryPermission(access, page_type); ++ void* result = mmap(hint, size, prot, flags, kMmapFd, kMmapFdOffset); ++ if (result == MAP_FAILED) return nullptr; ++ return result; ++} ++ ++#endif // !V8_OS_FUCHSIA ++ ++} // namespace ++ ++#if V8_OS_LINUX || V8_OS_FREEBSD ++#ifdef __arm__ ++ ++bool OS::ArmUsingHardFloat() { ++ // GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify ++ // the Floating Point ABI used (PCS stands for Procedure Call Standard). ++ // We use these as well as a couple of other defines to statically determine ++ // what FP ABI used. ++ // GCC versions 4.4 and below don't support hard-fp. ++ // GCC versions 4.5 may support hard-fp without defining __ARM_PCS or ++ // __ARM_PCS_VFP. ++ ++#define GCC_VERSION \ ++ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) ++#if GCC_VERSION >= 40600 && !defined(__clang__) ++#if defined(__ARM_PCS_VFP) ++ return true; ++#else ++ return false; ++#endif ++ ++#elif GCC_VERSION < 40500 && !defined(__clang__) ++ return false; ++ ++#else ++#if defined(__ARM_PCS_VFP) ++ return true; ++#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \ ++ !defined(__VFP_FP__) ++ return false; ++#else ++#error \ ++ "Your version of compiler does not report the FP ABI compiled for." \ ++ "Please report it on this issue" \ ++ "http://code.google.com/p/v8/issues/detail?id=2140" ++ ++#endif ++#endif ++#undef GCC_VERSION ++} ++ ++#endif // def __arm__ ++#endif ++ ++void OS::Initialize(bool hard_abort, const char* const gc_fake_mmap) { ++ g_hard_abort = hard_abort; ++ g_gc_fake_mmap = gc_fake_mmap; ++} ++ ++int OS::ActivationFrameAlignment() { ++#if V8_TARGET_ARCH_ARM ++ // On EABI ARM targets this is required for fp correctness in the ++ // runtime system. ++ return 8; ++#elif V8_TARGET_ARCH_MIPS ++ return 8; ++#elif V8_TARGET_ARCH_S390 ++ return 8; ++#else ++ // Otherwise we just assume 16 byte alignment, i.e.: ++ // - With gcc 4.4 the tree vectorization optimizer can generate code ++ // that requires 16 byte alignment such as movdqa on x86. ++ // - Mac OS X, PPC and Solaris (64-bit) activation frames must ++ // be 16 byte-aligned; see "Mac OS X ABI Function Call Guide" ++ return 16; ++#endif ++} ++ ++// static ++size_t OS::AllocatePageSize() { ++#if defined(V8_TARGET_OS_MACOSX) && V8_HOST_ARCH_ARM64 ++ return kAppleArmPageSize; ++#else ++ static size_t page_size = static_cast(sysconf(_SC_PAGESIZE)); ++ return page_size; ++#endif ++} ++ ++// static ++size_t OS::CommitPageSize() { ++ // Commit and allocate page size are the same on posix. ++ return OS::AllocatePageSize(); ++} ++ ++// static ++void OS::SetRandomMmapSeed(int64_t seed) { ++ if (seed) { ++ MutexGuard guard(rng_mutex.Pointer()); ++ GetPlatformRandomNumberGenerator()->SetSeed(seed); ++ } ++} ++ ++// static ++void* OS::GetRandomMmapAddr() { ++ uintptr_t raw_addr; ++ { ++ MutexGuard guard(rng_mutex.Pointer()); ++ GetPlatformRandomNumberGenerator()->NextBytes(&raw_addr, sizeof(raw_addr)); ++ } ++#if V8_HOST_ARCH_ARM64 ++#if defined(V8_TARGET_OS_MACOSX) ++ DCHECK_EQ(1 << 14, AllocatePageSize()); ++#endif ++ // Keep the address page-aligned, AArch64 supports 4K, 16K and 64K ++ // configurations. ++ raw_addr = RoundDown(raw_addr, AllocatePageSize()); ++#endif ++#if defined(V8_USE_ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ ++ defined(THREAD_SANITIZER) || defined(LEAK_SANITIZER) ++ // If random hint addresses interfere with address ranges hard coded in ++ // sanitizers, bad things happen. This address range is copied from TSAN ++ // source but works with all tools. ++ // See crbug.com/539863. ++ raw_addr &= 0x007fffff0000ULL; ++ raw_addr += 0x7e8000000000ULL; ++#else ++#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 ++ // Currently available CPUs have 48 bits of virtual addressing. Truncate ++ // the hint address to 46 bits to give the kernel a fighting chance of ++ // fulfilling our placement request. ++ raw_addr &= uint64_t{0x3FFFFFFFF000}; ++#elif V8_TARGET_ARCH_PPC64 ++#if V8_OS_AIX ++ // AIX: 64 bits of virtual addressing, but we limit address range to: ++ // a) minimize Segment Lookaside Buffer (SLB) misses and ++ raw_addr &= uint64_t{0x3FFFF000}; ++ // Use extra address space to isolate the mmap regions. ++ raw_addr += uint64_t{0x400000000000}; ++#elif V8_TARGET_BIG_ENDIAN ++ // Big-endian Linux: 42 bits of virtual addressing. ++ raw_addr &= uint64_t{0x03FFFFFFF000}; ++#else ++ // Little-endian Linux: 46 bits of virtual addressing. ++ raw_addr &= uint64_t{0x3FFFFFFF0000}; ++#endif ++#elif V8_TARGET_ARCH_S390X ++ // Linux on Z uses bits 22-32 for Region Indexing, which translates to 42 bits ++ // of virtual addressing. Truncate to 40 bits to allow kernel chance to ++ // fulfill request. ++ raw_addr &= uint64_t{0xFFFFFFF000}; ++#elif V8_TARGET_ARCH_S390 ++ // 31 bits of virtual addressing. Truncate to 29 bits to allow kernel chance ++ // to fulfill request. ++ raw_addr &= 0x1FFFF000; ++#elif V8_TARGET_ARCH_MIPS64 ++ // 42 bits of virtual addressing. Truncate to 40 bits to allow kernel chance ++ // to fulfill request. ++ raw_addr &= uint64_t{0xFFFFFF0000}; ++#elif V8_TARGET_ARCH_LOONGARCH64 ++ // 42 bits of virtual addressing. Truncate to 40 bits to allow kernel chance ++ // to fulfill request. ++ raw_addr &= uint64_t{0xFFFFFF0000}; ++#elif V8_TARGET_ARCH_LOONGARCH64 ++ // 42 bits of virtual addressing. Truncate to 40 bits to allow kernel chance ++ // to fulfill request. ++ raw_addr &= uint64_t{0xFFFFFF0000}; ++#else ++ raw_addr &= 0x3FFFF000; ++ ++#ifdef __sun ++ // For our Solaris/illumos mmap hint, we pick a random address in the bottom ++ // half of the top half of the address space (that is, the third quarter). ++ // Because we do not MAP_FIXED, this will be treated only as a hint -- the ++ // system will not fail to mmap() because something else happens to already ++ // be mapped at our random address. We deliberately set the hint high enough ++ // to get well above the system's break (that is, the heap); Solaris and ++ // illumos will try the hint and if that fails allocate as if there were ++ // no hint at all. The high hint prevents the break from getting hemmed in ++ // at low values, ceding half of the address space to the system heap. ++ raw_addr += 0x80000000; ++#elif V8_OS_AIX ++ // The range 0x30000000 - 0xD0000000 is available on AIX; ++ // choose the upper range. ++ raw_addr += 0x90000000; ++#else ++ // The range 0x20000000 - 0x60000000 is relatively unpopulated across a ++ // variety of ASLR modes (PAE kernel, NX compat mode, etc) and on macos ++ // 10.6 and 10.7. ++ raw_addr += 0x20000000; ++#endif ++#endif ++#endif ++ return reinterpret_cast(raw_addr); ++} ++ ++// TODO(bbudge) Move Cygwin and Fuchsia stuff into platform-specific files. ++#if !V8_OS_CYGWIN && !V8_OS_FUCHSIA ++// static ++void* OS::Allocate(void* hint, size_t size, size_t alignment, ++ MemoryPermission access) { ++ size_t page_size = AllocatePageSize(); ++ DCHECK_EQ(0, size % page_size); ++ DCHECK_EQ(0, alignment % page_size); ++ hint = AlignedAddress(hint, alignment); ++ // Add the maximum misalignment so we are guaranteed an aligned base address. ++ size_t request_size = size + (alignment - page_size); ++ request_size = RoundUp(request_size, OS::AllocatePageSize()); ++ void* result = base::Allocate(hint, request_size, access, PageType::kPrivate); ++ if (result == nullptr) return nullptr; ++ ++ // Unmap memory allocated before the aligned base address. ++ uint8_t* base = static_cast(result); ++ uint8_t* aligned_base = reinterpret_cast( ++ RoundUp(reinterpret_cast(base), alignment)); ++ if (aligned_base != base) { ++ DCHECK_LT(base, aligned_base); ++ size_t prefix_size = static_cast(aligned_base - base); ++ CHECK(Free(base, prefix_size)); ++ request_size -= prefix_size; ++ } ++ // Unmap memory allocated after the potentially unaligned end. ++ if (size != request_size) { ++ DCHECK_LT(size, request_size); ++ size_t suffix_size = request_size - size; ++ CHECK(Free(aligned_base + size, suffix_size)); ++ request_size -= suffix_size; ++ } ++ ++ DCHECK_EQ(size, request_size); ++ return static_cast(aligned_base); ++} ++ ++// static ++void* OS::AllocateShared(size_t size, MemoryPermission access) { ++ DCHECK_EQ(0, size % AllocatePageSize()); ++ return base::Allocate(nullptr, size, access, PageType::kShared); ++} ++ ++// static ++bool OS::Free(void* address, const size_t size) { ++ DCHECK_EQ(0, reinterpret_cast(address) % AllocatePageSize()); ++ DCHECK_EQ(0, size % AllocatePageSize()); ++ return munmap(address, size) == 0; ++} ++ ++// static ++bool OS::Release(void* address, size_t size) { ++ DCHECK_EQ(0, reinterpret_cast(address) % CommitPageSize()); ++ DCHECK_EQ(0, size % CommitPageSize()); ++ return munmap(address, size) == 0; ++} ++ ++// static ++bool OS::SetPermissions(void* address, size_t size, MemoryPermission access) { ++ DCHECK_EQ(0, reinterpret_cast(address) % CommitPageSize()); ++ DCHECK_EQ(0, size % CommitPageSize()); ++ ++ int prot = GetProtectionFromMemoryPermission(access); ++ int ret = mprotect(address, size, prot); ++ if (ret == 0 && access == OS::MemoryPermission::kNoAccess) { ++ // This is advisory; ignore errors and continue execution. ++ USE(DiscardSystemPages(address, size)); ++ } ++ ++// For accounting purposes, we want to call MADV_FREE_REUSE on macOS after ++// changing permissions away from OS::MemoryPermission::kNoAccess. Since this ++// state is not kept at this layer, we always call this if access != kNoAccess. ++// The cost is a syscall that effectively no-ops. ++// TODO(erikchen): Fix this to only call MADV_FREE_REUSE when necessary. ++// https://crbug.com/823915 ++#if defined(V8_OS_MACOSX) ++ if (access != OS::MemoryPermission::kNoAccess) ++ madvise(address, size, MADV_FREE_REUSE); ++#endif ++ ++ return ret == 0; ++} ++ ++bool OS::DiscardSystemPages(void* address, size_t size) { ++ DCHECK_EQ(0, reinterpret_cast(address) % CommitPageSize()); ++ DCHECK_EQ(0, size % CommitPageSize()); ++#if defined(V8_OS_MACOSX) ++ // On OSX, MADV_FREE_REUSABLE has comparable behavior to MADV_FREE, but also ++ // marks the pages with the reusable bit, which allows both Activity Monitor ++ // and memory-infra to correctly track the pages. ++ int ret = madvise(address, size, MADV_FREE_REUSABLE); ++#elif defined(_AIX) || defined(V8_OS_SOLARIS) ++ int ret = madvise(reinterpret_cast(address), size, MADV_FREE); ++#else ++ int ret = madvise(address, size, MADV_FREE); ++#endif ++ if (ret != 0 && errno == ENOSYS) ++ return true; // madvise is not available on all systems. ++ if (ret != 0 && errno == EINVAL) { ++// MADV_FREE only works on Linux 4.5+ . If request failed, retry with older ++// MADV_DONTNEED . Note that MADV_FREE being defined at compile time doesn't ++// imply runtime support. ++#if defined(_AIX) || defined(V8_OS_SOLARIS) ++ ret = madvise(reinterpret_cast(address), size, MADV_DONTNEED); ++#else ++ ret = madvise(address, size, MADV_DONTNEED); ++#endif ++ } ++ return ret == 0; ++} ++ ++// static ++bool OS::HasLazyCommits() { ++#if V8_OS_AIX || V8_OS_LINUX || V8_OS_MACOSX ++ return true; ++#else ++ // TODO(bbudge) Return true for all POSIX platforms. ++ return false; ++#endif ++} ++#endif // !V8_OS_CYGWIN && !V8_OS_FUCHSIA ++ ++const char* OS::GetGCFakeMMapFile() { ++ return g_gc_fake_mmap; ++} ++ ++ ++void OS::Sleep(TimeDelta interval) { ++ usleep(static_cast(interval.InMicroseconds())); ++} ++ ++ ++void OS::Abort() { ++ if (g_hard_abort) { ++ V8_IMMEDIATE_CRASH(); ++ } ++ // Redirect to std abort to signal abnormal program termination. ++ abort(); ++} ++ ++ ++void OS::DebugBreak() { ++#if V8_HOST_ARCH_ARM ++ asm("bkpt 0"); ++#elif V8_HOST_ARCH_ARM64 ++ asm("brk 0"); ++#elif V8_HOST_ARCH_MIPS ++ asm("break"); ++#elif V8_HOST_ARCH_MIPS64 ++ asm("break"); ++#elif V8_HOST_ARCH_LOONGARCH64 ++ asm("break 0"); ++#elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64 ++ asm("twge 2,2"); ++#elif V8_HOST_ARCH_IA32 ++ asm("int $3"); ++#elif V8_HOST_ARCH_X64 ++ asm("int $3"); ++#elif V8_HOST_ARCH_S390 ++ // Software breakpoint instruction is 0x0001 ++ asm volatile(".word 0x0001"); ++#elif V8_HOST_ARCH_LOONGARCH64 ++ asm("break 0"); ++#else ++#error Unsupported host architecture. ++#endif ++} ++ ++ ++class PosixMemoryMappedFile final : public OS::MemoryMappedFile { ++ public: ++ PosixMemoryMappedFile(FILE* file, void* memory, size_t size) ++ : file_(file), memory_(memory), size_(size) {} ++ ~PosixMemoryMappedFile() final; ++ void* memory() const final { return memory_; } ++ size_t size() const final { return size_; } ++ ++ private: ++ FILE* const file_; ++ void* const memory_; ++ size_t const size_; ++}; ++ ++ ++// static ++OS::MemoryMappedFile* OS::MemoryMappedFile::open(const char* name, ++ FileMode mode) { ++ const char* fopen_mode = (mode == FileMode::kReadOnly) ? "r" : "r+"; ++ if (FILE* file = fopen(name, fopen_mode)) { ++ if (fseek(file, 0, SEEK_END) == 0) { ++ long size = ftell(file); // NOLINT(runtime/int) ++ if (size == 0) return new PosixMemoryMappedFile(file, nullptr, 0); ++ if (size > 0) { ++ int prot = PROT_READ; ++ int flags = MAP_PRIVATE; ++ if (mode == FileMode::kReadWrite) { ++ prot |= PROT_WRITE; ++ flags = MAP_SHARED; ++ } ++ void* const memory = ++ mmap(OS::GetRandomMmapAddr(), size, prot, flags, fileno(file), 0); ++ if (memory != MAP_FAILED) { ++ return new PosixMemoryMappedFile(file, memory, size); ++ } ++ } ++ } ++ fclose(file); ++ } ++ return nullptr; ++} ++ ++// static ++OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name, ++ size_t size, void* initial) { ++ if (FILE* file = fopen(name, "w+")) { ++ if (size == 0) return new PosixMemoryMappedFile(file, nullptr, 0); ++ size_t result = fwrite(initial, 1, size, file); ++ if (result == size && !ferror(file)) { ++ void* memory = mmap(OS::GetRandomMmapAddr(), result, ++ PROT_READ | PROT_WRITE, MAP_SHARED, fileno(file), 0); ++ if (memory != MAP_FAILED) { ++ return new PosixMemoryMappedFile(file, memory, result); ++ } ++ } ++ fclose(file); ++ } ++ return nullptr; ++} ++ ++ ++PosixMemoryMappedFile::~PosixMemoryMappedFile() { ++ if (memory_) CHECK(OS::Free(memory_, RoundUp(size_, OS::AllocatePageSize()))); ++ fclose(file_); ++} ++ ++ ++int OS::GetCurrentProcessId() { ++ return static_cast(getpid()); ++} ++ ++ ++int OS::GetCurrentThreadId() { ++#if V8_OS_MACOSX || (V8_OS_ANDROID && defined(__APPLE__)) ++ return static_cast(pthread_mach_thread_np(pthread_self())); ++#elif V8_OS_LINUX ++ return static_cast(syscall(__NR_gettid)); ++#elif V8_OS_ANDROID ++ return static_cast(gettid()); ++#elif V8_OS_AIX ++ return static_cast(thread_self()); ++#elif V8_OS_FUCHSIA ++ return static_cast(zx_thread_self()); ++#elif V8_OS_SOLARIS ++ return static_cast(pthread_self()); ++#else ++ return static_cast(reinterpret_cast(pthread_self())); ++#endif ++} ++ ++void OS::ExitProcess(int exit_code) { ++ // Use _exit instead of exit to avoid races between isolate ++ // threads and static destructors. ++ fflush(stdout); ++ fflush(stderr); ++ _exit(exit_code); ++} ++ ++// ---------------------------------------------------------------------------- ++// POSIX date/time support. ++// ++ ++#if !defined(V8_OS_FUCHSIA) ++int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) { ++ struct rusage usage; ++ ++ if (getrusage(RUSAGE_SELF, &usage) < 0) return -1; ++ *secs = static_cast(usage.ru_utime.tv_sec); ++ *usecs = static_cast(usage.ru_utime.tv_usec); ++ return 0; ++} ++#endif ++ ++double OS::TimeCurrentMillis() { ++ return Time::Now().ToJsTime(); ++} ++ ++double PosixTimezoneCache::DaylightSavingsOffset(double time) { ++ if (std::isnan(time)) return std::numeric_limits::quiet_NaN(); ++ time_t tv = static_cast(std::floor(time/msPerSecond)); ++ struct tm tm; ++ struct tm* t = localtime_r(&tv, &tm); ++ if (nullptr == t) return std::numeric_limits::quiet_NaN(); ++ return t->tm_isdst > 0 ? 3600 * msPerSecond : 0; ++} ++ ++ ++int OS::GetLastError() { ++ return errno; ++} ++ ++ ++// ---------------------------------------------------------------------------- ++// POSIX stdio support. ++// ++ ++FILE* OS::FOpen(const char* path, const char* mode) { ++ FILE* file = fopen(path, mode); ++ if (file == nullptr) return nullptr; ++ struct stat file_stat; ++ if (fstat(fileno(file), &file_stat) != 0) { ++ fclose(file); ++ return nullptr; ++ } ++ bool is_regular_file = ((file_stat.st_mode & S_IFREG) != 0); ++ if (is_regular_file) return file; ++ fclose(file); ++ return nullptr; ++} ++ ++ ++bool OS::Remove(const char* path) { ++ return (remove(path) == 0); ++} ++ ++char OS::DirectorySeparator() { return '/'; } ++ ++bool OS::isDirectorySeparator(const char ch) { ++ return ch == DirectorySeparator(); ++} ++ ++ ++FILE* OS::OpenTemporaryFile() { ++ return tmpfile(); ++} ++ ++const char* const OS::LogFileOpenMode = "w+"; ++ ++void OS::Print(const char* format, ...) { ++ va_list args; ++ va_start(args, format); ++ VPrint(format, args); ++ va_end(args); ++} ++ ++ ++void OS::VPrint(const char* format, va_list args) { ++#if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT) ++ __android_log_vprint(ANDROID_LOG_INFO, LOG_TAG, format, args); ++#else ++ vprintf(format, args); ++#endif ++} ++ ++ ++void OS::FPrint(FILE* out, const char* format, ...) { ++ va_list args; ++ va_start(args, format); ++ VFPrint(out, format, args); ++ va_end(args); ++} ++ ++ ++void OS::VFPrint(FILE* out, const char* format, va_list args) { ++#if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT) ++ __android_log_vprint(ANDROID_LOG_INFO, LOG_TAG, format, args); ++#else ++ vfprintf(out, format, args); ++#endif ++} ++ ++ ++void OS::PrintError(const char* format, ...) { ++ va_list args; ++ va_start(args, format); ++ VPrintError(format, args); ++ va_end(args); ++} ++ ++ ++void OS::VPrintError(const char* format, va_list args) { ++#if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT) ++ __android_log_vprint(ANDROID_LOG_ERROR, LOG_TAG, format, args); ++#else ++ vfprintf(stderr, format, args); ++#endif ++} ++ ++ ++int OS::SNPrintF(char* str, int length, const char* format, ...) { ++ va_list args; ++ va_start(args, format); ++ int result = VSNPrintF(str, length, format, args); ++ va_end(args); ++ return result; ++} ++ ++ ++int OS::VSNPrintF(char* str, ++ int length, ++ const char* format, ++ va_list args) { ++ int n = vsnprintf(str, length, format, args); ++ if (n < 0 || n >= length) { ++ // If the length is zero, the assignment fails. ++ if (length > 0) ++ str[length - 1] = '\0'; ++ return -1; ++ } else { ++ return n; ++ } ++} ++ ++ ++// ---------------------------------------------------------------------------- ++// POSIX string support. ++// ++ ++void OS::StrNCpy(char* dest, int length, const char* src, size_t n) { ++ strncpy(dest, src, n); ++} ++ ++ ++// ---------------------------------------------------------------------------- ++// POSIX thread support. ++// ++ ++class Thread::PlatformData { ++ public: ++ PlatformData() : thread_(kNoThread) {} ++ pthread_t thread_; // Thread handle for pthread. ++ // Synchronizes thread creation ++ Mutex thread_creation_mutex_; ++}; ++ ++Thread::Thread(const Options& options) ++ : data_(new PlatformData), ++ stack_size_(options.stack_size()), ++ start_semaphore_(nullptr) { ++ if (stack_size_ > 0 && static_cast(stack_size_) < PTHREAD_STACK_MIN) { ++ stack_size_ = PTHREAD_STACK_MIN; ++ } ++ set_name(options.name()); ++} ++ ++ ++Thread::~Thread() { ++ delete data_; ++} ++ ++ ++static void SetThreadName(const char* name) { ++#if V8_OS_DRAGONFLYBSD || V8_OS_FREEBSD || V8_OS_OPENBSD ++ pthread_set_name_np(pthread_self(), name); ++#elif V8_OS_NETBSD ++ STATIC_ASSERT(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP); ++ pthread_setname_np(pthread_self(), "%s", name); ++#elif V8_OS_MACOSX ++ // pthread_setname_np is only available in 10.6 or later, so test ++ // for it at runtime. ++ int (*dynamic_pthread_setname_np)(const char*); ++ *reinterpret_cast(&dynamic_pthread_setname_np) = ++ dlsym(RTLD_DEFAULT, "pthread_setname_np"); ++ if (dynamic_pthread_setname_np == nullptr) return; ++ ++ // Mac OS X does not expose the length limit of the name, so hardcode it. ++ static const int kMaxNameLength = 63; ++ STATIC_ASSERT(Thread::kMaxThreadNameLength <= kMaxNameLength); ++ dynamic_pthread_setname_np(name); ++#elif defined(PR_SET_NAME) ++ prctl(PR_SET_NAME, ++ reinterpret_cast(name), // NOLINT ++ 0, 0, 0); ++#endif ++} ++ ++ ++static void* ThreadEntry(void* arg) { ++ Thread* thread = reinterpret_cast(arg); ++ // We take the lock here to make sure that pthread_create finished first since ++ // we don't know which thread will run first (the original thread or the new ++ // one). ++ { MutexGuard lock_guard(&thread->data()->thread_creation_mutex_); } ++ SetThreadName(thread->name()); ++ DCHECK_NE(thread->data()->thread_, kNoThread); ++ thread->NotifyStartedAndRun(); ++ return nullptr; ++} ++ ++ ++void Thread::set_name(const char* name) { ++ strncpy(name_, name, sizeof(name_) - 1); ++ name_[sizeof(name_) - 1] = '\0'; ++} ++ ++bool Thread::Start() { ++ int result; ++ pthread_attr_t attr; ++ memset(&attr, 0, sizeof(attr)); ++ result = pthread_attr_init(&attr); ++ if (result != 0) return false; ++ size_t stack_size = stack_size_; ++ if (stack_size == 0) { ++#if V8_OS_MACOSX ++ // Default on Mac OS X is 512kB -- bump up to 1MB ++ stack_size = 1 * 1024 * 1024; ++#elif V8_OS_AIX ++ // Default on AIX is 96kB -- bump up to 2MB ++ stack_size = 2 * 1024 * 1024; ++#endif ++ } ++ if (stack_size > 0) { ++ result = pthread_attr_setstacksize(&attr, stack_size); ++ if (result != 0) return pthread_attr_destroy(&attr), false; ++ } ++ { ++ MutexGuard lock_guard(&data_->thread_creation_mutex_); ++ result = pthread_create(&data_->thread_, &attr, ThreadEntry, this); ++ if (result != 0 || data_->thread_ == kNoThread) { ++ return pthread_attr_destroy(&attr), false; ++ } ++ } ++ result = pthread_attr_destroy(&attr); ++ return result == 0; ++} ++ ++void Thread::Join() { pthread_join(data_->thread_, nullptr); } ++ ++static Thread::LocalStorageKey PthreadKeyToLocalKey(pthread_key_t pthread_key) { ++#if V8_OS_CYGWIN ++ // We need to cast pthread_key_t to Thread::LocalStorageKey in two steps ++ // because pthread_key_t is a pointer type on Cygwin. This will probably not ++ // work on 64-bit platforms, but Cygwin doesn't support 64-bit anyway. ++ STATIC_ASSERT(sizeof(Thread::LocalStorageKey) == sizeof(pthread_key_t)); ++ intptr_t ptr_key = reinterpret_cast(pthread_key); ++ return static_cast(ptr_key); ++#else ++ return static_cast(pthread_key); ++#endif ++} ++ ++ ++static pthread_key_t LocalKeyToPthreadKey(Thread::LocalStorageKey local_key) { ++#if V8_OS_CYGWIN ++ STATIC_ASSERT(sizeof(Thread::LocalStorageKey) == sizeof(pthread_key_t)); ++ intptr_t ptr_key = static_cast(local_key); ++ return reinterpret_cast(ptr_key); ++#else ++ return static_cast(local_key); ++#endif ++} ++ ++ ++#ifdef V8_FAST_TLS_SUPPORTED ++ ++static std::atomic tls_base_offset_initialized{false}; ++intptr_t kMacTlsBaseOffset = 0; ++ ++// It's safe to do the initialization more that once, but it has to be ++// done at least once. ++static void InitializeTlsBaseOffset() { ++ const size_t kBufferSize = 128; ++ char buffer[kBufferSize]; ++ size_t buffer_size = kBufferSize; ++ int ctl_name[] = { CTL_KERN , KERN_OSRELEASE }; ++ if (sysctl(ctl_name, 2, buffer, &buffer_size, nullptr, 0) != 0) { ++ FATAL("V8 failed to get kernel version"); ++ } ++ // The buffer now contains a string of the form XX.YY.ZZ, where ++ // XX is the major kernel version component. ++ // Make sure the buffer is 0-terminated. ++ buffer[kBufferSize - 1] = '\0'; ++ char* period_pos = strchr(buffer, '.'); ++ *period_pos = '\0'; ++ int kernel_version_major = ++ static_cast(strtol(buffer, nullptr, 10)); // NOLINT ++ // The constants below are taken from pthreads.s from the XNU kernel ++ // sources archive at www.opensource.apple.com. ++ if (kernel_version_major < 11) { ++ // 8.x.x (Tiger), 9.x.x (Leopard), 10.x.x (Snow Leopard) have the ++ // same offsets. ++#if V8_HOST_ARCH_IA32 ++ kMacTlsBaseOffset = 0x48; ++#else ++ kMacTlsBaseOffset = 0x60; ++#endif ++ } else { ++ // 11.x.x (Lion) changed the offset. ++ kMacTlsBaseOffset = 0; ++ } ++ ++ tls_base_offset_initialized.store(true, std::memory_order_release); ++} ++ ++ ++static void CheckFastTls(Thread::LocalStorageKey key) { ++ void* expected = reinterpret_cast(0x1234CAFE); ++ Thread::SetThreadLocal(key, expected); ++ void* actual = Thread::GetExistingThreadLocal(key); ++ if (expected != actual) { ++ FATAL("V8 failed to initialize fast TLS on current kernel"); ++ } ++ Thread::SetThreadLocal(key, nullptr); ++} ++ ++#endif // V8_FAST_TLS_SUPPORTED ++ ++ ++Thread::LocalStorageKey Thread::CreateThreadLocalKey() { ++#ifdef V8_FAST_TLS_SUPPORTED ++ bool check_fast_tls = false; ++ if (!tls_base_offset_initialized.load(std::memory_order_acquire)) { ++ check_fast_tls = true; ++ InitializeTlsBaseOffset(); ++ } ++#endif ++ pthread_key_t key; ++ int result = pthread_key_create(&key, nullptr); ++ DCHECK_EQ(0, result); ++ USE(result); ++ LocalStorageKey local_key = PthreadKeyToLocalKey(key); ++#ifdef V8_FAST_TLS_SUPPORTED ++ // If we just initialized fast TLS support, make sure it works. ++ if (check_fast_tls) CheckFastTls(local_key); ++#endif ++ return local_key; ++} ++ ++ ++void Thread::DeleteThreadLocalKey(LocalStorageKey key) { ++ pthread_key_t pthread_key = LocalKeyToPthreadKey(key); ++ int result = pthread_key_delete(pthread_key); ++ DCHECK_EQ(0, result); ++ USE(result); ++} ++ ++ ++void* Thread::GetThreadLocal(LocalStorageKey key) { ++ pthread_key_t pthread_key = LocalKeyToPthreadKey(key); ++ return pthread_getspecific(pthread_key); ++} ++ ++ ++void Thread::SetThreadLocal(LocalStorageKey key, void* value) { ++ pthread_key_t pthread_key = LocalKeyToPthreadKey(key); ++ int result = pthread_setspecific(pthread_key, value); ++ DCHECK_EQ(0, result); ++ USE(result); ++} ++ ++// pthread_getattr_np used below is non portable (hence the _np suffix). We ++// keep this version in POSIX as most Linux-compatible derivatives will ++// support it. MacOS and FreeBSD are different here. ++#if !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(_AIX) && \ ++ !defined(V8_OS_SOLARIS) ++ ++// static ++void* Stack::GetStackStart() { ++ pthread_attr_t attr; ++ int error = pthread_getattr_np(pthread_self(), &attr); ++ if (!error) { ++ void* base; ++ size_t size; ++ error = pthread_attr_getstack(&attr, &base, &size); ++ CHECK(!error); ++ pthread_attr_destroy(&attr); ++ return reinterpret_cast(base) + size; ++ } ++ ++#if defined(V8_LIBC_GLIBC) ++ // pthread_getattr_np can fail for the main thread. In this case ++ // just like NaCl we rely on the __libc_stack_end to give us ++ // the start of the stack. ++ // See https://code.google.com/p/nativeclient/issues/detail?id=3431. ++ return __libc_stack_end; ++#endif // !defined(V8_LIBC_GLIBC) ++ return nullptr; ++} ++ ++#endif // !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && ++ // !defined(_AIX) && !defined(V8_OS_SOLARIS) ++ ++// static ++void* Stack::GetCurrentStackPosition() { return __builtin_frame_address(0); } ++ ++#undef LOG_TAG ++#undef MAP_ANONYMOUS ++#undef MADV_FREE ++ ++} // namespace base ++} // namespace v8 +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc.rej +@@ -0,0 +1,20 @@ ++--- src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc +++++ src/3rdparty/chromium/v8/src/base/platform/platform-posix.cc ++@@ -507,6 +511,8 @@ void OS::DebugBreak() { ++ asm("break"); ++ #elif V8_HOST_ARCH_MIPS64 ++ asm("break"); +++#elif V8_HOST_ARCH_LOONGARCH64 +++ asm("break 0"); ++ #elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64 ++ asm("twge 2,2"); ++ #elif V8_HOST_ARCH_IA32 ++@@ -516,6 +522,8 @@ void OS::DebugBreak() { ++ #elif V8_HOST_ARCH_S390 ++ // Software breakpoint instruction is 0x0001 ++ asm volatile(".word 0x0001"); +++#elif V8_HOST_ARCH_LOONGARCH64 +++ asm("break 0"); ++ #else ++ #error Unsupported host architecture. ++ #endif +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/builtins/builtins.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/builtins/builtins.cc +@@ -490,7 +490,7 @@ bool Builtins::CodeObjectIsExecutable(in case Builtins::kCEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit: return true; default: @@ -6639,11 +12711,22 @@ index 31682f397..3bceeae45 100644 // TODO(Loongson): Move non-JS linkage builtins code objects into RO_SPACE // caused MIPS platform to crash, and we need some time to handle it. Now // disable this change temporarily on MIPS platform. -diff --git a/src/3rdparty/chromium/v8/src/builtins/loongarch64/builtins-loongarch64.cc b/src/3rdparty/chromium/v8/src/builtins/loongarch64/builtins-loongarch64.cc -new file mode 100644 -index 000000000..9c4708b8b --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/builtins/loongarch64/builtins-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/builtins/builtins.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/builtins/builtins.cc +++++ src/3rdparty/chromium/v8/src/builtins/builtins.cc ++@@ -490,7 +490,7 @@ bool Builtins::CodeObjectIsExecutable(int builtin_index) { ++ case Builtins::kCEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit: ++ return true; ++ default: ++-#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 +++#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_LOONGARCH64 ++ // TODO(Loongson): Move non-JS linkage builtins code objects into RO_SPACE ++ // caused MIPS platform to crash, and we need some time to handle it. Now ++ // disable this change temporarily on MIPS platform. +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/builtins/loongarch64/builtins-loongarch64.cc @@ -0,0 +1,3549 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -10194,10 +16277,8 @@ index 000000000..9c4708b8b +} // namespace v8 + +#endif // V8_TARGET_ARCH_LOONGARCH64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/assembler-arch.h b/src/3rdparty/chromium/v8/src/codegen/assembler-arch.h -index d56b37250..85a477e1d 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/assembler-arch.h -+++ b/src/3rdparty/chromium/v8/src/codegen/assembler-arch.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/assembler-arch.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/assembler-arch.h @@ -17,6 +17,8 @@ #include "src/codegen/arm/assembler-arm.h" #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 @@ -10207,10 +16288,22 @@ index d56b37250..85a477e1d 100644 #elif V8_TARGET_ARCH_MIPS #include "src/codegen/mips/assembler-mips.h" #elif V8_TARGET_ARCH_MIPS64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/assembler-inl.h b/src/3rdparty/chromium/v8/src/codegen/assembler-inl.h -index 8c81315d5..e8a6271ed 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/assembler-inl.h -+++ b/src/3rdparty/chromium/v8/src/codegen/assembler-inl.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/assembler-arch.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/codegen/assembler-arch.h +++++ src/3rdparty/chromium/v8/src/codegen/assembler-arch.h ++@@ -17,6 +17,8 @@ ++ #include "src/codegen/arm/assembler-arm.h" ++ #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 ++ #include "src/codegen/ppc/assembler-ppc.h" +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#include "src/codegen/loongarch64/assembler-loongarch64.h" ++ #elif V8_TARGET_ARCH_MIPS ++ #include "src/codegen/mips/assembler-mips.h" ++ #elif V8_TARGET_ARCH_MIPS64 +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/assembler-inl.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/assembler-inl.h @@ -21,6 +21,8 @@ #include "src/codegen/mips/assembler-mips-inl.h" #elif V8_TARGET_ARCH_MIPS64 @@ -10220,11 +16313,23 @@ index 8c81315d5..e8a6271ed 100644 #elif V8_TARGET_ARCH_S390 #include "src/codegen/s390/assembler-s390-inl.h" #else -diff --git a/src/3rdparty/chromium/v8/src/codegen/assembler.h b/src/3rdparty/chromium/v8/src/codegen/assembler.h -index 6419e55ce..1e7604e14 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/assembler.h -+++ b/src/3rdparty/chromium/v8/src/codegen/assembler.h -@@ -258,7 +258,8 @@ class V8_EXPORT_PRIVATE AssemblerBase : public Malloced { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/assembler-inl.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/codegen/assembler-inl.h +++++ src/3rdparty/chromium/v8/src/codegen/assembler-inl.h ++@@ -21,6 +21,8 @@ ++ #include "src/codegen/mips/assembler-mips-inl.h" ++ #elif V8_TARGET_ARCH_MIPS64 ++ #include "src/codegen/mips64/assembler-mips64-inl.h" +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#include "src/codegen/loongarch64/assembler-loongarch64-inl.h" ++ #elif V8_TARGET_ARCH_S390 ++ #include "src/codegen/s390/assembler-s390-inl.h" ++ #else +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/assembler.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/assembler.h +@@ -258,7 +258,8 @@ class V8_EXPORT_PRIVATE AssemblerBase : int pc_offset() const { return static_cast(pc_ - buffer_start_); } int pc_offset_for_safepoint() { @@ -10234,10 +16339,23 @@ index 6419e55ce..1e7604e14 100644 // Mips needs it's own implementation to avoid trampoline's influence. UNREACHABLE(); #else -diff --git a/src/3rdparty/chromium/v8/src/codegen/constants-arch.h b/src/3rdparty/chromium/v8/src/codegen/constants-arch.h -index 7a222c960..67654757e 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/constants-arch.h -+++ b/src/3rdparty/chromium/v8/src/codegen/constants-arch.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/assembler.h.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/v8/src/codegen/assembler.h +++++ src/3rdparty/chromium/v8/src/codegen/assembler.h ++@@ -258,7 +258,8 @@ class V8_EXPORT_PRIVATE AssemblerBase : public Malloced { ++ int pc_offset() const { return static_cast(pc_ - buffer_start_); } ++ ++ int pc_offset_for_safepoint() { ++-#if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) +++#if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) || \ +++ defined(V8_TARGET_ARCH_LOONGARCH64) ++ // Mips needs it's own implementation to avoid trampoline's influence. ++ UNREACHABLE(); ++ #else +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/constants-arch.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/constants-arch.h @@ -11,6 +11,8 @@ #include "src/codegen/arm64/constants-arm64.h" // NOLINT #elif V8_TARGET_ARCH_IA32 @@ -10247,10 +16365,22 @@ index 7a222c960..67654757e 100644 #elif V8_TARGET_ARCH_MIPS #include "src/codegen/mips/constants-mips.h" // NOLINT #elif V8_TARGET_ARCH_MIPS64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/cpu-features.h b/src/3rdparty/chromium/v8/src/codegen/cpu-features.h -index eef98f77e..e6252d105 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/cpu-features.h -+++ b/src/3rdparty/chromium/v8/src/codegen/cpu-features.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/constants-arch.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/codegen/constants-arch.h +++++ src/3rdparty/chromium/v8/src/codegen/constants-arch.h ++@@ -11,6 +11,8 @@ ++ #include "src/codegen/arm64/constants-arm64.h" // NOLINT ++ #elif V8_TARGET_ARCH_IA32 ++ #include "src/codegen/ia32/constants-ia32.h" // NOLINT +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#include "src/codegen/loongarch64/constants-loongarch64.h" // NOLINT ++ #elif V8_TARGET_ARCH_MIPS ++ #include "src/codegen/mips/constants-mips.h" // NOLINT ++ #elif V8_TARGET_ARCH_MIPS64 +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/cpu-features.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/cpu-features.h @@ -50,6 +50,9 @@ enum CpuFeature { MIPSr6, MIPS_SIMD, // MSA instructions @@ -10261,11 +16391,24 @@ index eef98f77e..e6252d105 100644 #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 FPU, FPR_GPR_MOV, -diff --git a/src/3rdparty/chromium/v8/src/codegen/external-reference.cc b/src/3rdparty/chromium/v8/src/codegen/external-reference.cc -index ba71702e7..a51db28b6 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/external-reference.cc -+++ b/src/3rdparty/chromium/v8/src/codegen/external-reference.cc -@@ -500,6 +500,8 @@ ExternalReference ExternalReference::invoke_accessor_getter_callback() { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/cpu-features.h.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/v8/src/codegen/cpu-features.h +++++ src/3rdparty/chromium/v8/src/codegen/cpu-features.h ++@@ -50,6 +50,9 @@ enum CpuFeature { ++ MIPSr6, ++ MIPS_SIMD, // MSA instructions ++ +++#elif V8_TARGET_ARCH_LOONGARCH64 +++ FPU, // TODO +++ ++ #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 ++ FPU, ++ FPR_GPR_MOV, +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/external-reference.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/external-reference.cc +@@ -500,6 +500,8 @@ ExternalReference ExternalReference::inv #define re_stack_check_func RegExpMacroAssemblerMIPS::CheckStackGuardState #elif V8_TARGET_ARCH_MIPS64 #define re_stack_check_func RegExpMacroAssemblerMIPS::CheckStackGuardState @@ -10274,11 +16417,23 @@ index ba71702e7..a51db28b6 100644 #elif V8_TARGET_ARCH_S390 #define re_stack_check_func RegExpMacroAssemblerS390::CheckStackGuardState #else -diff --git a/src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc b/src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc -index 8a6235fa0..90b1d4695 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc -+++ b/src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc -@@ -131,7 +131,8 @@ const char* CallInterfaceDescriptor::DebugName() const { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/external-reference.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/codegen/external-reference.cc +++++ src/3rdparty/chromium/v8/src/codegen/external-reference.cc ++@@ -500,6 +500,8 @@ ExternalReference ExternalReference::invoke_accessor_getter_callback() { ++ #define re_stack_check_func RegExpMacroAssemblerMIPS::CheckStackGuardState ++ #elif V8_TARGET_ARCH_MIPS64 ++ #define re_stack_check_func RegExpMacroAssemblerMIPS::CheckStackGuardState +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#define re_stack_check_func RegExpMacroAssemblerLA64::CheckStackGuardState ++ #elif V8_TARGET_ARCH_S390 ++ #define re_stack_check_func RegExpMacroAssemblerS390::CheckStackGuardState ++ #else +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc +@@ -131,7 +131,8 @@ const char* CallInterfaceDescriptor::Deb return ""; } @@ -10288,7 +16443,7 @@ index 8a6235fa0..90b1d4695 100644 bool CallInterfaceDescriptor::IsValidFloatParameterRegister(Register reg) { return true; } -@@ -397,7 +398,8 @@ void WasmFloat64ToNumberDescriptor::InitializePlatformSpecific( +@@ -397,7 +398,8 @@ void WasmFloat64ToNumberDescriptor::Init } #endif // !V8_TARGET_ARCH_IA32 @@ -10298,11 +16453,33 @@ index 8a6235fa0..90b1d4695 100644 void WasmI32AtomicWait32Descriptor::InitializePlatformSpecific( CallInterfaceDescriptorData* data) { DefaultInitializePlatformSpecific(data, kParameterCount); -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64-inl.h b/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64-inl.h -new file mode 100644 -index 000000000..1093c7b6c --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64-inl.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc.rej +@@ -0,0 +1,22 @@ ++--- src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc +++++ src/3rdparty/chromium/v8/src/codegen/interface-descriptors.cc ++@@ -131,7 +131,8 @@ const char* CallInterfaceDescriptor::DebugName() const { ++ return ""; ++ } ++ ++-#if !defined(V8_TARGET_ARCH_MIPS) && !defined(V8_TARGET_ARCH_MIPS64) +++#if !defined(V8_TARGET_ARCH_MIPS) && !defined(V8_TARGET_ARCH_MIPS64) && \ +++ !defined(V8_TARGET_ARCH_LOONGARCH64) ++ bool CallInterfaceDescriptor::IsValidFloatParameterRegister(Register reg) { ++ return true; ++ } ++@@ -397,7 +398,8 @@ void WasmFloat64ToNumberDescriptor::InitializePlatformSpecific( ++ } ++ #endif // !V8_TARGET_ARCH_IA32 ++ ++-#if !defined(V8_TARGET_ARCH_MIPS) && !defined(V8_TARGET_ARCH_MIPS64) +++#if !defined(V8_TARGET_ARCH_MIPS) && !defined(V8_TARGET_ARCH_MIPS64) && \ +++ !defined(V8_TARGET_ARCH_LOONGARCH64) ++ void WasmI32AtomicWait32Descriptor::InitializePlatformSpecific( ++ CallInterfaceDescriptorData* data) { ++ DefaultInitializePlatformSpecific(data, kParameterCount); +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64-inl.h @@ -0,0 +1,267 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. @@ -10571,11 +16748,8 @@ index 000000000..1093c7b6c +} // namespace v8 + +#endif // V8_CODEGEN_LOONGARCH64_ASSEMBLER_LA64_INL_H_ -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.cc b/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.cc -new file mode 100644 -index 000000000..4971eecf6 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.cc @@ -0,0 +1,2689 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. @@ -13266,12 +19440,9 @@ index 000000000..4971eecf6 +} // namespace v8 + +#endif // V8_TARGET_ARCH_LOONGARCH64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.h b/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.h -new file mode 100644 -index 000000000..1c93e6459 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.h -@@ -0,0 +1,1138 @@ ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/assembler-loongarch64.h +@@ -0,0 +1,1137 @@ +// Copyright (c) 1994-2006 Sun Microsystems Inc. +// All Rights Reserved. +// @@ -13344,7 +19515,6 @@ index 000000000..1c93e6459 + : rm_(no_reg), rmode_(RelocInfo::EXTERNAL_REFERENCE) { + value_.immediate = static_cast(f.address()); + } -+ V8_INLINE explicit Operand(const char* s); + explicit Operand(Handle handle); + V8_INLINE explicit Operand(Smi value) : rm_(no_reg), rmode_(RelocInfo::NONE) { + value_.immediate = static_cast(value.ptr()); @@ -14410,11 +20580,8 @@ index 000000000..1c93e6459 +} // namespace v8 + +#endif // V8_CODEGEN_LOONGARCH64_ASSEMBLER_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.cc b/src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.cc -new file mode 100644 -index 000000000..307e2e72e --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.cc @@ -0,0 +1,100 @@ +// Copyright 2011 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -14516,11 +20683,8 @@ index 000000000..307e2e72e +} // namespace v8 + +#endif // V8_TARGET_ARCH_LOONGARCH64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.h b/src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.h -new file mode 100644 -index 000000000..0bac68014 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/constants-loongarch64.h @@ -0,0 +1,1340 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -15862,11 +22026,8 @@ index 000000000..0bac68014 +} // namespace v8 + +#endif // V8_CODEGEN_LOONGARCH64_CONSTANTS_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/cpu-loongarch64.cc b/src/3rdparty/chromium/v8/src/codegen/loongarch64/cpu-loongarch64.cc -new file mode 100644 -index 000000000..8a454c247 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/cpu-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/cpu-loongarch64.cc @@ -0,0 +1,38 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -15906,11 +22067,8 @@ index 000000000..8a454c247 +} // namespace v8 + +#endif // V8_TARGET_ARCH_LOONGARCH64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/interface-descriptors-loongarch64.cc b/src/3rdparty/chromium/v8/src/codegen/loongarch64/interface-descriptors-loongarch64.cc -new file mode 100644 -index 000000000..6e63852e3 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/interface-descriptors-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/interface-descriptors-loongarch64.cc @@ -0,0 +1,357 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -16269,11 +22427,8 @@ index 000000000..6e63852e3 +} // namespace v8 + +#endif // V8_TARGET_ARCH_LA64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.cc b/src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.cc -new file mode 100644 -index 000000000..85d503a68 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.cc @@ -0,0 +1,4021 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -20296,11 +26451,8 @@ index 000000000..85d503a68 +} // namespace v8 + +#endif // V8_TARGET_ARCH_LOONGARCH64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.h b/src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.h -new file mode 100644 -index 000000000..5089d280b --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/macro-assembler-loongarch64.h @@ -0,0 +1,1110 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -21412,11 +27564,8 @@ index 000000000..5089d280b +} // namespace v8 + +#endif // V8_CODEGEN_LOONGARCH64_MACRO_ASSEMBLER_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/codegen/loongarch64/register-loongarch64.h b/src/3rdparty/chromium/v8/src/codegen/loongarch64/register-loongarch64.h -new file mode 100644 -index 000000000..6999f1936 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/codegen/loongarch64/register-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/loongarch64/register-loongarch64.h @@ -0,0 +1,330 @@ +// Copyright 2018 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -21748,10 +27897,8 @@ index 000000000..6999f1936 +} // namespace v8 + +#endif // V8_CODEGEN_LOONGARCH64_REGISTER_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/codegen/macro-assembler.h b/src/3rdparty/chromium/v8/src/codegen/macro-assembler.h -index a213fc504..7532a4ab7 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/macro-assembler.h -+++ b/src/3rdparty/chromium/v8/src/codegen/macro-assembler.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/macro-assembler.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/macro-assembler.h @@ -49,6 +49,9 @@ enum AllocationFlags { #elif V8_TARGET_ARCH_MIPS64 #include "src/codegen/mips64/constants-mips64.h" @@ -21762,10 +27909,23 @@ index a213fc504..7532a4ab7 100644 #elif V8_TARGET_ARCH_S390 #include "src/codegen/s390/constants-s390.h" #include "src/codegen/s390/macro-assembler-s390.h" -diff --git a/src/3rdparty/chromium/v8/src/codegen/register-arch.h b/src/3rdparty/chromium/v8/src/codegen/register-arch.h -index 21a723301..f61f3cf01 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/register-arch.h -+++ b/src/3rdparty/chromium/v8/src/codegen/register-arch.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/macro-assembler.h.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/v8/src/codegen/macro-assembler.h +++++ src/3rdparty/chromium/v8/src/codegen/macro-assembler.h ++@@ -49,6 +49,9 @@ enum AllocationFlags { ++ #elif V8_TARGET_ARCH_MIPS64 ++ #include "src/codegen/mips64/constants-mips64.h" ++ #include "src/codegen/mips64/macro-assembler-mips64.h" +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#include "src/codegen/loongarch64/constants-loongarch64.h" +++#include "src/codegen/loongarch64/macro-assembler-loongarch64.h" ++ #elif V8_TARGET_ARCH_S390 ++ #include "src/codegen/s390/constants-s390.h" ++ #include "src/codegen/s390/macro-assembler-s390.h" +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/register-arch.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/register-arch.h @@ -22,6 +22,8 @@ #include "src/codegen/mips/register-mips.h" #elif V8_TARGET_ARCH_MIPS64 @@ -21775,11 +27935,23 @@ index 21a723301..f61f3cf01 100644 #elif V8_TARGET_ARCH_S390 #include "src/codegen/s390/register-s390.h" #else -diff --git a/src/3rdparty/chromium/v8/src/codegen/register-configuration.cc b/src/3rdparty/chromium/v8/src/codegen/register-configuration.cc -index 5752b4633..3253bd2c9 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/register-configuration.cc -+++ b/src/3rdparty/chromium/v8/src/codegen/register-configuration.cc -@@ -58,6 +58,8 @@ static int get_num_allocatable_double_registers() { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/register-arch.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/codegen/register-arch.h +++++ src/3rdparty/chromium/v8/src/codegen/register-arch.h ++@@ -22,6 +22,8 @@ ++ #include "src/codegen/mips/register-mips.h" ++ #elif V8_TARGET_ARCH_MIPS64 ++ #include "src/codegen/mips64/register-mips64.h" +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#include "src/codegen/loongarch64/register-loongarch64.h" ++ #elif V8_TARGET_ARCH_S390 ++ #include "src/codegen/s390/register-s390.h" ++ #else +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/register-configuration.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/register-configuration.cc +@@ -58,6 +58,8 @@ static int get_num_allocatable_double_re kMaxAllocatableDoubleRegisterCount; #elif V8_TARGET_ARCH_MIPS64 kMaxAllocatableDoubleRegisterCount; @@ -21788,11 +27960,23 @@ index 5752b4633..3253bd2c9 100644 #elif V8_TARGET_ARCH_PPC kMaxAllocatableDoubleRegisterCount; #elif V8_TARGET_ARCH_PPC64 -diff --git a/src/3rdparty/chromium/v8/src/codegen/reloc-info.cc b/src/3rdparty/chromium/v8/src/codegen/reloc-info.cc -index d984b1e91..4af5914a6 100644 ---- a/src/3rdparty/chromium/v8/src/codegen/reloc-info.cc -+++ b/src/3rdparty/chromium/v8/src/codegen/reloc-info.cc -@@ -330,7 +330,8 @@ bool RelocInfo::OffHeapTargetIsCodedSpecially() { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/register-configuration.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/codegen/register-configuration.cc +++++ src/3rdparty/chromium/v8/src/codegen/register-configuration.cc ++@@ -58,6 +58,8 @@ static int get_num_allocatable_double_registers() { ++ kMaxAllocatableDoubleRegisterCount; ++ #elif V8_TARGET_ARCH_MIPS64 ++ kMaxAllocatableDoubleRegisterCount; +++#elif V8_TARGET_ARCH_LOONGARCH64 +++ kMaxAllocatableDoubleRegisterCount; ++ #elif V8_TARGET_ARCH_PPC ++ kMaxAllocatableDoubleRegisterCount; ++ #elif V8_TARGET_ARCH_PPC64 +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/codegen/reloc-info.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/reloc-info.cc +@@ -330,7 +330,8 @@ bool RelocInfo::OffHeapTargetIsCodedSpec return false; #elif defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_MIPS) || \ defined(V8_TARGET_ARCH_MIPS64) || defined(V8_TARGET_ARCH_PPC) || \ @@ -21802,10 +27986,23 @@ index d984b1e91..4af5914a6 100644 return true; #endif } -diff --git a/src/3rdparty/chromium/v8/src/common/globals.h b/src/3rdparty/chromium/v8/src/common/globals.h -index 0e9d81520..4656ff32f 100644 ---- a/src/3rdparty/chromium/v8/src/common/globals.h -+++ b/src/3rdparty/chromium/v8/src/common/globals.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/codegen/reloc-info.cc.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/v8/src/codegen/reloc-info.cc +++++ src/3rdparty/chromium/v8/src/codegen/reloc-info.cc ++@@ -330,7 +330,8 @@ bool RelocInfo::OffHeapTargetIsCodedSpecially() { ++ return false; ++ #elif defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_MIPS) || \ ++ defined(V8_TARGET_ARCH_MIPS64) || defined(V8_TARGET_ARCH_PPC) || \ ++- defined(V8_TARGET_ARCH_PPC64) || defined(V8_TARGET_ARCH_S390) +++ defined(V8_TARGET_ARCH_PPC64) || defined(V8_TARGET_ARCH_S390) || \ +++ defined(V8_TARGET_ARCH_LOONGARCH64) ++ return true; ++ #endif ++ } +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/common/globals.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/common/globals.h @@ -58,6 +58,9 @@ constexpr int GB = MB * 1024; #if (V8_TARGET_ARCH_S390 && !V8_HOST_ARCH_S390) #define USE_SIMULATOR 1 @@ -21816,10 +28013,23 @@ index 0e9d81520..4656ff32f 100644 #endif // Determine whether the architecture uses an embedded constant pool -diff --git a/src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h b/src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h -index 8772a78df..c17db99f2 100644 ---- a/src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h -+++ b/src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/common/globals.h.rej +@@ -0,0 +1,12 @@ ++--- src/3rdparty/chromium/v8/src/common/globals.h +++++ src/3rdparty/chromium/v8/src/common/globals.h ++@@ -58,6 +58,9 @@ constexpr int GB = MB * 1024; ++ #if (V8_TARGET_ARCH_S390 && !V8_HOST_ARCH_S390) ++ #define USE_SIMULATOR 1 ++ #endif +++#if (V8_TARGET_ARCH_LOONGARCH64 && !V8_HOST_ARCH_LOONGARCH64) +++#define USE_SIMULATOR 1 +++#endif ++ #endif ++ ++ // Determine whether the architecture uses an embedded constant pool +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h @@ -17,6 +17,8 @@ #include "src/compiler/backend/mips/instruction-codes-mips.h" #elif V8_TARGET_ARCH_MIPS64 @@ -21829,11 +28039,23 @@ index 8772a78df..c17db99f2 100644 #elif V8_TARGET_ARCH_X64 #include "src/compiler/backend/x64/instruction-codes-x64.h" #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 -diff --git a/src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc b/src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc -index c8f34c14f..0835b9b60 100644 ---- a/src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc -+++ b/src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc -@@ -2624,7 +2624,7 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h +++++ src/3rdparty/chromium/v8/src/compiler/backend/instruction-codes.h ++@@ -17,6 +17,8 @@ ++ #include "src/compiler/backend/mips/instruction-codes-mips.h" ++ #elif V8_TARGET_ARCH_MIPS64 ++ #include "src/compiler/backend/mips64/instruction-codes-mips64.h" +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#include "src/compiler/backend/loongarch64/instruction-codes-loongarch64.h" ++ #elif V8_TARGET_ARCH_X64 ++ #include "src/compiler/backend/x64/instruction-codes-x64.h" ++ #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc +@@ -2624,7 +2624,7 @@ void InstructionSelector::VisitWord32Ato #endif // !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && \ @@ -21842,7 +28064,7 @@ index c8f34c14f..0835b9b60 100644 void InstructionSelector::VisitWord64AtomicLoad(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitWord64AtomicStore(Node* node) { -@@ -2649,7 +2649,8 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { +@@ -2649,7 +2649,8 @@ void InstructionSelector::VisitWord64Ato UNIMPLEMENTED(); } #endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_PPC64 @@ -21852,7 +28074,7 @@ index c8f34c14f..0835b9b60 100644 #if !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM // This is only needed on 32-bit to split the 64-bit value into two operands. -@@ -2663,11 +2664,11 @@ void InstructionSelector::VisitI64x2ReplaceLaneI32Pair(Node* node) { +@@ -2663,11 +2664,11 @@ void InstructionSelector::VisitI64x2Repl #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_S390X #if !V8_TARGET_ARCH_ARM64 @@ -21866,11 +28088,46 @@ index c8f34c14f..0835b9b60 100644 void InstructionSelector::VisitI64x2Eq(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitI64x2Ne(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitI64x2GtS(Node* node) { UNIMPLEMENTED(); } -diff --git a/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/code-generator-loongarch64.cc b/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/code-generator-loongarch64.cc -new file mode 100644 -index 000000000..b84eb556e --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/code-generator-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc.rej +@@ -0,0 +1,35 @@ ++--- src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc +++++ src/3rdparty/chromium/v8/src/compiler/backend/instruction-selector.cc ++@@ -2624,7 +2624,7 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) { ++ #endif // !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS ++ ++ #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && \ ++- !V8_TARGET_ARCH_S390 && !V8_TARGET_ARCH_PPC64 +++ !V8_TARGET_ARCH_S390 && !V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_LOONGARCH64 ++ void InstructionSelector::VisitWord64AtomicLoad(Node* node) { UNIMPLEMENTED(); } ++ ++ void InstructionSelector::VisitWord64AtomicStore(Node* node) { ++@@ -2649,7 +2649,8 @@ void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { ++ UNIMPLEMENTED(); ++ } ++ #endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_PPC64 ++- // !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_S390 +++ // !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_S390 && +++ // !V8_TARGET_ARCH_LOONGARCH64 ++ ++ #if !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM ++ // This is only needed on 32-bit to split the 64-bit value into two operands. ++@@ -2663,11 +2664,11 @@ void InstructionSelector::VisitI64x2ReplaceLaneI32Pair(Node* node) { ++ ++ #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_S390X ++ #if !V8_TARGET_ARCH_ARM64 ++-#if !V8_TARGET_ARCH_MIPS64 +++#if !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_LOONGARCH64 ++ void InstructionSelector::VisitI64x2Splat(Node* node) { UNIMPLEMENTED(); } ++ void InstructionSelector::VisitI64x2ExtractLane(Node* node) { UNIMPLEMENTED(); } ++ void InstructionSelector::VisitI64x2ReplaceLane(Node* node) { UNIMPLEMENTED(); } ++-#endif // !V8_TARGET_ARCH_MIPS64 +++#endif // !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_LOONGARCH64 ++ void InstructionSelector::VisitI64x2Eq(Node* node) { UNIMPLEMENTED(); } ++ void InstructionSelector::VisitI64x2Ne(Node* node) { UNIMPLEMENTED(); } ++ void InstructionSelector::VisitI64x2GtS(Node* node) { UNIMPLEMENTED(); } +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/code-generator-loongarch64.cc @@ -0,0 +1,2846 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -24718,11 +30975,8 @@ index 000000000..b84eb556e +} // namespace compiler +} // namespace internal +} // namespace v8 -diff --git a/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-codes-loongarch64.h b/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-codes-loongarch64.h -new file mode 100644 -index 000000000..128ee2801 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-codes-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-codes-loongarch64.h @@ -0,0 +1,432 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -25156,11 +31410,8 @@ index 000000000..128ee2801 +} // namespace v8 + +#endif // V8_COMPILER_BACKEND_LOONGARCH64_INSTRUCTION_CODES_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-scheduler-loongarch64.cc b/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-scheduler-loongarch64.cc -new file mode 100644 -index 000000000..3e0dd4397 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-scheduler-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-scheduler-loongarch64.cc @@ -0,0 +1,1554 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -26716,11 +32967,8 @@ index 000000000..3e0dd4397 +} // namespace compiler +} // namespace internal +} // namespace v8 -diff --git a/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-selector-loongarch64.cc b/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-selector-loongarch64.cc -new file mode 100644 -index 000000000..ff0a617ca --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-selector-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/backend/loongarch64/instruction-selector-loongarch64.cc @@ -0,0 +1,3170 @@ +// Copyright 2014 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -29892,10 +36140,8 @@ index 000000000..ff0a617ca +} // namespace compiler +} // namespace internal +} // namespace v8 -diff --git a/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc b/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc -index af467f2bb..765c5244f 100644 ---- a/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc -+++ b/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc @@ -100,6 +100,18 @@ namespace { #define CALLEE_SAVE_FP_REGISTERS \ f20.bit() | f22.bit() | f24.bit() | f26.bit() | f28.bit() | f30.bit() @@ -29915,11 +36161,33 @@ index af467f2bb..765c5244f 100644 #elif V8_TARGET_ARCH_PPC64 // =========================================================================== // == ppc & ppc64 ============================================================ -diff --git a/src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc b/src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc -index c7d0a890c..416e95bea 100644 ---- a/src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc -+++ b/src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc -@@ -1061,7 +1061,7 @@ void DebugEvaluate::VerifyTransitiveBuiltins(Isolate* isolate) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/compiler/c-linkage.cc.rej +@@ -0,0 +1,21 @@ ++--- src/3rdparty/chromium/v8/src/compiler/c-linkage.cc +++++ src/3rdparty/chromium/v8/src/compiler/c-linkage.cc ++@@ -100,6 +100,18 @@ namespace { ++ #define CALLEE_SAVE_FP_REGISTERS \ ++ f20.bit() | f22.bit() | f24.bit() | f26.bit() | f28.bit() | f30.bit() ++ +++#elif V8_TARGET_ARCH_LOONGARCH64 +++// =========================================================================== +++// == loongarch64 ============================================================ +++// =========================================================================== +++#define PARAM_REGISTERS a0, a1, a2, a3, a4, a5, a6, a7 +++#define CALLEE_SAVE_REGISTERS \ +++ s0.bit() | s1.bit() | s2.bit() | s3.bit() | s4.bit() | s5.bit() | s6.bit() | \ +++ s7.bit() | fp.bit() +++#define CALLEE_SAVE_FP_REGISTERS \ +++ f24.bit() | f25.bit() | f26.bit() | f27.bit() | f28.bit() | f29.bit() | \ +++ f30.bit() | f31.bit() +++ ++ #elif V8_TARGET_ARCH_PPC64 ++ // =========================================================================== ++ // == ppc & ppc64 ============================================================ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc +@@ -1061,7 +1061,7 @@ void DebugEvaluate::VerifyTransitiveBuil } CHECK(!failed); #if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64) || \ @@ -29928,11 +36196,22 @@ index c7d0a890c..416e95bea 100644 // Isolate-independent builtin calls and jumps do not emit reloc infos // on PPC. We try to avoid using PC relative code due to performance // issue with especially older hardwares. -diff --git a/src/3rdparty/chromium/v8/src/debug/loongarch64/debug-loongarch64.cc b/src/3rdparty/chromium/v8/src/debug/loongarch64/debug-loongarch64.cc -new file mode 100644 -index 000000000..a62d61073 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/debug/loongarch64/debug-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc +++++ src/3rdparty/chromium/v8/src/debug/debug-evaluate.cc ++@@ -1061,7 +1061,7 @@ void DebugEvaluate::VerifyTransitiveBuiltins(Isolate* isolate) { ++ } ++ CHECK(!failed); ++ #if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64) || \ ++- defined(V8_TARGET_ARCH_MIPS64) +++ defined(V8_TARGET_ARCH_MIPS64) || defined(V8_TARGET_ARCH_LOONGARCH64) ++ // Isolate-independent builtin calls and jumps do not emit reloc infos ++ // on PPC. We try to avoid using PC relative code due to performance ++ // issue with especially older hardwares. +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/debug/loongarch64/debug-loongarch64.cc @@ -0,0 +1,55 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -29989,11 +36268,8 @@ index 000000000..a62d61073 +} // namespace v8 + +#endif // V8_TARGET_ARCH_LOONGARCH64 -diff --git a/src/3rdparty/chromium/v8/src/deoptimizer/loongarch64/deoptimizer-loongarch64.cc b/src/3rdparty/chromium/v8/src/deoptimizer/loongarch64/deoptimizer-loongarch64.cc -new file mode 100644 -index 000000000..23a0051d9 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/deoptimizer/loongarch64/deoptimizer-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/deoptimizer/loongarch64/deoptimizer-loongarch64.cc @@ -0,0 +1,241 @@ +// Copyright 2011 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -30236,11 +36512,9 @@ index 000000000..23a0051d9 + +} // namespace internal +} // namespace v8 -diff --git a/src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc b/src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc -index c9180fbaf..8f2d3cb28 100644 ---- a/src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc -+++ b/src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc -@@ -1077,6 +1077,8 @@ class DebugInfoSection : public DebugSection { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc +@@ -1077,6 +1077,8 @@ class DebugInfoSection : public DebugSec UNIMPLEMENTED(); #elif V8_TARGET_ARCH_MIPS64 UNIMPLEMENTED(); @@ -30249,11 +36523,22 @@ index c9180fbaf..8f2d3cb28 100644 #elif V8_TARGET_ARCH_PPC64 && V8_OS_LINUX w->Write(DW_OP_reg31); // The frame pointer is here on PPC64. #elif V8_TARGET_ARCH_S390 -diff --git a/src/3rdparty/chromium/v8/src/diagnostics/loongarch64/disasm-loongarch64.cc b/src/3rdparty/chromium/v8/src/diagnostics/loongarch64/disasm-loongarch64.cc -new file mode 100644 -index 000000000..0bd6efd6b --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/diagnostics/loongarch64/disasm-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc +++++ src/3rdparty/chromium/v8/src/diagnostics/gdb-jit.cc ++@@ -1077,6 +1077,8 @@ class DebugInfoSection : public DebugSection { ++ UNIMPLEMENTED(); ++ #elif V8_TARGET_ARCH_MIPS64 ++ UNIMPLEMENTED(); +++#elif V8_TARGET_ARCH_LOONGARCH64 +++ UNIMPLEMENTED(); ++ #elif V8_TARGET_ARCH_PPC64 && V8_OS_LINUX ++ w->Write(DW_OP_reg31); // The frame pointer is here on PPC64. ++ #elif V8_TARGET_ARCH_S390 +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/diagnostics/loongarch64/disasm-loongarch64.cc @@ -0,0 +1,1694 @@ +#include +#include @@ -31949,11 +38234,9 @@ index 000000000..0bd6efd6b +} // namespace disasm + +#endif // V8_TARGET_ARCH_LOONGARCH64 -diff --git a/src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h b/src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h -index dbe78ddf2..bfa3f144b 100644 ---- a/src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h -+++ b/src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h -@@ -83,6 +83,7 @@ class PerfJitLogger : public CodeEventLogger { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h +@@ -83,6 +83,7 @@ class PerfJitLogger : public CodeEventLo static const uint32_t kElfMachARM = 40; static const uint32_t kElfMachMIPS = 8; static const uint32_t kElfMachMIPS64 = 8; @@ -31961,7 +38244,7 @@ index dbe78ddf2..bfa3f144b 100644 static const uint32_t kElfMachARM64 = 183; static const uint32_t kElfMachS390x = 22; static const uint32_t kElfMachPPC64 = 21; -@@ -98,6 +99,8 @@ class PerfJitLogger : public CodeEventLogger { +@@ -98,6 +99,8 @@ class PerfJitLogger : public CodeEventLo return kElfMachMIPS; #elif V8_TARGET_ARCH_MIPS64 return kElfMachMIPS64; @@ -31970,11 +38253,31 @@ index dbe78ddf2..bfa3f144b 100644 #elif V8_TARGET_ARCH_ARM64 return kElfMachARM64; #elif V8_TARGET_ARCH_S390X -diff --git a/src/3rdparty/chromium/v8/src/execution/frame-constants.h b/src/3rdparty/chromium/v8/src/execution/frame-constants.h -index 6c037451a..514d13a8a 100644 ---- a/src/3rdparty/chromium/v8/src/execution/frame-constants.h -+++ b/src/3rdparty/chromium/v8/src/execution/frame-constants.h -@@ -354,6 +354,8 @@ inline static int FrameSlotToFPOffset(int slot) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h.rej +@@ -0,0 +1,19 @@ ++--- src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h +++++ src/3rdparty/chromium/v8/src/diagnostics/perf-jit.h ++@@ -83,6 +83,7 @@ class PerfJitLogger : public CodeEventLogger { ++ static const uint32_t kElfMachARM = 40; ++ static const uint32_t kElfMachMIPS = 8; ++ static const uint32_t kElfMachMIPS64 = 8; +++ static const uint32_t kElfMachLA64 = 258; ++ static const uint32_t kElfMachARM64 = 183; ++ static const uint32_t kElfMachS390x = 22; ++ static const uint32_t kElfMachPPC64 = 21; ++@@ -98,6 +99,8 @@ class PerfJitLogger : public CodeEventLogger { ++ return kElfMachMIPS; ++ #elif V8_TARGET_ARCH_MIPS64 ++ return kElfMachMIPS64; +++#elif V8_TARGET_ARCH_LOONGARCH64 +++ return kElfMachLA64; ++ #elif V8_TARGET_ARCH_ARM64 ++ return kElfMachARM64; ++ #elif V8_TARGET_ARCH_S390X +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/execution/frame-constants.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/frame-constants.h +@@ -354,6 +354,8 @@ inline static int FrameSlotToFPOffset(in #include "src/execution/mips/frame-constants-mips.h" // NOLINT #elif V8_TARGET_ARCH_MIPS64 #include "src/execution/mips64/frame-constants-mips64.h" // NOLINT @@ -31983,11 +38286,22 @@ index 6c037451a..514d13a8a 100644 #elif V8_TARGET_ARCH_S390 #include "src/execution/s390/frame-constants-s390.h" // NOLINT #else -diff --git a/src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.cc b/src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.cc -new file mode 100644 -index 000000000..e1ccd99a1 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/frame-constants.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/execution/frame-constants.h +++++ src/3rdparty/chromium/v8/src/execution/frame-constants.h ++@@ -354,6 +354,8 @@ inline static int FrameSlotToFPOffset(int slot) { ++ #include "src/execution/mips/frame-constants-mips.h" // NOLINT ++ #elif V8_TARGET_ARCH_MIPS64 ++ #include "src/execution/mips64/frame-constants-mips64.h" // NOLINT +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#include "src/execution/loongarch64/frame-constants-loongarch64.h" // NOLINT ++ #elif V8_TARGET_ARCH_S390 ++ #include "src/execution/s390/frame-constants-s390.h" // NOLINT ++ #else +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.cc @@ -0,0 +1,32 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -32021,11 +38335,8 @@ index 000000000..e1ccd99a1 +} // namespace v8 + +#endif // V8_TARGET_ARCH_LOONGARCH64 -diff --git a/src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.h b/src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.h -new file mode 100644 -index 000000000..dd028aaf4 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/loongarch64/frame-constants-loongarch64.h @@ -0,0 +1,77 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -32104,11 +38415,8 @@ index 000000000..dd028aaf4 +} // namespace v8 + +#endif // V8_EXECUTION_LA64_FRAME_CONSTANTS_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.cc b/src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.cc -new file mode 100644 -index 000000000..49907cfda --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.cc @@ -0,0 +1,5564 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -37674,11 +43982,8 @@ index 000000000..49907cfda +} // namespace v8 + +#endif // USE_SIMULATOR -diff --git a/src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.h b/src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.h -new file mode 100644 -index 000000000..f66684e4d --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/loongarch64/simulator-loongarch64.h @@ -0,0 +1,646 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -38326,10 +44631,8 @@ index 000000000..f66684e4d + +#endif // defined(USE_SIMULATOR) +#endif // V8_EXECUTION_LA64_SIMULATOR_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/execution/simulator-base.h b/src/3rdparty/chromium/v8/src/execution/simulator-base.h -index f3e333297..c16b28434 100644 ---- a/src/3rdparty/chromium/v8/src/execution/simulator-base.h -+++ b/src/3rdparty/chromium/v8/src/execution/simulator-base.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/execution/simulator-base.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/simulator-base.h @@ -89,7 +89,7 @@ class SimulatorBase { static typename std::enable_if::value, intptr_t>::type ConvertArg(T arg) { @@ -38339,10 +44642,22 @@ index f3e333297..c16b28434 100644 // The MIPS64 calling convention is to sign extend all values, even unsigned // ones. using signed_t = typename std::make_signed::type; -diff --git a/src/3rdparty/chromium/v8/src/execution/simulator.h b/src/3rdparty/chromium/v8/src/execution/simulator.h -index 74763474c..fda820172 100644 ---- a/src/3rdparty/chromium/v8/src/execution/simulator.h -+++ b/src/3rdparty/chromium/v8/src/execution/simulator.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/simulator-base.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/execution/simulator-base.h +++++ src/3rdparty/chromium/v8/src/execution/simulator-base.h ++@@ -89,7 +89,7 @@ class SimulatorBase { ++ static typename std::enable_if::value, intptr_t>::type ++ ConvertArg(T arg) { ++ static_assert(sizeof(T) <= sizeof(intptr_t), "type bigger than ptrsize"); ++-#if V8_TARGET_ARCH_MIPS64 +++#if V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_LOONGARCH64 ++ // The MIPS64 calling convention is to sign extend all values, even unsigned ++ // ones. ++ using signed_t = typename std::make_signed::type; +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/execution/simulator.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/simulator.h @@ -24,6 +24,8 @@ #include "src/execution/mips/simulator-mips.h" #elif V8_TARGET_ARCH_MIPS64 @@ -38352,10 +44667,22 @@ index 74763474c..fda820172 100644 #elif V8_TARGET_ARCH_S390 #include "src/execution/s390/simulator-s390.h" #else -diff --git a/src/3rdparty/chromium/v8/src/flags/flag-definitions.h b/src/3rdparty/chromium/v8/src/flags/flag-definitions.h -index ab689283e..2a760a4d9 100644 ---- a/src/3rdparty/chromium/v8/src/flags/flag-definitions.h -+++ b/src/3rdparty/chromium/v8/src/flags/flag-definitions.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/execution/simulator.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/execution/simulator.h +++++ src/3rdparty/chromium/v8/src/execution/simulator.h ++@@ -24,6 +24,8 @@ ++ #include "src/execution/mips/simulator-mips.h" ++ #elif V8_TARGET_ARCH_MIPS64 ++ #include "src/execution/mips64/simulator-mips64.h" +++#elif V8_TARGET_ARCH_LOONGARCH64 +++#include "src/execution/loongarch64/simulator-loongarch64.h" ++ #elif V8_TARGET_ARCH_S390 ++ #include "src/execution/s390/simulator-s390.h" ++ #else +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/flags/flag-definitions.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/flags/flag-definitions.h @@ -1372,7 +1372,7 @@ DEFINE_BOOL(check_icache, false, "Check icache flushes in ARM and MIPS simulator") DEFINE_INT(stop_sim_at, 0, "Simulator stop after x number of instructions") @@ -38365,11 +44692,22 @@ index ab689283e..2a760a4d9 100644 DEFINE_INT(sim_stack_alignment, 16, "Stack alignment in bytes in simulator. This must be a power of two " "and it must be at least 16. 16 is default.") -diff --git a/src/3rdparty/chromium/v8/src/heap/base/asm/loongarch64/push_registers_asm.cc b/src/3rdparty/chromium/v8/src/heap/base/asm/loongarch64/push_registers_asm.cc -new file mode 100644 -index 000000000..c9e6f5d2c --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/heap/base/asm/loongarch64/push_registers_asm.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/flags/flag-definitions.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/flags/flag-definitions.h +++++ src/3rdparty/chromium/v8/src/flags/flag-definitions.h ++@@ -1372,7 +1372,7 @@ DEFINE_BOOL(check_icache, false, ++ "Check icache flushes in ARM and MIPS simulator") ++ DEFINE_INT(stop_sim_at, 0, "Simulator stop after x number of instructions") ++ #if defined(V8_TARGET_ARCH_ARM64) || defined(V8_TARGET_ARCH_MIPS64) || \ ++- defined(V8_TARGET_ARCH_PPC64) +++ defined(V8_TARGET_ARCH_PPC64) || defined(V8_TARGET_ARCH_LOONGARCH64) ++ DEFINE_INT(sim_stack_alignment, 16, ++ "Stack alignment in bytes in simulator. This must be a power of two " ++ "and it must be at least 16. 16 is default.") +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/heap/base/asm/loongarch64/push_registers_asm.cc @@ -0,0 +1,48 @@ +// Copyright 2020 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -38419,11 +44757,9 @@ index 000000000..c9e6f5d2c + // Discard all callee-saved registers. + " addi.d $sp, $sp, 96 \n" + " jirl $zero, $ra, 0 \n"); -diff --git a/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc b/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc -index e6fd97ddf..4a1765325 100644 ---- a/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc -+++ b/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc -@@ -1348,7 +1348,7 @@ void InterpreterAssembler::TraceBytecodeDispatch(TNode target_bytecode) { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc +@@ -1348,7 +1348,7 @@ void InterpreterAssembler::TraceBytecode // static bool InterpreterAssembler::TargetSupportsUnalignedAccess() { @@ -38432,11 +44768,23 @@ index e6fd97ddf..4a1765325 100644 return false; #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_S390 || \ V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_PPC || \ -diff --git a/src/3rdparty/chromium/v8/src/libsampler/sampler.cc b/src/3rdparty/chromium/v8/src/libsampler/sampler.cc -index 9631d2f47..8392dbeef 100644 ---- a/src/3rdparty/chromium/v8/src/libsampler/sampler.cc -+++ b/src/3rdparty/chromium/v8/src/libsampler/sampler.cc -@@ -415,6 +415,10 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc +++++ src/3rdparty/chromium/v8/src/interpreter/interpreter-assembler.cc ++@@ -1348,7 +1348,7 @@ void InterpreterAssembler::TraceBytecodeDispatch(TNode target_bytecode) { ++ ++ // static ++ bool InterpreterAssembler::TargetSupportsUnalignedAccess() { ++-#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 +++#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_LOONGARCH64 ++ return false; ++ #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_S390 || \ ++ V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_PPC || \ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/libsampler/sampler.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/libsampler/sampler.cc +@@ -415,6 +415,10 @@ void SignalHandler::FillRegisterState(vo state->pc = reinterpret_cast(mcontext.pc); state->sp = reinterpret_cast(mcontext.gregs[29]); state->fp = reinterpret_cast(mcontext.gregs[30]); @@ -38447,10 +44795,24 @@ index 9631d2f47..8392dbeef 100644 #elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64 #if V8_LIBC_GLIBC state->pc = reinterpret_cast(ucontext->uc_mcontext.regs->nip); -diff --git a/src/3rdparty/chromium/v8/src/logging/log.cc b/src/3rdparty/chromium/v8/src/logging/log.cc -index efd7c2b5f..2801e519a 100644 ---- a/src/3rdparty/chromium/v8/src/logging/log.cc -+++ b/src/3rdparty/chromium/v8/src/logging/log.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/libsampler/sampler.cc.rej +@@ -0,0 +1,13 @@ ++--- src/3rdparty/chromium/v8/src/libsampler/sampler.cc +++++ src/3rdparty/chromium/v8/src/libsampler/sampler.cc ++@@ -415,6 +415,10 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) { ++ state->pc = reinterpret_cast(mcontext.pc); ++ state->sp = reinterpret_cast(mcontext.gregs[29]); ++ state->fp = reinterpret_cast(mcontext.gregs[30]); +++#elif V8_HOST_ARCH_LOONGARCH64 +++ state->pc = reinterpret_cast(mcontext.__pc); +++ state->sp = reinterpret_cast(mcontext.__gregs[3]); +++ state->fp = reinterpret_cast(mcontext.__gregs[22]); ++ #elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64 ++ #if V8_LIBC_GLIBC ++ state->pc = reinterpret_cast(ucontext->uc_mcontext.regs->nip); +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/logging/log.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/logging/log.cc @@ -590,6 +590,8 @@ void LowLevelLogger::LogCodeInfo() { const char arch[] = "ppc64"; #elif V8_TARGET_ARCH_MIPS @@ -38460,10 +44822,22 @@ index efd7c2b5f..2801e519a 100644 #elif V8_TARGET_ARCH_ARM64 const char arch[] = "arm64"; #elif V8_TARGET_ARCH_S390 -diff --git a/src/3rdparty/chromium/v8/src/objects/backing-store.cc b/src/3rdparty/chromium/v8/src/objects/backing-store.cc -index c67fff0fa..7c4d0fbfd 100644 ---- a/src/3rdparty/chromium/v8/src/objects/backing-store.cc -+++ b/src/3rdparty/chromium/v8/src/objects/backing-store.cc +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/logging/log.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/logging/log.cc +++++ src/3rdparty/chromium/v8/src/logging/log.cc ++@@ -590,6 +590,8 @@ void LowLevelLogger::LogCodeInfo() { ++ const char arch[] = "ppc64"; ++ #elif V8_TARGET_ARCH_MIPS ++ const char arch[] = "mips"; +++#elif V8_TARGET_ARCH_LOONGARCH64 +++ const char arch[] = "la64"; ++ #elif V8_TARGET_ARCH_ARM64 ++ const char arch[] = "arm64"; ++ #elif V8_TARGET_ARCH_S390 +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/objects/backing-store.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/objects/backing-store.cc @@ -29,7 +29,7 @@ constexpr bool kUseGuardRegions = true; constexpr bool kUseGuardRegions = false; #endif @@ -38473,11 +44847,23 @@ index c67fff0fa..7c4d0fbfd 100644 // MIPS64 has a user space of 2^40 bytes on most processors, // address space limits needs to be smaller. constexpr size_t kAddressSpaceLimit = 0x8000000000L; // 512 GiB -diff --git a/src/3rdparty/chromium/v8/src/objects/code.cc b/src/3rdparty/chromium/v8/src/objects/code.cc -index c79690471..0f32770c1 100644 ---- a/src/3rdparty/chromium/v8/src/objects/code.cc -+++ b/src/3rdparty/chromium/v8/src/objects/code.cc -@@ -234,7 +234,7 @@ bool Code::IsIsolateIndependent(Isolate* isolate) { +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/objects/backing-store.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/objects/backing-store.cc +++++ src/3rdparty/chromium/v8/src/objects/backing-store.cc ++@@ -29,7 +29,7 @@ constexpr bool kUseGuardRegions = true; ++ constexpr bool kUseGuardRegions = false; ++ #endif ++ ++-#if V8_TARGET_ARCH_MIPS64 +++#if V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_LOONGARCH64 ++ // MIPS64 has a user space of 2^40 bytes on most processors, ++ // address space limits needs to be smaller. ++ constexpr size_t kAddressSpaceLimit = 0x8000000000L; // 512 GiB +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/objects/code.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/objects/code.cc +@@ -234,7 +234,7 @@ bool Code::IsIsolateIndependent(Isolate* RelocInfo::ModeMask(RelocInfo::WASM_STUB_CALL))); #if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64) || \ @@ -38486,10 +44872,22 @@ index c79690471..0f32770c1 100644 return RelocIterator(*this, kModeMask).done(); #elif defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_ARM64) || \ defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) || \ -diff --git a/src/3rdparty/chromium/v8/src/objects/code.h b/src/3rdparty/chromium/v8/src/objects/code.h -index d71a0b113..2dfed5bd8 100644 ---- a/src/3rdparty/chromium/v8/src/objects/code.h -+++ b/src/3rdparty/chromium/v8/src/objects/code.h +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/objects/code.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/objects/code.cc +++++ src/3rdparty/chromium/v8/src/objects/code.cc ++@@ -234,7 +234,7 @@ bool Code::IsIsolateIndependent(Isolate* isolate) { ++ RelocInfo::ModeMask(RelocInfo::WASM_STUB_CALL))); ++ ++ #if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64) || \ ++- defined(V8_TARGET_ARCH_MIPS64) +++ defined(V8_TARGET_ARCH_MIPS64) || defined(V8_TARGET_ARCH_LOONGARCH64) ++ return RelocIterator(*this, kModeMask).done(); ++ #elif defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_ARM64) || \ ++ defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) || \ +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/objects/code.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/objects/code.h @@ -447,6 +447,8 @@ class Code : public HeapObject { static constexpr int kHeaderPaddingSize = COMPRESS_POINTERS_BOOL ? 16 : 28; #elif V8_TARGET_ARCH_MIPS64 @@ -38499,11 +44897,23 @@ index d71a0b113..2dfed5bd8 100644 #elif V8_TARGET_ARCH_X64 static constexpr int kHeaderPaddingSize = COMPRESS_POINTERS_BOOL ? 16 : 28; #elif V8_TARGET_ARCH_ARM -diff --git a/src/3rdparty/chromium/v8/src/profiler/tick-sample.cc b/src/3rdparty/chromium/v8/src/profiler/tick-sample.cc -index 45fc91185..5c9d2164a 100644 ---- a/src/3rdparty/chromium/v8/src/profiler/tick-sample.cc -+++ b/src/3rdparty/chromium/v8/src/profiler/tick-sample.cc -@@ -105,7 +105,7 @@ bool SimulatorHelper::FillRegisters(Isolate* isolate, +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/objects/code.h.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/objects/code.h +++++ src/3rdparty/chromium/v8/src/objects/code.h ++@@ -447,6 +447,8 @@ class Code : public HeapObject { ++ static constexpr int kHeaderPaddingSize = COMPRESS_POINTERS_BOOL ? 16 : 28; ++ #elif V8_TARGET_ARCH_MIPS64 ++ static constexpr int kHeaderPaddingSize = 28; +++#elif V8_TARGET_ARCH_LOONGARCH64 +++ static constexpr int kHeaderPaddingSize = 28; ++ #elif V8_TARGET_ARCH_X64 ++ static constexpr int kHeaderPaddingSize = COMPRESS_POINTERS_BOOL ? 16 : 28; ++ #elif V8_TARGET_ARCH_ARM +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/profiler/tick-sample.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/profiler/tick-sample.cc +@@ -105,7 +105,7 @@ bool SimulatorHelper::FillRegisters(Isol state->sp = reinterpret_cast(simulator->sp()); state->fp = reinterpret_cast(simulator->fp()); state->lr = reinterpret_cast(simulator->lr()); @@ -38512,12 +44922,23 @@ index 45fc91185..5c9d2164a 100644 if (!simulator->has_bad_pc()) { state->pc = reinterpret_cast(simulator->get_pc()); } -diff --git a/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.cc b/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.cc -new file mode 100644 -index 000000000..cd8e2bd7e --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.cc -@@ -0,0 +1,1270 @@ ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/profiler/tick-sample.cc.rej +@@ -0,0 +1,11 @@ ++--- src/3rdparty/chromium/v8/src/profiler/tick-sample.cc +++++ src/3rdparty/chromium/v8/src/profiler/tick-sample.cc ++@@ -105,7 +105,7 @@ bool SimulatorHelper::FillRegisters(Isolate* isolate, ++ state->sp = reinterpret_cast(simulator->sp()); ++ state->fp = reinterpret_cast(simulator->fp()); ++ state->lr = reinterpret_cast(simulator->lr()); ++-#elif V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 +++#elif V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_LOONGARCH64 ++ if (!simulator->has_bad_pc()) { ++ state->pc = reinterpret_cast(simulator->get_pc()); ++ } +--- /dev/null ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.cc +@@ -0,0 +1,1255 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -39196,14 +45617,14 @@ index 000000000..cd8e2bd7e + __ Branch(&stack_limit_hit, le, a0, Operand(zero_reg)); + // Check if there is room for the variable number of registers above + // the stack limit. -+ __ Branch(&stack_ok, hs, a0, Operand(num_registers_ * kPointerSize)); ++ __ Branch(&stack_ok, hs, a0, extra_space_for_variables); + // Exit with OutOfMemory exception. There is not enough space on the stack + // for our working registers. + __ li(a0, Operand(EXCEPTION)); + __ jmp(&return_v0); + + __ bind(&stack_limit_hit); -+ CallCheckStackGuardState(a0); ++ CallCheckStackGuardState(a0, extra_space_for_variables); + // If returned value is non-zero, we exit with the returned value as result. + __ Branch(&return_v0, ne, a0, Operand(zero_reg)); + @@ -39588,7 +46009,8 @@ index 000000000..cd8e2bd7e + +// Private methods: + -+void RegExpMacroAssemblerLA64::CallCheckStackGuardState(Register scratch) { ++void RegExpMacroAssemblerLA64::CallCheckStackGuardState(Register scratch, ++ Operand extra_space) { + DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins()); + DCHECK(!masm_->options().isolate_independent_code); + @@ -39600,7 +46022,9 @@ index 000000000..cd8e2bd7e + DCHECK(base::bits::IsPowerOfTwo(stack_alignment)); + __ And(sp, sp, Operand(-stack_alignment)); + __ St_d(scratch, MemOperand(sp, 0)); -+ ++ // Extra space for variables. ++ __ li(a3, extra_space); ++ // RegExp code frame pointer. + __ mov(a2, frame_pointer()); + // Code of self. + __ li(a1, Operand(masm_->CodeObject()), CONSTANT_SIZE); @@ -39609,15 +46033,6 @@ index 000000000..cd8e2bd7e + DCHECK(IsAligned(stack_alignment, kPointerSize)); + __ Sub_d(sp, sp, Operand(stack_alignment)); + -+ // The stack pointer now points to cell where the return address will be -+ // written. Arguments are in registers, meaning we treat the return address as -+ // argument 5. Since DirectCEntry will handle allocating space for the C -+ // argument slots, we don't need to care about that here. This is how the -+ // stack will look (sp meaning the value of sp at this moment): -+ // [sp + 3] - empty slot if needed for alignment. -+ // [sp + 2] - saved sp. -+ // [sp + 1] - second word reserved for return value. -+ // [sp + 0] - first word reserved for return value. + + // a0 will point to the return address, placed by DirectCEntry. + __ mov(a0, sp); @@ -39632,17 +46047,6 @@ index 000000000..cd8e2bd7e + __ li(kScratchReg, Operand(entry, RelocInfo::OFF_HEAP_TARGET)); + __ Call(kScratchReg); + -+ // DirectCEntry allocated space for the C argument slots so we have to -+ // drop them with the return address from the stack with loading saved sp. -+ // At this point stack must look: -+ // [sp + 7] - empty slot if needed for alignment. -+ // [sp + 6] - saved sp. -+ // [sp + 5] - second word reserved for return value. -+ // [sp + 4] - first word reserved for return value. -+ // [sp + 3] - C argument slot. -+ // [sp + 2] - C argument slot. -+ // [sp + 1] - C argument slot. -+ // [sp + 0] - C argument slot. + __ Ld_d(sp, MemOperand(sp, stack_alignment + kCArgsSlotsSize)); + + __ li(code_pointer(), Operand(masm_->CodeObject())); @@ -39661,7 +46065,8 @@ index 000000000..cd8e2bd7e + +int64_t RegExpMacroAssemblerLA64::CheckStackGuardState(Address* return_address, + Address raw_code, -+ Address re_frame) { ++ Address re_frame, ++ uintptr_t extra_space) { + Code re_code = Code::cast(Object(raw_code)); + return NativeRegExpMacroAssembler::CheckStackGuardState( + frame_entry(re_frame, kIsolate), @@ -39671,7 +46076,8 @@ index 000000000..cd8e2bd7e + return_address, re_code, + frame_entry_address
(re_frame, kInputString), + frame_entry_address(re_frame, kInputStart), -+ frame_entry_address(re_frame, kInputEnd)); ++ frame_entry_address(re_frame, kInputEndOffset), ++ extra_space); +} + +MemOperand RegExpMacroAssemblerLA64::register_location(int register_index) { @@ -39747,6 +46153,7 @@ index 000000000..cd8e2bd7e + // Check for preemption. + ExternalReference stack_limit = + ExternalReference::address_of_jslimit(masm_->isolate()); ++ Operand extra_space_for_variables(num_registers_ * kSystemPointerSize); + __ li(a0, Operand(stack_limit)); + __ Ld_d(a0, MemOperand(a0, 0)); + SafeCall(&check_preempt_label_, ls, sp, Operand(a0)); @@ -39787,12 +46194,10 @@ index 000000000..cd8e2bd7e +} // namespace internal +} // namespace v8 + -+#endif // V8_TARGET_ARCH_LA64 -diff --git a/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.h b/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.h -new file mode 100644 -index 000000000..7985cf674 ++ ++#endif //V8_TARGET_ARCH_LOONGARCH64 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.h @@ -0,0 +1,211 @@ +// Copyright 2011 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -39878,7 +46283,7 @@ index 000000000..7985cf674 + // returning. + // {raw_code} is an Address because this is called via ExternalReference. + static int64_t CheckStackGuardState(Address* return_address, Address raw_code, -+ Address re_frame); ++ Address re_frame, uintptr_t extra_space); + + void print_regexp_frame_constants(); + @@ -39927,8 +46332,8 @@ index 000000000..7985cf674 + void CheckStackLimit(); + + // Generate a call to CheckStackGuardState. -+ void CallCheckStackGuardState(Register scratch); -+ ++ void CallCheckStackGuardState(Register scratch, ++ Operand extra_space = Operand(0)); + // The ebp-relative location of a regexp register. + MemOperand register_location(int register_index); + @@ -40005,10 +46410,8 @@ index 000000000..7985cf674 +} // namespace v8 + +#endif // V8_REGEXP_LOONGARCH64_REGEXP_MACRO_ASSEMBLER_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-arch.h b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-arch.h -index 8ec12a0ae..878792213 100644 ---- a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-arch.h -+++ b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-arch.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-arch.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-arch.h @@ -21,6 +21,8 @@ #include "src/regexp/mips/regexp-macro-assembler-mips.h" #elif V8_TARGET_ARCH_MIPS64 @@ -40018,11 +46421,9 @@ index 8ec12a0ae..878792213 100644 #elif V8_TARGET_ARCH_S390 #include "src/regexp/s390/regexp-macro-assembler-s390.h" #else -diff --git a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-tracer.cc b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-tracer.cc -index d1feec4c3..9fc84c446 100644 ---- a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-tracer.cc -+++ b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-tracer.cc -@@ -15,7 +15,7 @@ RegExpMacroAssemblerTracer::RegExpMacroAssemblerTracer( +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-tracer.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler-tracer.cc +@@ -15,7 +15,7 @@ RegExpMacroAssemblerTracer::RegExpMacroA : RegExpMacroAssembler(isolate, assembler->zone()), assembler_(assembler) { IrregexpImplementation type = assembler->Implementation(); DCHECK_LT(type, 9); @@ -40031,10 +46432,8 @@ index d1feec4c3..9fc84c446 100644 "PPC", "X64", "X87", "Bytecode"}; PrintF("RegExpMacroAssembler%s();\n", impl_names[type]); } -diff --git a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h -index 52465610c..13091e809 100644 ---- a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h -+++ b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h @@ -44,6 +44,7 @@ class RegExpMacroAssembler { kARMImplementation, kARM64Implementation, @@ -40043,11 +46442,9 @@ index 52465610c..13091e809 100644 kS390Implementation, kPPCImplementation, kX64Implementation, -diff --git a/src/3rdparty/chromium/v8/src/regexp/regexp.cc b/src/3rdparty/chromium/v8/src/regexp/regexp.cc -index 569acdab4..2e7bd9a32 100644 ---- a/src/3rdparty/chromium/v8/src/regexp/regexp.cc -+++ b/src/3rdparty/chromium/v8/src/regexp/regexp.cc -@@ -815,6 +815,9 @@ bool RegExpImpl::Compile(Isolate* isolate, Zone* zone, RegExpCompileData* data, +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/regexp/regexp.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/regexp/regexp.cc +@@ -815,6 +815,9 @@ bool RegExpImpl::Compile(Isolate* isolat #elif V8_TARGET_ARCH_MIPS64 macro_assembler.reset(new RegExpMacroAssemblerMIPS(isolate, zone, mode, output_register_count)); @@ -40057,10 +46454,8 @@ index 569acdab4..2e7bd9a32 100644 #else #error "Unsupported architecture" #endif -diff --git a/src/3rdparty/chromium/v8/src/runtime/runtime-atomics.cc b/src/3rdparty/chromium/v8/src/runtime/runtime-atomics.cc -index 2b17ad52b..26fd5da40 100644 ---- a/src/3rdparty/chromium/v8/src/runtime/runtime-atomics.cc -+++ b/src/3rdparty/chromium/v8/src/runtime/runtime-atomics.cc +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/runtime/runtime-atomics.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/runtime/runtime-atomics.cc @@ -19,7 +19,8 @@ namespace internal { // Other platforms have CSA support, see builtins-sharedarraybuffer-gen.h. @@ -40071,10 +46466,8 @@ index 2b17ad52b..26fd5da40 100644 namespace { -diff --git a/src/3rdparty/chromium/v8/src/snapshot/deserializer.h b/src/3rdparty/chromium/v8/src/snapshot/deserializer.h -index ae410bacd..ed9ed6982 100644 ---- a/src/3rdparty/chromium/v8/src/snapshot/deserializer.h -+++ b/src/3rdparty/chromium/v8/src/snapshot/deserializer.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/snapshot/deserializer.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/snapshot/deserializer.h @@ -30,6 +30,7 @@ class Object; // Used for platforms with embedded constant pools to trigger deserialization // of objects found in code. @@ -40083,11 +46476,9 @@ index ae410bacd..ed9ed6982 100644 defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_S390) || \ defined(V8_TARGET_ARCH_PPC64) || V8_EMBEDDED_CONSTANT_POOL #define V8_CODE_EMBEDS_OBJECT_POINTER 1 -diff --git a/src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc b/src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc -index 070aaf51b..88db4a501 100644 ---- a/src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc -+++ b/src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc -@@ -151,7 +151,8 @@ int PlatformEmbeddedFileWriterGeneric::IndentedDataDirective( +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc +@@ -151,7 +151,8 @@ int PlatformEmbeddedFileWriterGeneric::I DataDirective PlatformEmbeddedFileWriterGeneric::ByteChunkDataDirective() const { @@ -40097,11 +46488,9 @@ index 070aaf51b..88db4a501 100644 // MIPS uses a fixed 4 byte instruction set, using .long // to prevent any unnecessary padding. return kLong; -diff --git a/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler-defs.h b/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler-defs.h -index 781fb87db..a1bbf1760 100644 ---- a/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler-defs.h -+++ b/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler-defs.h -@@ -46,6 +46,14 @@ constexpr RegList kLiftoffAssemblerGpCacheRegs = +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler-defs.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler-defs.h +@@ -46,6 +46,14 @@ constexpr RegList kLiftoffAssemblerGpCac constexpr RegList kLiftoffAssemblerFpCacheRegs = DoubleRegister::ListOf( f0, f2, f4, f6, f8, f10, f12, f14, f16, f18, f20, f22, f24, f26); @@ -40116,7 +46505,7 @@ index 781fb87db..a1bbf1760 100644 #elif V8_TARGET_ARCH_ARM // r7: cp, r10: root, r11: fp, r12: ip, r13: sp, r14: lr, r15: pc. -@@ -90,7 +98,7 @@ constexpr Condition kUnsignedLessEqual = below_equal; +@@ -90,7 +98,7 @@ constexpr Condition kUnsignedLessEqual = constexpr Condition kUnsignedGreaterThan = above; constexpr Condition kUnsignedGreaterEqual = above_equal; @@ -40125,10 +46514,8 @@ index 781fb87db..a1bbf1760 100644 constexpr Condition kEqual = eq; constexpr Condition kUnequal = ne; -diff --git a/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler.h b/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler.h -index e2bd99841..4c45162eb 100644 ---- a/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler.h -+++ b/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/wasm/baseline/liftoff-assembler.h @@ -1351,6 +1351,8 @@ class LiftoffStackSlots { #include "src/wasm/baseline/mips/liftoff-assembler-mips.h" #elif V8_TARGET_ARCH_MIPS64 @@ -40138,11 +46525,8 @@ index e2bd99841..4c45162eb 100644 #elif V8_TARGET_ARCH_S390 #include "src/wasm/baseline/s390/liftoff-assembler-s390.h" #else -diff --git a/src/3rdparty/chromium/v8/src/wasm/baseline/loongarch64/liftoff-assembler-loongarch64.h b/src/3rdparty/chromium/v8/src/wasm/baseline/loongarch64/liftoff-assembler-loongarch64.h -new file mode 100644 -index 000000000..4916ed227 --- /dev/null -+++ b/src/3rdparty/chromium/v8/src/wasm/baseline/loongarch64/liftoff-assembler-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/wasm/baseline/loongarch64/liftoff-assembler-loongarch64.h @@ -0,0 +1,2080 @@ +// Copyright 2017 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be @@ -42224,11 +48608,9 @@ index 000000000..4916ed227 +} // namespace v8 + +#endif // V8_WASM_BASELINE_LOONGARCH64_LIFTOFF_ASSEMBLER_LOONGARCH64_H_ -diff --git a/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.cc b/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.cc -index 90cdad467..7167f1924 100644 ---- a/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.cc -+++ b/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.cc -@@ -268,6 +268,37 @@ void JumpTableAssembler::NopBytes(int bytes) { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.cc +@@ -268,6 +268,37 @@ void JumpTableAssembler::NopBytes(int by } } @@ -42266,11 +48648,9 @@ index 90cdad467..7167f1924 100644 #elif V8_TARGET_ARCH_PPC64 void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index, Address lazy_compile_target) { -diff --git a/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.h b/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.h -index 253f0bc01..00549b758 100644 ---- a/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.h -+++ b/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.h -@@ -215,6 +215,12 @@ class V8_EXPORT_PRIVATE JumpTableAssembler : public MacroAssembler { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/wasm/jump-table-assembler.h +@@ -215,6 +215,12 @@ class V8_EXPORT_PRIVATE JumpTableAssembl static constexpr int kJumpTableSlotSize = 8 * kInstrSize; static constexpr int kFarJumpTableSlotSize = 6 * kInstrSize; static constexpr int kLazyCompileTableSlotSize = 8 * kInstrSize; @@ -42283,11 +48663,9 @@ index 253f0bc01..00549b758 100644 #else #error Unknown architecture. #endif -diff --git a/src/3rdparty/chromium/v8/src/wasm/wasm-linkage.h b/src/3rdparty/chromium/v8/src/wasm/wasm-linkage.h -index 7e56ea6ea..e1898d858 100644 ---- a/src/3rdparty/chromium/v8/src/wasm/wasm-linkage.h -+++ b/src/3rdparty/chromium/v8/src/wasm/wasm-linkage.h -@@ -75,6 +75,15 @@ constexpr Register kGpReturnRegisters[] = {v0, v1}; +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/wasm/wasm-linkage.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/wasm/wasm-linkage.h +@@ -75,6 +75,15 @@ constexpr Register kGpReturnRegisters[] constexpr DoubleRegister kFpParamRegisters[] = {f2, f4, f6, f8, f10, f12, f14}; constexpr DoubleRegister kFpReturnRegisters[] = {f2, f4}; @@ -42303,11 +48681,9 @@ index 7e56ea6ea..e1898d858 100644 #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 // =========================================================================== // == ppc & ppc64 ============================================================ -diff --git a/src/3rdparty/gn/tools/gn/args.cc b/src/3rdparty/gn/tools/gn/args.cc -index d3491a422..57c1df998 100644 ---- a/src/3rdparty/gn/tools/gn/args.cc -+++ b/src/3rdparty/gn/tools/gn/args.cc -@@ -329,6 +329,7 @@ void Args::SetSystemVarsLocked(Scope* dest) const { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/gn/tools/gn/args.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/gn/tools/gn/args.cc +@@ -329,6 +329,7 @@ void Args::SetSystemVarsLocked(Scope* de static const char kMips64[] = "mips64el"; static const char kS390X[] = "s390x"; static const char kPPC64[] = "ppc64"; @@ -42315,7 +48691,7 @@ index d3491a422..57c1df998 100644 const char* arch = nullptr; // Set the host CPU architecture based on the underlying OS, not -@@ -353,6 +354,8 @@ void Args::SetSystemVarsLocked(Scope* dest) const { +@@ -353,6 +354,8 @@ void Args::SetSystemVarsLocked(Scope* de // This allows us to use the same toolchain as ppc64 BE // and specific flags are included using the host_byteorder logic. arch = kPPC64; @@ -42324,10 +48700,8 @@ index d3491a422..57c1df998 100644 else CHECK(false) << "OS architecture not handled. (" << os_arch << ")"; -diff --git a/src/3rdparty/gn/util/build_config.h b/src/3rdparty/gn/util/build_config.h -index addd7cfb0..4d8b53aff 100644 ---- a/src/3rdparty/gn/util/build_config.h -+++ b/src/3rdparty/gn/util/build_config.h +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/gn/util/build_config.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/gn/util/build_config.h @@ -172,6 +172,15 @@ #define ARCH_CPU_32_BITS 1 #define ARCH_CPU_BIG_ENDIAN 1 @@ -42344,11 +48718,9 @@ index addd7cfb0..4d8b53aff 100644 #else #error Please add support for your architecture in build_config.h #endif -diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri -index 3a5743c9d..2bc7d189e 100644 ---- a/src/buildtools/config/support.pri -+++ b/src/buildtools/config/support.pri -@@ -110,7 +110,7 @@ defineTest(qtwebengine_checkForPlatform) { +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/buildtools/config/support.pri ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/buildtools/config/support.pri +@@ -110,7 +110,7 @@ defineTest(qtwebengine_checkForPlatform) defineTest(qtwebengine_checkForArch) { module = $$1 !qtConfig(webengine-arch-support) { @@ -42357,6 +48729,3 @@ index 3a5743c9d..2bc7d189e 100644 return(false) } return(true) --- -2.45.2 - diff --git a/debian/patches/breakpad-getcontext.patch b/debian/patches/breakpad-getcontext.patch index 6579d913c4..6d46411756 100644 --- a/debian/patches/breakpad-getcontext.patch +++ b/debian/patches/breakpad-getcontext.patch @@ -1,6 +1,6 @@ Description: use system getcontext instead of breakpad's own Author: Dmitry Shachnev -Forwarded: no +Forwarded: not-needed Last-Update: 2021-03-16 --- a/src/3rdparty/chromium/third_party/breakpad/BUILD.gn diff --git a/debian/patches/build-with-c++17.patch b/debian/patches/build-with-c++17.patch new file mode 100644 index 0000000000..af9347eccd --- /dev/null +++ b/debian/patches/build-with-c++17.patch @@ -0,0 +1,89 @@ +Description: Build with C++17, which is required by ICU 75. +Author: Soren Stoutner +Forwarded: not-needed +Last-Update: 2024-05-21 +Origin: Arch Linux, https://gitlab.archlinux.org/archlinux/packaging/packages/qt5-webengine/-/blob/main/qt5-webengine-icu-75.patch?ref_type=heads + +--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +@@ -566,7 +566,7 @@ config("compiler") { + # Override Chromium's default for projects that wish to stay on C++11. + cflags_cc += [ "-std=${standard_prefix}++11" ] + } else { +- cflags_cc += [ "-std=${standard_prefix}++14" ] ++ cflags_cc += [ "-std=${standard_prefix}++17" ] + } + } else if (!is_win && !is_nacl) { + if (target_os == "android") { +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() { + // + // __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all + // platforms, as Chrome's requirement is C++14 as of 2020. +-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__) ++#if 0 + static constexpr size_t kAlignment = + std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__); + #else +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h ++++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H264_SPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; +--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h ++++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H264_PPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; +--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h +@@ -14,6 +14,7 @@ + #include + + #include "absl/types/optional.h" ++#include + + namespace webrtc { + +--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h ++++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include "absl/types/optional.h" + #include "api/array_view.h" +--- a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc +@@ -15,6 +15,7 @@ + #include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h" + #include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h" + #include "third_party/blink/renderer/platform/text/text_boundaries.h" ++#include "absl/base/attributes.h" + + namespace blink { + +--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h ++++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h +@@ -180,7 +180,7 @@ + // absl::variant is a typedef of std::variant, use the feature macro + // ABSL_USES_STD_VARIANT. + +-#define ABSL_OPTION_USE_STD_VARIANT 2 ++#define ABSL_OPTION_USE_STD_VARIANT 0 + + + // ABSL_OPTION_USE_INLINE_NAMESPACE diff --git a/debian/patches/chromium-python3.patch b/debian/patches/chromium-python3.patch deleted file mode 100644 index d3c84a28bf..0000000000 --- a/debian/patches/chromium-python3.patch +++ /dev/null @@ -1,1687 +0,0 @@ -Description: update Chromium code for compatibility with Python 3 -Origin: https://github.com/archlinux/svntogit-packages/blob/packages/qt5-webengine/trunk/qt5-webengine-chromium-python3.patch -Last-Update: 2022-11-25 - ---- a/src/3rdparty/chromium/build/print_python_deps.py -+++ b/src/3rdparty/chromium/build/print_python_deps.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python2.7 -+#!/usr/bin/python3 - # Copyright 2016 The Chromium Authors. All rights reserved. - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. -@@ -152,7 +152,7 @@ def main(): - - # Trybots run with vpython as default Python, but with a different config - # from //.vpython. To make the is_vpython test work, and to match the behavior -- # of dev machines, the shebang line must be run with python2.7. -+ # of dev machines, the shebang line must be run with python3. - # - # E.g. $HOME/.vpython-root/dd50d3/bin/python - # E.g. /b/s/w/ir/cache/vpython/ab5c79/bin/python ---- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py -+++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py -@@ -7,7 +7,7 @@ - Converts a given ASCII proto into a binary resource. - - """ -- -+from __future__ import print_function - import abc - import imp - import optparse -@@ -196,12 +196,12 @@ class BinaryProtoGenerator: - self._ImportProtoModules(opts.path) - - if not self.VerifyArgs(opts): -- print "Wrong arguments" -+ print("Wrong arguments") - return 1 - - try: - self._GenerateBinaryProtos(opts) - except Exception as e: -- print "ERROR: Failed to render binary version of %s:\n %s\n%s" % ( -- opts.infile, str(e), traceback.format_exc()) -+ print("ERROR: Failed to render binary version of %s:\n %s\n%s" % -+ (opts.infile, str(e), traceback.format_exc())) - return 1 ---- a/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py -+++ b/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py -@@ -74,7 +74,7 @@ def main(argv): - for filename in parsed_args.source_files: - add_file_to_grd(doc, os.path.basename(filename)) - -- with open(parsed_args.output_filename, 'w') as output_file: -+ with open(parsed_args.output_filename, 'wb') as output_file: - output_file.write(doc.toxml(encoding='UTF-8')) - - ---- a/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn -+++ b/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn -@@ -2,9 +2,11 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - -+import("//build/config/python.gni") - import("//mojo/public/tools/bindings/mojom.gni") - import("//third_party/jinja2/jinja2.gni") - -+# TODO(crbug.com/1194274): Investigate nondeterminism in Py3 builds. - action("precompile_templates") { - sources = mojom_generator_sources - sources += [ ---- a/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py -+++ b/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py -@@ -18,7 +18,6 @@ import os - import re - import sys - --from cStringIO import StringIO - from optparse import OptionParser - - sys.path.insert( -@@ -41,12 +40,9 @@ def main(): - pattern = re.compile(options.pattern) - files = [f for f in os.listdir(options.directory) if pattern.match(f)] - -- stream = StringIO() -- for f in files: -- print(f, file=stream) -+ contents = '\n'.join(f for f in files) + '\n' -+ WriteFile(contents, options.output) - -- WriteFile(stream.getvalue(), options.output) -- stream.close() - - if __name__ == '__main__': - sys.exit(main()) ---- a/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py -+++ b/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py -@@ -25,6 +25,10 @@ sys.path.append(os.path.join(os.path.dir - 'build', 'android', 'gyp')) - from util import build_utils - -+# TODO(crbug.com/1174969): Remove this once Python2 is obsoleted. -+if sys.version_info.major != 2: -+ basestring = str -+ long = int - - GENERATOR_PREFIX = 'java' - ---- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py -+++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py -@@ -136,9 +136,14 @@ class Stylizer(object): - - def WriteFile(contents, full_path): - # If |contents| is same with the file content, we skip updating. -+ if not isinstance(contents, bytes): -+ data = contents.encode('utf8') -+ else: -+ data = contents -+ - if os.path.isfile(full_path): - with open(full_path, 'rb') as destination_file: -- if destination_file.read() == contents: -+ if destination_file.read() == data: - return - - # Make sure the containing directory exists. -@@ -146,11 +151,8 @@ def WriteFile(contents, full_path): - fileutil.EnsureDirectoryExists(full_dir) - - # Dump the data to disk. -- with open(full_path, "wb") as f: -- if not isinstance(contents, bytes): -- f.write(contents.encode('utf-8')) -- else: -- f.write(contents) -+ with open(full_path, 'wb') as f: -+ f.write(data) - - - def AddComputedData(module): ---- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py -+++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py -@@ -398,7 +398,8 @@ class Field(object): - - - class StructField(Field): -- pass -+ def __hash__(self): -+ return super(Field, self).__hash__() - - - class UnionField(Field): ---- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py -+++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py -@@ -75,9 +75,9 @@ def PrecompileTemplates(generator_module - os.path.dirname(module.__file__), generator.GetTemplatePrefix()) - ])) - jinja_env.filters.update(generator.GetFilters()) -- jinja_env.compile_templates( -- os.path.join(output_dir, "%s.zip" % generator.GetTemplatePrefix()), -- extensions=["tmpl"], -- zip="stored", -- py_compile=True, -- ignore_errors=False) -+ jinja_env.compile_templates(os.path.join( -+ output_dir, "%s.zip" % generator.GetTemplatePrefix()), -+ extensions=["tmpl"], -+ zip="stored", -+ py_compile=sys.version_info.major < 3, -+ ignore_errors=False) ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py -@@ -344,7 +344,7 @@ def make_default_value_expr(idl_type, de - """ - assert default_value.is_type_compatible_with(idl_type) - -- class DefaultValueExpr: -+ class DefaultValueExpr(object): - _ALLOWED_SYMBOLS_IN_DEPS = ("isolate") - - def __init__(self, initializer_expr, initializer_deps, -@@ -502,7 +502,7 @@ def make_v8_to_blink_value(blink_var_nam - assert isinstance(blink_var_name, str) - assert isinstance(v8_value_expr, str) - assert isinstance(idl_type, web_idl.IdlType) -- assert (argument_index is None or isinstance(argument_index, (int, long))) -+ assert (argument_index is None or isinstance(argument_index, int)) - assert (default_value is None - or isinstance(default_value, web_idl.LiteralConstant)) - -@@ -622,7 +622,7 @@ def make_v8_to_blink_value_variadic(blin - """ - assert isinstance(blink_var_name, str) - assert isinstance(v8_array, str) -- assert isinstance(v8_array_start_index, (int, long)) -+ assert isinstance(v8_array_start_index, int) - assert isinstance(idl_type, web_idl.IdlType) - - pattern = ("auto&& ${{{_1}}} = " ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py -@@ -177,7 +177,7 @@ def generate_callback_interface(callback - prop_install_mode=PropInstallMode.UNCONDITIONAL, - trampoline_var_name=None, - attribute_entries=[], -- constant_entries=filter(is_unconditional, constant_entries), -+ constant_entries=list(filter(is_unconditional, constant_entries)), - exposed_construct_entries=[], - operation_entries=[]) - (install_interface_template_decl, install_interface_template_def, ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py -@@ -503,13 +503,13 @@ class CompositeNode(CodeNode): - gensym_kwargs = {} - template_vars = {} - for arg in args: -- assert isinstance(arg, (CodeNode, int, long, str)) -+ assert isinstance(arg, (CodeNode, int, str)) - gensym = CodeNode.gensym() - gensym_args.append("${{{}}}".format(gensym)) - template_vars[gensym] = arg - for key, value in kwargs.items(): -- assert isinstance(key, (int, long, str)) -- assert isinstance(value, (CodeNode, int, long, str)) -+ assert isinstance(key, (int, str)) -+ assert isinstance(value, (CodeNode, int, str)) - gensym = CodeNode.gensym() - gensym_kwargs[key] = "${{{}}}".format(gensym) - template_vars[gensym] = value -@@ -602,7 +602,7 @@ class ListNode(CodeNode): - def insert(self, index, node): - if node is None: - return -- assert isinstance(index, (int, long)) -+ assert isinstance(index, int) - assert isinstance(node, CodeNode) - assert node.outer is None and node.prev is None - -@@ -721,7 +721,7 @@ class SymbolScopeNode(SequenceNode): - if not scope_chains: - return counts - -- self_index = iter(scope_chains).next().index(self) -+ self_index = next(iter(scope_chains)).index(self) - scope_chains = map( - lambda scope_chain: scope_chain[self_index + 1:], scope_chains) - scope_to_likeliness = {} ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py -@@ -109,7 +109,7 @@ def expr_and(terms): - - if any(term.is_always_false for term in terms): - return _Expr(False) -- terms = filter(lambda x: not x.is_always_true, terms) -+ terms = list(filter(lambda x: not x.is_always_true, terms)) - if not terms: - return _Expr(True) - if len(terms) == 1: -@@ -124,7 +124,7 @@ def expr_or(terms): - - if any(term.is_always_true for term in terms): - return _Expr(True) -- terms = filter(lambda x: not x.is_always_false, terms) -+ terms = list(filter(lambda x: not x.is_always_false, terms)) - if not terms: - return _Expr(False) - if len(terms) == 1: -@@ -222,7 +222,7 @@ def expr_from_exposure(exposure, - elif exposure.only_in_secure_contexts is False: - secure_context_term = _Expr(True) - else: -- terms = map(ref_enabled, exposure.only_in_secure_contexts) -+ terms = list(map(ref_enabled, exposure.only_in_secure_contexts)) - secure_context_term = expr_or( - [_Expr("${is_in_secure_context}"), - expr_not(expr_and(terms))]) -@@ -275,10 +275,11 @@ def expr_from_exposure(exposure, - - # [ContextEnabled] - if exposure.context_enabled_features: -- terms = map( -- lambda feature: _Expr( -- "${{context_feature_settings}}->is{}Enabled()".format( -- feature)), exposure.context_enabled_features) -+ terms = list( -+ map( -+ lambda feature: _Expr( -+ "${{context_feature_settings}}->is{}Enabled()".format( -+ feature)), exposure.context_enabled_features)) - context_enabled_terms.append( - expr_and([_Expr("${context_feature_settings}"), - expr_or(terms)])) ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py -@@ -23,7 +23,7 @@ class _TemplateFormatter(string.Formatte - self._template_formatter_indexing_count_ = 0 - - def get_value(self, key, args, kwargs): -- if isinstance(key, (int, long)): -+ if isinstance(key, int): - return args[key] - assert isinstance(key, str) - if not key: ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py -@@ -116,4 +116,4 @@ def write_code_node_to_file(code_node, f - # stderr=format_result.error_message)) - # - # web_idl.file_io.write_to_file_if_changed(filepath, format_result.contents) -- web_idl.file_io.write_to_file_if_changed(filepath, rendered_text) -+ web_idl.file_io.write_to_file_if_changed(filepath, rendered_text.encode('utf-8')) ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py -@@ -993,7 +993,7 @@ def make_dict_trace_func(cg_context): - _2 = _blink_member_name(member).value_var - return TextNode(_format(pattern, _1=_1, _2=_2)) - -- body.extend(map(make_trace_member_node, own_members)) -+ body.extend(list(map(make_trace_member_node, own_members))) - body.append(TextNode("BaseClass::Trace(visitor);")) - - return func_decl, func_def ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py -@@ -582,7 +582,7 @@ def _make_blink_api_call(code_node, - overriding_args=None): - assert isinstance(code_node, SymbolScopeNode) - assert isinstance(cg_context, CodeGenContext) -- assert num_of_args is None or isinstance(num_of_args, (int, long)) -+ assert num_of_args is None or isinstance(num_of_args, int) - assert (overriding_args is None - or (isinstance(overriding_args, (list, tuple)) - and all(isinstance(arg, str) for arg in overriding_args))) -@@ -1196,8 +1196,10 @@ def make_overload_dispatcher(cg_context) - did_use_break = did_use_break or can_fail - - conditional = expr_or( -- map(lambda item: expr_from_exposure(item.function_like.exposure), -- items)) -+ list( -+ map( -+ lambda item: expr_from_exposure(item.function_like.exposure -+ ), items))) - if not conditional.is_always_true: - node = CxxUnlikelyIfNode(cond=conditional, body=node) - -@@ -4642,7 +4644,7 @@ class _PropEntryConstructorGroup(_PropEn - def __init__(self, is_context_dependent, exposure_conditional, world, - constructor_group, ctor_callback_name, ctor_func_length): - assert isinstance(ctor_callback_name, str) -- assert isinstance(ctor_func_length, (int, long)) -+ assert isinstance(ctor_func_length, int) - - _PropEntryBase.__init__(self, is_context_dependent, - exposure_conditional, world, constructor_group) -@@ -4670,7 +4672,7 @@ class _PropEntryOperationGroup(_PropEntr - op_func_length, - no_alloc_direct_callback_name=None): - assert isinstance(op_callback_name, str) -- assert isinstance(op_func_length, (int, long)) -+ assert isinstance(op_func_length, int) - - _PropEntryBase.__init__(self, is_context_dependent, - exposure_conditional, world, operation_group) -@@ -5175,9 +5177,9 @@ def make_install_interface_template(cg_c - ]) - - if class_like.identifier == "CSSStyleDeclaration": -- css_properties = filter( -- lambda attr: "CSSProperty" in attr.extended_attributes, -- class_like.attributes) -+ css_properties = list( -+ filter(lambda attr: "CSSProperty" in attr.extended_attributes, -+ class_like.attributes)) - if css_properties: - prop_name_list = "".join( - map(lambda attr: "\"{}\", ".format(attr.identifier), -@@ -5567,8 +5569,8 @@ ${instance_object} = ${v8_context}->Glob - "V8DOMConfiguration::InstallConstants(${isolate}, " - "${interface_template}, ${prototype_template}, " - "kConstantCallbackTable, base::size(kConstantCallbackTable));") -- constant_callback_entries = filter(lambda entry: entry.const_callback_name, -- constant_entries) -+ constant_callback_entries = list(filter(lambda entry: entry.const_callback_name, -+ constant_entries)) - install_properties(table_name, constant_callback_entries, - _make_constant_callback_registration_table, - installer_call_text) -@@ -5584,8 +5586,8 @@ ${instance_object} = ${v8_context}->Glob - "V8DOMConfiguration::InstallConstants(${isolate}, " - "${interface_template}, ${prototype_template}, " - "kConstantValueTable, base::size(kConstantValueTable));") -- constant_value_entries = filter( -- lambda entry: not entry.const_callback_name, constant_entries) -+ constant_value_entries = list(filter( -+ lambda entry: not entry.const_callback_name, constant_entries)) - install_properties(table_name, constant_value_entries, - _make_constant_value_registration_table, - installer_call_text) -@@ -6336,8 +6338,8 @@ def make_v8_context_snapshot_api(cg_cont - assert isinstance(component, web_idl.Component) - - derived_interfaces = cg_context.interface.deriveds -- derived_names = map(lambda interface: interface.identifier, -- derived_interfaces) -+ derived_names = list( -+ map(lambda interface: interface.identifier, derived_interfaces)) - derived_names.append(cg_context.interface.identifier) - if not ("Window" in derived_names or "HTMLDocument" in derived_names): - return None, None -@@ -6411,9 +6413,11 @@ def _make_v8_context_snapshot_get_refere - collect_callbacks(named_properties_object_callback_defs) - collect_callbacks(cross_origin_property_callback_defs) - -- entry_nodes = map( -- lambda name: TextNode("reinterpret_cast({}),".format(name)), -- filter(None, callback_names)) -+ entry_nodes = list( -+ map( -+ lambda name: TextNode("reinterpret_cast({}),".format(name -+ )), -+ filter(None, callback_names))) - table_node = ListNode([ - TextNode("using namespace ${class_name}Callbacks;"), - TextNode("static const intptr_t kReferenceTable[] = {"), -@@ -6451,10 +6455,11 @@ def _make_v8_context_snapshot_install_pr - class_name=None, - prop_install_mode=PropInstallMode.V8_CONTEXT_SNAPSHOT, - trampoline_var_name=None, -- attribute_entries=filter(selector, attribute_entries), -- constant_entries=filter(selector, constant_entries), -- exposed_construct_entries=filter(selector, exposed_construct_entries), -- operation_entries=filter(selector, operation_entries)) -+ attribute_entries=list(filter(selector, attribute_entries)), -+ constant_entries=list(filter(selector, constant_entries)), -+ exposed_construct_entries=list( -+ filter(selector, exposed_construct_entries)), -+ operation_entries=list(filter(selector, operation_entries))) - - return func_decl, func_def - -@@ -6810,11 +6815,11 @@ def generate_interface(interface_identif - class_name=impl_class_name, - prop_install_mode=PropInstallMode.UNCONDITIONAL, - trampoline_var_name=tp_install_unconditional_props, -- attribute_entries=filter(is_unconditional, attribute_entries), -- constant_entries=filter(is_unconditional, constant_entries), -- exposed_construct_entries=filter(is_unconditional, -- exposed_construct_entries), -- operation_entries=filter(is_unconditional, operation_entries)) -+ attribute_entries=list(filter(is_unconditional, attribute_entries)), -+ constant_entries=list(filter(is_unconditional, constant_entries)), -+ exposed_construct_entries=list( -+ filter(is_unconditional, exposed_construct_entries)), -+ operation_entries=list(filter(is_unconditional, operation_entries))) - (install_context_independent_props_decl, - install_context_independent_props_def, - install_context_independent_props_trampoline) = make_install_properties( -@@ -6823,11 +6828,14 @@ def generate_interface(interface_identif - class_name=impl_class_name, - prop_install_mode=PropInstallMode.CONTEXT_INDEPENDENT, - trampoline_var_name=tp_install_context_independent_props, -- attribute_entries=filter(is_context_independent, attribute_entries), -- constant_entries=filter(is_context_independent, constant_entries), -- exposed_construct_entries=filter(is_context_independent, -- exposed_construct_entries), -- operation_entries=filter(is_context_independent, operation_entries)) -+ attribute_entries=list( -+ filter(is_context_independent, attribute_entries)), -+ constant_entries=list(filter(is_context_independent, -+ constant_entries)), -+ exposed_construct_entries=list( -+ filter(is_context_independent, exposed_construct_entries)), -+ operation_entries=list( -+ filter(is_context_independent, operation_entries))) - (install_context_dependent_props_decl, install_context_dependent_props_def, - install_context_dependent_props_trampoline) = make_install_properties( - cg_context, -@@ -6835,11 +6843,13 @@ def generate_interface(interface_identif - class_name=impl_class_name, - prop_install_mode=PropInstallMode.CONTEXT_DEPENDENT, - trampoline_var_name=tp_install_context_dependent_props, -- attribute_entries=filter(is_context_dependent, attribute_entries), -- constant_entries=filter(is_context_dependent, constant_entries), -- exposed_construct_entries=filter(is_context_dependent, -- exposed_construct_entries), -- operation_entries=filter(is_context_dependent, operation_entries)) -+ attribute_entries=list(filter(is_context_dependent, -+ attribute_entries)), -+ constant_entries=list(filter(is_context_dependent, constant_entries)), -+ exposed_construct_entries=list( -+ filter(is_context_dependent, exposed_construct_entries)), -+ operation_entries=list(filter(is_context_dependent, -+ operation_entries))) - (install_interface_template_decl, install_interface_template_def, - install_interface_template_trampoline) = make_install_interface_template( - cg_context, ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py -@@ -105,7 +105,7 @@ class MakoRenderer(object): - on_error = self._caller_stack_on_error - if (len(current) <= len(on_error) - and all(current[i] == on_error[i] -- for i in xrange(len(current)))): -+ for i in range(len(current)))): - pass # Error happened in a deeper caller. - else: - self._caller_stack_on_error = list(self._caller_stack) ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py -@@ -70,8 +70,13 @@ def gn_format(contents, filename=None): - - - def _invoke_format_command(command_line, filename, contents): -- proc = subprocess.Popen( -- command_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE) -+ kwargs = {} -+ if sys.version_info.major != 2: -+ kwargs['encoding'] = 'utf-8' -+ proc = subprocess.Popen(command_line, -+ stdin=subprocess.PIPE, -+ stdout=subprocess.PIPE, -+ **kwargs) - stdout_output, stderr_output = proc.communicate(input=contents) - exit_code = proc.wait() - ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py -@@ -2,6 +2,7 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - -+import functools - import multiprocessing - - from .package_initializer import package_initializer -@@ -76,7 +77,7 @@ class TaskQueue(object): - if not report_progress: - return - -- done_count = reduce( -+ done_count = functools.reduce( - lambda count, worker_task: count + bool(worker_task.ready()), - self._worker_tasks, 0) - report_progress(len(self._worker_tasks), done_count) -@@ -85,4 +86,4 @@ class TaskQueue(object): - def _task_queue_run_tasks(tasks): - for task in tasks: - func, args, kwargs = task -- apply(func, args, kwargs) -+ func(*args, **kwargs) ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py -@@ -13,6 +13,7 @@ import re - import sys - - from idl_types import set_ancestors, IdlType -+from itertools import groupby - from v8_globals import includes - from v8_interface import constant_filters - from v8_types import set_component_dirs -@@ -43,6 +44,7 @@ TEMPLATES_DIR = os.path.normpath( - # after path[0] == invoking script dir - sys.path.insert(1, THIRD_PARTY_DIR) - import jinja2 -+from jinja2.filters import make_attrgetter, environmentfilter - - - def generate_indented_conditional(code, conditional): -@@ -88,6 +90,13 @@ def runtime_enabled_if(code, name): - return generate_indented_conditional(code, function) - - -+@environmentfilter -+def do_stringify_key_group_by(environment, value, attribute): -+ expr = make_attrgetter(environment, attribute) -+ key = lambda item: '' if expr(item) is None else str(expr(item)) -+ return groupby(sorted(value, key=key), expr) -+ -+ - def initialize_jinja_env(cache_dir): - jinja_env = jinja2.Environment( - loader=jinja2.FileSystemLoader(TEMPLATES_DIR), -@@ -117,6 +126,7 @@ def initialize_jinja_env(cache_dir): - }) - jinja_env.filters.update(constant_filters()) - jinja_env.filters.update(method_filters()) -+ jinja_env.filters["stringifykeygroupby"] = do_stringify_key_group_by - return jinja_env - - ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py -@@ -80,7 +80,7 @@ def read_idl_file(reader, idl_filename): - assert len(interfaces) == 1, ( - "Expected one interface in file %r, found %d" % - (idl_filename, len(interfaces))) -- return (interfaces.values()[0], includes) -+ return (list(interfaces.values())[0], includes) - - - def interface_is_global(interface): -@@ -281,7 +281,7 @@ def main(): - - info_provider = create_component_info_provider( - os.path.normpath(options.info_dir), options.target_component) -- idl_filenames = map(str.strip, open(options.idl_files_list)) -+ idl_filenames = list(map(str.strip, open(options.idl_files_list))) - - generate_origin_trial_features(info_provider, options, idl_filenames) - return 0 ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py -@@ -394,7 +394,8 @@ class IdlInterface(object): - else: - raise ValueError('Unrecognized node class: %s' % child_class) - -- if len(filter(None, [self.iterable, self.maplike, self.setlike])) > 1: -+ if len(list(filter(None, -+ [self.iterable, self.maplike, self.setlike]))) > 1: - raise ValueError( - 'Interface can only have one of iterable<>, maplike<> and setlike<>.' - ) -@@ -512,6 +513,9 @@ class IdlAttribute(TypedObject): - def accept(self, visitor): - visitor.visit_attribute(self) - -+ def __lt__(self, other): -+ return self.name < other.name -+ - - ################################################################################ - # Constants -@@ -852,7 +856,7 @@ class IdlIncludes(object): - ################################################################################ - - --class Exposure: -+class Exposure(object): - """An Exposure holds one Exposed or RuntimeEnabled condition. - Each exposure has two properties: exposed and runtime_enabled. - Exposure(e, r) corresponds to [Exposed(e r)]. Exposure(e) corresponds to ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py -@@ -55,8 +55,8 @@ def validate_blink_idl_definitions(idl_f - definitions. There is no filename convention in this case. - - Otherwise, an IDL file is invalid. - """ -- targets = ( -- definitions.interfaces.values() + definitions.dictionaries.values()) -+ targets = (list(definitions.interfaces.values()) + -+ list(definitions.dictionaries.values())) - number_of_targets = len(targets) - if number_of_targets > 1: - raise Exception( ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py -@@ -349,7 +349,7 @@ class IdlUnionType(IdlTypeBase): - return True - - def single_matching_member_type(self, predicate): -- matching_types = filter(predicate, self.flattened_member_types) -+ matching_types = list(filter(predicate, self.flattened_member_types)) - if len(matching_types) > 1: - raise ValueError('%s is ambiguous.' % self.name) - return matching_types[0] if matching_types else None ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py -@@ -196,8 +196,9 @@ class ComponentInfoProviderModules(Compo - - @property - def callback_functions(self): -- return dict(self._component_info_core['callback_functions'].items() + -- self._component_info_modules['callback_functions'].items()) -+ return dict( -+ list(self._component_info_core['callback_functions'].items()) + -+ list(self._component_info_modules['callback_functions'].items())) - - @property - def specifier_for_export(self): -@@ -209,8 +210,8 @@ class ComponentInfoProviderModules(Compo - - - def load_interfaces_info_overall_pickle(info_dir): -- with open(os.path.join(info_dir, -- 'interfaces_info.pickle')) as interface_info_file: -+ with open(os.path.join(info_dir, 'interfaces_info.pickle'), -+ mode='rb') as interface_info_file: - return pickle.load(interface_info_file) - - -@@ -236,23 +237,20 @@ def merge_dict_recursively(target, diff) - - def create_component_info_provider_core(info_dir): - interfaces_info = load_interfaces_info_overall_pickle(info_dir) -- with open( -- os.path.join(info_dir, 'core', -- 'component_info_core.pickle')) as component_info_file: -+ with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'), -+ mode='rb') as component_info_file: - component_info = pickle.load(component_info_file) - return ComponentInfoProviderCore(interfaces_info, component_info) - - - def create_component_info_provider_modules(info_dir): - interfaces_info = load_interfaces_info_overall_pickle(info_dir) -- with open( -- os.path.join(info_dir, 'core', -- 'component_info_core.pickle')) as component_info_file: -+ with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'), -+ mode='rb') as component_info_file: - component_info_core = pickle.load(component_info_file) -- with open( -- os.path.join( -- info_dir, 'modules', -- 'component_info_modules.pickle')) as component_info_file: -+ with open(os.path.join(info_dir, 'modules', -+ 'component_info_modules.pickle'), -+ mode='rb') as component_info_file: - component_info_modules = pickle.load(component_info_file) - return ComponentInfoProviderModules(interfaces_info, component_info_core, - component_info_modules) -@@ -356,7 +354,7 @@ def write_pickle_file(pickle_filename, d - pickle_filename = abs(pickle_filename) - # If |data| is same with the file content, we skip updating. - if os.path.isfile(pickle_filename): -- with open(pickle_filename) as pickle_file: -+ with open(pickle_filename, 'rb') as pickle_file: - try: - if pickle.load(pickle_file) == data: - return ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py -@@ -189,7 +189,7 @@ def context_enabled_features(attributes) - return sorted([ - member for member in members - if member.get(KEY) and not member.get('exposed_test') -- ]) -+ ], key=lambda item: item['name']) - - def member_filter_by_name(members, name): - return [member for member in members if member[KEY] == name] -@@ -612,7 +612,8 @@ def interface_context(interface, interfa - sorted( - origin_trial_features(interface, context['constants'], - context['attributes'], context['methods']) + -- context_enabled_features(context['attributes'])), -+ context_enabled_features(context['attributes']), -+ key=lambda item: item['name']), - }) - if context['optional_features']: - includes.add('platform/bindings/v8_per_context_data.h') -@@ -1356,9 +1357,9 @@ def resolution_tests_methods(effective_o - - # Extract argument and IDL type to simplify accessing these in each loop. - arguments = [method['arguments'][index] for method in methods] -- arguments_methods = zip(arguments, methods) -+ arguments_methods = list(zip(arguments, methods)) - idl_types = [argument['idl_type_object'] for argument in arguments] -- idl_types_methods = zip(idl_types, methods) -+ idl_types_methods = list(zip(idl_types, methods)) - - # We can’t do a single loop through all methods or simply sort them, because - # a method may be listed in multiple steps of the resolution algorithm, and ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py -@@ -46,6 +46,10 @@ import v8_types - import v8_utilities - from v8_utilities import (has_extended_attribute_value, is_unforgeable) - -+# TODO: Remove this once Python2 is obsoleted. -+if sys.version_info.major != 2: -+ basestring = str -+ - - def method_is_visible(method, interface_is_partial): - if 'overloads' in method: ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py -@@ -271,7 +271,7 @@ EXPOSED_WORKERS = set([ - ]) - - --class ExposureSet: -+class ExposureSet(object): - """An ExposureSet is a collection of Exposure instructions.""" - - def __init__(self, exposures=None): ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py -@@ -91,11 +91,13 @@ class CallbackInterface(UserDefinedType, - for operation_ir in ir.operations - ]) - self._operation_groups = tuple([ -- OperationGroup( -- operation_group_ir, -- filter(lambda x: x.identifier == operation_group_ir.identifier, -- self._operations), -- owner=self) for operation_group_ir in ir.operation_groups -+ OperationGroup(operation_group_ir, -+ list( -+ filter( -+ lambda x: x.identifier == operation_group_ir -+ .identifier, self._operations)), -+ owner=self) -+ for operation_group_ir in ir.operation_groups - ]) - - @property ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py -@@ -156,4 +156,4 @@ class Database(object): - return self._view_by_kind(Database._Kind.UNION) - - def _view_by_kind(self, kind): -- return self._impl.find_by_kind(kind).values() -+ return list(self._impl.find_by_kind(kind).values()) ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py -@@ -8,8 +8,11 @@ from .runtime_enabled_features import Ru - class _Feature(str): - """Represents a runtime-enabled feature.""" - -+ def __new__(cls, value): -+ return str.__new__(cls, value) -+ - def __init__(self, value): -- str.__init__(self, value) -+ str.__init__(self) - self._is_context_dependent = ( - RuntimeEnabledFeatures.is_context_dependent(self)) - ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py -@@ -71,8 +71,9 @@ class FunctionLike(WithIdentifier): - def num_of_required_arguments(self): - """Returns the number of required arguments.""" - return len( -- filter(lambda arg: not (arg.is_optional or arg.is_variadic), -- self.arguments)) -+ list( -+ filter(lambda arg: not (arg.is_optional or arg.is_variadic), -+ self.arguments))) - - - class OverloadGroup(WithIdentifier): -@@ -171,8 +172,7 @@ class OverloadGroup(WithIdentifier): - Returns the effective overload set. - https://heycam.github.io/webidl/#compute-the-effective-overload-set - """ -- assert argument_count is None or isinstance(argument_count, -- (int, long)) -+ assert argument_count is None or isinstance(argument_count, int) - - N = argument_count - S = [] -@@ -188,21 +188,21 @@ class OverloadGroup(WithIdentifier): - - S.append( - OverloadGroup.EffectiveOverloadItem( -- X, map(lambda arg: arg.idl_type, X.arguments), -- map(lambda arg: arg.optionality, X.arguments))) -+ X, list(map(lambda arg: arg.idl_type, X.arguments)), -+ list(map(lambda arg: arg.optionality, X.arguments)))) - - if X.is_variadic: -- for i in xrange(n, max(maxarg, N)): -- t = map(lambda arg: arg.idl_type, X.arguments) -- o = map(lambda arg: arg.optionality, X.arguments) -- for _ in xrange(n, i + 1): -+ for i in range(n, max(maxarg, N)): -+ t = list(map(lambda arg: arg.idl_type, X.arguments)) -+ o = list(map(lambda arg: arg.optionality, X.arguments)) -+ for _ in range(n, i + 1): - t.append(X.arguments[-1].idl_type) - o.append(X.arguments[-1].optionality) - S.append(OverloadGroup.EffectiveOverloadItem(X, t, o)) - -- t = map(lambda arg: arg.idl_type, X.arguments) -- o = map(lambda arg: arg.optionality, X.arguments) -- for i in xrange(n - 1, -1, -1): -+ t = list(map(lambda arg: arg.idl_type, X.arguments)) -+ o = list(map(lambda arg: arg.optionality, X.arguments)) -+ for i in range(n - 1, -1, -1): - if X.arguments[i].optionality == IdlType.Optionality.REQUIRED: - break - S.append(OverloadGroup.EffectiveOverloadItem(X, t[:i], o[:i])) -@@ -222,7 +222,7 @@ class OverloadGroup(WithIdentifier): - for item in items) - assert len(items) > 1 - -- for index in xrange(len(items[0].type_list)): -+ for index in range(len(items[0].type_list)): - # Assume that the given items are valid, and we only need to test - # the two types. - if OverloadGroup.are_distinguishable_types( ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py -@@ -149,8 +149,8 @@ class IdlCompiler(object): - for old_ir in old_irs: - new_ir = make_copy(old_ir) - self._ir_map.add(new_ir) -- new_ir.attributes = filter(not_disabled, new_ir.attributes) -- new_ir.operations = filter(not_disabled, new_ir.operations) -+ new_ir.attributes = list(filter(not_disabled, new_ir.attributes)) -+ new_ir.operations = list(filter(not_disabled, new_ir.operations)) - - def _record_defined_in_partial_and_mixin(self): - old_irs = self._ir_map.irs_of_kinds( -@@ -231,7 +231,7 @@ class IdlCompiler(object): - only_to_members_of_partial_or_mixin=False) - propagate_to_exposure(propagate) - -- map(process_member_like, ir.iter_all_members()) -+ list(map(process_member_like, ir.iter_all_members())) - - def process_member_like(ir): - propagate = functools.partial(propagate_extattr, ir=ir) -@@ -257,7 +257,7 @@ class IdlCompiler(object): - - self._ir_map.move_to_new_phase() - -- map(process_interface_like, old_irs) -+ list(map(process_interface_like, old_irs)) - - def _determine_blink_headers(self): - irs = self._ir_map.irs_of_kinds( -@@ -422,9 +422,9 @@ class IdlCompiler(object): - assert not new_interface.deriveds - derived_set = identifier_to_derived_set.get( - new_interface.identifier, set()) -- new_interface.deriveds = map( -- lambda id_: self._ref_to_idl_def_factory.create(id_), -- sorted(derived_set)) -+ new_interface.deriveds = list( -+ map(lambda id_: self._ref_to_idl_def_factory.create(id_), -+ sorted(derived_set))) - - def _supplement_missing_html_constructor_operation(self): - # Temporary mitigation of misuse of [HTMLConstructor] -@@ -553,7 +553,8 @@ class IdlCompiler(object): - self._ir_map.add(new_ir) - - for group in new_ir.iter_all_overload_groups(): -- exposures = map(lambda overload: overload.exposure, group) -+ exposures = list(map(lambda overload: overload.exposure, -+ group)) - - # [Exposed] - if any(not exposure.global_names_and_features -@@ -653,8 +654,8 @@ class IdlCompiler(object): - constructs = set() - for global_name in global_names: - constructs.update(exposed_map.get(global_name, [])) -- new_ir.exposed_constructs = map( -- self._ref_to_idl_def_factory.create, sorted(constructs)) -+ new_ir.exposed_constructs = list( -+ map(self._ref_to_idl_def_factory.create, sorted(constructs))) - - assert not new_ir.legacy_window_aliases - if new_ir.identifier != 'Window': ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py -@@ -180,8 +180,9 @@ class Interface(UserDefinedType, WithExt - self._constructor_groups = tuple([ - ConstructorGroup( - group_ir, -- filter(lambda x: x.identifier == group_ir.identifier, -- self._constructors), -+ list( -+ filter(lambda x: x.identifier == group_ir.identifier, -+ self._constructors)), - owner=self) for group_ir in ir.constructor_groups - ]) - assert len(self._constructor_groups) <= 1 -@@ -192,8 +193,9 @@ class Interface(UserDefinedType, WithExt - self._named_constructor_groups = tuple([ - ConstructorGroup( - group_ir, -- filter(lambda x: x.identifier == group_ir.identifier, -- self._named_constructors), -+ list( -+ filter(lambda x: x.identifier == group_ir.identifier, -+ self._named_constructors)), - owner=self) for group_ir in ir.named_constructor_groups - ]) - self._operations = tuple([ -@@ -203,22 +205,23 @@ class Interface(UserDefinedType, WithExt - self._operation_groups = tuple([ - OperationGroup( - group_ir, -- filter(lambda x: x.identifier == group_ir.identifier, -- self._operations), -+ list( -+ filter(lambda x: x.identifier == group_ir.identifier, -+ self._operations)), - owner=self) for group_ir in ir.operation_groups - ]) - self._exposed_constructs = tuple(ir.exposed_constructs) - self._legacy_window_aliases = tuple(ir.legacy_window_aliases) - self._indexed_and_named_properties = None -- indexed_and_named_property_operations = filter( -- lambda x: x.is_indexed_or_named_property_operation, -- self._operations) -+ indexed_and_named_property_operations = list( -+ filter(lambda x: x.is_indexed_or_named_property_operation, -+ self._operations)) - if indexed_and_named_property_operations: - self._indexed_and_named_properties = IndexedAndNamedProperties( - indexed_and_named_property_operations, owner=self) - self._stringifier = None -- stringifier_operation_irs = filter(lambda x: x.is_stringifier, -- ir.operations) -+ stringifier_operation_irs = list( -+ filter(lambda x: x.is_stringifier, ir.operations)) - if stringifier_operation_irs: - assert len(stringifier_operation_irs) == 1 - op_ir = make_copy(stringifier_operation_irs[0]) -@@ -231,8 +234,9 @@ class Interface(UserDefinedType, WithExt - attribute = None - if operation.stringifier_attribute: - attr_id = operation.stringifier_attribute -- attributes = filter(lambda x: x.identifier == attr_id, -- self._attributes) -+ attributes = list( -+ filter(lambda x: x.identifier == attr_id, -+ self._attributes)) - assert len(attributes) == 1 - attribute = attributes[0] - self._stringifier = Stringifier(operation, attribute, owner=self) -@@ -578,8 +582,9 @@ class Iterable(WithDebugInfo): - self._operation_groups = tuple([ - OperationGroup( - group_ir, -- filter(lambda x: x.identifier == group_ir.identifier, -- self._operations), -+ list( -+ filter(lambda x: x.identifier == group_ir.identifier, -+ self._operations)), - owner=owner) for group_ir in ir.operation_groups - ]) - -@@ -666,8 +671,9 @@ class Maplike(WithDebugInfo): - self._operation_groups = tuple([ - OperationGroup( - group_ir, -- filter(lambda x: x.identifier == group_ir.identifier, -- self._operations), -+ list( -+ filter(lambda x: x.identifier == group_ir.identifier, -+ self._operations)), - owner=owner) for group_ir in ir.operation_groups - ]) - -@@ -755,8 +761,9 @@ class Setlike(WithDebugInfo): - self._operation_groups = tuple([ - OperationGroup( - group_ir, -- filter(lambda x: x.identifier == group_ir.identifier, -- self._operations), -+ list( -+ filter(lambda x: x.identifier == group_ir.identifier, -+ self._operations)), - owner=owner) for group_ir in ir.operation_groups - ]) - ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py -@@ -2,6 +2,8 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - -+import sys -+ - from .argument import Argument - from .ast_group import AstGroup - from .attribute import Attribute -@@ -30,6 +32,11 @@ from .operation import Operation - from .typedef import Typedef - - -+# TODO: Remove this once Python2 is obsoleted. -+if sys.version_info.major != 2: -+ long = int -+ -+ - def load_and_register_idl_definitions(filepaths, register_ir, - create_ref_to_idl_def, idl_type_factory): - """ -@@ -160,7 +167,7 @@ class _IRBuilder(object): - child_nodes = list(node.GetChildren()) - extended_attributes = self._take_extended_attributes(child_nodes) - -- members = map(self._build_interface_member, child_nodes) -+ members = list(map(self._build_interface_member, child_nodes)) - attributes = [] - constants = [] - operations = [] -@@ -302,7 +309,7 @@ class _IRBuilder(object): - child_nodes = list(node.GetChildren()) - inherited = self._take_inheritance(child_nodes) - extended_attributes = self._take_extended_attributes(child_nodes) -- own_members = map(self._build_dictionary_member, child_nodes) -+ own_members = list(map(self._build_dictionary_member, child_nodes)) - - return Dictionary.IR( - identifier=Identifier(node.GetName()), -@@ -336,7 +343,7 @@ class _IRBuilder(object): - - child_nodes = list(node.GetChildren()) - extended_attributes = self._take_extended_attributes(child_nodes) -- members = map(self._build_interface_member, child_nodes) -+ members = list(map(self._build_interface_member, child_nodes)) - constants = [] - operations = [] - for member in members: -@@ -456,8 +463,8 @@ class _IRBuilder(object): - assert len(child_nodes) == 1 - child = child_nodes[0] - if child.GetClass() == 'Arguments': -- arguments = map(build_extattr_argument, -- child.GetChildren()) -+ arguments = list( -+ map(build_extattr_argument, child.GetChildren())) - elif child.GetClass() == 'Call': - assert len(child.GetChildren()) == 1 - grand_child = child.GetChildren()[0] -@@ -486,7 +493,9 @@ class _IRBuilder(object): - - assert node.GetClass() == 'ExtAttributes' - return ExtendedAttributes( -- filter(None, map(build_extended_attribute, node.GetChildren()))) -+ list( -+ filter(None, map(build_extended_attribute, -+ node.GetChildren())))) - - def _build_inheritance(self, node): - assert node.GetClass() == 'Inherit' -@@ -506,7 +515,7 @@ class _IRBuilder(object): - - def _build_iterable(self, node): - assert node.GetClass() == 'Iterable' -- types = map(self._build_type, node.GetChildren()) -+ types = list(map(self._build_type, node.GetChildren())) - assert len(types) == 1 or len(types) == 2 - if len(types) == 1: # value iterator - key_type, value_type = (None, types[0]) -@@ -584,7 +593,7 @@ class _IRBuilder(object): - def _build_maplike(self, node, interface_identifier): - assert node.GetClass() == 'Maplike' - assert isinstance(interface_identifier, Identifier) -- types = map(self._build_type, node.GetChildren()) -+ types = list(map(self._build_type, node.GetChildren())) - assert len(types) == 2 - key_type, value_type = types - is_readonly = bool(node.GetProperty('READONLY')) -@@ -676,7 +685,7 @@ class _IRBuilder(object): - def _build_setlike(self, node, interface_identifier): - assert node.GetClass() == 'Setlike' - assert isinstance(interface_identifier, Identifier) -- types = map(self._build_type, node.GetChildren()) -+ types = list(map(self._build_type, node.GetChildren())) - assert len(types) == 1 - value_type = types[0] - is_readonly = bool(node.GetProperty('READONLY')) -@@ -838,7 +847,7 @@ class _IRBuilder(object): - - def build_union_type(node, extended_attributes): - return self._idl_type_factory.union_type( -- member_types=map(self._build_type, node.GetChildren()), -+ member_types=list(map(self._build_type, node.GetChildren())), - is_optional=is_optional, - extended_attributes=extended_attributes, - debug_info=self._build_debug_info(node)) ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py -@@ -3,6 +3,13 @@ - # found in the LICENSE file. - - -+import sys -+ -+# TODO: Remove this once Python2 is obsoleted. -+if sys.version_info.major != 2: -+ long = int -+ basestring = str -+ - def make_copy(obj, memo=None): - """ - Creates a copy of the given object, which should be an IR or part of IR. ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py -@@ -107,11 +107,13 @@ class Namespace(UserDefinedType, WithExt - for operation_ir in ir.operations - ]) - self._operation_groups = tuple([ -- OperationGroup( -- operation_group_ir, -- filter(lambda x: x.identifier == operation_group_ir.identifier, -- self._operations), -- owner=self) for operation_group_ir in ir.operation_groups -+ OperationGroup(operation_group_ir, -+ list( -+ filter( -+ lambda x: x.identifier == operation_group_ir -+ .identifier, self._operations)), -+ owner=self) -+ for operation_group_ir in ir.operation_groups - ]) - - @property ---- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl -+++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl -@@ -59,9 +59,9 @@ void {{v8_class}}::ToImpl(v8::Isolate* i - DCHECK(executionContext); - {% endif %}{# has_origin_trial_members #} - {% endif %}{# members #} -- {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %} -+ {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %} - {% filter origin_trial_enabled(origin_trial_test, "executionContext") %} -- {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %} -+ {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %} - {% filter runtime_enabled(feature_name) %} - {% for member in member_list %} - v8::Local {{member.v8_value}}; -@@ -147,9 +147,9 @@ bool toV8{{cpp_class}}(const {{cpp_class - DCHECK(executionContext); - {% endif %}{# has_origin_trial_members #} - {% endif %}{# members #} -- {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %} -+ {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %} - {% filter origin_trial_enabled(origin_trial_test, "executionContext") %} -- {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %} -+ {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %} - {% filter runtime_enabled(feature_name) %} - {% for member in member_list %} - v8::Local {{member.v8_value}}; ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py -@@ -71,7 +71,7 @@ class Expansion(object): - def enabled_longhands(self): - include = lambda longhand: not longhand[ - 'runtime_flag'] or self.is_enabled(longhand['runtime_flag']) -- return filter(include, self._longhands) -+ return list(filter(include, self._longhands)) - - @property - def index(self): -@@ -87,8 +87,9 @@ class Expansion(object): - - def create_expansions(longhands): - flags = collect_runtime_flags(longhands) -- expansions = map(lambda mask: Expansion(longhands, flags, mask), -- range(1 << len(flags))) -+ expansions = list( -+ map(lambda mask: Expansion(longhands, flags, mask), -+ range(1 << len(flags)))) - assert len(expansions) > 0 - # We generate 2^N expansions for N flags, so enforce some limit. - assert len(flags) <= 4, 'Too many runtime flags for a single shorthand' -@@ -114,14 +115,14 @@ class StylePropertyShorthandWriter(json5 - - self._longhand_dictionary = defaultdict(list) - for property_ in json5_properties.shorthands: -- property_['longhand_enum_keys'] = map(enum_key_for_css_property, -- property_['longhands']) -- property_['longhand_property_ids'] = map(id_for_css_property, -- property_['longhands']) -- -- longhands = map( -- lambda name: json5_properties.properties_by_name[name], -- property_['longhands']) -+ property_['longhand_enum_keys'] = list( -+ map(enum_key_for_css_property, property_['longhands'])) -+ property_['longhand_property_ids'] = list( -+ map(id_for_css_property, property_['longhands'])) -+ -+ longhands = list( -+ map(lambda name: json5_properties.properties_by_name[name], -+ property_['longhands'])) - property_['expansions'] = create_expansions(longhands) - for longhand_enum_key in property_['longhand_enum_keys']: - self._longhand_dictionary[longhand_enum_key].append(property_) ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py -@@ -42,8 +42,8 @@ class CSSPropertyInstancesWriter(json5_g - aliases = self._css_properties.aliases - - # Lists of PropertyClassData. -- self._property_classes_by_id = map(self.get_class, properties) -- self._alias_classes_by_id = map(self.get_class, aliases) -+ self._property_classes_by_id = list(map(self.get_class, properties)) -+ self._alias_classes_by_id = list(map(self.get_class, aliases)) - - # Sort by enum value. - self._property_classes_by_id.sort(key=lambda t: t.enum_value) ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py -@@ -95,7 +95,7 @@ def main(): - - open(args.output_file, 'wb').write( - generate_gperf(gperf_path, -- open(infile).read(), gperf_args)) -+ open(infile).read(), gperf_args).encode('utf-8')) - - - if __name__ == '__main__': ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py -@@ -66,7 +66,7 @@ class InFile(object): - self._defaults = defaults - self._valid_values = copy.deepcopy( - valid_values if valid_values else {}) -- self._parse(map(str.strip, lines)) -+ self._parse(list(map(str.strip, lines))) - - @classmethod - def load_from_files(self, file_paths, defaults, valid_values, ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py -@@ -32,10 +32,15 @@ import os - import os.path - import shlex - import shutil -+import sys - import optparse - - from in_file import InFile - -+# TODO: Remove this once Python2 is obsoleted. -+if sys.version_info.major != 2: -+ basestring = str -+ - - ######################################################### - # This is now deprecated - use json5_generator.py instead ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py -@@ -138,7 +138,7 @@ class RuntimeFeatureWriter(BaseRuntimeFe - except Exception: - # If trouble unpickling, overwrite - pass -- with open(os.path.abspath(file_name), 'w') as pickle_file: -+ with open(os.path.abspath(file_name), 'wb') as pickle_file: - pickle.dump(features_map, pickle_file) - - def _template_inputs(self): ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl -@@ -26,7 +26,7 @@ using {{namespace}}FunctionMap = HashMap - - static {{namespace}}FunctionMap* g_{{namespace|lower}}_constructors = nullptr; - --{% for tag in tags|sort if not tag.noConstructor %} -+{% for tag in tags|sort(attribute='name') if not tag.noConstructor %} - static {{namespace}}Element* {{namespace}}{{tag.name.to_upper_camel_case()}}Constructor( - Document& document, const CreateElementFlags flags) { - {% if tag.runtimeEnabled %} -@@ -52,7 +52,7 @@ static void Create{{namespace}}FunctionM - // Empty array initializer lists are illegal [dcl.init.aggr] and will not - // compile in MSVC. If tags list is empty, add check to skip this. - static const Create{{namespace}}FunctionMapData data[] = { -- {% for tag in tags|sort if not tag.noConstructor %} -+ {% for tag in tags|sort(attribute='name') if not tag.noConstructor %} - { {{cpp_namespace}}::{{tag|symbol}}Tag, {{namespace}}{{tag.name.to_upper_camel_case()}}Constructor }, - {% endfor %} - }; ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.cc.tmpl -@@ -22,7 +22,7 @@ HTMLTypeMap CreateHTMLTypeMap() { - const char* name; - HTMLElementType type; - } kTags[] = { -- {% for tag in tags|sort %} -+ {% for tag in tags|sort(attribute='name') %} - { "{{tag.name}}", HTMLElementType::k{{tag.js_interface}} }, - {% endfor %} - }; -@@ -42,7 +42,7 @@ HTMLElementType htmlElementTypeForTag(co - if (it == html_type_map.end()) - return HTMLElementType::kHTMLUnknownElement; - -- {% for tag in tags|sort %} -+ {% for tag in tags|sort(attribute='name') %} - {% if tag.runtimeEnabled %} - if (tagName == "{{tag.name}}") { - if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled(document->GetExecutionContext())) { ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl -@@ -15,7 +15,7 @@ namespace blink { - class Document; - - // Type checking. --{% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} -+{% for tag in tags|sort(attribute='name') if not tag.multipleTagNames and not tag.noTypeHelpers %} - class {{tag.interface}}; - template <> - inline bool IsElementOfType(const Node& node) { ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl -@@ -25,7 +25,7 @@ - - - {% macro trie_leaf(index, object, return_macro, lowercase_data) %} --{% set name, value = object.items()[0] %} -+{% set name, value = (object.items()|list)[0] %} - {% if name|length %} - if ( - {%- for c in name -%} -@@ -45,7 +45,7 @@ return {{ return_macro(value) }}; - - - {% macro trie_switch(trie, index, return_macro, lowercase_data) %} --{% if trie|length == 1 and trie.values()[0] is string %} -+{% if trie|length == 1 and (trie.values()|list)[0] is string %} - {{ trie_leaf(index, trie, return_macro, lowercase_data) -}} - {% else %} - {% if lowercase_data %} ---- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl -+++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl -@@ -24,12 +24,12 @@ namespace {{cpp_namespace}} { - {{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceURI; - - // Tags --{% for tag in tags|sort %} -+{% for tag in tags|sort(attribute='name') %} - {{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}Tag; - {% endfor %} - - // Attributes --{% for attr in attrs|sort %} -+{% for attr in attrs|sort(attribute='name') %} - {{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr; - {% endfor %} - ---- a/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py -+++ b/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py -@@ -201,6 +201,10 @@ def _compute_python_dependencies(root_di - - paths = set() - for path in module_paths: -+ # Builtin/namespaced modules may return None for the file path. -+ if not path: -+ continue -+ - path = os.path.abspath(path) - - if not path.startswith(root_dir): ---- a/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn -+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn -@@ -2,6 +2,8 @@ - # Use of this source code is governed by a BSD-style license that can be - # found in the LICENSE file. - -+import("//build/config/python.gni") -+ - import("//third_party/blink/public/public_features.gni") - import("./all_devtools_files.gni") - import("./all_devtools_modules.gni") ---- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py -+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py -@@ -45,7 +45,8 @@ def rollup(input_path, output_path, file - ['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] + - ['--plugin', rollup_plugin], - stdout=subprocess.PIPE, -- stderr=subprocess.PIPE) -+ stderr=subprocess.PIPE, -+ text=True) - out, error = rollup_process.communicate() - if not out: - raise Exception("rollup failed: " + error) ---- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py -+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py -@@ -10,7 +10,7 @@ Builds applications in release mode: - and the application loader into a single script. - """ - --from cStringIO import StringIO -+from io import StringIO - from os import path - from os.path import join - import copy -@@ -145,8 +145,7 @@ class ReleaseBuilder(object): - resource_content = read_file(path.join(self.application_dir, resource_name)) - if not (resource_name.endswith('.html') - or resource_name.endswith('md')): -- resource_content += resource_source_url(resource_name).encode( -- 'utf-8') -+ resource_content += resource_source_url(resource_name) - resource_content = resource_content.replace('\\', '\\\\') - resource_content = resource_content.replace('\n', '\\n') - resource_content = resource_content.replace('"', '\\"') -@@ -173,7 +172,9 @@ class ReleaseBuilder(object): - def _concatenate_application_script(self, output): - output.write('Root.allDescriptors.push(...%s);' % self._release_module_descriptors()) - if self.descriptors.extends: -- output.write('Root.applicationDescriptor.modules.push(...%s);' % json.dumps(self.descriptors.application.values())) -+ output.write( -+ 'Root.applicationDescriptor.modules.push(...%s);' % -+ json.dumps(list(self.descriptors.application.values()))) - else: - output.write('Root.applicationDescriptor = %s;' % self.descriptors.application_json()) - ---- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py -+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py -@@ -123,7 +123,7 @@ def main(argv): - - try: - os.makedirs(path.join(output_directory, 'Images')) -- except OSError, e: -+ except OSError as e: - if e.errno != errno.EEXIST: - raise e - -@@ -147,7 +147,7 @@ def main(argv): - shutil.copy(path.join(dirname, filename), path.join(output_directory, 'Images')) - add_file_to_grd(doc, path.join('Images', filename)) - -- with open(parsed_args.output_filename, 'w') as output_file: -+ with open(parsed_args.output_filename, 'wb') as output_file: - output_file.write(doc.toxml(encoding='UTF-8')) - - ---- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py -+++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py -@@ -7,6 +7,8 @@ - Utilities for the modular DevTools build. - """ - -+from __future__ import print_function -+ - import collections - from os import path - import os -@@ -40,7 +42,7 @@ def load_and_parse_json(filename): - try: - return json.loads(read_file(filename)) - except: -- print 'ERROR: Failed to parse %s' % filename -+ print('ERROR: Failed to parse %s' % filename) - raise - - class Descriptors: -@@ -57,7 +59,7 @@ class Descriptors: - - def application_json(self): - result = dict() -- result['modules'] = self.application.values() -+ result['modules'] = list(self.application.values()) - return json.dumps(result) - - def all_compiled_files(self): ---- a/src/3rdparty/chromium/third_party/jinja2/tests.py -+++ b/src/3rdparty/chromium/third_party/jinja2/tests.py -@@ -10,7 +10,7 @@ - """ - import operator - import re --from collections import Mapping -+from collections.abc import Mapping - from jinja2.runtime import Undefined - from jinja2._compat import text_type, string_types, integer_types - import decimal ---- a/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py -+++ b/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py -@@ -48,9 +48,10 @@ def ReadFilteredData(path): - data = ukm_model.UKM_XML_TYPE.Parse(ukm_file.read()) - event_tag = ukm_model._EVENT_TYPE.tag - metric_tag = ukm_model._METRIC_TYPE.tag -- data[event_tag] = filter(ukm_model.IsNotObsolete, data[event_tag]) -+ data[event_tag] = list(filter(ukm_model.IsNotObsolete, data[event_tag])) - for event in data[event_tag]: -- event[metric_tag] = filter(ukm_model.IsNotObsolete, event[metric_tag]) -+ event[metric_tag] = list( -+ filter(ukm_model.IsNotObsolete, event[metric_tag])) - return data - - ---- a/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py -+++ b/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py -@@ -45,12 +45,15 @@ Example Output: ./ui/ozone/generate_cons - } // namespace ui - """ - -+try: -+ from StringIO import StringIO # for Python 2 -+except ImportError: -+ from io import StringIO # for Python 3 - import optparse - import os - import collections - import re - import sys --import string - - - def GetTypedefName(typename): -@@ -68,7 +71,7 @@ def GetConstructorName(typename, platfor - This is just "Create" + typename + platform. - """ - -- return 'Create' + typename + string.capitalize(platform) -+ return 'Create' + typename + platform.capitalize() - - - def GenerateConstructorList(out, namespace, export, typenames, platforms, -@@ -163,12 +166,14 @@ def main(argv): - sys.exit(1) - - # Write to standard output or file specified by --output_cc. -- out_cc = sys.stdout -+ out_cc = getattr(sys.stdout, 'buffer', sys.stdout) - if options.output_cc: - out_cc = open(options.output_cc, 'wb') - -- GenerateConstructorList(out_cc, options.namespace, options.export, -+ out_cc_str = StringIO() -+ GenerateConstructorList(out_cc_str, options.namespace, options.export, - typenames, platforms, includes, usings) -+ out_cc.write(out_cc_str.getvalue().encode('utf-8')) - - if options.output_cc: - out_cc.close() ---- a/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py -+++ b/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py -@@ -49,12 +49,15 @@ Example Output: ./generate_ozone_platfor - - """ - -+try: -+ from StringIO import StringIO # for Python 2 -+except ImportError: -+ from io import StringIO # for Python 3 - import optparse - import os - import collections - import re - import sys --import string - - - def GetConstantName(name): -@@ -63,7 +66,7 @@ def GetConstantName(name): - We just capitalize the platform name and prepend "CreateOzonePlatform". - """ - -- return 'kPlatform' + string.capitalize(name) -+ return 'kPlatform' + name.capitalize() - - - def GeneratePlatformListText(out, platforms): -@@ -149,9 +152,9 @@ def main(argv): - platforms.insert(0, options.default) - - # Write to standard output or file specified by --output_{cc,h}. -- out_cc = sys.stdout -- out_h = sys.stdout -- out_txt = sys.stdout -+ out_cc = getattr(sys.stdout, 'buffer', sys.stdout) -+ out_h = getattr(sys.stdout, 'buffer', sys.stdout) -+ out_txt = getattr(sys.stdout, 'buffer', sys.stdout) - if options.output_cc: - out_cc = open(options.output_cc, 'wb') - if options.output_h: -@@ -159,9 +162,16 @@ def main(argv): - if options.output_txt: - out_txt = open(options.output_txt, 'wb') - -- GeneratePlatformListText(out_txt, platforms) -- GeneratePlatformListHeader(out_h, platforms) -- GeneratePlatformListSource(out_cc, platforms) -+ out_txt_str = StringIO() -+ out_h_str = StringIO() -+ out_cc_str = StringIO() -+ -+ GeneratePlatformListText(out_txt_str, platforms) -+ out_txt.write(out_txt_str.getvalue().encode('utf-8')) -+ GeneratePlatformListHeader(out_h_str, platforms) -+ out_h.write(out_h_str.getvalue().encode('utf-8')) -+ GeneratePlatformListSource(out_cc_str, platforms) -+ out_cc.write(out_cc_str.getvalue().encode('utf-8')) - - if options.output_cc: - out_cc.close() diff --git a/debian/patches/ffmpeg-x86-optimization.patch b/debian/patches/ffmpeg-x86-optimization.patch deleted file mode 100644 index cff8df9a43..0000000000 --- a/debian/patches/ffmpeg-x86-optimization.patch +++ /dev/null @@ -1,64 +0,0 @@ -Description: avcodec/x86/mathops: clip constants used with shift instructions within inline assembly - Fixes assembling with gas from binutils >= 2.41. -Origin: upstream, https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/effadce6c756247e -Bug: https://bugs.debian.org/1038132 -Last-Update: 2023-07-21 - ---- a/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h -+++ b/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h -@@ -35,12 +35,20 @@ - static av_always_inline av_const int MULL(int a, int b, unsigned shift) - { - int rt, dummy; -+ if (__builtin_constant_p(shift)) - __asm__ ( - "imull %3 \n\t" - "shrdl %4, %%edx, %%eax \n\t" - :"=a"(rt), "=d"(dummy) -- :"a"(a), "rm"(b), "ci"((uint8_t)shift) -+ :"a"(a), "rm"(b), "i"(shift & 0x1F) - ); -+ else -+ __asm__ ( -+ "imull %3 \n\t" -+ "shrdl %4, %%edx, %%eax \n\t" -+ :"=a"(rt), "=d"(dummy) -+ :"a"(a), "rm"(b), "c"((uint8_t)shift) -+ ); - return rt; - } - -@@ -113,19 +121,31 @@ __asm__ volatile(\ - // avoid +32 for shift optimization (gcc should do that ...) - #define NEG_SSR32 NEG_SSR32 - static inline int32_t NEG_SSR32( int32_t a, int8_t s){ -+ if (__builtin_constant_p(s)) - __asm__ ("sarl %1, %0\n\t" - : "+r" (a) -- : "ic" ((uint8_t)(-s)) -+ : "i" (-s & 0x1F) - ); -+ else -+ __asm__ ("sarl %1, %0\n\t" -+ : "+r" (a) -+ : "c" ((uint8_t)(-s)) -+ ); - return a; - } - - #define NEG_USR32 NEG_USR32 - static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ -+ if (__builtin_constant_p(s)) - __asm__ ("shrl %1, %0\n\t" - : "+r" (a) -- : "ic" ((uint8_t)(-s)) -+ : "i" (-s & 0x1F) - ); -+ else -+ __asm__ ("shrl %1, %0\n\t" -+ : "+r" (a) -+ : "c" ((uint8_t)(-s)) -+ ); - return a; - } - diff --git a/debian/patches/fix-example-pro-files.patch b/debian/patches/fix-example-pro-files.patch index 9e2f158df8..9129b255ad 100644 --- a/debian/patches/fix-example-pro-files.patch +++ b/debian/patches/fix-example-pro-files.patch @@ -1,5 +1,5 @@ Description: Fix example .pro files so that they build correctly on Debian. -Author: Soren Stoutner +Author: Soren Stoutner Forwarded: not-needed Last-Update: 2023-07-04 diff --git a/debian/patches/fix-regexp-loongarch64-stack-check.patch b/debian/patches/fix-regexp-loongarch64-stack-check.patch new file mode 100644 index 0000000000..ed50d28d3d --- /dev/null +++ b/debian/patches/fix-regexp-loongarch64-stack-check.patch @@ -0,0 +1,50 @@ +From: https://github.com/v8/v8/commit/1ec3c714bf75f01e +From: lichenggang +Date: Mon, 28 Aug 2024 08:44:28 +0800 +Subject: [PATCH] fix egexp loongarch64 stack check + + + +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.cc ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.cc +@@ -669,6 +669,7 @@ Handle RegExpMacroAssemblerL + + ExternalReference stack_limit = + ExternalReference::address_of_jslimit(masm_->isolate()); ++ Operand extra_space_for_variables(num_registers_ * kSystemPointerSize); + __ li(a0, Operand(stack_limit)); + __ Ld_d(a0, MemOperand(a0, 0)); + __ Sub_d(a0, sp, a0); +@@ -1135,7 +1136,7 @@ int64_t RegExpMacroAssemblerLA64::CheckS + return_address, re_code, + frame_entry_address
(re_frame, kInputString), + frame_entry_address(re_frame, kInputStart), +- frame_entry_address(re_frame, kInputEndOffset), ++ frame_entry_address(re_frame, kInputEnd), + extra_space); + } + +@@ -1212,7 +1213,6 @@ void RegExpMacroAssemblerLA64::CheckPree + // Check for preemption. + ExternalReference stack_limit = + ExternalReference::address_of_jslimit(masm_->isolate()); +- Operand extra_space_for_variables(num_registers_ * kSystemPointerSize); + __ li(a0, Operand(stack_limit)); + __ Ld_d(a0, MemOperand(a0, 0)); + SafeCall(&check_preempt_label_, ls, sp, Operand(a0)); +@@ -1253,3 +1253,4 @@ void RegExpMacroAssemblerLA64::LoadCurre + } // namespace internal + } // namespace v8 + ++#endif //V8_TARGET_ARCH_LOONGARCH64 +--- qtwebengine-opensource-src-5.15.17+dfsg.orig/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.h ++++ qtwebengine-opensource-src-5.15.17+dfsg/src/3rdparty/chromium/v8/src/regexp/loongarch64/regexp-macro-assembler-loongarch64.h +@@ -132,7 +132,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssem + + // Generate a call to CheckStackGuardState. + void CallCheckStackGuardState(Register scratch, +- Operand extra_space = Operand(0)); ++ Operand extra_space_for_variables = Operand(0)); + // The ebp-relative location of a regexp register. + MemOperand register_location(int register_index); + diff --git a/debian/patches/icu74.patch b/debian/patches/icu74.patch deleted file mode 100644 index 3ac7c6ce02..0000000000 --- a/debian/patches/icu74.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: fix static_assert failure with ICU 74 -Origin: Gentoo, https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-qt/qtwebengine/files/qtwebengine-6.5.3-icu74.patch -Last-Update: 2023-12-25 - ---- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc -+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc -@@ -162,7 +162,9 @@ static const unsigned char kAsciiLineBre - }; - // clang-format on - --#if U_ICU_VERSION_MAJOR_NUM >= 58 -+#if U_ICU_VERSION_MAJOR_NUM >= 74 -+#define BA_LB_COUNT (U_LB_COUNT - 8) -+#elif U_ICU_VERSION_MAJOR_NUM >= 58 - #define BA_LB_COUNT (U_LB_COUNT - 3) - #else - #define BA_LB_COUNT U_LB_COUNT diff --git a/debian/patches/mips64el-no-dav1d.patch b/debian/patches/mips64el-no-dav1d.patch index e3bbab501f..8572fcefeb 100644 --- a/debian/patches/mips64el-no-dav1d.patch +++ b/debian/patches/mips64el-no-dav1d.patch @@ -1,7 +1,7 @@ Description: disable dav1d support on mipsel/mips64el dav1d does not support MIPS, and there is no config directory for it. Author: Dmitry Shachnev -Forwarded: no +Forwarded: not-needed Last-Update: 2021-02-14 --- a/src/3rdparty/chromium/media/media_options.gni diff --git a/debian/patches/mips64el-ptrace-include.patch b/debian/patches/mips64el-ptrace-include.patch index 6c8814f0c8..a18c9bd970 100644 --- a/debian/patches/mips64el-ptrace-include.patch +++ b/debian/patches/mips64el-ptrace-include.patch @@ -1,6 +1,6 @@ Description: on mipsel PTRACE_GET_THREAD_AREA is defined in asm/ptrace.h Author: Dmitry Shachnev -Forwarded: no +Forwarded: not-needed Last-Update: 2020-03-17 --- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc diff --git a/debian/patches/mips64el-v8-regexp.patch b/debian/patches/mips64el-v8-regexp.patch new file mode 100644 index 0000000000..8be9480146 --- /dev/null +++ b/debian/patches/mips64el-v8-regexp.patch @@ -0,0 +1,140 @@ +Description: fix stack check in native code when interrupt was requested +Origin: upstream v8, commits: + - https://github.com/v8/v8/commit/3ebf2052a1b27039 + - https://github.com/v8/v8/commit/1ec3c714bf75f01e +Last-Update: 2024-07-04 + +--- a/src/3rdparty/chromium/v8/src/codegen/mips64/assembler-mips64.h ++++ b/src/3rdparty/chromium/v8/src/codegen/mips64/assembler-mips64.h +@@ -69,7 +69,6 @@ class Operand { + : rm_(no_reg), rmode_(RelocInfo::EXTERNAL_REFERENCE) { + value_.immediate = static_cast(f.address()); + } +- V8_INLINE explicit Operand(const char* s); + explicit Operand(Handle handle); + V8_INLINE explicit Operand(Smi value) : rm_(no_reg), rmode_(RelocInfo::NONE) { + value_.immediate = static_cast(value.ptr()); +--- a/src/3rdparty/chromium/v8/src/regexp/mips64/regexp-macro-assembler-mips64.cc ++++ b/src/3rdparty/chromium/v8/src/regexp/mips64/regexp-macro-assembler-mips64.cc +@@ -698,6 +698,8 @@ Handle RegExpMacroAssemblerM + + ExternalReference stack_limit = + ExternalReference::address_of_jslimit(masm_->isolate()); ++ Operand extra_space_for_variables(num_registers_ * kPointerSize); ++ + __ li(a0, Operand(stack_limit)); + __ Ld(a0, MemOperand(a0)); + __ Dsubu(a0, sp, a0); +@@ -705,14 +707,14 @@ Handle RegExpMacroAssemblerM + __ Branch(&stack_limit_hit, le, a0, Operand(zero_reg)); + // Check if there is room for the variable number of registers above + // the stack limit. +- __ Branch(&stack_ok, hs, a0, Operand(num_registers_ * kPointerSize)); ++ __ Branch(&stack_ok, hs, a0, extra_space_for_variables); + // Exit with OutOfMemory exception. There is not enough space on the stack + // for our working registers. + __ li(v0, Operand(EXCEPTION)); + __ jmp(&return_v0); + + __ bind(&stack_limit_hit); +- CallCheckStackGuardState(a0); ++ CallCheckStackGuardState(a0, extra_space_for_variables); + // If returned value is non-zero, we exit with the returned value as result. + __ Branch(&return_v0, ne, v0, Operand(zero_reg)); + +@@ -1122,7 +1124,8 @@ bool RegExpMacroAssemblerMIPS::CanReadUn + + // Private methods: + +-void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) { ++void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch, ++ Operand extra_space) { + DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins()); + DCHECK(!masm_->options().isolate_independent_code); + +@@ -1135,6 +1138,9 @@ void RegExpMacroAssemblerMIPS::CallCheck + __ And(sp, sp, Operand(-stack_alignment)); + __ Sd(scratch, MemOperand(sp)); + ++ // Extra space for variables to consider in stack check. ++ __ li(a3, extra_space); ++ // RegExp code frame pointer. + __ mov(a2, frame_pointer()); + // Code of self. + __ li(a1, Operand(masm_->CodeObject()), CONSTANT_SIZE); +@@ -1143,16 +1149,6 @@ void RegExpMacroAssemblerMIPS::CallCheck + DCHECK(IsAligned(stack_alignment, kPointerSize)); + __ Dsubu(sp, sp, Operand(stack_alignment)); + +- // The stack pointer now points to cell where the return address will be +- // written. Arguments are in registers, meaning we treat the return address as +- // argument 5. Since DirectCEntry will handle allocating space for the C +- // argument slots, we don't need to care about that here. This is how the +- // stack will look (sp meaning the value of sp at this moment): +- // [sp + 3] - empty slot if needed for alignment. +- // [sp + 2] - saved sp. +- // [sp + 1] - second word reserved for return value. +- // [sp + 0] - first word reserved for return value. +- + // a0 will point to the return address, placed by DirectCEntry. + __ mov(a0, sp); + +@@ -1166,17 +1162,6 @@ void RegExpMacroAssemblerMIPS::CallCheck + __ li(kScratchReg, Operand(entry, RelocInfo::OFF_HEAP_TARGET)); + __ Call(kScratchReg); + +- // DirectCEntry allocated space for the C argument slots so we have to +- // drop them with the return address from the stack with loading saved sp. +- // At this point stack must look: +- // [sp + 7] - empty slot if needed for alignment. +- // [sp + 6] - saved sp. +- // [sp + 5] - second word reserved for return value. +- // [sp + 4] - first word reserved for return value. +- // [sp + 3] - C argument slot. +- // [sp + 2] - C argument slot. +- // [sp + 1] - C argument slot. +- // [sp + 0] - C argument slot. + __ Ld(sp, MemOperand(sp, stack_alignment + kCArgsSlotsSize)); + + __ li(code_pointer(), Operand(masm_->CodeObject())); +@@ -1197,7 +1182,8 @@ static T* frame_entry_address(Address re + + int64_t RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address, + Address raw_code, +- Address re_frame) { ++ Address re_frame, ++ uintptr_t extra_space) { + Code re_code = Code::cast(Object(raw_code)); + return NativeRegExpMacroAssembler::CheckStackGuardState( + frame_entry(re_frame, kIsolate), +@@ -1207,7 +1193,8 @@ int64_t RegExpMacroAssemblerMIPS::CheckS + return_address, re_code, + frame_entry_address
(re_frame, kInputString), + frame_entry_address(re_frame, kInputStart), +- frame_entry_address(re_frame, kInputEnd)); ++ frame_entry_address(re_frame, kInputEnd), ++ extra_space); + } + + +--- a/src/3rdparty/chromium/v8/src/regexp/mips64/regexp-macro-assembler-mips64.h ++++ b/src/3rdparty/chromium/v8/src/regexp/mips64/regexp-macro-assembler-mips64.h +@@ -90,7 +90,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssem + // returning. + // {raw_code} is an Address because this is called via ExternalReference. + static int64_t CheckStackGuardState(Address* return_address, Address raw_code, +- Address re_frame); ++ Address re_frame, uintptr_t extra_space); + + void print_regexp_frame_constants(); + +@@ -140,7 +140,8 @@ class V8_EXPORT_PRIVATE RegExpMacroAssem + + + // Generate a call to CheckStackGuardState. +- void CallCheckStackGuardState(Register scratch); ++ void CallCheckStackGuardState(Register scratch, ++ Operand extra_space = Operand(0)); + + // The ebp-relative location of a regexp register. + MemOperand register_location(int register_index); diff --git a/debian/patches/ninja-1.12.patch b/debian/patches/ninja-1.12.patch new file mode 100644 index 0000000000..df2b1b2b9d --- /dev/null +++ b/debian/patches/ninja-1.12.patch @@ -0,0 +1,47 @@ +Description: Build with Ninja 1.12. +Author: Soren Stoutner +Forwarded: Cherry-picked from upstream. +Origin: upstream, https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/555586 +Origin: upstream, https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/560295 +Last-Update: 2024-05-22 + +--- a/src/3rdparty/chromium/content/public/browser/BUILD.gn ++++ b/src/3rdparty/chromium/content/public/browser/BUILD.gn +@@ -469,6 +469,7 @@ jumbo_source_set("browser_sources") { + "//build:chromeos_buildflags", + "//cc", + "//components/viz/host", ++ "//components/spellcheck:buildflags", + "//content/browser", # Must not be public_deps! + "//device/fido", + "//gpu", +--- a/src/3rdparty/chromium/components/history/core/browser/BUILD.gn ++++ b/src/3rdparty/chromium/components/history/core/browser/BUILD.gn +@@ -105,6 +105,7 @@ static_library("browser") { + "//components/keyed_service/core", + "//components/prefs", + "//components/query_parser", ++ "//components/signin/public/base:signin_buildflags", + "//components/signin/public/identity_manager", + "//components/sync", + "//components/url_formatter", +--- a/src/3rdparty/chromium/components/webcrypto/BUILD.gn ++++ b/src/3rdparty/chromium/components/webcrypto/BUILD.gn +@@ -62,6 +62,7 @@ static_library("webcrypto") { + "//crypto", + "//crypto:platform", + "//third_party/blink/public:blink_headers", ++ "//third_party/blink/renderer/platform/heap:heap", + ] + } + +--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/BUILD.gn ++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/BUILD.gn +@@ -121,6 +121,7 @@ blink_platform_sources("heap") { + } + + visibility = [ ++ "//components/webcrypto:webcrypto", + "//third_party/blink/renderer/platform:platform", + "//third_party/blink/renderer/platform/instrumentation:instrumentation", + "//third_party/blink/renderer/platform/loader:loader", diff --git a/debian/patches/python3.11.patch b/debian/patches/python3.11.patch deleted file mode 100644 index 37c040ec70..0000000000 --- a/debian/patches/python3.11.patch +++ /dev/null @@ -1,46 +0,0 @@ -Description: fix build with Python 3.11 -Author: Dmitry Shachnev -Last-Update: 2023-01-08 - ---- a/src/3rdparty/chromium/tools/grit/grit/util.py -+++ b/src/3rdparty/chromium/tools/grit/grit/util.py -@@ -211,7 +211,7 @@ def ReadFile(filename, encoding): - mode = 'rb' - encoding = None - else: -- mode = 'rU' -+ mode = 'r' - - with io.open(abs(filename), mode, encoding=encoding) as f: - return f.read() ---- a/src/3rdparty/chromium/tools/metrics/structured/model.py -+++ b/src/3rdparty/chromium/tools/metrics/structured/model.py -@@ -26,7 +26,7 @@ _METRIC_TYPE = models.ObjectNodeType( - 'metric', - attributes=[ - ('name', unicode, r'^[A-Za-z0-9_.]+$'), -- ('kind', unicode, r'^(?i)(|hashed-string|int)$'), -+ ('kind', unicode, r'(?i)^(|hashed-string|int)$'), - ], - alphabetization=[ - (_OBSOLETE_TYPE.tag, lambda _: 1), ---- a/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py -+++ b/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py -@@ -42,7 +42,7 @@ _INDEX_TYPE = models.ObjectNodeType( - _STATISTICS_TYPE = models.ObjectNodeType( - 'statistics', - attributes=[ -- ('export', str, r'^(?i)(|true|false)$'), -+ ('export', str, r'(?i)^(|true|false)$'), - ], - children=[ - models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False), -@@ -94,7 +94,7 @@ _EVENT_TYPE = models.ObjectNodeType( - 'event', - attributes=[ - ('name', str, r'^[A-Za-z0-9.]+$'), -- ('singular', str, r'^(?i)(|true|false)$'), -+ ('singular', str, r'(?i)^(|true|false)$'), - ], - alphabetization=[ - (_OBSOLETE_TYPE.tag, _KEEP_ORDER), diff --git a/debian/patches/python3.12-imp.patch b/debian/patches/python3.12-imp.patch new file mode 100644 index 0000000000..b879e3ee9d --- /dev/null +++ b/debian/patches/python3.12-imp.patch @@ -0,0 +1,24 @@ +Description: stop using imp module which was removed in Python 3.12 +Origin: upstream, https://chromium.googlesource.com/chromium/src/+/f5f6e361d037c316 +Last-Update: 2024-06-30 + +--- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/fileutil.py ++++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/fileutil.py +@@ -3,7 +3,6 @@ + # found in the LICENSE file. + + import errno +-import imp + import os.path + import sys + +--- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py ++++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py +@@ -2,7 +2,6 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-import imp + import os.path + import sys + diff --git a/debian/patches/python3.12-six.patch b/debian/patches/python3.12-six.patch new file mode 100644 index 0000000000..f1f5ae143c --- /dev/null +++ b/debian/patches/python3.12-six.patch @@ -0,0 +1,56 @@ +Description: implement find_spec() for _SixMetaPathImporter +Origin: upstream, https://github.com/benjaminp/six/commit/25916292d96f5f09 +Last-Update: 2024-03-17 + +--- a/src/3rdparty/chromium/third_party/protobuf/third_party/six/six.py ++++ b/src/3rdparty/chromium/third_party/protobuf/third_party/six/six.py +@@ -71,6 +71,11 @@ else: + MAXSIZE = int((1 << 63) - 1) + del X + ++if PY34: ++ from importlib.util import spec_from_loader ++else: ++ spec_from_loader = None ++ + + def _add_doc(func, doc): + """Add documentation to a function.""" +@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object): + return self + return None + ++ def find_spec(self, fullname, path, target=None): ++ if fullname in self.known_modules: ++ return spec_from_loader(fullname, self) ++ return None ++ + def __get_module(self, fullname): + try: + return self.known_modules[fullname] +--- a/src/3rdparty/chromium/tools/grit/third_party/six/__init__.py ++++ b/src/3rdparty/chromium/tools/grit/third_party/six/__init__.py +@@ -71,6 +71,11 @@ else: + MAXSIZE = int((1 << 63) - 1) + del X + ++if PY34: ++ from importlib.util import spec_from_loader ++else: ++ spec_from_loader = None ++ + + def _add_doc(func, doc): + """Add documentation to a function.""" +@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object): + return self + return None + ++ def find_spec(self, fullname, path, target=None): ++ if fullname in self.known_modules: ++ return spec_from_loader(fullname, self) ++ return None ++ + def __get_module(self, fullname): + try: + return self.known_modules[fullname] diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch deleted file mode 100644 index 1ed6e4c062..0000000000 --- a/debian/patches/python3.patch +++ /dev/null @@ -1,159 +0,0 @@ -Description: replace Python 2 with Python 3 in the build system -Author: Dmitry Shachnev -Last-Update: 2022-11-25 -Forwarded: not-needed - ---- a/configure.pri -+++ b/configure.pri -@@ -6,23 +6,6 @@ QTWEBENGINE_SOURCE_TREE = $$PWD - - equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe - --defineTest(isPythonVersionSupported) { -- python = $$system_quote($$system_path($$1)) -- python_version = $$system('$$python -c "import sys; print(sys.version_info[0:3])"') -- python_version ~= s/[()]//g -- python_version = $$split(python_version, ',') -- python_major_version = $$first(python_version) -- greaterThan(python_major_version, 2) { -- qtLog("Python version 3 is not supported by Chromium.") -- return(false) -- } -- python_minor_version = $$member(python_version, 1) -- python_patch_version = $$member(python_version, 2) -- greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true) -- qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.") -- return(false) --} -- - defineTest(qtConfTest_detectJumboBuild) { - mergeLimit = $$eval(config.input.merge_limit) - mergeLimit = $$find(mergeLimit, "\\d") -@@ -52,22 +35,18 @@ defineTest(qtConfReport_jumboBuild) { - qtConfReportPadded($${1}, $$mergeLimit) - } - --defineTest(qtConfTest_detectPython2) { -- python = $$qtConfFindInPath("python2$$EXE_SUFFIX") -+defineTest(qtConfTest_detectPython3) { -+ python = $$qtConfFindInPath("python3$$EXE_SUFFIX") - isEmpty(python) { -- qtLog("'python2$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.") -+ qtLog("'python3$$EXE_SUFFIX' not found in PATH. Checking for 'python$$EXE_SUFFIX'.") - python = $$qtConfFindInPath("python$$EXE_SUFFIX") - } - isEmpty(python) { - qtLog("'python$$EXE_SUFFIX' not found in PATH. Giving up.") - return(false) - } -- !isPythonVersionSupported($$python) { -- qtLog("A suitable Python 2 executable could not be located.") -- return(false) -- } - -- # Make tests.python2.location available in configure.json. -+ # Make tests.python3.location available in configure.json. - $${1}.location = $$clean_path($$python) - export($${1}.location) - $${1}.cache += location ---- a/mkspecs/features/functions.prf -+++ b/mkspecs/features/functions.prf -@@ -44,11 +44,11 @@ defineReplace(which) { - - # Returns the unquoted path to the python executable. - defineReplace(pythonPath) { -- isEmpty(QMAKE_PYTHON2) { -+ isEmpty(QMAKE_PYTHON3) { - # Fallback for building QtWebEngine with Qt < 5.8 -- QMAKE_PYTHON2 = python -+ QMAKE_PYTHON3 = python - } -- return($$QMAKE_PYTHON2) -+ return($$QMAKE_PYTHON3) - } - - # Returns the python executable for use with shell / make targets. ---- a/src/buildtools/config/support.pri -+++ b/src/buildtools/config/support.pri -@@ -21,7 +21,7 @@ defineReplace(qtwebengine_checkWebEngine - !qtwebengine_checkForGperf(QtWebEngine):return(false) - !qtwebengine_checkForBison(QtWebEngine):return(false) - !qtwebengine_checkForFlex(QtWebEngine):return(false) -- !qtwebengine_checkForPython2(QtWebEngine):return(false) -+ !qtwebengine_checkForPython3(QtWebEngine):return(false) - !qtwebengine_checkForNodejs(QtWebEngine):return(false) - !qtwebengine_checkForSanitizer(QtWebEngine):return(false) - linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false) -@@ -51,7 +51,7 @@ defineReplace(qtwebengine_checkPdfError) - !qtwebengine_checkForGperf(QtPdf):return(false) - !qtwebengine_checkForBison(QtPdf):return(false) - !qtwebengine_checkForFlex(QtPdf):return(false) -- !qtwebengine_checkForPython2(QtPdf):return(false) -+ !qtwebengine_checkForPython3(QtPdf):return(false) - !qtwebengine_checkForSanitizer(QtPdf):return(false) - linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false) - linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false) -@@ -143,10 +143,10 @@ defineTest(qtwebengine_checkForFlex) { - return(true) - } - --defineTest(qtwebengine_checkForPython2) { -+defineTest(qtwebengine_checkForPython3) { - module = $$1 -- !qtConfig(webengine-python2) { -- qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.") -+ !qtConfig(webengine-python3) { -+ qtwebengine_skipBuild("Python version 3 is required to build $${module}.") - return(false) - } - return(true) ---- a/src/buildtools/configure.json -+++ b/src/buildtools/configure.json -@@ -301,9 +301,9 @@ - "label": "system ninja", - "type": "detectNinja" - }, -- "webengine-python2": { -- "label": "python2", -- "type": "detectPython2", -+ "webengine-python3": { -+ "label": "python3", -+ "type": "detectPython3", - "log": "location" - }, - "webengine-winversion": { -@@ -380,7 +380,7 @@ - && features.webengine-gperf - && features.webengine-bison - && features.webengine-flex -- && features.webengine-python2 -+ && features.webengine-python3 - && features.webengine-nodejs - && (!config.sanitizer || features.webengine-sanitizer) - && (!config.linux || features.pkg-config) -@@ -406,7 +406,7 @@ - && features.webengine-gperf - && features.webengine-bison - && features.webengine-flex -- && features.webengine-python2 -+ && features.webengine-python3 - && (!config.sanitizer || features.webengine-sanitizer) - && (!config.linux || features.pkg-config) - && (!config.linux || features.webengine-host-pkg-config) -@@ -429,12 +429,12 @@ - "autoDetect": "features.private_tests", - "output": [ "privateFeature" ] - }, -- "webengine-python2": { -- "label": "python2", -- "condition": "tests.webengine-python2", -+ "webengine-python3": { -+ "label": "python3", -+ "condition": "tests.webengine-python3", - "output": [ - "privateFeature", -- { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } -+ { "type": "varAssign", "name": "QMAKE_PYTHON3", "value": "tests.webengine-python3.location" } - ] - }, - "webengine-gperf": { diff --git a/debian/patches/sandbox-time64-syscalls.patch b/debian/patches/sandbox-time64-syscalls.patch index 092fb37b56..d3a325f08a 100644 --- a/debian/patches/sandbox-time64-syscalls.patch +++ b/debian/patches/sandbox-time64-syscalls.patch @@ -2,7 +2,7 @@ Description: fix seccomp-bpf failures in syscall 422 (futex_time64) glibc 2.33 and newer uses this syscall on 32-bit platforms: https://sourceware.org/git/?p=glibc.git;a=commit;h=29e9874a048f47e2 Author: Fabian Vogt -Forwarded: no +Forwarded: not-needed Last-Update: 2022-11-25 --- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc diff --git a/debian/patches/series b/debian/patches/series index 9fb77685f1..31eb382904 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,9 +5,8 @@ system-nspr-prtime.patch system-icu-utf.patch # Fix python problems. -python3.patch -chromium-python3.patch -python3.11.patch +python3.12-imp.patch +python3.12-six.patch # General patches. verbose-gn-bootstrap.patch @@ -22,7 +21,7 @@ mips64el-kernel_stat64.patch armhf-no-thumb.patch disable-catapult.patch pipewire-0.3.patch -ffmpeg-x86-optimization.patch fix-example-pro-files.patch - -icu74.patch +build-with-c++17.patch +ninja-1.12.patch +mips64el-v8-regexp.patch diff --git a/debian/patches/system-openjpeg2.patch b/debian/patches/system-openjpeg2.patch index 051a9baf84..e80dee86ad 100644 --- a/debian/patches/system-openjpeg2.patch +++ b/debian/patches/system-openjpeg2.patch @@ -1,12 +1,12 @@ Description: Use system libopenjpeg2 -Author: Soren Stoutner +Author: Soren Stoutner Forwarded: https://bugreports.qt.io/browse/QTBUG-63889 Last-Update: 2023-01-28 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/buildtools/configure.json +++ b/src/buildtools/configure.json -@@ -114,6 +114,12 @@ +@@ -115,6 +115,12 @@ "-ljpeg" ] }, @@ -19,7 +19,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ "webengine-libevent": { "label": "libevent", "sources": [ -@@ -611,6 +617,11 @@ +@@ -633,6 +639,11 @@ "condition": "config.unix && features.system-jpeg && libs.webengine-jpeglib", "output": [ "privateFeature" ] }, @@ -31,7 +31,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ "webengine-qt-jpeg" : { "label": "qtlibjpeg", "condition": "config.static && !features.system-jpeg && features.jpeg", -@@ -819,6 +830,7 @@ +@@ -846,6 +857,7 @@ "webengine-system-lcms2", "webengine-system-png", "webengine-system-jpeg", @@ -41,7 +41,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ] --- a/src/buildtools/config/linux.pri +++ b/src/buildtools/config/linux.pri -@@ -164,6 +164,11 @@ +@@ -164,6 +164,11 @@ host_build { } else { gn_args += use_system_libjpeg=false } diff --git a/debian/patches/verbose-gn-bootstrap.patch b/debian/patches/verbose-gn-bootstrap.patch index 24a127ccf6..08fe84a52c 100644 --- a/debian/patches/verbose-gn-bootstrap.patch +++ b/debian/patches/verbose-gn-bootstrap.patch @@ -1,6 +1,6 @@ Description: print compiler commands, honor $NINJAJOBS when bootstrapping gn Author: Dmitry Shachnev -Forwarded: no +Forwarded: not-needed Last-Update: 2021-06-18 --- a/src/buildtools/gn.pro diff --git a/debian/rules b/debian/rules index 40c01f40f6..22f5bce01d 100755 --- a/debian/rules +++ b/debian/rules @@ -69,7 +69,7 @@ endif patch_loong64: patch -p1 < debian/patches/Port-for-loongarch64.patch - + patch -p1 < debian/patches/fix-regexp-loongarch64-stack-check.patch patch_riscv64: patch -p1 < debian/patches/add-riscv64-support.patch @@ -93,7 +93,7 @@ override_dh_auto_clean: done override_dh_auto_configure: - qmake QT_BUILD_PARTS+=tests QMAKE_EXTRA_ARGS+="$(config_args)" QMAKE_PYTHON3=python3 $(qmake_args) + qmake QT_BUILD_PARTS+=tests QMAKE_EXTRA_ARGS+="$(config_args)" QMAKE_PYTHON2=python3 $(qmake_args) # Create js files, that are needed for building step for arch and indep builds cd $(CURDIR)/src/3rdparty/chromium/third_party/jstemplate/; \ @@ -107,7 +107,11 @@ override_dh_auto_configure: touch $(CURDIR)/$${fname}; \ done - /usr/lib/qt5/bin/syncqt.pl Source -version ${DEB_VERSION_UPSTREAM:+dfsg=} + /usr/lib/qt5/bin/syncqt.pl Source -version $(word 1,$(subst +, ,$(DEB_VERSION_UPSTREAM))) + + # Link against the system version of dagre-layout. The bundled version was removed by debian/copyright. + mkdir -p src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout + ln -s /usr/share/nodejs/dagre/dist/dagre.js -t src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout override_dh_auto_build-arch: dh_auto_build -- -Onone @@ -131,7 +135,7 @@ override_dh_auto_install-arch: # Do not require matching versions of Qt dependencies set -eu && \ - VERSION=${DEB_VERSION_UPSTREAM:+dfsg=} && \ + VERSION=$(word 1,$(subst +, ,$(DEB_VERSION_UPSTREAM))) && \ QT_VERSION=$$(qmake -query QT_VERSION) && \ sed -i "s/$$VERSION /$$QT_VERSION /" debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/*/*Config.cmake @@ -169,8 +173,9 @@ endef get-orig-source: @set -eux && \ TEMPDIR=$$(mktemp -d) && \ - VERSION=${DEB_VERSION_UPSTREAM:+dfsg=} && \ - SUBMODULE_COMMIT=8df91f886e7fffb61408e2426f8a90d763a3b6ea && \ + VERSION=$(word 1,$(subst +, ,$(DEB_VERSION_UPSTREAM))) && \ + DFSG=$(word 2,$(subst +, ,$(DEB_VERSION_UPSTREAM))) && \ + SUBMODULE_COMMIT=fdfef5b37af3bed8402d7c7e20a5487f2602b0a6 && \ echo "$${GET_FILES_EXCLUDED}" >$${TEMPDIR}/get_files_excluded.py && \ cd $${TEMPDIR} && \ wget https://github.com/qt/qtwebengine/archive/v$${VERSION}-lts.tar.gz && \ @@ -184,5 +189,5 @@ get-orig-source: cd src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules && \ ls -A | grep -Ev '^(@types|rollup|typescript)$$' | xargs rm -rf && \ cd $${TEMPDIR} && \ - tar cJ --owner=root --group=root --sort=name -f $(CURDIR)/../qtwebengine-opensource-src_$${VERSION}+dfsg.orig.tar.xz qtwebengine-$${VERSION}-lts && \ + tar cJ --owner=root --group=root --sort=name -f $(CURDIR)/../qtwebengine-opensource-src_$${VERSION}+$${DFSG}.orig.tar.xz qtwebengine-$${VERSION}-lts && \ rm -rf $${TEMPDIR} diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides index 3b60993f1a..ac9a147922 100644 --- a/debian/source/lintian-overrides +++ b/debian/source/lintian-overrides @@ -10,33 +10,93 @@ qtwebengine-opensource-src source: license-problem-json-evil [src/3rdparty/chrom # The old, non-hinted Lintian syntax is required because FTP Masters is running an older version of Lintian. The following line can be removed at some point in the future. qtwebengine-opensource-src source: license-problem-json-evil src/3rdparty/chromium/third_party/angle/third_party/rapidjson/src/license.txt +# This notice file is simply a symlink to the Apache 2 LICENSE file. As no extra information is contained in the NOTICE file, the requirements are already fulfilled with the entry in debian/copyright. +qtwebengine-opensource-src source: missing-notice-file-for-apache-license [src/3rdparty/chromium/third_party/ukey2/src/NOTICE] + # Source is in debian/missing-sources/jquery-1.3.2.js, replaced by build step with self-minified version qtwebengine-opensource-src source: source-is-missing [examples/webenginewidgets/contentmanipulation/jquery.min.js] # Source is in debian/missing-sources/mocha-6.1.4 qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/mocha/mocha.js] -# Valid files, with very long lines (files are not minified) +# Source is in src/3rdparty/chromium/third_party/blink/renderer/devtools/scripts/javascript_natives/index.js +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/javascript_metadata/NativeFunctions.js] + +# Source is in src/3rdparty/chromium/components/variations/proto/devtools/client_variations_uncompiled.js +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/components/variations/proto/devtools/client_variations.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/chromium/client-variations/ClientVariations.js] + +# Source is in src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/package/dist/ +# The ideal would be to package the upstream intl-messageformat, but the embedded version in Qt5 WebEngine is very old (4.4.0 vs. 10.5.8 on 28 November 2023). +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/intl-messageformat/package/core.js] + +# this is not compiled, despite the filename +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/polymer/v3_0/components-chromium/paper-spinner/paper-spinner-lite.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/ui/webui/resources/js/jstemplate_compiled.js] + +# Valid files with very long lines (files are not minified) +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/chrome/browser/resources/omnibox/omnibox.html] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/chrome/browser/resources/signin/profile_picker/icons.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/content/browser/webrtc/resources/webrtc_internals.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/net/base/dir_header.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/axe-core/axe.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/autofill-popup-location.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/bugzilla-48077.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/contenteditable-link.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/dictionary-scrolled-iframe.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/linkjump-1.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/linkjump-2.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/linkjump-4.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/popup-width-restriction-within-screen.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/resources/testframe-link_text.html] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/win/milliondollar.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/renderer/core/testing/data/fixed_layout.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/renderer/core/testing/data/resize_scroll_fixed_layout.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/renderer/core/testing/data/resize_scroll_fixed_width.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/renderer/core/testing/data/resize_scroll_mobile.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/axe-core/axe.js] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/codemirror/package/addon/hint/html-hint.js] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/codemirror/package/mode/*] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/codemirror/package/src/util/misc.js] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/inspector_overlay/debug/*] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/typescript/lib/tsc.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/typescript/lib/tsserver.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/typescript/lib/tsserverlibrary.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/typescript/lib/typescript.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/typescript/lib/typescriptServices.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/node_modules/typescript/lib/typingsInstaller.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/google-closure-library/closure/goog/demos/textarea.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/google-closure-library/closure/goog/deps.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/google-closure-library/closure/goog/i18n/datetimesymbolsext.js] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/google-closure-library/closure/goog/ui/ac/renderer_test.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/leveldatabase/src/doc/benchmark.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/lottie/lottie_worker.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/webxr_test_pages/webxr-samples/attribution.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/webxr_test_pages/webxr-samples/explainer.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/webxr_test_pages/webxr-samples/js/webxr-polyfill.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/webxr_test_pages/webxr-samples/js/webxr-polyfill.module.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/tools/win/sizeviewer/codemirror.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/ui/accessibility/extensions/chromevoxclassic/cvox2/background/sre_browser.js] -# base64-encoded image/data, this is normal +# Valid files with lots of Unicode characters. +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/components/dom_distiller/core/html/preview.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/skia/modules/skparagraph/test.html] + +# base64-encoded or SVG image/data, this is normal +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/chrome/browser/resources/management/icons.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/chrome/browser/resources/nearby_share/shared/nearby_shared_icons.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/chrome/browser/resources/pdf/elements/icons.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/components/android_system_error_page/resources/load_error.html] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/image-resampling-with-scale.html] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/blink/manual_tests/svg-image-resampling-with-scale.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/d3/src/d3.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/lighthouse/report-assets/template.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/lighthouse/report-assets/templates.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/google-closure-library/doc/_includes/favicon.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/tools/binary_size/libsupersize/static/viewer.html] qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/tools/page_cycler/acid3/acid3.acidtests.org/index.html] - -# source is in src/3rdparty/chromium/third_party/blink/renderer/devtools/scripts/javascript_natives/index.js -qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/javascript_metadata/NativeFunctions.js] - -# source is in src/3rdparty/chromium/components/variations/proto/devtools/client_variations_uncompiled.js -qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/components/variations/proto/devtools/client_variations.js] -qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/chromium/client-variations/ClientVariations.js] - -# this is not compiled, despite the filename -qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/third_party/polymer/v3_0/components-chromium/paper-spinner/paper-spinner-lite.js] -qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/ui/webui/resources/js/jstemplate_compiled.js] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/ui/login/account_picker/chromeos_user_pod_template.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/ui/webui/resources/cr_components/chromeos/network/network_icons.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/ui/webui/resources/cr_elements/cr_fingerprint/cr_fingerprint_icon.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/ui/webui/resources/cr_elements/icons.html] +qtwebengine-opensource-src source: source-is-missing [src/3rdparty/chromium/ui/webui/resources/cr_elements/mwb_shared_icons.html] diff --git a/src/3rdparty/chromium/AUTHORS b/src/3rdparty/chromium/AUTHORS index 92f53ac669..9d61a61e57 100644 --- a/src/3rdparty/chromium/AUTHORS +++ b/src/3rdparty/chromium/AUTHORS @@ -631,6 +631,7 @@ Luke Inman-Semerau Luke Seunghoe Gu Luke Zarko Luoxi Pan +Lyra Rebane Maarten Lankhorst Magnus Danielsson Mahesh Kulkarni diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h b/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h index e77003eab2..31ac05b86f 100644 --- a/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h +++ b/src/3rdparty/chromium/base/allocator/partition_allocator/address_space_randomization.h @@ -119,6 +119,21 @@ AslrMask(uintptr_t bits) { return AslrAddress(0x20000000ULL); } + #elif defined(OS_LINUX) + + // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on + // page size and number of levels of translation pages used. We use + // 39-bit as base as all setups should support this, lowered to 38-bit + // as ASLROffset() could cause a carry. + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE uintptr_t + ASLRMask() { + return AslrMask(38); + } + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE uintptr_t + ASLROffset() { + return AslrAddress(0x1000000000ULL); + } + #else // ARM64 on Linux has 39-bit user space. Use 38 bits since ASLROffset() diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h index c42fe2835f..9e4f7b9557 100644 --- a/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h +++ b/src/3rdparty/chromium/base/allocator/partition_allocator/page_allocator_constants.h @@ -24,6 +24,31 @@ // elimination. #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) +#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) +// This should work for all POSIX (if needed), but currently all other +// supported OS/architecture combinations use either hard-coded values +// (such as x86) or have means to determine these values without needing +// atomics (such as macOS on arm64). + +// Page allocator constants are run-time constant +#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) + +#include +#include + +namespace base::internal { + +// Holds the current page size and shift, where size = 1 << shift +// Use PageAllocationGranularity(), PageAllocationGranularityShift() +// to initialize and retrieve these values safely. +struct PageCharacteristics { + std::atomic size; + std::atomic shift; +}; +extern PageCharacteristics page_characteristics; + +} // namespace base::internal + #else // When defined, page size constants are fixed at compile time. When not @@ -36,11 +61,12 @@ #endif -namespace { - -#if !defined(OS_APPLE) +namespace base { +// Forward declaration, implementation below +PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t +PageAllocationGranularity(); -constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { +PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PageAllocationGranularityShift() { #if defined(OS_WIN) || defined(ARCH_CPU_PPC64) // Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page // sizes. Since 64kB is the de facto standard on the platform and binaries @@ -49,21 +75,37 @@ constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { return 16; // 64kB #elif defined(_MIPS_ARCH_LOONGSON) return 14; // 16kB +#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) + // page sizes. Retrieve from or initialize cache. + int shift = base::internal::page_characteristics.shift.load(std::memory_order_relaxed); + if (UNLIKELY(shift == 0)) { + shift = __builtin_ctz((int)base::PageAllocationGranularity()); + base::internal::page_characteristics.shift.store(shift, std::memory_order_relaxed); + } + return shift; +#elif defined(OS_APPLE) + return vm_page_shift; #else return 12; // 4kB #endif } -#endif - -} // namespace - -namespace base { - PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t PageAllocationGranularity() { #if defined(OS_APPLE) + // This is literally equivalent to |1 << PageAllocationGranularityShift()| + // below, but was separated out for OS_APPLE to avoid << on a non-constexpr. return vm_page_size; +#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or + // initialize cache. + int size = internal::page_characteristics.size.load(std::memory_order_relaxed); + if (UNLIKELY(size == 0)) { + size = getpagesize(); + internal::page_characteristics.size.store(size, std::memory_order_relaxed); + } + return size; #else return 1ULL << PageAllocationGranularityShift(); #endif diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc index 03883bcb11..90efc51c83 100644 --- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc +++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_address_space.cc @@ -75,6 +75,12 @@ void PartitionAddressSpace::UninitForTesting() { internal::AddressPoolManager::GetInstance()->ResetForTesting(); } +#if defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + +PageCharacteristics page_characteristics; + +#endif // defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + #endif // defined(PA_HAS_64_BITS_POINTERS) } // namespace internal diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc index daeb6d5cb1..7c434b5e69 100644 --- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc +++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.cc @@ -522,7 +522,7 @@ static size_t PartitionPurgePage(internal::PartitionPage* page, #if defined(PAGE_ALLOCATOR_CONSTANTS_ARE_CONSTEXPR) constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerSlotSpan) / SystemPageSize(); -#elif defined(OS_APPLE) +#elif defined(OS_APPLE) || (defined(OS_LINUX) && defined(ARCH_CPU_ARM64)) // It's better for slot_usage to be stack-allocated and fixed-size, which // demands that its size be constexpr. On OS_APPLE, PartitionPageSize() is // always SystemPageSize() << 2, so regardless of what the run time page size diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h index c8268ec30a..f03ba1e4ab 100644 --- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h +++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h @@ -57,10 +57,11 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PartitionPageShift() { return 18; // 256 KiB } -#elif defined(OS_APPLE) +#elif defined(OS_APPLE) || \ + (defined(OS_LINUX) && defined(ARCH_CPU_ARM64)) PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PartitionPageShift() { - return vm_page_shift + 2; + return PageAllocationGranularityShift() + 2; } #else PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int diff --git a/src/3rdparty/chromium/build/android/gyp/java_cpp_enum.py b/src/3rdparty/chromium/build/android/gyp/java_cpp_enum.py index 0b9ee541e4..5fd66b93b9 100755 --- a/src/3rdparty/chromium/build/android/gyp/java_cpp_enum.py +++ b/src/3rdparty/chromium/build/android/gyp/java_cpp_enum.py @@ -186,8 +186,9 @@ class HeaderParser(object): enum_name_re = r'(\w+)' optional_fixed_type_re = r'(\:\s*(\w+\s*\w+?))?' enum_start_re = re.compile(r'^\s*(?:\[cpp.*\])?\s*enum\s+' + - optional_class_or_struct_re + '\s*' + enum_name_re + '\s*' + - optional_fixed_type_re + '\s*{\s*') + optional_class_or_struct_re + r'\s*' + + enum_name_re + r'\s*' + optional_fixed_type_re + + r'\s*{\s*') enum_single_line_re = re.compile( r'^\s*(?:\[cpp.*\])?\s*enum.*{(?P.*)}.*$') diff --git a/src/3rdparty/chromium/build/print_python_deps.py b/src/3rdparty/chromium/build/print_python_deps.py index fd29c0972c..2a0118563e 100755 --- a/src/3rdparty/chromium/build/print_python_deps.py +++ b/src/3rdparty/chromium/build/print_python_deps.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.7 +#!/usr/bin/python3 # Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -152,7 +152,7 @@ def main(): # Trybots run with vpython as default Python, but with a different config # from //.vpython. To make the is_vpython test work, and to match the behavior - # of dev machines, the shebang line must be run with python2.7. + # of dev machines, the shebang line must be run with python3. # # E.g. $HOME/.vpython-root/dd50d3/bin/python # E.g. /b/s/w/ir/cache/vpython/ab5c79/bin/python diff --git a/src/3rdparty/chromium/build/util/python2_action.py b/src/3rdparty/chromium/build/util/python2_action.py index a62d065ce1..d23ec8eaf2 100644 --- a/src/3rdparty/chromium/build/util/python2_action.py +++ b/src/3rdparty/chromium/build/util/python2_action.py @@ -6,17 +6,5 @@ import subprocess import sys -if sys.version_info.major == 2: - # If we get here, we're already Python2, so just re-execute the - # command without the wrapper. - exe = sys.executable -elif sys.executable.endswith('.exe'): - # If we get here, we're a Python3 executable likely running on - # Windows, so look for the Python2 wrapper in depot_tools. - exe = 'python.bat' -else: - # If we get here, we are a Python3 executable. Hope that we can find - # a `python2.7` in path somewhere. - exe = 'python2.7' - +exe = sys.executable sys.exit(subprocess.call([exe] + sys.argv[1:])) diff --git a/src/3rdparty/chromium/components/crx_file/crx_verifier.cc b/src/3rdparty/chromium/components/crx_file/crx_verifier.cc index cbd7d777b6..d03cadb150 100644 --- a/src/3rdparty/chromium/components/crx_file/crx_verifier.cc +++ b/src/3rdparty/chromium/components/crx_file/crx_verifier.cc @@ -4,6 +4,7 @@ #include "components/crx_file/crx_verifier.h" +#include #include #include #include @@ -44,6 +45,9 @@ constexpr uint8_t kPublisherTestKeyHash[] = { 0x5f, 0x64, 0xf3, 0xa6, 0x17, 0x03, 0x0d, 0xde, 0x21, 0x61, 0xbe, 0xb7, 0x95, 0x91, 0x95, 0x83, 0x68, 0x12, 0xe9, 0x78, 0x1e}; +constexpr uint8_t kEocd[] = {'P', 'K', 0x05, 0x06}; +constexpr uint8_t kEocd64[] = {'P', 'K', 0x06, 0x07}; + using VerifierCollection = std::vector>; using RepeatedProof = google::protobuf::RepeatedPtrField; @@ -109,6 +113,18 @@ VerifierResult VerifyCrx3( if (ReadAndHashBuffer(header_bytes.data(), header_size, file, hash) != static_cast(header_size)) return VerifierResult::ERROR_HEADER_INVALID; + + // If the header contains a ZIP EOCD or EOCD64 token, unzipping may not work + // correctly. + if (std::search(std::begin(header_bytes), std::end(header_bytes), + std::begin(kEocd), + std::end(kEocd)) != std::end(header_bytes) || + std::search(std::begin(header_bytes), std::end(header_bytes), + std::begin(kEocd64), + std::end(kEocd64)) != std::end(header_bytes)) { + return VerifierResult::ERROR_HEADER_INVALID; + } + CrxFileHeader header; if (!header.ParseFromArray(header_bytes.data(), header_size)) return VerifierResult::ERROR_HEADER_INVALID; diff --git a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py index 7422ead969..f98e87594e 100755 --- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py +++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py @@ -7,9 +7,8 @@ Converts a given ASCII proto into a binary resource. """ - +from __future__ import print_function import abc -import imp import optparse import os import re @@ -17,6 +16,12 @@ import sys import traceback +PY34 = sys.version_info[0:2] >= (3, 4) + +if PY34: + from importlib import util as imp_util +else: + import imp class GoogleProtobufModuleImporter: """A custom module importer for importing google.protobuf. @@ -67,8 +72,16 @@ def load_module(self, fullname): # but is included for completeness. raise ImportError(fullname) - filepath = self._fullname_to_filepath(fullname) - return imp.load_source(fullname, filepath) + if PY34: + filepath = self._fullname_to_filepath(fullname) + spec = imp_util.spec_from_file_location(fullname, filepath) + loaded = imp_util.module_from_spec(spec) + spec.loader.exec_module(loaded) + + else: + return imp.load_source(fullname, filepath) + + return loaded class BinaryProtoGenerator: @@ -196,12 +209,12 @@ def Run(self): self._ImportProtoModules(opts.path) if not self.VerifyArgs(opts): - print "Wrong arguments" + print("Wrong arguments") return 1 try: self._GenerateBinaryProtos(opts) except Exception as e: - print "ERROR: Failed to render binary version of %s:\n %s\n%s" % ( - opts.infile, str(e), traceback.format_exc()) + print("ERROR: Failed to render binary version of %s:\n %s\n%s" % + (opts.infile, str(e), traceback.format_exc())) return 1 diff --git a/src/3rdparty/chromium/components/update_client/protocol_parser_json.cc b/src/3rdparty/chromium/components/update_client/protocol_parser_json.cc index 71d3e54e6b..a165b42f08 100644 --- a/src/3rdparty/chromium/components/update_client/protocol_parser_json.cc +++ b/src/3rdparty/chromium/components/update_client/protocol_parser_json.cc @@ -168,7 +168,7 @@ bool ParseUpdateCheck(const base::Value& updatecheck_node, } for (const auto& kv : updatecheck_node.DictItems()) { - if (kv.first.front() == '_' && kv.second.is_string()) { + if (!kv.first.empty() && kv.first.front() == '_' && kv.second.is_string()) { result->custom_attributes[kv.first] = kv.second.GetString(); } } diff --git a/src/3rdparty/chromium/components/variations/seed_response.h b/src/3rdparty/chromium/components/variations/seed_response.h index 058bb11044..6879450e06 100644 --- a/src/3rdparty/chromium/components/variations/seed_response.h +++ b/src/3rdparty/chromium/components/variations/seed_response.h @@ -5,6 +5,7 @@ #ifndef COMPONENTS_VARIATIONS_SEED_RESPONSE_H_ #define COMPONENTS_VARIATIONS_SEED_RESPONSE_H_ +#include #include namespace variations { diff --git a/src/3rdparty/chromium/components/variations/service/generate_ui_string_overrider.py b/src/3rdparty/chromium/components/variations/service/generate_ui_string_overrider.py index 859b758ef8..2da8713403 100755 --- a/src/3rdparty/chromium/components/variations/service/generate_ui_string_overrider.py +++ b/src/3rdparty/chromium/components/variations/service/generate_ui_string_overrider.py @@ -20,7 +20,7 @@ # #define IDS_FOO_MESSAGE 1234 # With generate whitelist flag: # #define IDS_FOO_MESSAGE (::ui::AllowlistedResource<1234>(), 1234) -RESOURCE_EXTRACT_REGEX = re.compile('^#define (\S*).* (\d+)\)?$', re.MULTILINE) +RESOURCE_EXTRACT_REGEX = re.compile(r'^#define (\S*).* (\d+)\)?$', re.MULTILINE) class Error(Exception): """Base error class for all exceptions in generated_resources_map.""" diff --git a/src/3rdparty/chromium/components/viz/service/frame_sinks/compositor_frame_sink_support.cc b/src/3rdparty/chromium/components/viz/service/frame_sinks/compositor_frame_sink_support.cc index 7e10b2b6e5..a1133b220f 100644 --- a/src/3rdparty/chromium/components/viz/service/frame_sinks/compositor_frame_sink_support.cc +++ b/src/3rdparty/chromium/components/viz/service/frame_sinks/compositor_frame_sink_support.cc @@ -635,7 +635,7 @@ void CompositorFrameSinkSupport::DidPresentCompositorFrame( DCHECK_LE(pending_received_frame_times_.size(), 25u); auto received_frame_timestamp = pending_received_frame_times_.find(frame_token); - DCHECK(received_frame_timestamp != pending_received_frame_times_.end()); + CHECK(received_frame_timestamp != pending_received_frame_times_.end()); FrameTimingDetails details; details.received_compositor_frame_timestamp = @@ -648,8 +648,7 @@ void CompositorFrameSinkSupport::DidPresentCompositorFrame( pending_received_frame_times_.erase(received_frame_timestamp); // We should only ever get one PresentationFeedback per frame_token. - DCHECK(frame_timing_details_.find(frame_token) == - frame_timing_details_.end()); + CHECK(!frame_timing_details_.contains(frame_token)); frame_timing_details_.emplace(frame_token, details); UpdateNeedsBeginFramesInternal(); diff --git a/src/3rdparty/chromium/content/browser/loader/navigation_url_loader_impl.cc b/src/3rdparty/chromium/content/browser/loader/navigation_url_loader_impl.cc index f54cfd9a61..41c78e2fe1 100644 --- a/src/3rdparty/chromium/content/browser/loader/navigation_url_loader_impl.cc +++ b/src/3rdparty/chromium/content/browser/loader/navigation_url_loader_impl.cc @@ -560,10 +560,10 @@ void NavigationURLLoaderImpl::MaybeStartLoader( next_interceptor->MaybeCreateLoader( *resource_request_, browser_context_, base::BindOnce(&NavigationURLLoaderImpl::MaybeStartLoader, - base::Unretained(this), next_interceptor), + weak_factory_.GetWeakPtr(), next_interceptor), base::BindOnce( &NavigationURLLoaderImpl::FallbackToNonInterceptedRequest, - base::Unretained(this))); + weak_factory_.GetWeakPtr())); return; } diff --git a/src/3rdparty/chromium/content/browser/media/capture/web_contents_video_capture_device.cc b/src/3rdparty/chromium/content/browser/media/capture/web_contents_video_capture_device.cc index 0093df22c2..6100fe8167 100644 --- a/src/3rdparty/chromium/content/browser/media/capture/web_contents_video_capture_device.cc +++ b/src/3rdparty/chromium/content/browser/media/capture/web_contents_video_capture_device.cc @@ -41,7 +41,7 @@ class WebContentsVideoCaptureDevice::FrameTracker int main_render_frame_id) : device_(std::move(device)), device_task_runner_(base::ThreadTaskRunnerHandle::Get()), - cursor_controller_(cursor_controller) { + cursor_controller_(cursor_controller->GetWeakPtr()) { DCHECK(device_task_runner_); DCHECK(cursor_controller_); @@ -184,7 +184,9 @@ class WebContentsVideoCaptureDevice::FrameTracker // Note: MouseCursorOverlayController runs on the UI thread. It's also // important that SetTargetView() be called in the current stack while // |native_view| is known to be a valid pointer. http://crbug.com/818679 - cursor_controller_->SetTargetView(native_view); + if (cursor_controller_) { + cursor_controller_->SetTargetView(native_view); + } } } else { device_task_runner_->PostTask( @@ -192,7 +194,9 @@ class WebContentsVideoCaptureDevice::FrameTracker base::BindOnce( &WebContentsVideoCaptureDevice::OnTargetPermanentlyLost, device_)); - cursor_controller_->SetTargetView(gfx::NativeView()); + if (cursor_controller_) { + cursor_controller_->SetTargetView(gfx::NativeView()); + } } } @@ -200,10 +204,11 @@ class WebContentsVideoCaptureDevice::FrameTracker const base::WeakPtr device_; const scoped_refptr device_task_runner_; - // Owned by FrameSinkVideoCaptureDevice. This will be valid for the life of - // FrameTracker because the FrameTracker deleter task will be posted to the UI - // thread before the MouseCursorOverlayController deleter task. - MouseCursorOverlayController* const cursor_controller_; + // Owned by FrameSinkVideoCaptureDevice. This may only be accessed on the + // UI thread. This is not guaranteed to be valid and must be checked before + // use. + // https://crbug.com/1480152 + const base::WeakPtr cursor_controller_; viz::FrameSinkId target_frame_sink_id_; gfx::NativeView target_native_view_ = gfx::NativeView(); diff --git a/src/3rdparty/chromium/content/browser/renderer_host/render_frame_host_impl.cc b/src/3rdparty/chromium/content/browser/renderer_host/render_frame_host_impl.cc index ad9a55dc31..49c747b287 100644 --- a/src/3rdparty/chromium/content/browser/renderer_host/render_frame_host_impl.cc +++ b/src/3rdparty/chromium/content/browser/renderer_host/render_frame_host_impl.cc @@ -2068,6 +2068,13 @@ void RenderFrameHostImpl::RenderProcessGone( ResetNavigationRequests(); ResetLoadingState(); + // Also, clear any pending navigations that have been blocked while the + // embedder is processing window.open() requests. This is consistent + // with clearing NavigationRequests and loading state above, and it also + // makes sense because certain parts of `pending_navigate_`, like the + // NavigationClient remote interface, can no longer be used. + pending_navigate_.reset(); + // Any future UpdateState or UpdateTitle messages from this or a recreated // process should be ignored until the next commit. set_nav_entry_id(0); @@ -2366,17 +2373,29 @@ void RenderFrameHostImpl::Init() { return; waiting_for_init_ = false; + if (pending_navigate_) { - frame_tree_node()->navigator().OnBeginNavigation( - frame_tree_node(), std::move(pending_navigate_->common_params), - std::move(pending_navigate_->begin_navigation_params), - std::move(pending_navigate_->blob_url_loader_factory), - std::move(pending_navigate_->navigation_client), - std::move(pending_navigate_->navigation_initiator), + // Transfer `pending_navigate_` to a local variable, to avoid resetting it + // after OnBeginNavigation since `this` might already be destroyed (see + // below). + // + // This shouldn't matter for early RFH swaps out of crashed frames, since + // `pending_navigate_` is cleared when the renderer process dies, but it + // may matter for other current/future use cases of the early RFH swap. + std::unique_ptr pending_navigation = + std::move(pending_navigate_); + frame_tree_node()->navigator().OnBeginNavigation( + frame_tree_node(), std::move(pending_navigation->common_params), + std::move(pending_navigation->begin_navigation_params), + std::move(pending_navigation->blob_url_loader_factory), + std::move(pending_navigation->navigation_client), + std::move(pending_navigation->navigation_initiator), EnsurePrefetchedSignedExchangeCache(), MaybeCreateWebBundleHandleTracker()); - pending_navigate_.reset(); - } + + // DO NOT ADD CODE after this, as `this` might be deleted if an early + // RenderFrameHost swap was performed when starting the navigation above. + } } void RenderFrameHostImpl::PropagateEmbeddingTokenToParentFrame() { diff --git a/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py b/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py index 037f9497dc..be393d21f9 100755 --- a/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py +++ b/src/3rdparty/chromium/content/browser/tracing/generate_trace_viewer_grd.py @@ -74,7 +74,7 @@ def main(argv): for filename in parsed_args.source_files: add_file_to_grd(doc, os.path.basename(filename)) - with open(parsed_args.output_filename, 'w') as output_file: + with open(parsed_args.output_filename, 'wb') as output_file: output_file.write(doc.toxml(encoding='UTF-8')) diff --git a/src/3rdparty/chromium/content/browser/web_contents/web_contents_impl.cc b/src/3rdparty/chromium/content/browser/web_contents/web_contents_impl.cc index 0627170ed0..23d4268a1b 100644 --- a/src/3rdparty/chromium/content/browser/web_contents/web_contents_impl.cc +++ b/src/3rdparty/chromium/content/browser/web_contents/web_contents_impl.cc @@ -3278,7 +3278,12 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) { } if (delegate_) { + // This may spin the message loop and destroy this object crbug.com/1506535 + base::WeakPtr weak_ptr = weak_factory_.GetWeakPtr(); delegate_->ExitFullscreenModeForTab(this); + if (!weak_ptr) { + return; + } if (keyboard_lock_widget_) delegate_->CancelKeyboardLockRequest(this); diff --git a/src/3rdparty/chromium/content/gpu/in_process_gpu_thread.cc b/src/3rdparty/chromium/content/gpu/in_process_gpu_thread.cc index efe399b0a7..210ee7d72b 100644 --- a/src/3rdparty/chromium/content/gpu/in_process_gpu_thread.cc +++ b/src/3rdparty/chromium/content/gpu/in_process_gpu_thread.cc @@ -24,6 +24,10 @@ #include "base/android/jni_android.h" #endif +#if defined(OS_WIN) +#include +#endif + namespace content { InProcessGpuThread::InProcessGpuThread( @@ -41,6 +45,10 @@ InProcessGpuThread::~InProcessGpuThread() { void InProcessGpuThread::Init() { base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; +#if defined(OS_WIN) + ImmDisableIME(0); +#endif + #if defined(OS_ANDROID) // Call AttachCurrentThreadWithName, before any other AttachCurrentThread() // calls. The latter causes Java VM to assign Thread-??? to the thread name. diff --git a/src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc b/src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc index 448b9aa5b6..123d4d7769 100644 --- a/src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc +++ b/src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc @@ -421,7 +421,7 @@ bool FormDataParserUrlEncoded::GetNextNameValue(Result* result) { bool FormDataParserUrlEncoded::SetSource(base::StringPiece source) { if (source_set_) return false; // We do not allow multiple sources for this parser. - source_.set(source.data(), source.size()); + source_ = re2::StringPiece(source.data(), source.size()); source_set_ = true; source_malformed_ = false; return true; @@ -565,7 +565,7 @@ bool FormDataParserMultipart::GetNextNameValue(Result* result) { bool FormDataParserMultipart::SetSource(base::StringPiece source) { if (source.data() == NULL || !source_.empty()) return false; - source_.set(source.data(), source.size()); + source_ = re2::StringPiece(source.data(), source.size()); switch (state_) { case STATE_INIT: diff --git a/src/3rdparty/chromium/gpu/config/gpu_control_list_format.txt b/src/3rdparty/chromium/gpu/config/gpu_control_list_format.txt index ab0f0a0336..e8baf93ba6 100644 --- a/src/3rdparty/chromium/gpu/config/gpu_control_list_format.txt +++ b/src/3rdparty/chromium/gpu/config/gpu_control_list_format.txt @@ -77,9 +77,10 @@ // 29. "intel_gpu_series" is a list of gpu series names. Currently supported // series include: "broadwater", "eaglelake", "ironlake", "sandybridge", // "baytrail", "ivybridge", "haswell", "cherrytrail", "broadwell", -// "apollolake", "skylake", "geminilake", "kabylake", "coffeelake", -// "whiskeylake", "cometlake", "cannonlake", "icelake", "elkhartlake", -// "jasperlake", "tigerlake". +// "apollolake", "skylake", "geminilake", "kabylake", "amberlake", +// "coffeelake", "whiskeylake", "cometlake", "cannonlake", "icelake", +// "elkhartlake", "jasperlake", "tigerlake", "rocketlake", "DG1", +// "alderlake", "alchemist", "raptorlake", "meteorlake". // 30. "hardware_overlay" is either "supported" or "unsupported". Currently it // only applies on Windows where hardware overlays may be supported on // certain Intel GPUs. By default it's "dont_care" and there is no need to diff --git a/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h b/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h index 1d9d56670f..8be31b1fd0 100644 --- a/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h +++ b/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h @@ -5,6 +5,7 @@ #ifndef GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_ #define GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_ +#include #include #include "base/macros.h" diff --git a/src/3rdparty/chromium/gpu/config/gpu_info.h b/src/3rdparty/chromium/gpu/config/gpu_info.h index 1589fee915..c400448cb9 100644 --- a/src/3rdparty/chromium/gpu/config/gpu_info.h +++ b/src/3rdparty/chromium/gpu/config/gpu_info.h @@ -58,6 +58,7 @@ enum class IntelGpuSeriesType { kSkylake = 8, kGeminilake = 9, kKabylake = 10, + kAmberlake = 23, kCoffeelake = 11, kWhiskeylake = 12, kCometlake = 13, @@ -69,8 +70,14 @@ enum class IntelGpuSeriesType { kJasperlake = 20, // Intel 12th gen kTigerlake = 21, + kRocketlake = 24, + kDG1 = 25, + kAlderlake = 22, + kAlchemist = 26, + kRaptorlake = 27, + kMeteorlake = 28, // Please also update |gpu_series_map| in process_json.py. - kMaxValue = kTigerlake, + kMaxValue = kMeteorlake, }; // Video profile. This *must* match media::VideoCodecProfile. diff --git a/src/3rdparty/chromium/gpu/config/gpu_util.cc b/src/3rdparty/chromium/gpu/config/gpu_util.cc index 105f489515..b115b4bd5c 100644 --- a/src/3rdparty/chromium/gpu/config/gpu_util.cc +++ b/src/3rdparty/chromium/gpu/config/gpu_util.cc @@ -872,6 +872,8 @@ IntelGpuSeriesType GetIntelGpuSeriesType(uint32_t vendor_id, case 0x3100: return IntelGpuSeriesType::kGeminilake; case 0x5900: + if (device_id == 0x591C) + return IntelGpuSeriesType::kAmberlake; return IntelGpuSeriesType::kKabylake; case 0x8700: if (device_id == 0x87C0) @@ -894,6 +896,19 @@ IntelGpuSeriesType GetIntelGpuSeriesType(uint32_t vendor_id, return IntelGpuSeriesType::kJasperlake; case 0x9A00: return IntelGpuSeriesType::kTigerlake; + case 0x4c00: + return IntelGpuSeriesType::kRocketlake; + case 0x4900: + return IntelGpuSeriesType::kDG1; + case 0x4600: + return IntelGpuSeriesType::kAlderlake; + case 0x4F00: + case 0x5600: + return IntelGpuSeriesType::kAlchemist; + case 0xa700: + return IntelGpuSeriesType::kRaptorlake; + case 0x7d00: + return IntelGpuSeriesType::kMeteorlake; default: break; } @@ -923,6 +938,7 @@ std::string GetIntelGpuGeneration(uint32_t vendor_id, uint32_t device_id) { case IntelGpuSeriesType::kSkylake: case IntelGpuSeriesType::kGeminilake: case IntelGpuSeriesType::kKabylake: + case IntelGpuSeriesType::kAmberlake: case IntelGpuSeriesType::kCoffeelake: case IntelGpuSeriesType::kWhiskeylake: case IntelGpuSeriesType::kCometlake: @@ -934,6 +950,12 @@ std::string GetIntelGpuGeneration(uint32_t vendor_id, uint32_t device_id) { case IntelGpuSeriesType::kJasperlake: return "11"; case IntelGpuSeriesType::kTigerlake: + case IntelGpuSeriesType::kRocketlake: + case IntelGpuSeriesType::kDG1: + case IntelGpuSeriesType::kAlderlake: + case IntelGpuSeriesType::kAlchemist: + case IntelGpuSeriesType::kRaptorlake: + case IntelGpuSeriesType::kMeteorlake: return "12"; default: break; diff --git a/src/3rdparty/chromium/gpu/config/process_json.py b/src/3rdparty/chromium/gpu/config/process_json.py index 6a609fe932..392f98633d 100755 --- a/src/3rdparty/chromium/gpu/config/process_json.py +++ b/src/3rdparty/chromium/gpu/config/process_json.py @@ -678,6 +678,7 @@ def write_intel_gpu_series_list(entry_id, is_exception, exception_id, 'apollolake': 'kApollolake', 'skylake': 'kSkylake', 'geminilake': 'kGeminilake', + 'amberlake': 'kAmberlake', 'kabylake': 'kKabylake', 'coffeelake': 'kCoffeelake', 'whiskeylake': 'kWhiskeylake', @@ -686,7 +687,13 @@ def write_intel_gpu_series_list(entry_id, is_exception, exception_id, 'icelake': 'kIcelake', 'elkhartlake': 'kElkhartlake', 'jasperlake': 'kJasperlake', - 'tigerlake': 'kTigerlake' + 'tigerlake': 'kTigerlake', + 'rocketlake': 'kRocketlake', + 'dg1': 'kDG1', + 'alderlake': 'kAlderlake', + 'alchemist': 'kAlchemist', + 'raptorlake': 'kRaptorlake', + 'meteorlake': 'kMeteorlake' } for series in intel_gpu_series_list: assert series in intel_gpu_series_map diff --git a/src/3rdparty/chromium/ipc/ipc_mojo_bootstrap.cc b/src/3rdparty/chromium/ipc/ipc_mojo_bootstrap.cc index 616382cb8f..9a9eeef847 100644 --- a/src/3rdparty/chromium/ipc/ipc_mojo_bootstrap.cc +++ b/src/3rdparty/chromium/ipc/ipc_mojo_bootstrap.cc @@ -702,13 +702,12 @@ class ChannelAssociatedGroupController // handle. DCHECK(!endpoint->client()); DCHECK(endpoint->peer_closed()); - MarkClosedAndMaybeRemove(endpoint); + MarkClosed(endpoint); } else { - MarkPeerClosedAndMaybeRemove(endpoint); + MarkPeerClosed(endpoint); } } - - DCHECK(endpoints_.empty()); + endpoints_.clear(); GetMemoryDumpProvider().RemoveController(this); } @@ -755,15 +754,19 @@ class ChannelAssociatedGroupController base::AutoLock locker(lock_); encountered_error_ = true; + std::vector endpoints_to_remove; std::vector> endpoints_to_notify; for (auto iter = endpoints_.begin(); iter != endpoints_.end();) { Endpoint* endpoint = iter->second.get(); ++iter; - if (endpoint->client()) + if (endpoint->client()) { endpoints_to_notify.push_back(endpoint); + } - MarkPeerClosedAndMaybeRemove(endpoint); + if (MarkPeerClosed(endpoint)) { + endpoints_to_remove.push_back(endpoint->id()); + } } for (auto& endpoint : endpoints_to_notify) { @@ -772,6 +775,10 @@ class ChannelAssociatedGroupController if (endpoint->client()) NotifyEndpointOfError(endpoint.get(), false /* force_async */); } + + for (uint32_t id : endpoints_to_remove) { + endpoints_.erase(id); + } } void NotifyEndpointOfError(Endpoint* endpoint, bool force_async) { @@ -806,19 +813,33 @@ class ChannelAssociatedGroupController NotifyEndpointOfError(endpoint, false /* force_async */); } - void MarkClosedAndMaybeRemove(Endpoint* endpoint) { + // Marks `endpoint` as closed and returns true if and only if its peer was + // also already closed. + bool MarkClosed(Endpoint* endpoint) { lock_.AssertAcquired(); endpoint->set_closed(); - if (endpoint->closed() && endpoint->peer_closed()) - endpoints_.erase(endpoint->id()); + return endpoint->peer_closed(); } - void MarkPeerClosedAndMaybeRemove(Endpoint* endpoint) { + // Marks `endpoint` as having a closed peer and returns true if and only if + // `endpoint` itself was also already closed. + bool MarkPeerClosed(Endpoint* endpoint) { lock_.AssertAcquired(); endpoint->set_peer_closed(); endpoint->SignalSyncMessageEvent(); - if (endpoint->closed() && endpoint->peer_closed()) + return endpoint->closed(); + } + + void MarkClosedAndMaybeRemove(Endpoint* endpoint) { + if (MarkClosed(endpoint)) { endpoints_.erase(endpoint->id()); + } + } + + void MarkPeerClosedAndMaybeRemove(Endpoint* endpoint) { + if (MarkPeerClosed(endpoint)) { + endpoints_.erase(endpoint->id()); + } } Endpoint* FindOrInsertEndpoint(mojo::InterfaceId id, bool* inserted) { diff --git a/src/3rdparty/chromium/media/formats/mp2t/ts_section_cets_pssh.cc b/src/3rdparty/chromium/media/formats/mp2t/ts_section_cets_pssh.cc index 976d4b5389..3d30eb7741 100644 --- a/src/3rdparty/chromium/media/formats/mp2t/ts_section_cets_pssh.cc +++ b/src/3rdparty/chromium/media/formats/mp2t/ts_section_cets_pssh.cc @@ -32,6 +32,11 @@ bool TsSectionCetsPssh::Parse(bool payload_unit_start_indicator, RCHECK(bit_reader.SkipBits(31)); int box_length_bits = bit_reader.bits_available(); std::string pssh; + if (!box_length_bits) { + // Ignore if there are no bits to read. + return false; + } + RCHECK(box_length_bits % 8 == 0); RCHECK(bit_reader.ReadString(box_length_bits, &pssh)); // Now check that the first 4 bytes are of the form {0x00, 0x00, 0x00, X}, // where X is the box length in bytes. diff --git a/src/3rdparty/chromium/mojo/core/channel_posix.cc b/src/3rdparty/chromium/mojo/core/channel_posix.cc index d7d9d6cfee..0e8b3884da 100644 --- a/src/3rdparty/chromium/mojo/core/channel_posix.cc +++ b/src/3rdparty/chromium/mojo/core/channel_posix.cc @@ -242,18 +242,23 @@ class ChannelPosix : public Channel, void ShutDownOnIOThread() { base::CurrentThread::Get()->RemoveDestructionObserver(this); - read_watcher_.reset(); - write_watcher_.reset(); - if (leak_handle_) { - ignore_result(socket_.release()); - server_.TakePlatformHandle().release(); - } else { - socket_.reset(); - ignore_result(server_.TakePlatformHandle()); + { + base::AutoLock lock(write_lock_); + reject_writes_ = true; + read_watcher_.reset(); + write_watcher_.reset(); + if (leak_handle_) { + std::ignore = socket_.release(); + server_.TakePlatformHandle().release(); + } else { + socket_.reset(); + std::ignore = server_.TakePlatformHandle(); + } + #if defined(OS_IOS) + base::AutoLock fd_lock(fds_to_close_lock_); + fds_to_close_.clear(); + #endif } -#if defined(OS_IOS) - fds_to_close_.clear(); -#endif // May destroy the |this| if it was the last reference. self_ = nullptr; diff --git a/src/3rdparty/chromium/mojo/public/cpp/bindings/lib/message.cc b/src/3rdparty/chromium/mojo/public/cpp/bindings/lib/message.cc index 8c48994760..ba0b148adb 100644 --- a/src/3rdparty/chromium/mojo/public/cpp/bindings/lib/message.cc +++ b/src/3rdparty/chromium/mojo/public/cpp/bindings/lib/message.cc @@ -270,7 +270,7 @@ Message::Message(base::span payload, void* buffer; uint32_t buffer_size; - DCHECK(base::IsValueInRangeForNumericType(payload.size())); + CHECK(base::IsValueInRangeForNumericType(payload.size())); DCHECK(base::IsValueInRangeForNumericType(handles.size())); MojoAppendMessageDataOptions options; options.struct_size = sizeof(options); diff --git a/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn b/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn index fc04b5dd0b..708958e438 100644 --- a/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn +++ b/src/3rdparty/chromium/mojo/public/tools/bindings/BUILD.gn @@ -2,9 +2,11 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/python.gni") import("//mojo/public/tools/bindings/mojom.gni") import("//third_party/jinja2/jinja2.gni") +# TODO(crbug.com/1194274): Investigate nondeterminism in Py3 builds. action("precompile_templates") { sources = mojom_generator_sources sources += [ diff --git a/src/3rdparty/chromium/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py b/src/3rdparty/chromium/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py index be8985cedc..e42ee0edf6 100755 --- a/src/3rdparty/chromium/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py +++ b/src/3rdparty/chromium/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py @@ -31,7 +31,7 @@ def FilterLine(filename, line, output): return if line.startswith("goog.provide"): - match = re.match("goog.provide\('([^']+)'\);", line) + match = re.match(r"goog.provide\('([^']+)'\);", line) if not match: print("Invalid goog.provide line in %s:\n%s" % (filename, line)) exit(1) diff --git a/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py b/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py index 79c9e50efc..8b78d09241 100644 --- a/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py +++ b/src/3rdparty/chromium/mojo/public/tools/bindings/gen_data_files_list.py @@ -18,7 +18,6 @@ import re import sys -from cStringIO import StringIO from optparse import OptionParser sys.path.insert( @@ -41,12 +40,9 @@ def main(): pattern = re.compile(options.pattern) files = [f for f in os.listdir(options.directory) if pattern.match(f)] - stream = StringIO() - for f in files: - print(f, file=stream) + contents = '\n'.join(f for f in files) + '\n' + WriteFile(contents, options.output) - WriteFile(stream.getvalue(), options.output) - stream.close() if __name__ == '__main__': sys.exit(main()) diff --git a/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py b/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py index 96b2fdfae0..00b9dccd00 100644 --- a/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py +++ b/src/3rdparty/chromium/mojo/public/tools/bindings/generators/mojom_java_generator.py @@ -25,6 +25,10 @@ 'build', 'android', 'gyp')) from util import build_utils +# TODO(crbug.com/1174969): Remove this once Python2 is obsoleted. +if sys.version_info.major != 2: + basestring = str + long = int GENERATOR_PREFIX = 'java' diff --git a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py index de62260a5c..4a1c73fcf8 100644 --- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py +++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/generator.py @@ -136,9 +136,14 @@ def StylizeModule(self, mojom_namespace): def WriteFile(contents, full_path): # If |contents| is same with the file content, we skip updating. + if not isinstance(contents, bytes): + data = contents.encode('utf8') + else: + data = contents + if os.path.isfile(full_path): with open(full_path, 'rb') as destination_file: - if destination_file.read() == contents: + if destination_file.read() == data: return # Make sure the containing directory exists. @@ -146,11 +151,8 @@ def WriteFile(contents, full_path): fileutil.EnsureDirectoryExists(full_dir) # Dump the data to disk. - with open(full_path, "wb") as f: - if not isinstance(contents, bytes): - f.write(contents.encode('utf-8')) - else: - f.write(contents) + with open(full_path, 'wb') as f: + f.write(data) def AddComputedData(module): diff --git a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py index ebbc9b322e..3d026429bb 100644 --- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py +++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/module.py @@ -398,7 +398,8 @@ def __hash__(self): class StructField(Field): - pass + def __hash__(self): + return super(Field, self).__hash__() class UnionField(Field): diff --git a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py index 7a30056024..8d9e26fb7f 100644 --- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py +++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/generate/template_expander.py @@ -75,9 +75,9 @@ def PrecompileTemplates(generator_modules, output_dir): os.path.dirname(module.__file__), generator.GetTemplatePrefix()) ])) jinja_env.filters.update(generator.GetFilters()) - jinja_env.compile_templates( - os.path.join(output_dir, "%s.zip" % generator.GetTemplatePrefix()), - extensions=["tmpl"], - zip="stored", - py_compile=True, - ignore_errors=False) + jinja_env.compile_templates(os.path.join( + output_dir, "%s.zip" % generator.GetTemplatePrefix()), + extensions=["tmpl"], + zip="stored", + py_compile=sys.version_info.major < 3, + ignore_errors=False) diff --git a/src/3rdparty/chromium/net/quic/quic_chromium_client_stream.cc b/src/3rdparty/chromium/net/quic/quic_chromium_client_stream.cc index cd5e352381..e50e91042c 100644 --- a/src/3rdparty/chromium/net/quic/quic_chromium_client_stream.cc +++ b/src/3rdparty/chromium/net/quic/quic_chromium_client_stream.cc @@ -172,6 +172,10 @@ int QuicChromiumClientStream::Handle::ReadBody( if (!stream_) return net_error_; + if (stream_->read_side_closed()) { + return OK; + } + int rv = stream_->Read(buffer, buffer_len); if (rv != ERR_IO_PENDING) return rv; diff --git a/src/3rdparty/chromium/net/third_party/quiche/src/quic/core/quic_stream.h b/src/3rdparty/chromium/net/third_party/quiche/src/quic/core/quic_stream.h index f0a5a714a2..ca9e56911f 100644 --- a/src/3rdparty/chromium/net/third_party/quiche/src/quic/core/quic_stream.h +++ b/src/3rdparty/chromium/net/third_party/quiche/src/quic/core/quic_stream.h @@ -206,6 +206,7 @@ class QUIC_EXPORT_PRIVATE QuicStream return sequencer_.ignore_read_data() || read_side_closed_; } bool write_side_closed() const { return write_side_closed_; } + bool read_side_closed() const { return read_side_closed_; } bool IsZombie() const { return read_side_closed_ && write_side_closed_ && IsWaitingForAcks(); diff --git a/src/3rdparty/chromium/sandbox/policy/mac/package_sb_file.py b/src/3rdparty/chromium/sandbox/policy/mac/package_sb_file.py index 934fd2261b..152c386002 100755 --- a/src/3rdparty/chromium/sandbox/policy/mac/package_sb_file.py +++ b/src/3rdparty/chromium/sandbox/policy/mac/package_sb_file.py @@ -3,6 +3,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +from __future__ import print_function import os import sys @@ -28,7 +29,7 @@ def escape_for_c(line): def pack_file(argv): if len(argv) != 2: - print >> sys.stderr, 'usage: package_sb_file.py input_filename output_dir' + print('usage: package_sb_file.py input_filename output_dir', file=sys.stderr) return 1 input_filename = argv[0] output_directory = argv[1] @@ -37,14 +38,14 @@ def pack_file(argv): output_h_file = output_directory + '/' + input_basename + '.h' output_cc_file = output_directory + '/' + input_basename + '.cc' try: - with open(input_filename, 'rb') as infile: - with open(output_h_file, 'wb') as outfile: + with open(input_filename, 'r') as infile: + with open(output_h_file, 'w') as outfile: outfile.write(header) outfile.write(h_include) outfile.write(namespace) outfile.write(h_definition % module_name) outfile.write(namespace_end) - with open(output_cc_file, 'wb') as outfile: + with open(output_cc_file, 'w') as outfile: outfile.write(header) outfile.write(cc_include % module_name) outfile.write(namespace) @@ -56,7 +57,7 @@ def pack_file(argv): outfile.write(cc_definition_end) outfile.write(namespace_end) except IOError: - print >> sys.stderr, 'Failed to process %s' % input_filename + print('Failed to process %s' % input_filename, file = sys.stderr) return 1 return 0 diff --git a/src/3rdparty/chromium/services/device/usb/mojo/device_impl.cc b/src/3rdparty/chromium/services/device/usb/mojo/device_impl.cc index bc70814864..4c6affe583 100644 --- a/src/3rdparty/chromium/services/device/usb/mojo/device_impl.cc +++ b/src/3rdparty/chromium/services/device/usb/mojo/device_impl.cc @@ -16,6 +16,7 @@ #include "base/callback.h" #include "base/memory/ptr_util.h" #include "base/memory/ref_counted_memory.h" +#include "base/optional.h" #include "base/stl_util.h" #include "services/device/public/cpp/usb/usb_utils.h" #include "services/device/usb/usb_descriptors.h" @@ -84,6 +85,20 @@ void OnIsochronousTransferOut( std::move(callback).Run(std::move(packets)); } +// Returns the sum of `packet_lengths`, or nullopt if the sum would overflow. +base::Optional TotalPacketLength( + base::span packet_lengths) { + uint32_t total_bytes = 0; + for (const uint32_t packet_length : packet_lengths) { + // Check for overflow. + if (std::numeric_limits::max() - total_bytes < packet_length) { + return base::nullopt; + } + total_bytes += packet_length; + } + return total_bytes; +} + } // namespace // static @@ -368,6 +383,15 @@ void DeviceImpl::IsochronousTransferIn( return; } + base::Optional total_bytes = TotalPacketLength(packet_lengths); + if (!total_bytes.has_value()) { + mojo::ReportBadMessage("Invalid isochronous packet lengths."); + std::move(callback).Run( + {}, BuildIsochronousPacketArray( + packet_lengths, mojom::UsbTransferStatus::TRANSFER_ERROR)); + return; + } + uint8_t endpoint_address = endpoint_number | 0x80; device_handle_->IsochronousTransferIn( endpoint_address, packet_lengths, timeout, @@ -386,6 +410,14 @@ void DeviceImpl::IsochronousTransferOut( return; } + base::Optional total_bytes = TotalPacketLength(packet_lengths); + if (!total_bytes.has_value() || total_bytes.value() != data.size()) { + mojo::ReportBadMessage("Invalid isochronous packet lengths."); + std::move(callback).Run(BuildIsochronousPacketArray( + packet_lengths, mojom::UsbTransferStatus::TRANSFER_ERROR)); + return; + } + uint8_t endpoint_address = endpoint_number; auto buffer = base::MakeRefCounted(data); device_handle_->IsochronousTransferOut( diff --git a/src/3rdparty/chromium/services/network/network_context.cc b/src/3rdparty/chromium/services/network/network_context.cc index 795b2d5d7d..035ee94c9b 100644 --- a/src/3rdparty/chromium/services/network/network_context.cc +++ b/src/3rdparty/chromium/services/network/network_context.cc @@ -477,6 +477,8 @@ NetworkContext::NetworkContext( } NetworkContext::~NetworkContext() { + is_destructing_ = true; + // May be nullptr in tests. if (network_service_) network_service_->DeregisterNetworkContext(this); @@ -518,6 +520,12 @@ NetworkContext::~NetworkContext() { } #endif // BUILDFLAG(IS_CT_SUPPORTED) } + + // Clear `url_loader_factories_` before deleting the contents, as it can + // result in re-entrant calls to DestroyURLLoaderFactory(). + std::set, + base::UniquePtrComparator> + url_loader_factories = std::move(url_loader_factories_); } // static @@ -641,6 +649,9 @@ void NetworkContext::DisableQuic() { void NetworkContext::DestroyURLLoaderFactory( cors::CorsURLLoaderFactory* url_loader_factory) { + if (is_destructing_) { + return; + } const int32_t process_id = url_loader_factory->process_id(); auto it = url_loader_factories_.find(url_loader_factory); diff --git a/src/3rdparty/chromium/services/network/network_context.h b/src/3rdparty/chromium/services/network/network_context.h index a9c3c62457..7d006d4864 100644 --- a/src/3rdparty/chromium/services/network/network_context.h +++ b/src/3rdparty/chromium/services/network/network_context.h @@ -726,15 +726,14 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext // HttpAuthHandle via |NetworkContext::CreateHttpAuthHandlerFactory|. net::HttpAuthPreferences http_auth_merged_preferences_; + // True once the destructor has been called. Used to guard against re-entrant + // calls to DestroyURLLoaderFactory(). + bool is_destructing_ = false; + // CorsURLLoaderFactory assumes that fields owned by the NetworkContext always // live longer than the factory. Therefore we want the factories to be - // destroyed before other fields above. In particular: - // - This must be below |url_request_context_| so that the URLRequestContext - // outlives all the URLLoaderFactories and URLLoaders that depend on it; - // for the same reason, it must also be below |network_context_|. - // - This must be below |loader_count_per_process_| that is touched by - // CorsURLLoaderFactory::DestroyURLLoader (see also - // https://crbug.com/1174943). + // destroyed before other fields above. This is accomplished by explicitly + // clearing `url_loader_factories_` in the destructor. std::set, base::UniquePtrComparator> url_loader_factories_; diff --git a/src/3rdparty/chromium/services/network/public/cpp/source_stream_to_data_pipe.cc b/src/3rdparty/chromium/services/network/public/cpp/source_stream_to_data_pipe.cc index d6ade7b0ec..615804ad8d 100644 --- a/src/3rdparty/chromium/services/network/public/cpp/source_stream_to_data_pipe.cc +++ b/src/3rdparty/chromium/services/network/public/cpp/source_stream_to_data_pipe.cc @@ -53,9 +53,9 @@ void SourceStreamToDataPipe::ReadMore() { scoped_refptr buffer( new network::NetToMojoIOBuffer(pending_write_.get())); - int result = source_->Read( - buffer.get(), base::checked_cast(num_bytes), - base::BindOnce(&SourceStreamToDataPipe::DidRead, base::Unretained(this))); + int result = source_->Read(buffer.get(), base::checked_cast(num_bytes), + base::BindOnce(&SourceStreamToDataPipe::DidRead, + weak_factory_.GetWeakPtr())); if (result != net::ERR_IO_PENDING) DidRead(result); diff --git a/src/3rdparty/chromium/services/viz/public/cpp/gpu/context_provider_command_buffer.cc b/src/3rdparty/chromium/services/viz/public/cpp/gpu/context_provider_command_buffer.cc index e8b9ff4983..d79b97fd37 100644 --- a/src/3rdparty/chromium/services/viz/public/cpp/gpu/context_provider_command_buffer.cc +++ b/src/3rdparty/chromium/services/viz/public/cpp/gpu/context_provider_command_buffer.cc @@ -164,13 +164,13 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { } // The transfer buffer is used to serialize Dawn commands - transfer_buffer_ = + auto transfer_buffer = std::make_unique(webgpu_helper.get()); // The WebGPUImplementation exposes the WebGPUInterface, as well as the // gpu::ContextSupport interface. auto webgpu_impl = std::make_unique( - webgpu_helper.get(), transfer_buffer_.get(), command_buffer_.get()); + webgpu_helper.get(), transfer_buffer.get(), command_buffer_.get()); bind_result_ = webgpu_impl->Initialize(memory_limits_); if (bind_result_ != gpu::ContextResult::kSuccess) { DLOG(ERROR) << "Failed to initialize WebGPUImplementation."; @@ -182,8 +182,11 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { std::string unique_context_name = base::StringPrintf("%s-%p", type_name.c_str(), webgpu_impl.get()); + // IMPORTANT: These hold raw_ptrs to each other, so must be set together. + // See note in the header (and keep it up to date if things change). impl_ = webgpu_impl.get(); webgpu_interface_ = std::move(webgpu_impl); + transfer_buffer_ = std::move(transfer_buffer); helper_ = std::move(webgpu_helper); } else if (attributes_.enable_raster_interface && !attributes_.enable_gles2_interface && @@ -201,14 +204,14 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { } // The transfer buffer is used to copy resources between the client // process and the GPU process. - transfer_buffer_ = + auto transfer_buffer = std::make_unique(raster_helper.get()); // The RasterImplementation exposes the RasterInterface, as well as the // gpu::ContextSupport interface. DCHECK(channel_); auto raster_impl = std::make_unique( - raster_helper.get(), transfer_buffer_.get(), + raster_helper.get(), transfer_buffer.get(), attributes_.bind_generates_resource, attributes_.lose_context_when_out_of_memory, command_buffer_.get(), channel_->image_decode_accelerator_proxy()); @@ -225,8 +228,11 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { raster_impl->TraceBeginCHROMIUM("gpu_toplevel", unique_context_name.c_str()); + // IMPORTANT: These hold raw_ptrs to each other, so must be set together. + // See note in the header (and keep it up to date if things change). impl_ = raster_impl.get(); raster_interface_ = std::move(raster_impl); + transfer_buffer_ = std::move(transfer_buffer); helper_ = std::move(raster_helper); } else { // The GLES2 helper writes the command buffer protocol. @@ -241,7 +247,7 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { // The transfer buffer is used to copy resources between the client // process and the GPU process. - transfer_buffer_ = + auto transfer_buffer = std::make_unique(gles2_helper.get()); // The GLES2Implementation exposes the OpenGLES2 API, as well as the @@ -254,13 +260,13 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { // we only use it if grcontext_support was requested. gles2_impl = std::make_unique< skia_bindings::GLES2ImplementationWithGrContextSupport>( - gles2_helper.get(), /*share_group=*/nullptr, transfer_buffer_.get(), + gles2_helper.get(), /*share_group=*/nullptr, transfer_buffer.get(), attributes_.bind_generates_resource, attributes_.lose_context_when_out_of_memory, support_client_side_arrays, command_buffer_.get()); } else { gles2_impl = std::make_unique( - gles2_helper.get(), /*share_group=*/nullptr, transfer_buffer_.get(), + gles2_helper.get(), /*share_group=*/nullptr, transfer_buffer.get(), attributes_.bind_generates_resource, attributes_.lose_context_when_out_of_memory, support_client_side_arrays, command_buffer_.get()); @@ -271,8 +277,11 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { return bind_result_; } + // IMPORTANT: These hold raw_ptrs to each other, so must be set together. + // See note in the header (and keep it up to date if things change). impl_ = gles2_impl.get(); gles2_impl_ = std::move(gles2_impl); + transfer_buffer_ = std::move(transfer_buffer); helper_ = std::move(gles2_helper); } @@ -306,6 +315,7 @@ gpu::ContextResult ContextProviderCommandBuffer::BindToCurrentThread() { switches::kEnableGpuClientTracing)) { // This wraps the real GLES2Implementation and we should always use this // instead when it's present. + // IMPORTANT: This holds a raw_ptr to gles2_impl_. trace_impl_ = std::make_unique( gles2_impl_.get()); gl = trace_impl_.get(); diff --git a/src/3rdparty/chromium/services/viz/public/cpp/gpu/context_provider_command_buffer.h b/src/3rdparty/chromium/services/viz/public/cpp/gpu/context_provider_command_buffer.h index 22d80baf76..0ac70dae7e 100644 --- a/src/3rdparty/chromium/services/viz/public/cpp/gpu/context_provider_command_buffer.h +++ b/src/3rdparty/chromium/services/viz/public/cpp/gpu/context_provider_command_buffer.h @@ -156,18 +156,44 @@ class ContextProviderCommandBuffer // associated shared images are destroyed. std::unique_ptr shared_image_interface_; - base::Lock context_lock_; // Referenced by command_buffer_. + ////////////////////////////////////////////////////////////////////////////// + // IMPORTANT NOTE: All of the objects in this block are part of a complex // + // graph of raw pointers (holder or pointee of various raw_ptrs). They are // + // defined in topological order: only later items point to earlier items. // + // - When writing any member, always ensure its pointers to earlier members + // are guaranteed to stay alive. + // - When clearing OR overwriting any member, always ensure objects that + // point to it have already been cleared. + // - The topological order of definitions guarantees that the + // destructors will be called in the correct order (bottom to top). + // - When overwriting multiple members, similarly do so in reverse order. + // + // Please note these comments are likely not to stay perfectly up-to-date. + + base::Lock context_lock_; + // Points to the context_lock_ field of `this`. std::unique_ptr command_buffer_; + + // Points to command_buffer_. std::unique_ptr helper_; + // Points to helper_. std::unique_ptr transfer_buffer_; - // Owned by either gles2_impl_ or raster_interface_, not both. - gpu::ImplementationBase* impl_; + // Points to transfer_buffer_, helper_, and command_buffer_. std::unique_ptr gles2_impl_; + // Points to gles2_impl_. std::unique_ptr trace_impl_; - std::unique_ptr raster_interface_; + // Points to transfer_buffer_, helper_, and command_buffer_. + std::unique_ptr raster_interface_; + // Points to transfer_buffer_, helper_, and command_buffer_. std::unique_ptr webgpu_interface_; + // END IMPORTANT NOTE // + ////////////////////////////////////////////////////////////////////////////// + + // Owned by either gles2_impl_ or raster_interface_, not both. + gpu::ImplementationBase* impl_ = nullptr; + std::unique_ptr gr_context_; #if BUILDFLAG(SKIA_USE_DAWN) std::unique_ptr diff --git a/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp b/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp index 1950375b9b..a098da4bfd 100644 --- a/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp +++ b/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp @@ -466,8 +466,28 @@ angle::Result TextureVk::copyImage(const gl::Context *context, gl::GetInternalFormatInfo(internalFormat, GL_UNSIGNED_BYTE); const vk::Format &vkFormat = renderer->getFormat(internalFormatInfo.sizedInternalFormat); + // The texture level being redefined might be the same as the one bound to the framebuffer. + // This _could_ be supported by using a temp image before redefining the level (and potentially + // discarding the image). However, this is currently unimplemented. + FramebufferVk *framebufferVk = vk::GetImpl(source); + RenderTargetVk *colorReadRT = framebufferVk->getColorReadRenderTarget(); + vk::ImageHelper *srcImage = &colorReadRT->getImageForCopy(); + const bool isCubeMap = index.getType() == gl::TextureType::CubeMap; + gl::LevelIndex levelIndex(getNativeImageIndex(index).getLevelIndex()); + const uint32_t layerIndex = index.hasLayer() ? index.getLayerIndex() : 0; + const uint32_t redefinedFace = isCubeMap ? layerIndex : 0; + const uint32_t sourceFace = isCubeMap ? colorReadRT->getLayerIndex() : 0; + const bool isSelfCopy = mImage == srcImage && levelIndex == colorReadRT->getLevelIndex() && + redefinedFace == sourceFace; + ANGLE_TRY(redefineLevel(context, index, vkFormat, newImageSize)); + if (isSelfCopy) + { + UNIMPLEMENTED(); + return angle::Result::Continue; + } + return copySubImageImpl(context, index, gl::Offset(0, 0, 0), sourceArea, internalFormatInfo, source); } @@ -1393,7 +1413,8 @@ angle::Result TextureVk::redefineLevel(const gl::Context *context, mImage->getLevelCount() == 1 && mImage->getBaseLevel() == levelIndexGL; // If incompatible, and redefining the single-level image, release it so it can be - // recreated immediately. This is an optimization to avoid an extra copy. + // recreated immediately. This is needed so that the texture can be reallocated with + // the correct format/size. if (!isCompatibleRedefinition && isUpdateToSingleLevelImage) { releaseImage(contextVk); diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py index 3225ecca6e..fc078d31b5 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/blink_v8_bridge.py @@ -344,7 +344,7 @@ def make_default_value_expr(idl_type, default_value): """ assert default_value.is_type_compatible_with(idl_type) - class DefaultValueExpr: + class DefaultValueExpr(object): _ALLOWED_SYMBOLS_IN_DEPS = ("isolate") def __init__(self, initializer_expr, initializer_deps, @@ -502,7 +502,7 @@ def make_v8_to_blink_value(blink_var_name, assert isinstance(blink_var_name, str) assert isinstance(v8_value_expr, str) assert isinstance(idl_type, web_idl.IdlType) - assert (argument_index is None or isinstance(argument_index, (int, long))) + assert (argument_index is None or isinstance(argument_index, int)) assert (default_value is None or isinstance(default_value, web_idl.LiteralConstant)) @@ -622,7 +622,7 @@ def make_v8_to_blink_value_variadic(blink_var_name, v8_array, """ assert isinstance(blink_var_name, str) assert isinstance(v8_array, str) - assert isinstance(v8_array_start_index, (int, long)) + assert isinstance(v8_array_start_index, int) assert isinstance(idl_type, web_idl.IdlType) pattern = ("auto&& ${{{_1}}} = " diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py index 4a6df51306..8b51f23a40 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/callback_interface.py @@ -177,7 +177,7 @@ def generate_callback_interface(callback_interface_identifier): prop_install_mode=PropInstallMode.UNCONDITIONAL, trampoline_var_name=None, attribute_entries=[], - constant_entries=filter(is_unconditional, constant_entries), + constant_entries=list(filter(is_unconditional, constant_entries)), exposed_construct_entries=[], operation_entries=[]) (install_interface_template_decl, install_interface_template_def, diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py index 52972fefe2..e5ae9d9629 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/code_node.py @@ -503,13 +503,13 @@ def __init__(self, template_format_str, *args, **kwargs): gensym_kwargs = {} template_vars = {} for arg in args: - assert isinstance(arg, (CodeNode, int, long, str)) + assert isinstance(arg, (CodeNode, int, str)) gensym = CodeNode.gensym() gensym_args.append("${{{}}}".format(gensym)) template_vars[gensym] = arg for key, value in kwargs.items(): - assert isinstance(key, (int, long, str)) - assert isinstance(value, (CodeNode, int, long, str)) + assert isinstance(key, (int, str)) + assert isinstance(value, (CodeNode, int, str)) gensym = CodeNode.gensym() gensym_kwargs[key] = "${{{}}}".format(gensym) template_vars[gensym] = value @@ -602,7 +602,7 @@ def extend(self, nodes): def insert(self, index, node): if node is None: return - assert isinstance(index, (int, long)) + assert isinstance(index, int) assert isinstance(node, CodeNode) assert node.outer is None and node.prev is None @@ -721,7 +721,7 @@ def analyze_symbol_usage(render_state): if not scope_chains: return counts - self_index = iter(scope_chains).next().index(self) + self_index = next(iter(scope_chains)).index(self) scope_chains = map( lambda scope_chain: scope_chain[self_index + 1:], scope_chains) scope_to_likeliness = {} diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py index a229a6c71c..5fa288dabf 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_expr.py @@ -109,7 +109,7 @@ def expr_and(terms): if any(term.is_always_false for term in terms): return _Expr(False) - terms = filter(lambda x: not x.is_always_true, terms) + terms = list(filter(lambda x: not x.is_always_true, terms)) if not terms: return _Expr(True) if len(terms) == 1: @@ -124,7 +124,7 @@ def expr_or(terms): if any(term.is_always_true for term in terms): return _Expr(True) - terms = filter(lambda x: not x.is_always_false, terms) + terms = list(filter(lambda x: not x.is_always_false, terms)) if not terms: return _Expr(False) if len(terms) == 1: @@ -222,7 +222,7 @@ def ref_selected(features): elif exposure.only_in_secure_contexts is False: secure_context_term = _Expr(True) else: - terms = map(ref_enabled, exposure.only_in_secure_contexts) + terms = list(map(ref_enabled, exposure.only_in_secure_contexts)) secure_context_term = expr_or( [_Expr("${is_in_secure_context}"), expr_not(expr_and(terms))]) @@ -275,10 +275,11 @@ def ref_selected(features): # [ContextEnabled] if exposure.context_enabled_features: - terms = map( - lambda feature: _Expr( - "${{context_feature_settings}}->is{}Enabled()".format( - feature)), exposure.context_enabled_features) + terms = list( + map( + lambda feature: _Expr( + "${{context_feature_settings}}->is{}Enabled()".format( + feature)), exposure.context_enabled_features)) context_enabled_terms.append( expr_and([_Expr("${context_feature_settings}"), expr_or(terms)])) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py index 87d26eec3c..f3e9d38247 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_format.py @@ -23,7 +23,7 @@ def __init__(self): self._template_formatter_indexing_count_ = 0 def get_value(self, key, args, kwargs): - if isinstance(key, (int, long)): + if isinstance(key, int): return args[key] assert isinstance(key, str) if not key: diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py index 2bcc4fed49..e72282aa69 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py @@ -116,4 +116,4 @@ def write_code_node_to_file(code_node, filepath): # stderr=format_result.error_message)) # # web_idl.file_io.write_to_file_if_changed(filepath, format_result.contents) - web_idl.file_io.write_to_file_if_changed(filepath, rendered_text) + web_idl.file_io.write_to_file_if_changed(filepath, rendered_text.encode('utf-8')) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py index b39f010041..4d68202296 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/dictionary.py @@ -993,7 +993,7 @@ def make_trace_member_node(member): _2 = _blink_member_name(member).value_var return TextNode(_format(pattern, _1=_1, _2=_2)) - body.extend(map(make_trace_member_node, own_members)) + body.extend(list(map(make_trace_member_node, own_members))) body.append(TextNode("BaseClass::Trace(visitor);")) return func_decl, func_def diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py index 10ff30656a..bfdf7128aa 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/interface.py @@ -582,7 +582,7 @@ def _make_blink_api_call(code_node, overriding_args=None): assert isinstance(code_node, SymbolScopeNode) assert isinstance(cg_context, CodeGenContext) - assert num_of_args is None or isinstance(num_of_args, (int, long)) + assert num_of_args is None or isinstance(num_of_args, int) assert (overriding_args is None or (isinstance(overriding_args, (list, tuple)) and all(isinstance(arg, str) for arg in overriding_args))) @@ -1196,8 +1196,10 @@ def make_overload_dispatcher(cg_context): did_use_break = did_use_break or can_fail conditional = expr_or( - map(lambda item: expr_from_exposure(item.function_like.exposure), - items)) + list( + map( + lambda item: expr_from_exposure(item.function_like.exposure + ), items))) if not conditional.is_always_true: node = CxxUnlikelyIfNode(cond=conditional, body=node) @@ -4642,7 +4644,7 @@ class _PropEntryConstructorGroup(_PropEntryBase): def __init__(self, is_context_dependent, exposure_conditional, world, constructor_group, ctor_callback_name, ctor_func_length): assert isinstance(ctor_callback_name, str) - assert isinstance(ctor_func_length, (int, long)) + assert isinstance(ctor_func_length, int) _PropEntryBase.__init__(self, is_context_dependent, exposure_conditional, world, constructor_group) @@ -4670,7 +4672,7 @@ def __init__(self, op_func_length, no_alloc_direct_callback_name=None): assert isinstance(op_callback_name, str) - assert isinstance(op_func_length, (int, long)) + assert isinstance(op_func_length, int) _PropEntryBase.__init__(self, is_context_dependent, exposure_conditional, world, operation_group) @@ -5175,9 +5177,9 @@ def make_install_interface_template(cg_context, function_name, class_name, api_c ]) if class_like.identifier == "CSSStyleDeclaration": - css_properties = filter( - lambda attr: "CSSProperty" in attr.extended_attributes, - class_like.attributes) + css_properties = list( + filter(lambda attr: "CSSProperty" in attr.extended_attributes, + class_like.attributes)) if css_properties: prop_name_list = "".join( map(lambda attr: "\"{}\", ".format(attr.identifier), @@ -5567,8 +5569,8 @@ def install_properties(table_name, target_entries, make_table_func, "V8DOMConfiguration::InstallConstants(${isolate}, " "${interface_template}, ${prototype_template}, " "kConstantCallbackTable, base::size(kConstantCallbackTable));") - constant_callback_entries = filter(lambda entry: entry.const_callback_name, - constant_entries) + constant_callback_entries = list(filter(lambda entry: entry.const_callback_name, + constant_entries)) install_properties(table_name, constant_callback_entries, _make_constant_callback_registration_table, installer_call_text) @@ -5584,8 +5586,8 @@ def install_properties(table_name, target_entries, make_table_func, "V8DOMConfiguration::InstallConstants(${isolate}, " "${interface_template}, ${prototype_template}, " "kConstantValueTable, base::size(kConstantValueTable));") - constant_value_entries = filter( - lambda entry: not entry.const_callback_name, constant_entries) + constant_value_entries = list(filter( + lambda entry: not entry.const_callback_name, constant_entries)) install_properties(table_name, constant_value_entries, _make_constant_value_registration_table, installer_call_text) @@ -6336,8 +6338,8 @@ def make_v8_context_snapshot_api(cg_context, component, attribute_entries, assert isinstance(component, web_idl.Component) derived_interfaces = cg_context.interface.deriveds - derived_names = map(lambda interface: interface.identifier, - derived_interfaces) + derived_names = list( + map(lambda interface: interface.identifier, derived_interfaces)) derived_names.append(cg_context.interface.identifier) if not ("Window" in derived_names or "HTMLDocument" in derived_names): return None, None @@ -6411,9 +6413,11 @@ def collect_callbacks(node): collect_callbacks(named_properties_object_callback_defs) collect_callbacks(cross_origin_property_callback_defs) - entry_nodes = map( - lambda name: TextNode("reinterpret_cast({}),".format(name)), - filter(None, callback_names)) + entry_nodes = list( + map( + lambda name: TextNode("reinterpret_cast({}),".format(name + )), + filter(None, callback_names))) table_node = ListNode([ TextNode("using namespace ${class_name}Callbacks;"), TextNode("static const intptr_t kReferenceTable[] = {"), @@ -6451,10 +6455,11 @@ def selector(entry): class_name=None, prop_install_mode=PropInstallMode.V8_CONTEXT_SNAPSHOT, trampoline_var_name=None, - attribute_entries=filter(selector, attribute_entries), - constant_entries=filter(selector, constant_entries), - exposed_construct_entries=filter(selector, exposed_construct_entries), - operation_entries=filter(selector, operation_entries)) + attribute_entries=list(filter(selector, attribute_entries)), + constant_entries=list(filter(selector, constant_entries)), + exposed_construct_entries=list( + filter(selector, exposed_construct_entries)), + operation_entries=list(filter(selector, operation_entries))) return func_decl, func_def @@ -6810,11 +6815,11 @@ def add_custom_callback_impl_decl(**params): class_name=impl_class_name, prop_install_mode=PropInstallMode.UNCONDITIONAL, trampoline_var_name=tp_install_unconditional_props, - attribute_entries=filter(is_unconditional, attribute_entries), - constant_entries=filter(is_unconditional, constant_entries), - exposed_construct_entries=filter(is_unconditional, - exposed_construct_entries), - operation_entries=filter(is_unconditional, operation_entries)) + attribute_entries=list(filter(is_unconditional, attribute_entries)), + constant_entries=list(filter(is_unconditional, constant_entries)), + exposed_construct_entries=list( + filter(is_unconditional, exposed_construct_entries)), + operation_entries=list(filter(is_unconditional, operation_entries))) (install_context_independent_props_decl, install_context_independent_props_def, install_context_independent_props_trampoline) = make_install_properties( @@ -6823,11 +6828,14 @@ def add_custom_callback_impl_decl(**params): class_name=impl_class_name, prop_install_mode=PropInstallMode.CONTEXT_INDEPENDENT, trampoline_var_name=tp_install_context_independent_props, - attribute_entries=filter(is_context_independent, attribute_entries), - constant_entries=filter(is_context_independent, constant_entries), - exposed_construct_entries=filter(is_context_independent, - exposed_construct_entries), - operation_entries=filter(is_context_independent, operation_entries)) + attribute_entries=list( + filter(is_context_independent, attribute_entries)), + constant_entries=list(filter(is_context_independent, + constant_entries)), + exposed_construct_entries=list( + filter(is_context_independent, exposed_construct_entries)), + operation_entries=list( + filter(is_context_independent, operation_entries))) (install_context_dependent_props_decl, install_context_dependent_props_def, install_context_dependent_props_trampoline) = make_install_properties( cg_context, @@ -6835,11 +6843,13 @@ def add_custom_callback_impl_decl(**params): class_name=impl_class_name, prop_install_mode=PropInstallMode.CONTEXT_DEPENDENT, trampoline_var_name=tp_install_context_dependent_props, - attribute_entries=filter(is_context_dependent, attribute_entries), - constant_entries=filter(is_context_dependent, constant_entries), - exposed_construct_entries=filter(is_context_dependent, - exposed_construct_entries), - operation_entries=filter(is_context_dependent, operation_entries)) + attribute_entries=list(filter(is_context_dependent, + attribute_entries)), + constant_entries=list(filter(is_context_dependent, constant_entries)), + exposed_construct_entries=list( + filter(is_context_dependent, exposed_construct_entries)), + operation_entries=list(filter(is_context_dependent, + operation_entries))) (install_interface_template_decl, install_interface_template_def, install_interface_template_trampoline) = make_install_interface_template( cg_context, diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py index b4c7055386..f3a2fcd772 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/mako_renderer.py @@ -105,7 +105,7 @@ def render(self, caller, template, template_vars): on_error = self._caller_stack_on_error if (len(current) <= len(on_error) and all(current[i] == on_error[i] - for i in xrange(len(current)))): + for i in range(len(current)))): pass # Error happened in a deeper caller. else: self._caller_stack_on_error = list(self._caller_stack) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py index dc3493cc39..017d3d47bb 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py @@ -70,8 +70,13 @@ def gn_format(contents, filename=None): def _invoke_format_command(command_line, filename, contents): - proc = subprocess.Popen( - command_line, stdin=subprocess.PIPE, stdout=subprocess.PIPE) + kwargs = {} + if sys.version_info.major != 2: + kwargs['encoding'] = 'utf-8' + proc = subprocess.Popen(command_line, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + **kwargs) stdout_output, stderr_output = proc.communicate(input=contents) exit_code = proc.wait() diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py index 0d8f4c0f30..e666a9b668 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/bind_gen/task_queue.py @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import functools import multiprocessing from .package_initializer import package_initializer @@ -76,7 +77,7 @@ def _report_worker_task_progress(self, report_progress): if not report_progress: return - done_count = reduce( + done_count = functools.reduce( lambda count, worker_task: count + bool(worker_task.ready()), self._worker_tasks, 0) report_progress(len(self._worker_tasks), done_count) @@ -85,4 +86,4 @@ def _report_worker_task_progress(self, report_progress): def _task_queue_run_tasks(tasks): for task in tasks: func, args, kwargs = task - apply(func, args, kwargs) + func(*args, **kwargs) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py index e8280be721..e49e6eb965 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/code_generator.py @@ -13,6 +13,7 @@ import sys from idl_types import set_ancestors, IdlType +from itertools import groupby from v8_globals import includes from v8_interface import constant_filters from v8_types import set_component_dirs @@ -43,6 +44,7 @@ # after path[0] == invoking script dir sys.path.insert(1, THIRD_PARTY_DIR) import jinja2 +from jinja2.filters import make_attrgetter, environmentfilter def generate_indented_conditional(code, conditional): @@ -88,6 +90,13 @@ def runtime_enabled_if(code, name): return generate_indented_conditional(code, function) +@environmentfilter +def do_stringify_key_group_by(environment, value, attribute): + expr = make_attrgetter(environment, attribute) + key = lambda item: '' if expr(item) is None else str(expr(item)) + return groupby(sorted(value, key=key), expr) + + def initialize_jinja_env(cache_dir): jinja_env = jinja2.Environment( loader=jinja2.FileSystemLoader(TEMPLATES_DIR), @@ -117,6 +126,7 @@ def initialize_jinja_env(cache_dir): }) jinja_env.filters.update(constant_filters()) jinja_env.filters.update(method_filters()) + jinja_env.filters["stringifykeygroupby"] = do_stringify_key_group_by return jinja_env diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py index 130004eae8..04c0fabcef 100755 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/generate_origin_trial_features.py @@ -80,7 +80,7 @@ def read_idl_file(reader, idl_filename): assert len(interfaces) == 1, ( "Expected one interface in file %r, found %d" % (idl_filename, len(interfaces))) - return (interfaces.values()[0], includes) + return (list(interfaces.values())[0], includes) def interface_is_global(interface): @@ -281,7 +281,7 @@ def main(): info_provider = create_component_info_provider( os.path.normpath(options.info_dir), options.target_component) - idl_filenames = map(str.strip, open(options.idl_files_list)) + idl_filenames = list(map(str.strip, open(options.idl_files_list))) generate_origin_trial_features(info_provider, options, idl_filenames) return 0 diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py index 14e6e9d3f8..b027818aef 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_definitions.py @@ -394,7 +394,8 @@ def is_invalid_attribute_type(idl_type): else: raise ValueError('Unrecognized node class: %s' % child_class) - if len(filter(None, [self.iterable, self.maplike, self.setlike])) > 1: + if len(list(filter(None, + [self.iterable, self.maplike, self.setlike]))) > 1: raise ValueError( 'Interface can only have one of iterable<>, maplike<> and setlike<>.' ) @@ -512,6 +513,9 @@ def __init__(self, node=None): def accept(self, visitor): visitor.visit_attribute(self) + def __lt__(self, other): + return self.name < other.name + ################################################################################ # Constants @@ -852,7 +856,7 @@ def accept(self, visitor): ################################################################################ -class Exposure: +class Exposure(object): """An Exposure holds one Exposed or RuntimeEnabled condition. Each exposure has two properties: exposed and runtime_enabled. Exposure(e, r) corresponds to [Exposed(e r)]. Exposure(e) corresponds to diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py index 8d72865a6c..b80eebdcd6 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_reader.py @@ -55,8 +55,8 @@ def validate_blink_idl_definitions(idl_filename, idl_file_basename, definitions. There is no filename convention in this case. - Otherwise, an IDL file is invalid. """ - targets = ( - definitions.interfaces.values() + definitions.dictionaries.values()) + targets = (list(definitions.interfaces.values()) + + list(definitions.dictionaries.values())) number_of_targets = len(targets) if number_of_targets > 1: raise Exception( diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py index cd4f0c3513..ab95e9c0b0 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/idl_types.py @@ -349,7 +349,7 @@ def is_union_type(self): return True def single_matching_member_type(self, predicate): - matching_types = filter(predicate, self.flattened_member_types) + matching_types = list(filter(predicate, self.flattened_member_types)) if len(matching_types) > 1: raise ValueError('%s is ambiguous.' % self.name) return matching_types[0] if matching_types else None diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py index e1677ee7bd..3c5006f064 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/utilities.py @@ -196,8 +196,9 @@ def include_path_for_union_types(self, union_type): @property def callback_functions(self): - return dict(self._component_info_core['callback_functions'].items() + - self._component_info_modules['callback_functions'].items()) + return dict( + list(self._component_info_core['callback_functions'].items()) + + list(self._component_info_modules['callback_functions'].items())) @property def specifier_for_export(self): @@ -209,8 +210,8 @@ def include_path_for_export(self): def load_interfaces_info_overall_pickle(info_dir): - with open(os.path.join(info_dir, - 'interfaces_info.pickle')) as interface_info_file: + with open(os.path.join(info_dir, 'interfaces_info.pickle'), + mode='rb') as interface_info_file: return pickle.load(interface_info_file) @@ -236,23 +237,20 @@ def merge_dict_recursively(target, diff): def create_component_info_provider_core(info_dir): interfaces_info = load_interfaces_info_overall_pickle(info_dir) - with open( - os.path.join(info_dir, 'core', - 'component_info_core.pickle')) as component_info_file: + with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'), + mode='rb') as component_info_file: component_info = pickle.load(component_info_file) return ComponentInfoProviderCore(interfaces_info, component_info) def create_component_info_provider_modules(info_dir): interfaces_info = load_interfaces_info_overall_pickle(info_dir) - with open( - os.path.join(info_dir, 'core', - 'component_info_core.pickle')) as component_info_file: + with open(os.path.join(info_dir, 'core', 'component_info_core.pickle'), + mode='rb') as component_info_file: component_info_core = pickle.load(component_info_file) - with open( - os.path.join( - info_dir, 'modules', - 'component_info_modules.pickle')) as component_info_file: + with open(os.path.join(info_dir, 'modules', + 'component_info_modules.pickle'), + mode='rb') as component_info_file: component_info_modules = pickle.load(component_info_file) return ComponentInfoProviderModules(interfaces_info, component_info_core, component_info_modules) @@ -356,7 +354,7 @@ def write_pickle_file(pickle_filename, data): pickle_filename = abs(pickle_filename) # If |data| is same with the file content, we skip updating. if os.path.isfile(pickle_filename): - with open(pickle_filename) as pickle_file: + with open(pickle_filename, 'rb') as pickle_file: try: if pickle.load(pickle_file) == data: return diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py index a43260414d..a85b03abe7 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_interface.py @@ -189,7 +189,7 @@ def member_filter(members): return sorted([ member for member in members if member.get(KEY) and not member.get('exposed_test') - ]) + ], key=lambda item: item['name']) def member_filter_by_name(members, name): return [member for member in members if member[KEY] == name] @@ -612,7 +612,8 @@ def interface_context(interface, interfaces, component_info): sorted( origin_trial_features(interface, context['constants'], context['attributes'], context['methods']) + - context_enabled_features(context['attributes'])), + context_enabled_features(context['attributes']), + key=lambda item: item['name']), }) if context['optional_features']: includes.add('platform/bindings/v8_per_context_data.h') @@ -1356,9 +1357,9 @@ def resolution_tests_methods(effective_overloads): # Extract argument and IDL type to simplify accessing these in each loop. arguments = [method['arguments'][index] for method in methods] - arguments_methods = zip(arguments, methods) + arguments_methods = list(zip(arguments, methods)) idl_types = [argument['idl_type_object'] for argument in arguments] - idl_types_methods = zip(idl_types, methods) + idl_types_methods = list(zip(idl_types, methods)) # We can’t do a single loop through all methods or simply sort them, because # a method may be listed in multiple steps of the resolution algorithm, and diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py index 5f1f89a3de..6ee8a40779 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_methods.py @@ -46,6 +46,10 @@ import v8_utilities from v8_utilities import (has_extended_attribute_value, is_unforgeable) +# TODO: Remove this once Python2 is obsoleted. +if sys.version_info.major != 2: + basestring = str + def method_is_visible(method, interface_is_partial): if 'overloads' in method: diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py index 2ecd692332..fcfc48371b 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/v8_utilities.py @@ -271,7 +271,7 @@ def deprecate_as(member): ]) -class ExposureSet: +class ExposureSet(object): """An ExposureSet is a collection of Exposure instructions.""" def __init__(self, exposures=None): diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py index 13fb7c7068..b73b771068 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py @@ -91,11 +91,13 @@ def __init__(self, ir): for operation_ir in ir.operations ]) self._operation_groups = tuple([ - OperationGroup( - operation_group_ir, - filter(lambda x: x.identifier == operation_group_ir.identifier, - self._operations), - owner=self) for operation_group_ir in ir.operation_groups + OperationGroup(operation_group_ir, + list( + filter( + lambda x: x.identifier == operation_group_ir + .identifier, self._operations)), + owner=self) + for operation_group_ir in ir.operation_groups ]) @property diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py index c92cf48eb2..f5d5912944 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/database.py @@ -156,4 +156,4 @@ def union_types(self): return self._view_by_kind(Database._Kind.UNION) def _view_by_kind(self, kind): - return self._impl.find_by_kind(kind).values() + return list(self._impl.find_by_kind(kind).values()) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py index abaeef39c3..e36cf7439a 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/exposure.py @@ -8,8 +8,11 @@ class _Feature(str): """Represents a runtime-enabled feature.""" + def __new__(cls, value): + return str.__new__(cls, value) + def __init__(self, value): - str.__init__(self, value) + str.__init__(self) self._is_context_dependent = ( RuntimeEnabledFeatures.is_context_dependent(self)) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py index 648c70d803..1712f19c67 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/function_like.py @@ -71,8 +71,9 @@ def is_variadic(self): def num_of_required_arguments(self): """Returns the number of required arguments.""" return len( - filter(lambda arg: not (arg.is_optional or arg.is_variadic), - self.arguments)) + list( + filter(lambda arg: not (arg.is_optional or arg.is_variadic), + self.arguments))) class OverloadGroup(WithIdentifier): @@ -171,8 +172,7 @@ def effective_overload_set(self, argument_count=None): Returns the effective overload set. https://heycam.github.io/webidl/#compute-the-effective-overload-set """ - assert argument_count is None or isinstance(argument_count, - (int, long)) + assert argument_count is None or isinstance(argument_count, int) N = argument_count S = [] @@ -188,21 +188,21 @@ def effective_overload_set(self, argument_count=None): S.append( OverloadGroup.EffectiveOverloadItem( - X, map(lambda arg: arg.idl_type, X.arguments), - map(lambda arg: arg.optionality, X.arguments))) + X, list(map(lambda arg: arg.idl_type, X.arguments)), + list(map(lambda arg: arg.optionality, X.arguments)))) if X.is_variadic: - for i in xrange(n, max(maxarg, N)): - t = map(lambda arg: arg.idl_type, X.arguments) - o = map(lambda arg: arg.optionality, X.arguments) - for _ in xrange(n, i + 1): + for i in range(n, max(maxarg, N)): + t = list(map(lambda arg: arg.idl_type, X.arguments)) + o = list(map(lambda arg: arg.optionality, X.arguments)) + for _ in range(n, i + 1): t.append(X.arguments[-1].idl_type) o.append(X.arguments[-1].optionality) S.append(OverloadGroup.EffectiveOverloadItem(X, t, o)) - t = map(lambda arg: arg.idl_type, X.arguments) - o = map(lambda arg: arg.optionality, X.arguments) - for i in xrange(n - 1, -1, -1): + t = list(map(lambda arg: arg.idl_type, X.arguments)) + o = list(map(lambda arg: arg.optionality, X.arguments)) + for i in range(n - 1, -1, -1): if X.arguments[i].optionality == IdlType.Optionality.REQUIRED: break S.append(OverloadGroup.EffectiveOverloadItem(X, t[:i], o[:i])) @@ -222,7 +222,7 @@ def distinguishing_argument_index(items_of_effective_overload_set): for item in items) assert len(items) > 1 - for index in xrange(len(items[0].type_list)): + for index in range(len(items[0].type_list)): # Assume that the given items are valid, and we only need to test # the two types. if OverloadGroup.are_distinguishable_types( diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py index c5ee2bd8a3..5831507248 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/idl_compiler.py @@ -149,8 +149,8 @@ def _remove_legacy_interface_members(self): for old_ir in old_irs: new_ir = make_copy(old_ir) self._ir_map.add(new_ir) - new_ir.attributes = filter(not_disabled, new_ir.attributes) - new_ir.operations = filter(not_disabled, new_ir.operations) + new_ir.attributes = list(filter(not_disabled, new_ir.attributes)) + new_ir.operations = list(filter(not_disabled, new_ir.operations)) def _record_defined_in_partial_and_mixin(self): old_irs = self._ir_map.irs_of_kinds( @@ -231,7 +231,7 @@ def process_interface_like(ir): only_to_members_of_partial_or_mixin=False) propagate_to_exposure(propagate) - map(process_member_like, ir.iter_all_members()) + list(map(process_member_like, ir.iter_all_members())) def process_member_like(ir): propagate = functools.partial(propagate_extattr, ir=ir) @@ -257,7 +257,7 @@ def propagate_to_exposure(propagate): self._ir_map.move_to_new_phase() - map(process_interface_like, old_irs) + list(map(process_interface_like, old_irs)) def _determine_blink_headers(self): irs = self._ir_map.irs_of_kinds( @@ -422,9 +422,9 @@ def is_own_member(member): assert not new_interface.deriveds derived_set = identifier_to_derived_set.get( new_interface.identifier, set()) - new_interface.deriveds = map( - lambda id_: self._ref_to_idl_def_factory.create(id_), - sorted(derived_set)) + new_interface.deriveds = list( + map(lambda id_: self._ref_to_idl_def_factory.create(id_), + sorted(derived_set))) def _supplement_missing_html_constructor_operation(self): # Temporary mitigation of misuse of [HTMLConstructor] @@ -553,7 +553,8 @@ def _calculate_group_exposure(self): self._ir_map.add(new_ir) for group in new_ir.iter_all_overload_groups(): - exposures = map(lambda overload: overload.exposure, group) + exposures = list(map(lambda overload: overload.exposure, + group)) # [Exposed] if any(not exposure.global_names_and_features @@ -653,8 +654,8 @@ def make_legacy_window_alias(ir): constructs = set() for global_name in global_names: constructs.update(exposed_map.get(global_name, [])) - new_ir.exposed_constructs = map( - self._ref_to_idl_def_factory.create, sorted(constructs)) + new_ir.exposed_constructs = list( + map(self._ref_to_idl_def_factory.create, sorted(constructs))) assert not new_ir.legacy_window_aliases if new_ir.identifier != 'Window': diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py index 65d24e529d..067ef2eb0b 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/interface.py @@ -180,8 +180,9 @@ def __init__(self, ir): self._constructor_groups = tuple([ ConstructorGroup( group_ir, - filter(lambda x: x.identifier == group_ir.identifier, - self._constructors), + list( + filter(lambda x: x.identifier == group_ir.identifier, + self._constructors)), owner=self) for group_ir in ir.constructor_groups ]) assert len(self._constructor_groups) <= 1 @@ -192,8 +193,9 @@ def __init__(self, ir): self._named_constructor_groups = tuple([ ConstructorGroup( group_ir, - filter(lambda x: x.identifier == group_ir.identifier, - self._named_constructors), + list( + filter(lambda x: x.identifier == group_ir.identifier, + self._named_constructors)), owner=self) for group_ir in ir.named_constructor_groups ]) self._operations = tuple([ @@ -203,22 +205,23 @@ def __init__(self, ir): self._operation_groups = tuple([ OperationGroup( group_ir, - filter(lambda x: x.identifier == group_ir.identifier, - self._operations), + list( + filter(lambda x: x.identifier == group_ir.identifier, + self._operations)), owner=self) for group_ir in ir.operation_groups ]) self._exposed_constructs = tuple(ir.exposed_constructs) self._legacy_window_aliases = tuple(ir.legacy_window_aliases) self._indexed_and_named_properties = None - indexed_and_named_property_operations = filter( - lambda x: x.is_indexed_or_named_property_operation, - self._operations) + indexed_and_named_property_operations = list( + filter(lambda x: x.is_indexed_or_named_property_operation, + self._operations)) if indexed_and_named_property_operations: self._indexed_and_named_properties = IndexedAndNamedProperties( indexed_and_named_property_operations, owner=self) self._stringifier = None - stringifier_operation_irs = filter(lambda x: x.is_stringifier, - ir.operations) + stringifier_operation_irs = list( + filter(lambda x: x.is_stringifier, ir.operations)) if stringifier_operation_irs: assert len(stringifier_operation_irs) == 1 op_ir = make_copy(stringifier_operation_irs[0]) @@ -231,8 +234,9 @@ def __init__(self, ir): attribute = None if operation.stringifier_attribute: attr_id = operation.stringifier_attribute - attributes = filter(lambda x: x.identifier == attr_id, - self._attributes) + attributes = list( + filter(lambda x: x.identifier == attr_id, + self._attributes)) assert len(attributes) == 1 attribute = attributes[0] self._stringifier = Stringifier(operation, attribute, owner=self) @@ -578,8 +582,9 @@ def __init__(self, ir, owner): self._operation_groups = tuple([ OperationGroup( group_ir, - filter(lambda x: x.identifier == group_ir.identifier, - self._operations), + list( + filter(lambda x: x.identifier == group_ir.identifier, + self._operations)), owner=owner) for group_ir in ir.operation_groups ]) @@ -666,8 +671,9 @@ def __init__(self, ir, owner): self._operation_groups = tuple([ OperationGroup( group_ir, - filter(lambda x: x.identifier == group_ir.identifier, - self._operations), + list( + filter(lambda x: x.identifier == group_ir.identifier, + self._operations)), owner=owner) for group_ir in ir.operation_groups ]) @@ -755,8 +761,9 @@ def __init__(self, ir, owner): self._operation_groups = tuple([ OperationGroup( group_ir, - filter(lambda x: x.identifier == group_ir.identifier, - self._operations), + list( + filter(lambda x: x.identifier == group_ir.identifier, + self._operations)), owner=owner) for group_ir in ir.operation_groups ]) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py index e9aeff4ab8..d80554d603 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/ir_builder.py @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import sys + from .argument import Argument from .ast_group import AstGroup from .attribute import Attribute @@ -30,6 +32,11 @@ from .typedef import Typedef +# TODO: Remove this once Python2 is obsoleted. +if sys.version_info.major != 2: + long = int + + def load_and_register_idl_definitions(filepaths, register_ir, create_ref_to_idl_def, idl_type_factory): """ @@ -160,7 +167,7 @@ def _build_namespace(self, node): child_nodes = list(node.GetChildren()) extended_attributes = self._take_extended_attributes(child_nodes) - members = map(self._build_interface_member, child_nodes) + members = list(map(self._build_interface_member, child_nodes)) attributes = [] constants = [] operations = [] @@ -302,7 +309,7 @@ def _build_dictionary(self, node): child_nodes = list(node.GetChildren()) inherited = self._take_inheritance(child_nodes) extended_attributes = self._take_extended_attributes(child_nodes) - own_members = map(self._build_dictionary_member, child_nodes) + own_members = list(map(self._build_dictionary_member, child_nodes)) return Dictionary.IR( identifier=Identifier(node.GetName()), @@ -336,7 +343,7 @@ def _build_callback_interface(self, node): child_nodes = list(node.GetChildren()) extended_attributes = self._take_extended_attributes(child_nodes) - members = map(self._build_interface_member, child_nodes) + members = list(map(self._build_interface_member, child_nodes)) constants = [] operations = [] for member in members: @@ -456,8 +463,8 @@ def build_extended_attribute(node): assert len(child_nodes) == 1 child = child_nodes[0] if child.GetClass() == 'Arguments': - arguments = map(build_extattr_argument, - child.GetChildren()) + arguments = list( + map(build_extattr_argument, child.GetChildren())) elif child.GetClass() == 'Call': assert len(child.GetChildren()) == 1 grand_child = child.GetChildren()[0] @@ -486,7 +493,9 @@ def build_extattr_argument(node): assert node.GetClass() == 'ExtAttributes' return ExtendedAttributes( - filter(None, map(build_extended_attribute, node.GetChildren()))) + list( + filter(None, map(build_extended_attribute, + node.GetChildren())))) def _build_inheritance(self, node): assert node.GetClass() == 'Inherit' @@ -506,7 +515,7 @@ def _build_is_variadic_argument(self, node): def _build_iterable(self, node): assert node.GetClass() == 'Iterable' - types = map(self._build_type, node.GetChildren()) + types = list(map(self._build_type, node.GetChildren())) assert len(types) == 1 or len(types) == 2 if len(types) == 1: # value iterator key_type, value_type = (None, types[0]) @@ -584,7 +593,7 @@ def _build_literal_constant(self, node): def _build_maplike(self, node, interface_identifier): assert node.GetClass() == 'Maplike' assert isinstance(interface_identifier, Identifier) - types = map(self._build_type, node.GetChildren()) + types = list(map(self._build_type, node.GetChildren())) assert len(types) == 2 key_type, value_type = types is_readonly = bool(node.GetProperty('READONLY')) @@ -676,7 +685,7 @@ def _build_maplike(self, node, interface_identifier): def _build_setlike(self, node, interface_identifier): assert node.GetClass() == 'Setlike' assert isinstance(interface_identifier, Identifier) - types = map(self._build_type, node.GetChildren()) + types = list(map(self._build_type, node.GetChildren())) assert len(types) == 1 value_type = types[0] is_readonly = bool(node.GetProperty('READONLY')) @@ -838,7 +847,7 @@ def build_promise_type(node, extended_attributes): def build_union_type(node, extended_attributes): return self._idl_type_factory.union_type( - member_types=map(self._build_type, node.GetChildren()), + member_types=list(map(self._build_type, node.GetChildren())), is_optional=is_optional, extended_attributes=extended_attributes, debug_info=self._build_debug_info(node)) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py index a7a2b11f3f..2f6b61300f 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/make_copy.py @@ -3,6 +3,13 @@ # found in the LICENSE file. +import sys + +# TODO: Remove this once Python2 is obsoleted. +if sys.version_info.major != 2: + long = int + basestring = str + def make_copy(obj, memo=None): """ Creates a copy of the given object, which should be an IR or part of IR. diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py index eeabef97cb..bd7e98907f 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py @@ -107,11 +107,13 @@ def __init__(self, ir): for operation_ir in ir.operations ]) self._operation_groups = tuple([ - OperationGroup( - operation_group_ir, - filter(lambda x: x.identifier == operation_group_ir.identifier, - self._operations), - owner=self) for operation_group_ir in ir.operation_groups + OperationGroup(operation_group_ir, + list( + filter( + lambda x: x.identifier == operation_group_ir + .identifier, self._operations)), + owner=self) + for operation_group_ir in ir.operation_groups ]) @property diff --git a/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl b/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl index 0add9c45a3..dc910f6d22 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl +++ b/src/3rdparty/chromium/third_party/blink/renderer/bindings/templates/dictionary_v8.cc.tmpl @@ -59,9 +59,9 @@ void {{v8_class}}::ToImpl(v8::Isolate* isolate, v8::Local v8_value, { DCHECK(executionContext); {% endif %}{# has_origin_trial_members #} {% endif %}{# members #} - {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %} + {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %} {% filter origin_trial_enabled(origin_trial_test, "executionContext") %} - {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %} + {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %} {% filter runtime_enabled(feature_name) %} {% for member in member_list %} v8::Local {{member.v8_value}}; @@ -147,9 +147,9 @@ bool toV8{{cpp_class}}(const {{cpp_class}}* impl, v8::Local dictiona DCHECK(executionContext); {% endif %}{# has_origin_trial_members #} {% endif %}{# members #} - {% for origin_trial_test, origin_trial_member_list in members | groupby('origin_trial_feature_name') %} + {% for origin_trial_test, origin_trial_member_list in members | stringifykeygroupby('origin_trial_feature_name') %} {% filter origin_trial_enabled(origin_trial_test, "executionContext") %} - {% for feature_name, member_list in origin_trial_member_list | groupby('runtime_enabled_feature_name') %} + {% for feature_name, member_list in origin_trial_member_list | stringifykeygroupby('runtime_enabled_feature_name') %} {% filter runtime_enabled(feature_name) %} {% for member in member_list %} v8::Local {{member.v8_value}}; diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py index 1799cd5a15..5f43ffabc2 100755 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/make_style_shorthands.py @@ -71,7 +71,7 @@ def is_empty(self): def enabled_longhands(self): include = lambda longhand: not longhand[ 'runtime_flag'] or self.is_enabled(longhand['runtime_flag']) - return filter(include, self._longhands) + return list(filter(include, self._longhands)) @property def index(self): @@ -87,8 +87,9 @@ def flags(self): def create_expansions(longhands): flags = collect_runtime_flags(longhands) - expansions = map(lambda mask: Expansion(longhands, flags, mask), - range(1 << len(flags))) + expansions = list( + map(lambda mask: Expansion(longhands, flags, mask), + range(1 << len(flags)))) assert len(expansions) > 0 # We generate 2^N expansions for N flags, so enforce some limit. assert len(flags) <= 4, 'Too many runtime flags for a single shorthand' @@ -114,14 +115,14 @@ def __init__(self, json5_file_paths, output_dir): self._longhand_dictionary = defaultdict(list) for property_ in json5_properties.shorthands: - property_['longhand_enum_keys'] = map(enum_key_for_css_property, - property_['longhands']) - property_['longhand_property_ids'] = map(id_for_css_property, - property_['longhands']) - - longhands = map( - lambda name: json5_properties.properties_by_name[name], - property_['longhands']) + property_['longhand_enum_keys'] = list( + map(enum_key_for_css_property, property_['longhands'])) + property_['longhand_property_ids'] = list( + map(id_for_css_property, property_['longhands'])) + + longhands = list( + map(lambda name: json5_properties.properties_by_name[name], + property_['longhands'])) property_['expansions'] = create_expansions(longhands) for longhand_enum_key in property_['longhand_enum_keys']: self._longhand_dictionary[longhand_enum_key].append(property_) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py index 75030ac577..f72aadee17 100755 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py @@ -42,8 +42,8 @@ def __init__(self, json5_file_paths, output_dir): aliases = self._css_properties.aliases # Lists of PropertyClassData. - self._property_classes_by_id = map(self.get_class, properties) - self._alias_classes_by_id = map(self.get_class, aliases) + self._property_classes_by_id = list(map(self.get_class, properties)) + self._alias_classes_by_id = list(map(self.get_class, aliases)) # Sort by enum value. self._property_classes_by_id.sort(key=lambda t: t.enum_value) diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py index 5ee49056be..db72660d47 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py @@ -95,7 +95,7 @@ def main(): open(args.output_file, 'wb').write( generate_gperf(gperf_path, - open(infile).read(), gperf_args)) + open(infile).read(), gperf_args).encode('utf-8')) if __name__ == '__main__': diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py index 28adc050f1..58113483e5 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_file.py @@ -66,7 +66,7 @@ def __init__(self, self._defaults = defaults self._valid_values = copy.deepcopy( valid_values if valid_values else {}) - self._parse(map(str.strip, lines)) + self._parse(list(map(str.strip, lines))) @classmethod def load_from_files(self, file_paths, defaults, valid_values, diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py index e46740a2e8..ab1981ad1e 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/in_generator.py @@ -32,10 +32,15 @@ import os.path import shlex import shutil +import sys import optparse from in_file import InFile +# TODO: Remove this once Python2 is obsoleted. +if sys.version_info.major != 2: + basestring = str + ######################################################### # This is now deprecated - use json5_generator.py instead diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py index cafe8d94a8..6925a4fa58 100755 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/make_runtime_features.py @@ -138,7 +138,7 @@ def _write_features_to_pickle_file(self, platform_output_dir): except Exception: # If trouble unpickling, overwrite pass - with open(os.path.abspath(file_name), 'w') as pickle_file: + with open(os.path.abspath(file_name), 'wb') as pickle_file: pickle.dump(features_map, pickle_file) def _template_inputs(self): diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl index dc3f44c5b1..3eefcf9f0e 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_factory.cc.tmpl @@ -26,7 +26,7 @@ using {{namespace}}FunctionMap = HashMapGetExecutionContext())) { diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl index 1b5297d52d..edecc81d9d 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/element_type_helpers.h.tmpl @@ -15,7 +15,7 @@ namespace blink { class Document; // Type checking. -{% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} +{% for tag in tags|sort(attribute='name') if not tag.multipleTagNames and not tag.noTypeHelpers %} class {{tag.interface}}; template <> inline bool IsElementOfType(const Node& node) { diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl index 0244433af2..dcdbb02a56 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/macros.tmpl @@ -25,7 +25,7 @@ {% macro trie_leaf(index, object, return_macro, lowercase_data) %} -{% set name, value = object.items()[0] %} +{% set name, value = (object.items()|list)[0] %} {% if name|length %} if ( {%- for c in name -%} @@ -45,7 +45,7 @@ return {{ return_macro(value) }}; {% macro trie_switch(trie, index, return_macro, lowercase_data) %} -{% if trie|length == 1 and trie.values()[0] is string %} +{% if trie|length == 1 and (trie.values()|list)[0] is string %} {{ trie_leaf(index, trie, return_macro, lowercase_data) -}} {% else %} {% if lowercase_data %} diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl index cb05c6c431..bd5566b03e 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/templates/make_qualified_names.h.tmpl @@ -24,12 +24,12 @@ namespace {{cpp_namespace}} { {{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceURI; // Tags -{% for tag in tags|sort %} +{% for tag in tags|sort(attribute='name') %} {{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}Tag; {% endfor %} // Attributes -{% for attr in attrs|sort %} +{% for attr in attrs|sort(attribute='name') %} {{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr; {% endfor %} diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/fetch/body.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/fetch/body.cc index 97d8301f46..8b24da08f5 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/fetch/body.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/fetch/body.cc @@ -113,8 +113,13 @@ class BodyFormDataConsumer final : public BodyConsumerBase { void DidFetchDataLoadedString(const String& string) override { auto* formData = MakeGarbageCollected(); - for (const auto& pair : URLSearchParams::Create(string)->Params()) + // URLSearchParams::Create() returns an on-heap object, but it can be + // garbage collected, so making it a persistent variable on the stack + // mitigates use-after-free scenarios. See crbug.com/1497997. + Persistent search_params = URLSearchParams::Create(string); + for (const auto& pair : search_params->Params()) { formData->append(pair.first, pair.second); + } DidFetchDataLoadedFormData(formData); } DISALLOW_COPY_AND_ASSIGN(BodyFormDataConsumer); diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/BUILD.gn b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/BUILD.gn index 3db4233ba2..8c0d149465 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/BUILD.gn +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/BUILD.gn @@ -121,6 +121,8 @@ blink_core_sources("paint") { "list_item_painter.h", "list_marker_painter.cc", "list_marker_painter.h", + "media_record_id.cc", + "media_record_id.h", "multi_column_set_painter.cc", "multi_column_set_painter.h", "ng/ng_box_fragment_painter.cc", diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/DEPS b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/DEPS index a58190f203..377061397a 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/DEPS +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/DEPS @@ -4,6 +4,8 @@ include_rules = [ "+cc/layers/picture_layer.h", # For DCHECK. "+base/logging.h", + # Hash function access + "+base/hash/hash.h", ] specific_include_rules = { diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_element_timing.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_element_timing.cc index 18089bb7ac..9b745590ba 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_element_timing.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_element_timing.cc @@ -67,7 +67,7 @@ void ImageElementTiming::NotifyImageFinished( return; const auto& insertion_result = images_notified_.insert( - std::make_pair(&layout_object, cached_image), ImageInfo()); + MediaRecordId::GenerateHash(&layout_object, cached_image), ImageInfo()); if (insertion_result.is_new_entry) insertion_result.stored_value->value.load_time_ = base::TimeTicks::Now(); } @@ -95,7 +95,7 @@ void ImageElementTiming::NotifyImagePainted( if (!internal::IsExplicitlyRegisteredForTiming(layout_object)) return; - auto it = images_notified_.find(std::make_pair(layout_object, cached_image)); + auto it = images_notified_.find(MediaRecordId::GenerateHash(layout_object, cached_image)); // It is possible that the pair is not in |images_notified_|. See // https://crbug.com/1027948 if (it != images_notified_.end() && !it->value.is_painted_ && cached_image) { @@ -212,7 +212,7 @@ void ImageElementTiming::NotifyBackgroundImagePainted( ImageInfo& info = images_notified_ - .insert(std::make_pair(layout_object, cached_image), ImageInfo()) + .insert(MediaRecordId::GenerateHash(layout_object, cached_image), ImageInfo()) .stored_value->value; if (!info.is_painted_) { info.is_painted_ = true; @@ -240,7 +240,7 @@ void ImageElementTiming::ReportImagePaintSwapTime(WebSwapResult, void ImageElementTiming::NotifyImageRemoved(const LayoutObject* layout_object, const ImageResourceContent* image) { - images_notified_.erase(std::make_pair(layout_object, image)); + images_notified_.erase(MediaRecordId::GenerateHash(layout_object, image)); } void ImageElementTiming::Trace(Visitor* visitor) const { diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_element_timing.h b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_element_timing.h index 0dbb052fe4..753ba37251 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_element_timing.h +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_element_timing.h @@ -5,11 +5,10 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_IMAGE_ELEMENT_TIMING_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_IMAGE_ELEMENT_TIMING_H_ -#include - #include "third_party/blink/public/web/web_swap_result.h" #include "third_party/blink/renderer/core/dom/element.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h" +#include "third_party/blink/renderer/core/paint/media_record_id.h" #include "third_party/blink/renderer/platform/heap/heap_allocator.h" #include "third_party/blink/renderer/platform/supplementable.h" #include "third_party/blink/renderer/platform/wtf/functional.h" @@ -121,13 +120,12 @@ class CORE_EXPORT ImageElementTiming final base::TimeTicks load_time_; bool is_painted_ = false; }; - typedef std::pair RecordId; // Hashmap of pairs of elements, LayoutObjects (for the elements) and // ImageResourceContent (for the src) which correspond to either images or // background images whose paint has been observed. For background images, // only the |is_painted_| bit is used, as the timestamp needs to be tracked by // |background_image_timestamps_|. - WTF::HashMap images_notified_; + WTF::HashMap images_notified_; // Hashmap of background images which contain information about the load time // of the background image. diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_paint_timing_detector.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_paint_timing_detector.cc index b92407aedb..3c9f99034b 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_paint_timing_detector.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_paint_timing_detector.cc @@ -166,11 +166,11 @@ void ImagePaintTimingDetector::NotifyImageRemoved( const ImageResourceContent* cached_image) { if (!is_recording_) return; - RecordId record_id = std::make_pair(&object, cached_image); - records_manager_.RemoveImageFinishedRecord(record_id); - if (!records_manager_.IsRecordedVisibleImage(record_id)) + MediaRecordIdHash record_id_hash = MediaRecordId::GenerateHash(&object, cached_image); + records_manager_.RemoveImageFinishedRecord(record_id_hash); + if (!records_manager_.IsRecordedVisibleImage(record_id_hash)) return; - records_manager_.RemoveVisibleRecord(record_id); + records_manager_.RemoveVisibleRecord(record_id_hash); need_update_timing_at_frame_end_ = true; } @@ -224,9 +224,11 @@ void ImagePaintTimingDetector::RecordImage( if (records_manager_.IsRecordedInvisibleImage(object)) return; - RecordId record_id = std::make_pair(&object, &cached_image); + MediaRecordId record_id(&object, &cached_image); + MediaRecordIdHash record_id_hash = record_id.GetHash(); + bool is_recorded_visible_image = - records_manager_.IsRecordedVisibleImage(record_id); + records_manager_.IsRecordedVisibleImage(record_id_hash); if (int depth = IgnorePaintTimingScope::IgnoreDepth()) { // Record the largest loaded image that is hidden due to documentElement // being invisible but by no other reason (i.e. IgnoreDepth() needs to be @@ -242,9 +244,9 @@ void ImagePaintTimingDetector::RecordImage( } if (is_recorded_visible_image && - !records_manager_.IsVisibleImageLoaded(record_id) && + !records_manager_.IsVisibleImageLoaded(record_id_hash) && cached_image.IsLoaded()) { - records_manager_.OnImageLoaded(record_id, frame_index_, style_image); + records_manager_.OnImageLoaded(record_id_hash, frame_index_, style_image); need_update_timing_at_frame_end_ = true; if (base::Optional& visualizer = frame_view_->GetPaintTimingDetector().Visualizer()) { @@ -272,7 +274,7 @@ void ImagePaintTimingDetector::RecordImage( } else { records_manager_.RecordVisible(record_id, rect_size); if (cached_image.IsLoaded()) { - records_manager_.OnImageLoaded(record_id, frame_index_, style_image); + records_manager_.OnImageLoaded(record_id_hash, frame_index_, style_image); need_update_timing_at_frame_end_ = true; } } @@ -306,8 +308,7 @@ uint64_t ImagePaintTimingDetector::ComputeImageRectSize( void ImagePaintTimingDetector::NotifyImageFinished( const LayoutObject& object, const ImageResourceContent* cached_image) { - RecordId record_id = std::make_pair(&object, cached_image); - records_manager_.NotifyImageFinished(record_id); + records_manager_.NotifyImageFinished(MediaRecordId::GenerateHash(&object, cached_image)); } void ImagePaintTimingDetector::ReportLargestIgnoredImage() { @@ -318,13 +319,13 @@ void ImagePaintTimingDetector::ReportLargestIgnoredImage() { ImageRecordsManager::ImageRecordsManager(LocalFrameView* frame_view) : size_ordered_set_(&LargeImageFirst), frame_view_(frame_view) {} -void ImageRecordsManager::OnImageLoaded(const RecordId& record_id, +void ImageRecordsManager::OnImageLoaded(MediaRecordIdHash record_id_hash, unsigned current_frame_index, const StyleFetchedImage* style_image) { - base::WeakPtr record = FindVisibleRecord(record_id); + base::WeakPtr record = FindVisibleRecord(record_id_hash); DCHECK(record); if (!style_image) { - record->load_time = image_finished_times_.at(record_id); + record->load_time = image_finished_times_.at(record_id_hash); DCHECK(!record->load_time.is_null()); } else { Document* document = frame_view_->GetFrame().GetDocument(); @@ -348,10 +349,9 @@ void ImageRecordsManager::ReportLargestIgnoredImage( largest_ignored_image_.reset(); return; } - RecordId record_id = std::make_pair(node->GetLayoutObject(), - largest_ignored_image_->cached_image); + MediaRecordId record_id(node->GetLayoutObject(), largest_ignored_image_->cached_image); size_ordered_set_.insert(record); - visible_images_.insert(record_id, std::move(largest_ignored_image_)); + visible_images_.insert(record_id.GetHash(), std::move(largest_ignored_image_)); OnImageLoadedInternal(record, current_frame_index); } @@ -363,22 +363,22 @@ void ImageRecordsManager::OnImageLoadedInternal( } void ImageRecordsManager::MaybeUpdateLargestIgnoredImage( - const RecordId& record_id, + const MediaRecordId& record_id, const uint64_t& visual_size) { if (visual_size && (!largest_ignored_image_ || visual_size > largest_ignored_image_->first_size)) { largest_ignored_image_ = - CreateImageRecord(*record_id.first, record_id.second, visual_size); + CreateImageRecord(*record_id.GetLayoutObject(), record_id.GetImageResourceContent(), visual_size); largest_ignored_image_->load_time = base::TimeTicks::Now(); } } -void ImageRecordsManager::RecordVisible(const RecordId& record_id, +void ImageRecordsManager::RecordVisible(const MediaRecordId& record_id, const uint64_t& visual_size) { std::unique_ptr record = - CreateImageRecord(*record_id.first, record_id.second, visual_size); + CreateImageRecord(*record_id.GetLayoutObject(), record_id.GetImageResourceContent(), visual_size); size_ordered_set_.insert(record->AsWeakPtr()); - visible_images_.insert(record_id, std::move(record)); + visible_images_.insert(record_id.GetHash(), std::move(record)); } std::unique_ptr ImageRecordsManager::CreateImageRecord( diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_paint_timing_detector.h b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_paint_timing_detector.h index e1188dbf35..41bc9e9943 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_paint_timing_detector.h +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/image_paint_timing_detector.h @@ -13,6 +13,7 @@ #include "third_party/blink/public/web/web_widget_client.h" #include "third_party/blink/renderer/core/dom/dom_node_ids.h" #include "third_party/blink/renderer/core/loader/resource/image_resource_content.h" +#include "third_party/blink/renderer/core/paint/media_record_id.h" #include "third_party/blink/renderer/core/paint/paint_timing_detector.h" #include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" #include "third_party/blink/renderer/platform/wtf/hash_set.h" @@ -53,8 +54,6 @@ class ImageRecord : public base::SupportsWeakPtr { bool loaded = false; }; -typedef std::pair RecordId; - // |ImageRecordsManager| is the manager of all of the images that Largest Image // Paint cares about. Note that an image does not necessarily correspond to a // node; it can also be one of the background images attached to a node. @@ -80,13 +79,13 @@ class CORE_EXPORT ImageRecordsManager { invisible_images_.erase(&object); } - inline void RemoveImageFinishedRecord(const RecordId& record_id) { - image_finished_times_.erase(record_id); + inline void RemoveImageFinishedRecord(MediaRecordIdHash record_id_hash) { + image_finished_times_.erase(record_id_hash); } - inline void RemoveVisibleRecord(const RecordId& record_id) { + inline void RemoveVisibleRecord(MediaRecordIdHash record_id_hash) { base::WeakPtr record = - visible_images_.find(record_id)->value->AsWeakPtr(); + visible_images_.find(record_id_hash)->value->AsWeakPtr(); if (!record->paint_time.is_null()) { DCHECK_GT(record->first_size, 0u); if (record->first_size > largest_removed_image_size_) { @@ -100,7 +99,7 @@ class CORE_EXPORT ImageRecordsManager { } } size_ordered_set_.erase(record); - visible_images_.erase(record_id); + visible_images_.erase(record_id_hash); // Leave out |images_queued_for_paint_time_| intentionally because the null // record will be removed in |AssignPaintTimeToRegisteredQueuedRecords|. } @@ -108,29 +107,29 @@ class CORE_EXPORT ImageRecordsManager { inline void RecordInvisible(const LayoutObject& object) { invisible_images_.insert(&object); } - void RecordVisible(const RecordId& record_id, const uint64_t& visual_size); - bool IsRecordedVisibleImage(const RecordId& record_id) const { - return visible_images_.Contains(record_id); + void RecordVisible(const MediaRecordId& record_id, const uint64_t& visual_size); + bool IsRecordedVisibleImage(const MediaRecordIdHash record_id_hash) const { + return visible_images_.Contains(record_id_hash); } bool IsRecordedInvisibleImage(const LayoutObject& object) const { return invisible_images_.Contains(&object); } - void NotifyImageFinished(const RecordId& record_id) { + void NotifyImageFinished(MediaRecordIdHash record_id_hash) { // TODO(npm): Ideally NotifyImageFinished() would only be called when the // record has not yet been inserted in |image_finished_times_| but that's // not currently the case. If we plumb some information from // ImageResourceContent we may be able to ensure that this call does not // require the Contains() check, which would save time. - if (!image_finished_times_.Contains(record_id)) - image_finished_times_.insert(record_id, base::TimeTicks::Now()); + if (!image_finished_times_.Contains(record_id_hash)) + image_finished_times_.insert(record_id_hash, base::TimeTicks::Now()); } - inline bool IsVisibleImageLoaded(const RecordId& record_id) const { - DCHECK(visible_images_.Contains(record_id)); - return visible_images_.at(record_id)->loaded; + inline bool IsVisibleImageLoaded(MediaRecordIdHash record_id_hash) const { + DCHECK(visible_images_.Contains(record_id_hash)); + return visible_images_.at(record_id_hash)->loaded; } - void OnImageLoaded(const RecordId&, + void OnImageLoaded(MediaRecordIdHash, unsigned current_frame_index, const StyleFetchedImage*); void OnImageLoadedInternal(base::WeakPtr&, @@ -139,7 +138,7 @@ class CORE_EXPORT ImageRecordsManager { // Receives a candidate image painted under opacity 0 but without nested // opacity. May update |largest_ignored_image_| if the new candidate has a // larger size. - void MaybeUpdateLargestIgnoredImage(const RecordId&, + void MaybeUpdateLargestIgnoredImage(const MediaRecordId&, const uint64_t& visual_size); void ReportLargestIgnoredImage(unsigned current_frame_index); @@ -175,9 +174,9 @@ class CORE_EXPORT ImageRecordsManager { private: // Find the image record of an visible image. inline base::WeakPtr FindVisibleRecord( - const RecordId& record_id) const { - DCHECK(visible_images_.Contains(record_id)); - return visible_images_.find(record_id)->value->AsWeakPtr(); + const MediaRecordIdHash record_id_hash) const { + DCHECK(visible_images_.Contains(record_id_hash)); + return visible_images_.find(record_id_hash)->value->AsWeakPtr(); } std::unique_ptr CreateImageRecord( const LayoutObject& object, @@ -192,7 +191,7 @@ class CORE_EXPORT ImageRecordsManager { record->loaded = true; } - HashMap> visible_images_; + HashMap> visible_images_; HashSet invisible_images_; // This stores the image records, which are ordered by size. @@ -202,7 +201,7 @@ class CORE_EXPORT ImageRecordsManager { Deque> images_queued_for_paint_time_; // Map containing timestamps of when LayoutObject::ImageNotifyFinished is // first called. - HashMap image_finished_times_; + HashMap image_finished_times_; Member frame_view_; diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/media_record_id.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/media_record_id.cc new file mode 100644 index 0000000000..5a0fc1e3c0 --- /dev/null +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/media_record_id.cc @@ -0,0 +1,27 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "third_party/blink/renderer/core/paint/media_record_id.h" + +#include "base/hash/hash.h" + +namespace blink { + +MediaRecordId::MediaRecordId(const LayoutObject* layout, + const ImageResourceContent* content) + : layout_object_(layout), + image_resource_content_(content), + hash_(GenerateHash(layout, image_resource_content_)) {} + +// This hash is used as a key where previously MediaRecordId was used directly. +// That helps us avoid storing references to the GCed LayoutObject and +// MediaTiming, as that can be unsafe when using regular WTF containers. It also +// helps us avoid needlessly allocating MediaRecordId on the heap. +MediaRecordIdHash MediaRecordId::GenerateHash(const LayoutObject* layout, + const ImageResourceContent* content) { + return base::HashInts(reinterpret_cast(layout), + reinterpret_cast(content)); +} + +} // namespace blink diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/paint/media_record_id.h b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/media_record_id.h new file mode 100644 index 0000000000..ae8df161ba --- /dev/null +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/paint/media_record_id.h @@ -0,0 +1,37 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_MEDIA_RECORD_ID_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_MEDIA_RECORD_ID_H_ + +#include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" + +namespace blink { +class LayoutObject; +class ImageResourceContent; + +using MediaRecordIdHash = size_t; + +class MediaRecordId { + STACK_ALLOCATED(); + + public: + static MediaRecordIdHash CORE_EXPORT GenerateHash(const LayoutObject* layout, + const ImageResourceContent* content); + + MediaRecordId(const LayoutObject* layout, const ImageResourceContent* content); + + MediaRecordIdHash GetHash() const { return hash_; } + const LayoutObject* GetLayoutObject() const { return layout_object_; } + const ImageResourceContent* GetImageResourceContent() const { return image_resource_content_; } + + private: + const LayoutObject* const layout_object_; + const ImageResourceContent* const image_resource_content_; + const MediaRecordIdHash hash_; +}; + +} // namespace blink +#endif diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h index e501cf17c3..e4550ec500 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h @@ -79,7 +79,12 @@ class XSLTProcessor final : public ScriptWrappable { void reset(); +#if LIBXML_VERSION >= 21200 + static void ParseErrorFunc(void* user_data, const xmlError*); +#else static void ParseErrorFunc(void* user_data, xmlError*); +#endif + static void GenericErrorFunc(void* user_data, const char* msg, ...); // Only for libXSLT callbacks diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc index b3ce345f32..2174d1df1d 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc @@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(void*, const char*, ...) { // It would be nice to do something with this error message. } +#if LIBXML_VERSION >= 21200 +void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) { +#else void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) { +#endif FrameConsole* console = static_cast(user_data); if (!console) return; diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc index ade14e0102..fe8c4cd277 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc @@ -86,35 +86,6 @@ static bool ContextLostRestoredEventsEnabled() { return RuntimeEnabledFeatures::Canvas2dContextLostRestoredEnabled(); } -// Drawing methods need to use this instead of SkAutoCanvasRestore in case -// overdraw detection substitutes the recording canvas (to discard overdrawn -// draw calls). -class CanvasRenderingContext2DAutoRestoreSkCanvas { - STACK_ALLOCATED(); - - public: - explicit CanvasRenderingContext2DAutoRestoreSkCanvas( - CanvasRenderingContext2D* context) - : context_(context), save_count_(0) { - DCHECK(context_); - cc::PaintCanvas* c = context_->GetOrCreatePaintCanvas(); - if (c) { - save_count_ = c->getSaveCount(); - } - } - - ~CanvasRenderingContext2DAutoRestoreSkCanvas() { - cc::PaintCanvas* c = context_->GetOrCreatePaintCanvas(); - if (c) - c->restoreToCount(save_count_); - context_->ValidateStateStack(); - } - - private: - CanvasRenderingContext2D* context_; - int save_count_; -}; - CanvasRenderingContext2D::CanvasRenderingContext2D( HTMLCanvasElement* canvas, const CanvasContextCreationAttributesCore& attrs) @@ -850,9 +821,11 @@ void CanvasRenderingContext2D::DrawTextInternal( // to 0, for example), so update style before grabbing the PaintCanvas. canvas()->GetDocument().UpdateStyleAndLayoutTreeForNode(canvas()); - cc::PaintCanvas* c = GetOrCreatePaintCanvas(); - if (!c) + // Abort if we don't have a paint canvas (e.g. the context was lost). + cc::PaintCanvas* paint_canvas = GetOrCreatePaintCanvas(); + if (!paint_canvas) { return; + } if (!std::isfinite(x) || !std::isfinite(y)) return; @@ -920,14 +893,13 @@ void CanvasRenderingContext2D::DrawTextInternal( if (paint_type == CanvasRenderingContext2DState::kStrokePaintType) InflateStrokeRect(bounds); - CanvasRenderingContext2DAutoRestoreSkCanvas state_restorer(this); if (use_max_width) { - c->save(); + paint_canvas->save(); // We draw when fontWidth is 0 so compositing operations (eg, a "copy" op) // still work. As the width of canvas is scaled, so text can be scaled to // match the given maxwidth, update text location so it appears on desired // place. - c->scale(clampTo(width / font_width), 1); + paint_canvas->scale(clampTo(width / font_width), 1); location.SetX(location.X() / clampTo(width / font_width)); } @@ -942,6 +914,16 @@ void CanvasRenderingContext2D::DrawTextInternal( [](const SkIRect& rect) // overdraw test lambda { return false; }, bounds, paint_type, CanvasRenderingContext2DState::kNoImage); + + if (use_max_width) { + // Cannot use `paint_canvas` in case recording canvas was substituted or + // destroyed during draw call. + cc::PaintCanvas* c = GetPaintCanvas(); + if (c) { + c->restore(); + } + } + ValidateStateStack(); } const Font& CanvasRenderingContext2D::AccessFont() { diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h b/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h index ac10ae4389..b0d09f182a 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h @@ -236,8 +236,6 @@ class MODULES_EXPORT CanvasRenderingContext2D final void WillOverwriteCanvas() override; private: - friend class CanvasRenderingContext2DAutoRestoreSkCanvas; - void DispatchContextLostEvent(TimerBase*); void DispatchContextRestoredEvent(TimerBase*); void TryRestoreContextEvent(TimerBase*); diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc index 7781c4083d..abd1bdd663 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc @@ -1110,14 +1110,18 @@ bool RTCPeerConnectionHandler::Initialize( const MediaConstraints& options, WebLocalFrame* frame) { DCHECK(task_runner_->RunsTasksInCurrentSequence()); - DCHECK(frame); - frame_ = frame; CHECK(!initialize_called_); initialize_called_ = true; // Prevent garbage collection of client_ during processing. auto* client_on_stack = client_; + if (!client_on_stack) { + return false; + } + + DCHECK(frame); + frame_ = frame; // TODO(crbug.com/787254): Evaluate the need for passing weak ptr since // PeerConnectionTracker is now leaky with base::LazyInstance. peer_connection_tracker_ = PeerConnectionTracker::GetInstance()->AsWeakPtr(); @@ -2523,10 +2527,13 @@ void RTCPeerConnectionHandler::OnIceCandidate(const String& sdp, int sdp_mline_index, int component, int address_family) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); // In order to ensure that the RTCPeerConnection is not garbage collected // from under the function, we keep a pointer to it on the stack. auto* client_on_stack = client_; - DCHECK(task_runner_->RunsTasksInCurrentSequence()); + if (!client_on_stack) { + return; + } TRACE_EVENT0("webrtc", "RTCPeerConnectionHandler::OnIceCandidateImpl"); // This line can cause garbage collection. auto* platform_candidate = MakeGarbageCollected( @@ -2547,7 +2554,9 @@ void RTCPeerConnectionHandler::OnIceCandidate(const String& sdp, NOTREACHED(); } } - if (!is_closed_) + + client_on_stack = client_; + if (!is_closed_ && client_on_stack) client_on_stack->DidGenerateICECandidate(platform_candidate); } diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/analyser_node.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/analyser_node.cc index cb281f5b72..9f515af5d9 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/analyser_node.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/analyser_node.cc @@ -51,9 +51,11 @@ AnalyserHandler::~AnalyserHandler() { } void AnalyserHandler::Process(uint32_t frames_to_process) { - AudioBus* output_bus = Output(0).Bus(); + DCHECK(Context()->IsAudioThread()); - if (!IsInitialized()) { + AudioBus* output_bus = Output(0).RenderingFanOutCount() > 0 ? Output(0).Bus() : nullptr; + + if (!IsInitialized() && output_bus) { output_bus->Zero(); return; } @@ -65,6 +67,11 @@ void AnalyserHandler::Process(uint32_t frames_to_process) { // Analyser reflects the current input. analyser_.WriteInput(input_bus.get(), frames_to_process); + // Subsequent steps require `output_bus` to be valid. + if (!output_bus) { + return; + } + if (!Input(0).IsConnected()) { // No inputs, so clear the output, and propagate the silence hint. output_bus->Zero(); diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_node.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_node.cc index eccf002b6d..5f18c4cd12 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_node.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_node.cc @@ -102,11 +102,16 @@ void AudioWorkletHandler::Process(uint32_t frames_to_process) { // We also need to check if the global scope is valid before we request // the rendering in the AudioWorkletGlobalScope. if (processor_ && !processor_->hasErrorOccurred()) { - // If the input is not connected, inform the processor with nullptr. - for (unsigned i = 0; i < NumberOfInputs(); ++i) + // If the input or the output is not connected, inform the processor with + // nullptr. + for (unsigned i = 0; i < NumberOfInputs(); ++i) { inputs_[i] = Input(i).IsConnected() ? Input(i).Bus() : nullptr; - for (unsigned i = 0; i < NumberOfOutputs(); ++i) - outputs_[i] = WrapRefCounted(Output(i).Bus()); + } + for (unsigned i = 0; i < NumberOfOutputs(); ++i) { + outputs_[i] = Output(i).RenderingFanOutCount() > 0 + ? WrapRefCounted(Output(i).Bus()) + : nullptr; + } for (const auto& param_name : param_value_map_.Keys()) { auto* const param_handler = param_handler_map_.at(param_name); diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_processor.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_processor.cc index e68b1c1b2f..84ab72b977 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_processor.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/audio_worklet_processor.cc @@ -343,6 +343,12 @@ void AudioWorkletProcessor::CopyArrayBuffersToPort( for (uint32_t bus_index = 0; bus_index < audio_port.size(); ++bus_index) { const scoped_refptr& audio_bus = audio_port[bus_index]; + + // nullptr indicates the output bus is not connected. Do not proceed. + if (!audio_bus) { + break; + } + for (uint32_t channel_index = 0; channel_index < audio_bus->NumberOfChannels(); ++channel_index) { const v8::ArrayBuffer::Contents& contents = diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc index 76aa9acccd..88e4228cae 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc @@ -169,6 +169,16 @@ void DeferredTaskHandler::UpdateAutomaticPullNodes() { if (try_locker.Locked()) { CopyToVector(automatic_pull_handlers_, rendering_automatic_pull_handlers_); + + // In rare cases, it is possible for automatic pull nodes' output bus + // to become stale. Make sure update their rendering output counts. + // crbug.com/1505080. + for (auto& handler : rendering_automatic_pull_handlers_) { + for (unsigned i = 0; i < handler->NumberOfOutputs(); ++i) { + handler->Output(i).UpdateRenderingState(); + } + } + automatic_pull_handlers_need_updating_ = false; } } diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/realtime_audio_destination_node.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/realtime_audio_destination_node.cc index 3854a6bc7e..13b78c74ad 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/realtime_audio_destination_node.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/webaudio/realtime_audio_destination_node.cc @@ -110,13 +110,21 @@ void RealtimeAudioDestinationHandler::SetChannelCount( uint32_t old_channel_count = this->ChannelCount(); AudioHandler::SetChannelCount(channel_count, exception_state); - // Stop, re-create and start the destination to apply the new channel count. - if (this->ChannelCount() != old_channel_count && - !exception_state.HadException()) { - StopPlatformDestination(); - CreatePlatformDestination(); - StartPlatformDestination(); + // After the context is closed, changing channel count will be ignored + // because it will trigger the recreation of the platform destination. This + // in turn can activate the audio rendering thread. + AudioContext* context = static_cast(Context()); + CHECK(context); + if (context->ContextState() == AudioContext::kClosed || + ChannelCount() == old_channel_count || + exception_state.HadException()) { + return; } + + // Stop, re-create and start the destination to apply the new channel count. + StopPlatformDestination(); + CreatePlatformDestination(); + StartPlatformDestination(); } void RealtimeAudioDestinationHandler::StartRendering() { diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/webusb/usb_device.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/webusb/usb_device.cc index 1ba2a231a0..41a6ff5cbe 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/modules/webusb/usb_device.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/webusb/usb_device.cc @@ -6,8 +6,10 @@ #include #include +#include #include +#include "base/optional.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" @@ -42,6 +44,10 @@ namespace blink { namespace { const char kBufferTooBig[] = "The data buffer exceeded its maximum size."; +const char kPacketLengthsTooBig[] = + "The total packet length exceeded the maximum size."; +const char kBufferSizeMismatch[] = + "The data buffer size must match the total packet length."; const char kDetachedBuffer[] = "The data buffer has been detached."; const char kDeviceStateChangeInProgress[] = "An operation that changes the device state is in progress."; @@ -179,6 +185,20 @@ bool ConvertBufferSource(const ArrayBufferOrArrayBufferView& buffer_source, return true; } +// Returns the sum of `packet_lengths`, or nullopt if the sum would overflow. +base::Optional TotalPacketLength( + const Vector& packet_lengths) { + uint32_t total_bytes = 0; + for (const auto packet_length : packet_lengths) { + // Check for overflow. + if (std::numeric_limits::max() - total_bytes < packet_length) { + return base::nullopt; + } + total_bytes += packet_length; + } + return total_bytes; +} + } // namespace USBDevice::USBDevice(UsbDeviceInfoPtr device_info, @@ -549,6 +569,14 @@ ScriptPromise USBDevice::isochronousTransferIn( Vector packet_lengths) { auto* resolver = MakeGarbageCollected(script_state); ScriptPromise promise = resolver->Promise(); + + base::Optional total_bytes = TotalPacketLength(packet_lengths); + if (!total_bytes.has_value()) { + resolver->Reject(MakeGarbageCollected( + DOMExceptionCode::kDataError, kPacketLengthsTooBig)); + return promise; + } + if (EnsureEndpointAvailable(true /* in */, endpoint_number, resolver)) { device_requests_.insert(resolver); device_->IsochronousTransferIn( @@ -569,6 +597,20 @@ ScriptPromise USBDevice::isochronousTransferOut( if (!EnsureEndpointAvailable(false /* out */, endpoint_number, resolver)) return promise; + base::Optional total_bytes = TotalPacketLength(packet_lengths); + if (!total_bytes.has_value()) { + resolver->Reject(MakeGarbageCollected( + DOMExceptionCode::kDataError, kPacketLengthsTooBig)); + return promise; + } + + DOMArrayBuffer* array_buffer = data.GetAsArrayBuffer(); + if (total_bytes.value() != static_cast(array_buffer->ByteLengthAsSizeT())) { + resolver->Reject(MakeGarbageCollected( + DOMExceptionCode::kDataError, kBufferSizeMismatch)); + return promise; + } + Vector buffer; if (!ConvertBufferSource(data, &buffer, resolver)) return promise; diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/audio_delay_dsp_kernel.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/audio_delay_dsp_kernel.cc index 25818dcf2a..c34118e953 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/audio_delay_dsp_kernel.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/audio_delay_dsp_kernel.cc @@ -150,7 +150,7 @@ int AudioDelayDSPKernel::ProcessARateScalar(unsigned start, const float* delay_times = delay_times_.Data(); for (unsigned i = start; i < frames_to_process; ++i) { - double delay_time = delay_times[i]; + double delay_time = std::fmax(delay_times[i], 0); double desired_delay_frames = delay_time * sample_rate; double read_position = w_index + buffer_length - desired_delay_frames; diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/cpu/arm/audio_delay_dsp_kernel_neon.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/cpu/arm/audio_delay_dsp_kernel_neon.cc index 2843bd60b8..803f3e7244 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/cpu/arm/audio_delay_dsp_kernel_neon.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/cpu/arm/audio_delay_dsp_kernel_neon.cc @@ -60,6 +60,7 @@ std::tuple AudioDelayDSPKernel::ProcessARateVector( int w_index = write_index_; const float32x4_t v_sample_rate = vdupq_n_f32(sample_rate); + const float32x4_t v_all_zeros = vdupq_n_f32(0); // The buffer length as a float and as an int so we don't need to constant // convert from one to the other. @@ -87,7 +88,8 @@ std::tuple AudioDelayDSPKernel::ProcessARateVector( int k = 0; for (int n = 0; n < number_of_loops; ++n, k += 4) { - const float32x4_t v_delay_time = vld1q_f32(delay_times + k); + const float32x4_t v_delay_time = vmaxq_f32(vld1q_f32(delay_times + k), + v_all_zeros); const float32x4_t v_desired_delay_frames = vmulq_f32(v_delay_time, v_sample_rate); @@ -100,7 +102,8 @@ std::tuple AudioDelayDSPKernel::ProcessARateVector( WrapPositionVector(v_read_position, v_buffer_length_float); // Get indices into the buffer for the samples we need for interpolation. - const int32x4_t v_read_index1 = vcvtq_s32_f32(v_read_position); + const int32x4_t v_read_index1 = WrapIndexVector( + vcvtq_s32_f32(v_read_position), v_buffer_length_int); const int32x4_t v_read_index2 = WrapIndexVector( vaddq_s32(v_read_index1, vdupq_n_s32(1)), v_buffer_length_int); diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/cpu/x86/audio_delay_dsp_kernel_sse2.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/cpu/x86/audio_delay_dsp_kernel_sse2.cc index fe2aef95ae..dd368ee4b0 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/cpu/x86/audio_delay_dsp_kernel_sse2.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/audio/cpu/x86/audio_delay_dsp_kernel_sse2.cc @@ -56,10 +56,10 @@ std::tuple AudioDelayDSPKernel::ProcessARateVector( const float sample_rate = this->SampleRate(); const float* delay_times = delay_times_.Data(); - int w_index = write_index_; const __m128 v_sample_rate = _mm_set1_ps(sample_rate); + const __m128 v_all_zeros = _mm_setzero_ps(); // The buffer length as a float and as an int so we don't need to constant // convert from one to the other. @@ -82,7 +82,10 @@ std::tuple AudioDelayDSPKernel::ProcessARateVector( int k = 0; for (int n = 0; n < number_of_loops; ++n, k += 4) { - const __m128 v_delay_time = _mm_loadu_ps(delay_times + k); + // It's possible that `delay_time` contains negative values. Make sure + // they are greater than zero. + const __m128 v_delay_time = _mm_max_ps(_mm_loadu_ps(delay_times + k), + v_all_zeros); const __m128 v_desired_delay_frames = _mm_mul_ps(v_delay_time, v_sample_rate); @@ -95,7 +98,8 @@ std::tuple AudioDelayDSPKernel::ProcessARateVector( WrapPositionVector(v_read_position, v_buffer_length_float); // Get indices into the buffer for the samples we need for interpolation. - const __m128i v_read_index1 = _mm_cvttps_epi32(v_read_position); + const __m128i v_read_index1 = WrapIndexVector( + _mm_cvttps_epi32(v_read_position), v_buffer_length_int); const __m128i v_read_index2 = WrapIndexVector( _mm_add_epi32(v_read_index1, _mm_set1_epi32(1)), v_buffer_length_int); diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc index 5622233970..3ad17ef41e 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.cc @@ -723,22 +723,29 @@ bool BMPImageReader::ProcessColorTable() { const size_t header_end = header_offset_ + info_header_.size; size_t colors_in_palette = info_header_.clr_used; + CHECK_LE(colors_in_palette, 256u); // Enforced by ProcessInfoHeader(). size_t table_size_in_bytes = colors_in_palette * bytes_per_color; const size_t table_end = header_end + table_size_in_bytes; if (table_end < header_end) return parent_->SetFailed(); - // Some BMPs don't contain a complete palette. Avoid reading off the end. + // Some BMPs don't contain a complete palette. Truncate it instead of reading + // off the end of the palette. if (img_data_offset_ && (img_data_offset_ < table_end)) { - colors_in_palette = (img_data_offset_ - header_end) / bytes_per_color; + size_t colors_in_truncated_palette = + (img_data_offset_ - header_end) / bytes_per_color; + CHECK_LE(colors_in_truncated_palette, colors_in_palette); + colors_in_palette = colors_in_truncated_palette; table_size_in_bytes = colors_in_palette * bytes_per_color; } - // Read color table. + // If we don't have enough data to read in the whole palette yet, stop here. if ((decoded_offset_ > data_->size()) || ((data_->size() - decoded_offset_) < table_size_in_bytes)) return false; - color_table_.resize(info_header_.clr_used); + + // Read the color table. + color_table_.resize(colors_in_palette); for (size_t i = 0; i < colors_in_palette; ++i) { color_table_[i].rgb_blue = ReadUint8(0); @@ -746,12 +753,6 @@ bool BMPImageReader::ProcessColorTable() { color_table_[i].rgb_red = ReadUint8(2); decoded_offset_ += bytes_per_color; } - // Explicitly zero any colors past the end of a truncated palette. - for (size_t i = colors_in_palette; i < info_header_.clr_used; ++i) { - color_table_[i].rgb_blue = 0; - color_table_[i].rgb_green = 0; - color_table_[i].rgb_red = 0; - } // We've now decoded all the non-image data we care about. Skip anything // else before the actual raster data. @@ -827,8 +828,11 @@ BMPImageReader::ProcessingResult BMPImageReader::ProcessRLEData() { // the image. const uint8_t count = ReadUint8(0); const uint8_t code = ReadUint8(1); - if ((count || (code != 1)) && PastEndOfImage(0)) + const bool is_past_end_of_image = PastEndOfImage(0); + if ((count || (code != 1)) && is_past_end_of_image) { return kFailure; + } + // Decode. if (!count) { @@ -849,7 +853,9 @@ BMPImageReader::ProcessingResult BMPImageReader::ProcessRLEData() { (is_top_down_ ? (coord_.Y() < (parent_->Size().Height() - 1)) : (coord_.Y() > 0))) buffer_->SetHasAlpha(true); - ColorCorrectCurrentRow(); + if (!is_past_end_of_image) { + ColorCorrectCurrentRow(); + } // There's no need to move |coord_| here to trigger the caller // to call SetPixelsChanged(). If the only thing that's changed // is the alpha state, that will be properly written into the @@ -923,7 +929,7 @@ BMPImageReader::ProcessingResult BMPImageReader::ProcessRLEData() { for (wtf_size_t which = 0; coord_.X() < end_x;) { // Some images specify color values past the end of the // color table; set these pixels to black. - if (color_indexes[which] < info_header_.clr_used) + if (color_indexes[which] < color_table_.size()) SetI(color_indexes[which]); else SetRGBA(0, 0, 0, 255); @@ -997,7 +1003,7 @@ BMPImageReader::ProcessingResult BMPImageReader::ProcessNonRLEData( } } else { // See comments near the end of ProcessRLEData(). - if (color_index < info_header_.clr_used) + if (color_index < color_table_.size()) SetI(color_index); else SetRGBA(0, 0, 0, 255); @@ -1061,6 +1067,13 @@ void BMPImageReader::ColorCorrectCurrentRow() { const ColorProfileTransform* const transform = parent_->ColorTransform(); if (!transform) return; + int decoder_width = parent_->Size().Width(); + // Enforce 0 ≤ current row < bitmap height. + CHECK_GE(coord_.Y(), 0); + CHECK_LT(coord_.Y(), buffer_->Bitmap().height()); + // Enforce decoder width == bitmap width exactly. (The bitmap rowbytes might + // add a bit of padding, but we are only converting one row at a time.) + CHECK_EQ(decoder_width, buffer_->Bitmap().width()); ImageFrame::PixelData* const row = buffer_->GetAddr(0, coord_.Y()); const skcms_PixelFormat fmt = XformColorFormat(); const skcms_AlphaFormat alpha = @@ -1069,7 +1082,7 @@ void BMPImageReader::ColorCorrectCurrentRow() { : skcms_AlphaFormat_Unpremul; const bool success = skcms_Transform(row, fmt, alpha, transform->SrcProfile(), row, fmt, alpha, - transform->DstProfile(), parent_->Size().Width()); + transform->DstProfile(), decoder_width); DCHECK(success); buffer_->SetPixelsChanged(true); } diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/webrtc_audio_sink.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/webrtc_audio_sink.cc index a0f2c5e800..0542a9a7d4 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/webrtc_audio_sink.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/webrtc_audio_sink.cc @@ -115,7 +115,7 @@ void WebRtcAudioSink::OnData(const media::AudioBus& audio_bus, } void WebRtcAudioSink::OnSetFormat(const media::AudioParameters& params) { - DCHECK(params.IsValid()); + CHECK(params.IsValid()); SendLogMessage(base::StringPrintf("OnSetFormat([label=%s] {params=[%s]})", adapter_->label().c_str(), params.AsHumanReadableString().c_str())); diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.cc index 065986002f..8e89e7af82 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/scheduler/worker/non_main_thread_task_queue.cc @@ -33,6 +33,10 @@ void NonMainThreadTaskQueue::OnTaskCompleted( base::sequence_manager::LazyNow* lazy_now) { // |non_main_thread_scheduler_| can be nullptr in tests. if (non_main_thread_scheduler_) { + // The last ref to `non_main_thread_scheduler_` might be released as part of + // this task's cleanup microtasks, make sure it lives through its own + // cleanup: crbug.com/1464113. + auto self_ref = WrapRefCounted(this); non_main_thread_scheduler_->OnTaskCompleted(this, task, task_timing, lazy_now); } diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc index e34b073723..c0f9268aa8 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc +++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc @@ -162,7 +162,9 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar }; // clang-format on -#if U_ICU_VERSION_MAJOR_NUM >= 58 +#if U_ICU_VERSION_MAJOR_NUM >= 74 +#define BA_LB_COUNT (U_LB_COUNT - 8) +#elif U_ICU_VERSION_MAJOR_NUM >= 58 #define BA_LB_COUNT (U_LB_COUNT - 3) #else #define BA_LB_COUNT U_LB_COUNT diff --git a/src/3rdparty/chromium/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py b/src/3rdparty/chromium/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py index fe8b5e5d61..01a2bd09e9 100755 --- a/src/3rdparty/chromium/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py +++ b/src/3rdparty/chromium/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py @@ -36,6 +36,7 @@ 'base::CreateSequencedTaskRunner', 'base::DefaultTickClock', 'base::ElapsedTimer', + 'base::HashInts', 'base::JobDelegate', 'base::JobHandle', 'base::PostJob', diff --git a/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/sanitized/module_snapshot_sanitized.cc b/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/sanitized/module_snapshot_sanitized.cc index 1789fa2785..0fb219311e 100644 --- a/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/sanitized/module_snapshot_sanitized.cc +++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/sanitized/module_snapshot_sanitized.cc @@ -97,9 +97,11 @@ ModuleSnapshotSanitized::AnnotationsSimpleMap() const { std::map annotations = snapshot_->AnnotationsSimpleMap(); if (allowed_annotations_) { - for (auto kv = annotations.begin(); kv != annotations.end(); ++kv) { - if (!KeyIsAllowed(kv->first, *allowed_annotations_)) { - annotations.erase(kv); + for (auto kv = annotations.begin(); kv != annotations.end();) { + if (KeyIsAllowed(kv->first, *allowed_annotations_)) { + ++kv; + } else { + kv = annotations.erase(kv); } } } diff --git a/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py b/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py index 5e3734d783..e3d46bd194 100644 --- a/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py +++ b/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py @@ -201,6 +201,10 @@ def _compute_python_dependencies(root_dir=None): paths = set() for path in module_paths: + # Builtin/namespaced modules may return None for the file path. + if not path: + continue + path = os.path.abspath(path) if not path.startswith(root_dir): diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn b/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn index cd488e88b6..ea1dc3d9a7 100644 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn +++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/BUILD.gn @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/python.gni") + import("//third_party/blink/public/public_features.gni") import("./all_devtools_files.gni") import("./all_devtools_modules.gni") diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/LICENSE b/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/LICENSE deleted file mode 100644 index 77a9719731..0000000000 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2012-2014 Chris Pettitt - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/README.md b/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/README.md deleted file mode 100644 index 19a09096f2..0000000000 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Rolling Dagre - -## What is dagre? -Dagre is a third-party graph layouting library, which is used by the graph visualizer of -Chrome `DevTools/web_audio`. It implements several research papers about layouting graph. -1. Size: The size of dagre.js 323 KB. The core of dagre.js is 83 KB. -2. Github repo: https://github.com/dagrejs/dagre - -## Why should we add Dagre as a module, instead of a folder under web_audio? -Dagre is used by both `DevTools/web_audio` and `DevTools/web_audio_worker`. Therefore, -it seems better to be a module that can be used as a dependency. For example, -`web_audio` constructs `dagre.graphlib.Graph` and sends to `web_audio_worker`, which is a Web Worker that runs `dagre.layout()`. - -## Updating Dagre -1. Download from https://github.com/dagrejs/dagre/blob/master/dist/dagre.js -2. Optionally add a comment "// clang-format off" at the beginning of `dagre.js`. diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/dagre.js b/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/dagre.js deleted file mode 100644 index ce56e951b2..0000000000 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/dagre_layout/dagre.js +++ /dev/null @@ -1,11500 +0,0 @@ -// clang-format off -/* eslint-disable */ -(function(f) { -if (typeof exports === 'object' && typeof module !== 'undefined') { - module.exports = f() -} else if (typeof define === 'function' && define.amd) { - define([], f) -} else { - var g; - if (typeof window !== 'undefined') { - g = window - } else if (typeof global !== 'undefined') { - g = global - } else if (typeof self !== 'undefined') { - g = self - } else { - g = this - } - g.dagre = f() -} -})(function() { -var define, module, exports; -return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c='function'==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error('Cannot find module \''+i+'\'');throw a.code='MODULE_NOT_FOUND',a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u='function'==typeof require&&require,i=0;i 0; --i) { - entry = buckets[i].dequeue(); - if (entry) { - results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); - break; - } - } - } - } - - return results; -} - -function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { - var results = collectPredecessors ? [] : undefined; - - _.forEach(g.inEdges(entry.v), function(edge) { - var weight = g.edge(edge), - uEntry = g.node(edge.v); - - if (collectPredecessors) { - results.push({ v: edge.v, w: edge.w }); - } - - uEntry.out -= weight; - assignBucket(buckets, zeroIdx, uEntry); - }); - - _.forEach(g.outEdges(entry.v), function(edge) { - var weight = g.edge(edge), - w = edge.w, - wEntry = g.node(w); - wEntry['in'] -= weight; - assignBucket(buckets, zeroIdx, wEntry); - }); - - g.removeNode(entry.v); - - return results; -} - -function buildState(g, weightFn) { - var fasGraph = new Graph(), - maxIn = 0, - maxOut = 0; - - _.forEach(g.nodes(), function(v) { - fasGraph.setNode(v, { v: v, 'in': 0, out: 0 }); - }); - - // Aggregate weights on nodes, but also sum the weights across multi-edges - // into a single edge for the fasGraph. - _.forEach(g.edges(), function(e) { - var prevWeight = fasGraph.edge(e.v, e.w) || 0, - weight = weightFn(e), - edgeWeight = prevWeight + weight; - fasGraph.setEdge(e.v, e.w, edgeWeight); - maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight); - maxIn = Math.max(maxIn, fasGraph.node(e.w)['in'] += weight); - }); - - var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); }); - var zeroIdx = maxIn + 1; - - _.forEach(fasGraph.nodes(), function(v) { - assignBucket(buckets, zeroIdx, fasGraph.node(v)); - }); - - return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; -} - -function assignBucket(buckets, zeroIdx, entry) { - if (!entry.out) { - buckets[0].enqueue(entry); - } else if (!entry['in']) { - buckets[buckets.length - 1].enqueue(entry); - } else { - buckets[entry.out - entry['in'] + zeroIdx].enqueue(entry); - } -} - -},{'./data/list':5,'./graphlib':7,'./lodash':10}],9:[function(require,module,exports){ -'use strict'; - -var _ = require('./lodash'), - acyclic = require('./acyclic'), - normalize = require('./normalize'), - rank = require('./rank'), - normalizeRanks = require('./util').normalizeRanks, - parentDummyChains = require('./parent-dummy-chains'), - removeEmptyRanks = require('./util').removeEmptyRanks, - nestingGraph = require('./nesting-graph'), - addBorderSegments = require('./add-border-segments'), - coordinateSystem = require('./coordinate-system'), - order = require('./order'), - position = require('./position'), - util = require('./util'), - Graph = require('./graphlib').Graph; - -module.exports = layout; - -function layout(g, opts) { - var time = opts && opts.debugTiming ? util.time : util.notime; - time('layout', function() { - var layoutGraph = time(' buildLayoutGraph', - function() { return buildLayoutGraph(g); }); - time(' runLayout', function() { runLayout(layoutGraph, time); }); - time(' updateInputGraph', function() { updateInputGraph(g, layoutGraph); }); - }); -} - -function runLayout(g, time) { - time(' makeSpaceForEdgeLabels', function() { makeSpaceForEdgeLabels(g); }); - time(' removeSelfEdges', function() { removeSelfEdges(g); }); - time(' acyclic', function() { acyclic.run(g); }); - time(' nestingGraph.run', function() { nestingGraph.run(g); }); - time(' rank', function() { rank(util.asNonCompoundGraph(g)); }); - time(' injectEdgeLabelProxies', function() { injectEdgeLabelProxies(g); }); - time(' removeEmptyRanks', function() { removeEmptyRanks(g); }); - time(' nestingGraph.cleanup', function() { nestingGraph.cleanup(g); }); - time(' normalizeRanks', function() { normalizeRanks(g); }); - time(' assignRankMinMax', function() { assignRankMinMax(g); }); - time(' removeEdgeLabelProxies', function() { removeEdgeLabelProxies(g); }); - time(' normalize.run', function() { normalize.run(g); }); - time(' parentDummyChains', function() { parentDummyChains(g); }); - time(' addBorderSegments', function() { addBorderSegments(g); }); - time(' order', function() { order(g); }); - time(' insertSelfEdges', function() { insertSelfEdges(g); }); - time(' adjustCoordinateSystem', function() { coordinateSystem.adjust(g); }); - time(' position', function() { position(g); }); - time(' positionSelfEdges', function() { positionSelfEdges(g); }); - time(' removeBorderNodes', function() { removeBorderNodes(g); }); - time(' normalize.undo', function() { normalize.undo(g); }); - time(' fixupEdgeLabelCoords', function() { fixupEdgeLabelCoords(g); }); - time(' undoCoordinateSystem', function() { coordinateSystem.undo(g); }); - time(' translateGraph', function() { translateGraph(g); }); - time(' assignNodeIntersects', function() { assignNodeIntersects(g); }); - time(' reversePoints', function() { reversePointsForReversedEdges(g); }); - time(' acyclic.undo', function() { acyclic.undo(g); }); -} - -/* - * Copies final layout information from the layout graph back to the input - * graph. This process only copies allowlisted attributes from the layout - * graph to the input graph, so it serves as a good place to determine what - * attributes can influence layout. - */ -function updateInputGraph(inputGraph, layoutGraph) { - _.forEach(inputGraph.nodes(), function(v) { - var inputLabel = inputGraph.node(v), - layoutLabel = layoutGraph.node(v); - - if (inputLabel) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - - if (layoutGraph.children(v).length) { - inputLabel.width = layoutLabel.width; - inputLabel.height = layoutLabel.height; - } - } - }); - - _.forEach(inputGraph.edges(), function(e) { - var inputLabel = inputGraph.edge(e), - layoutLabel = layoutGraph.edge(e); - - inputLabel.points = layoutLabel.points; - if (_.has(layoutLabel, 'x')) { - inputLabel.x = layoutLabel.x; - inputLabel.y = layoutLabel.y; - } - }); - - inputGraph.graph().width = layoutGraph.graph().width; - inputGraph.graph().height = layoutGraph.graph().height; -} - -var graphNumAttrs = ['nodesep', 'edgesep', 'ranksep', 'marginx', 'marginy'], - graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: 'tb' }, - graphAttrs = ['acyclicer', 'ranker', 'rankdir', 'align'], - nodeNumAttrs = ['width', 'height'], - nodeDefaults = { width: 0, height: 0 }, - edgeNumAttrs = ['minlen', 'weight', 'width', 'height', 'labeloffset'], - edgeDefaults = { - minlen: 1, weight: 1, width: 0, height: 0, - labeloffset: 10, labelpos: 'r' - }, - edgeAttrs = ['labelpos']; - -/* - * Constructs a new graph from the input graph, which can be used for layout. - * This process copies only allowlisted attributes from the input graph to the - * layout graph. Thus this function serves as a good place to determine what - * attributes can influence layout. - */ -function buildLayoutGraph(inputGraph) { - var g = new Graph({ multigraph: true, compound: true }), - graph = canonicalize(inputGraph.graph()); - - g.setGraph(_.merge({}, - graphDefaults, - selectNumberAttrs(graph, graphNumAttrs), - _.pick(graph, graphAttrs))); - - _.forEach(inputGraph.nodes(), function(v) { - var node = canonicalize(inputGraph.node(v)); - g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); - g.setParent(v, inputGraph.parent(v)); - }); - - _.forEach(inputGraph.edges(), function(e) { - var edge = canonicalize(inputGraph.edge(e)); - g.setEdge(e, _.merge({}, - edgeDefaults, - selectNumberAttrs(edge, edgeNumAttrs), - _.pick(edge, edgeAttrs))); - }); - - return g; -} - -/* - * This idea comes from the Gansner paper: to account for edge labels in our - * layout we split each rank in half by doubling minlen and halving ranksep. - * Then we can place labels at these mid-points between nodes. - * - * We also add some minimal padding to the width to push the label for the edge - * away from the edge itself a bit. - */ -function makeSpaceForEdgeLabels(g) { - var graph = g.graph(); - graph.ranksep /= 2; - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - edge.minlen *= 2; - if (edge.labelpos.toLowerCase() !== 'c') { - if (graph.rankdir === 'TB' || graph.rankdir === 'BT') { - edge.width += edge.labeloffset; - } else { - edge.height += edge.labeloffset; - } - } - }); -} - -/* - * Creates temporary dummy nodes that capture the rank in which each edge's - * label is going to, if it has one of non-zero width and height. We do this - * so that we can safely remove empty ranks while preserving balance for the - * label's position. - */ -function injectEdgeLabelProxies(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.width && edge.height) { - var v = g.node(e.v), - w = g.node(e.w), - label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; - util.addDummyNode(g, 'edge-proxy', label, '_ep'); - } - }); -} - -function assignRankMinMax(g) { - var maxRank = 0; - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.borderTop) { - node.minRank = g.node(node.borderTop).rank; - node.maxRank = g.node(node.borderBottom).rank; - maxRank = _.max(maxRank, node.maxRank); - } - }); - g.graph().maxRank = maxRank; -} - -function removeEdgeLabelProxies(g) { - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.dummy === 'edge-proxy') { - g.edge(node.e).labelRank = node.rank; - g.removeNode(v); - } - }); -} - -function translateGraph(g) { - var minX = Number.POSITIVE_INFINITY, - maxX = 0, - minY = Number.POSITIVE_INFINITY, - maxY = 0, - graphLabel = g.graph(), - marginX = graphLabel.marginx || 0, - marginY = graphLabel.marginy || 0; - - function getExtremes(attrs) { - var x = attrs.x, - y = attrs.y, - w = attrs.width, - h = attrs.height; - minX = Math.min(minX, x - w / 2); - maxX = Math.max(maxX, x + w / 2); - minY = Math.min(minY, y - h / 2); - maxY = Math.max(maxY, y + h / 2); - } - - _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); }); - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (_.has(edge, 'x')) { - getExtremes(edge); - } - }); - - minX -= marginX; - minY -= marginY; - - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - node.x -= minX; - node.y -= minY; - }); - - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - _.forEach(edge.points, function(p) { - p.x -= minX; - p.y -= minY; - }); - if (_.has(edge, 'x')) { edge.x -= minX; } - if (_.has(edge, 'y')) { edge.y -= minY; } - }); - - graphLabel.width = maxX - minX + marginX; - graphLabel.height = maxY - minY + marginY; -} - -function assignNodeIntersects(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e), - nodeV = g.node(e.v), - nodeW = g.node(e.w), - p1, p2; - if (!edge.points) { - edge.points = []; - p1 = nodeW; - p2 = nodeV; - } else { - p1 = edge.points[0]; - p2 = edge.points[edge.points.length - 1]; - } - edge.points.unshift(util.intersectRect(nodeV, p1)); - edge.points.push(util.intersectRect(nodeW, p2)); - }); -} - -function fixupEdgeLabelCoords(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (_.has(edge, 'x')) { - if (edge.labelpos === 'l' || edge.labelpos === 'r') { - edge.width -= edge.labeloffset; - } - switch (edge.labelpos) { - case 'l': edge.x -= edge.width / 2 + edge.labeloffset; break; - case 'r': edge.x += edge.width / 2 + edge.labeloffset; break; - } - } - }); -} - -function reversePointsForReversedEdges(g) { - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.reversed) { - edge.points.reverse(); - } - }); -} - -function removeBorderNodes(g) { - _.forEach(g.nodes(), function(v) { - if (g.children(v).length) { - var node = g.node(v), - t = g.node(node.borderTop), - b = g.node(node.borderBottom), - l = g.node(_.last(node.borderLeft)), - r = g.node(_.last(node.borderRight)); - - node.width = Math.abs(r.x - l.x); - node.height = Math.abs(b.y - t.y); - node.x = l.x + node.width / 2; - node.y = t.y + node.height / 2; - } - }); - - _.forEach(g.nodes(), function(v) { - if (g.node(v).dummy === 'border') { - g.removeNode(v); - } - }); -} - -function removeSelfEdges(g) { - _.forEach(g.edges(), function(e) { - if (e.v === e.w) { - var node = g.node(e.v); - if (!node.selfEdges) { - node.selfEdges = []; - } - node.selfEdges.push({ e: e, label: g.edge(e) }); - g.removeEdge(e); - } - }); -} - -function insertSelfEdges(g) { - var layers = util.buildLayerMatrix(g); - _.forEach(layers, function(layer) { - var orderShift = 0; - _.forEach(layer, function(v, i) { - var node = g.node(v); - node.order = i + orderShift; - _.forEach(node.selfEdges, function(selfEdge) { - util.addDummyNode(g, 'selfedge', { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + (++orderShift), - e: selfEdge.e, - label: selfEdge.label - }, '_se'); - }); - delete node.selfEdges; - }); - }); -} - -function positionSelfEdges(g) { - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (node.dummy === 'selfedge') { - var selfNode = g.node(node.e.v), - x = selfNode.x + selfNode.width / 2, - y = selfNode.y, - dx = node.x - x, - dy = selfNode.height / 2; - g.setEdge(node.e, node.label); - g.removeNode(v); - node.label.points = [ - { x: x + 2 * dx / 3, y: y - dy }, - { x: x + 5 * dx / 6, y: y - dy }, - { x: x + dx , y: y }, - { x: x + 5 * dx / 6, y: y + dy }, - { x: x + 2 * dx / 3, y: y + dy } - ]; - node.label.x = node.x; - node.label.y = node.y; - } - }); -} - -function selectNumberAttrs(obj, attrs) { - return _.mapValues(_.pick(obj, attrs), Number); -} - -function canonicalize(attrs) { - var newAttrs = {}; - _.forEach(attrs, function(v, k) { - newAttrs[k.toLowerCase()] = v; - }); - return newAttrs; -} - -},{'./acyclic':2,'./add-border-segments':3,'./coordinate-system':4,'./graphlib':7,'./lodash':10,'./nesting-graph':11,'./normalize':12,'./order':17,'./parent-dummy-chains':22,'./position':24,'./rank':26,'./util':29}],10:[function(require,module,exports){ -/* global window */ - -var lodash; - -if (typeof require === 'function') { - try { - lodash = { - cloneDeep: require('lodash/cloneDeep'), - constant: require('lodash/constant'), - defaults: require('lodash/defaults'), - each: require('lodash/each'), - filter: require('lodash/filter'), - find: require('lodash/find'), - flatten: require('lodash/flatten'), - forEach: require('lodash/forEach'), - forIn: require('lodash/forIn'), - has: require('lodash/has'), - isUndefined: require('lodash/isUndefined'), - last: require('lodash/last'), - map: require('lodash/map'), - mapValues: require('lodash/mapValues'), - max: require('lodash/max'), - merge: require('lodash/merge'), - min: require('lodash/min'), - minBy: require('lodash/minBy'), - now: require('lodash/now'), - pick: require('lodash/pick'), - range: require('lodash/range'), - reduce: require('lodash/reduce'), - sortBy: require('lodash/sortBy'), - uniqueId: require('lodash/uniqueId'), - values: require('lodash/values'), - zipObject: require('lodash/zipObject'), - }; - } catch (e) {} -} - -if (!lodash) { - lodash = window._; -} - -module.exports = lodash; - -},{'lodash/cloneDeep':227,'lodash/constant':228,'lodash/defaults':229,'lodash/each':230,'lodash/filter':232,'lodash/find':233,'lodash/flatten':235,'lodash/forEach':236,'lodash/forIn':237,'lodash/has':239,'lodash/isUndefined':258,'lodash/last':261,'lodash/map':262,'lodash/mapValues':263,'lodash/max':264,'lodash/merge':266,'lodash/min':267,'lodash/minBy':268,'lodash/now':270,'lodash/pick':271,'lodash/range':273,'lodash/reduce':274,'lodash/sortBy':276,'lodash/uniqueId':286,'lodash/values':287,'lodash/zipObject':288}],11:[function(require,module,exports){ -var _ = require('./lodash'), - util = require('./util'); - -module.exports = { - run: run, - cleanup: cleanup -}; - -/* - * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, - * adds appropriate edges to ensure that all cluster nodes are placed between - * these boundries, and ensures that the graph is connected. - * - * In addition we ensure, through the use of the minlen property, that nodes - * and subgraph border nodes to not end up on the same rank. - * - * Preconditions: - * - * 1. Input graph is a DAG - * 2. Nodes in the input graph has a minlen attribute - * - * Postconditions: - * - * 1. Input graph is connected. - * 2. Dummy nodes are added for the tops and bottoms of subgraphs. - * 3. The minlen attribute for nodes is adjusted to ensure nodes do not - * get placed on the same rank as subgraph border nodes. - * - * The nesting graph idea comes from Sander, "Layout of Compound Directed - * Graphs." - */ -function run(g) { - var root = util.addDummyNode(g, 'root', {}, '_root'); - var depths = treeDepths(g); - var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array - var nodeSep = 2 * height + 1; - - g.graph().nestingRoot = root; - - // Multiply minlen by nodeSep to align nodes on non-border ranks. - _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; }); - - // Calculate a weight that is sufficient to keep subgraphs vertically compact - var weight = sumWeights(g) + 1; - - // Create border nodes and link them up - _.forEach(g.children(), function(child) { - dfs(g, root, nodeSep, weight, height, depths, child); - }); - - // Save the multiplier for node layers for later removal of empty border - // layers. - g.graph().nodeRankFactor = nodeSep; -} - -function dfs(g, root, nodeSep, weight, height, depths, v) { - var children = g.children(v); - if (!children.length) { - if (v !== root) { - g.setEdge(root, v, { weight: 0, minlen: nodeSep }); - } - return; - } - - var top = util.addBorderNode(g, '_bt'), - bottom = util.addBorderNode(g, '_bb'), - label = g.node(v); - - g.setParent(top, v); - label.borderTop = top; - g.setParent(bottom, v); - label.borderBottom = bottom; - - _.forEach(children, function(child) { - dfs(g, root, nodeSep, weight, height, depths, child); - - var childNode = g.node(child), - childTop = childNode.borderTop ? childNode.borderTop : child, - childBottom = childNode.borderBottom ? childNode.borderBottom : child, - thisWeight = childNode.borderTop ? weight : 2 * weight, - minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; - - g.setEdge(top, childTop, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true - }); - - g.setEdge(childBottom, bottom, { - weight: thisWeight, - minlen: minlen, - nestingEdge: true - }); - }); - - if (!g.parent(v)) { - g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); - } -} - -function treeDepths(g) { - var depths = {}; - function dfs(v, depth) { - var children = g.children(v); - if (children && children.length) { - _.forEach(children, function(child) { - dfs(child, depth + 1); - }); - } - depths[v] = depth; - } - _.forEach(g.children(), function(v) { dfs(v, 1); }); - return depths; -} - -function sumWeights(g) { - return _.reduce(g.edges(), function(acc, e) { - return acc + g.edge(e).weight; - }, 0); -} - -function cleanup(g) { - var graphLabel = g.graph(); - g.removeNode(graphLabel.nestingRoot); - delete graphLabel.nestingRoot; - _.forEach(g.edges(), function(e) { - var edge = g.edge(e); - if (edge.nestingEdge) { - g.removeEdge(e); - } - }); -} - -},{'./lodash':10,'./util':29}],12:[function(require,module,exports){ -'use strict'; - -var _ = require('./lodash'), - util = require('./util'); - -module.exports = { - run: run, - undo: undo -}; - -/* - * Breaks any long edges in the graph into short segments that span 1 layer - * each. This operation is undoable with the denormalize function. - * - * Pre-conditions: - * - * 1. The input graph is a DAG. - * 2. Each node in the graph has a "rank" property. - * - * Post-condition: - * - * 1. All edges in the graph have a length of 1. - * 2. Dummy nodes are added where edges have been split into segments. - * 3. The graph is augmented with a "dummyChains" attribute which contains - * the first dummy in each chain of dummy nodes produced. - */ -function run(g) { - g.graph().dummyChains = []; - _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); }); -} - -function normalizeEdge(g, e) { - var v = e.v, - vRank = g.node(v).rank, - w = e.w, - wRank = g.node(w).rank, - name = e.name, - edgeLabel = g.edge(e), - labelRank = edgeLabel.labelRank; - - if (wRank === vRank + 1) return; - - g.removeEdge(e); - - var dummy, attrs, i; - for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { - edgeLabel.points = []; - attrs = { - width: 0, height: 0, - edgeLabel: edgeLabel, edgeObj: e, - rank: vRank - }; - dummy = util.addDummyNode(g, 'edge', attrs, '_d'); - if (vRank === labelRank) { - attrs.width = edgeLabel.width; - attrs.height = edgeLabel.height; - attrs.dummy = 'edge-label'; - attrs.labelpos = edgeLabel.labelpos; - } - g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); - if (i === 0) { - g.graph().dummyChains.push(dummy); - } - v = dummy; - } - - g.setEdge(v, w, { weight: edgeLabel.weight }, name); -} - -function undo(g) { - _.forEach(g.graph().dummyChains, function(v) { - var node = g.node(v), - origLabel = node.edgeLabel, - w; - g.setEdge(node.edgeObj, origLabel); - while (node.dummy) { - w = g.successors(v)[0]; - g.removeNode(v); - origLabel.points.push({ x: node.x, y: node.y }); - if (node.dummy === 'edge-label') { - origLabel.x = node.x; - origLabel.y = node.y; - origLabel.width = node.width; - origLabel.height = node.height; - } - v = w; - node = g.node(v); - } - }); -} - -},{'./lodash':10,'./util':29}],13:[function(require,module,exports){ -var _ = require('../lodash'); - -module.exports = addSubgraphConstraints; - -function addSubgraphConstraints(g, cg, vs) { - var prev = {}, - rootPrev; - - _.forEach(vs, function(v) { - var child = g.parent(v), - parent, - prevChild; - while (child) { - parent = g.parent(child); - if (parent) { - prevChild = prev[parent]; - prev[parent] = child; - } else { - prevChild = rootPrev; - rootPrev = child; - } - if (prevChild && prevChild !== child) { - cg.setEdge(prevChild, child); - return; - } - child = parent; - } - }); - - /* - function dfs(v) { - var children = v ? g.children(v) : g.children(); - if (children.length) { - var min = Number.POSITIVE_INFINITY, - subgraphs = []; - _.each(children, function(child) { - var childMin = dfs(child); - if (g.children(child).length) { - subgraphs.push({ v: child, order: childMin }); - } - min = Math.min(min, childMin); - }); - _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { - cg.setEdge(prev.v, curr.v); - return curr; - }); - return min; - } - return g.node(v).order; - } - dfs(undefined); - */ -} - -},{'../lodash':10}],14:[function(require,module,exports){ -var _ = require('../lodash'); - -module.exports = barycenter; - -function barycenter(g, movable) { - return _.map(movable, function(v) { - var inV = g.inEdges(v); - if (!inV.length) { - return { v: v }; - } else { - var result = _.reduce(inV, function(acc, e) { - var edge = g.edge(e), - nodeU = g.node(e.v); - return { - sum: acc.sum + (edge.weight * nodeU.order), - weight: acc.weight + edge.weight - }; - }, { sum: 0, weight: 0 }); - - return { - v: v, - barycenter: result.sum / result.weight, - weight: result.weight - }; - } - }); -} - - -},{'../lodash':10}],15:[function(require,module,exports){ -var _ = require('../lodash'), - Graph = require('../graphlib').Graph; - -module.exports = buildLayerGraph; - -/* - * Constructs a graph that can be used to sort a layer of nodes. The graph will - * contain all base and subgraph nodes from the request layer in their original - * hierarchy and any edges that are incident on these nodes and are of the type - * requested by the "relationship" parameter. - * - * Nodes from the requested rank that do not have parents are assigned a root - * node in the output graph, which is set in the root graph attribute. This - * makes it easy to walk the hierarchy of movable nodes during ordering. - * - * Pre-conditions: - * - * 1. Input graph is a DAG - * 2. Base nodes in the input graph have a rank attribute - * 3. Subgraph nodes in the input graph has minRank and maxRank attributes - * 4. Edges have an assigned weight - * - * Post-conditions: - * - * 1. Output graph has all nodes in the movable rank with preserved - * hierarchy. - * 2. Root nodes in the movable layer are made children of the node - * indicated by the root attribute of the graph. - * 3. Non-movable nodes incident on movable nodes, selected by the - * relationship parameter, are included in the graph (without hierarchy). - * 4. Edges incident on movable nodes, selected by the relationship - * parameter, are added to the output graph. - * 5. The weights for copied edges are aggregated as need, since the output - * graph is not a multi-graph. - */ -function buildLayerGraph(g, rank, relationship) { - var root = createRootNode(g), - result = new Graph({ compound: true }).setGraph({ root: root }) - .setDefaultNodeLabel(function(v) { return g.node(v); }); - - _.forEach(g.nodes(), function(v) { - var node = g.node(v), - parent = g.parent(v); - - if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) { - result.setNode(v); - result.setParent(v, parent || root); - - // This assumes we have only short edges! - _.forEach(g[relationship](v), function(e) { - var u = e.v === v ? e.w : e.v, - edge = result.edge(u, v), - weight = !_.isUndefined(edge) ? edge.weight : 0; - result.setEdge(u, v, { weight: g.edge(e).weight + weight }); - }); - - if (_.has(node, 'minRank')) { - result.setNode(v, { - borderLeft: node.borderLeft[rank], - borderRight: node.borderRight[rank] - }); - } - } - }); - - return result; -} - -function createRootNode(g) { - var v; - while (g.hasNode((v = _.uniqueId('_root')))); - return v; -} - -},{'../graphlib':7,'../lodash':10}],16:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'); - -module.exports = crossCount; - -/* - * A function that takes a layering (an array of layers, each with an array of - * ordererd nodes) and a graph and returns a weighted crossing count. - * - * Pre-conditions: - * - * 1. Input graph must be simple (not a multigraph), directed, and include - * only simple edges. - * 2. Edges in the input graph must have assigned weights. - * - * Post-conditions: - * - * 1. The graph and layering matrix are left unchanged. - * - * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." - */ -function crossCount(g, layering) { - var cc = 0; - for (var i = 1; i < layering.length; ++i) { - cc += twoLayerCrossCount(g, layering[i-1], layering[i]); - } - return cc; -} - -function twoLayerCrossCount(g, northLayer, southLayer) { - // Sort all of the edges between the north and south layers by their position - // in the north layer and then the south. Map these edges to the position of - // their head in the south layer. - var southPos = _.zipObject(southLayer, - _.map(southLayer, function (v, i) { return i; })); - var southEntries = _.flatten(_.map(northLayer, function(v) { - return _.sortBy(_.map(g.outEdges(v), function(e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), 'pos'); - }), true); - - // Build the accumulator tree - var firstIndex = 1; - while (firstIndex < southLayer.length) firstIndex <<= 1; - var treeSize = 2 * firstIndex - 1; - firstIndex -= 1; - var tree = _.map(new Array(treeSize), function() { return 0; }); - - // Calculate the weighted crossings - var cc = 0; - _.forEach(southEntries.forEach(function(entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - while (index > 0) { - if (index % 2) { - weightSum += tree[index + 1]; - } - index = (index - 1) >> 1; - tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - })); - - return cc; -} - -},{'../lodash':10}],17:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'), - initOrder = require('./init-order'), - crossCount = require('./cross-count'), - sortSubgraph = require('./sort-subgraph'), - buildLayerGraph = require('./build-layer-graph'), - addSubgraphConstraints = require('./add-subgraph-constraints'), - Graph = require('../graphlib').Graph, - util = require('../util'); - -module.exports = order; - -/* - * Applies heuristics to minimize edge crossings in the graph and sets the best - * order solution as an order attribute on each node. - * - * Pre-conditions: - * - * 1. Graph must be DAG - * 2. Graph nodes must be objects with a "rank" attribute - * 3. Graph edges must have the "weight" attribute - * - * Post-conditions: - * - * 1. Graph nodes will have an "order" attribute based on the results of the - * algorithm. - */ -function order(g) { - var maxRank = util.maxRank(g), - downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), 'inEdges'), - upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), 'outEdges'); - - var layering = initOrder(g); - assignOrder(g, layering); - - var bestCC = Number.POSITIVE_INFINITY, - best; - - for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { - sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); - - layering = util.buildLayerMatrix(g); - var cc = crossCount(g, layering); - if (cc < bestCC) { - lastBest = 0; - best = _.cloneDeep(layering); - bestCC = cc; - } - } - - assignOrder(g, best); -} - -function buildLayerGraphs(g, ranks, relationship) { - return _.map(ranks, function(rank) { - return buildLayerGraph(g, rank, relationship); - }); -} - -function sweepLayerGraphs(layerGraphs, biasRight) { - var cg = new Graph(); - _.forEach(layerGraphs, function(lg) { - var root = lg.graph().root; - var sorted = sortSubgraph(lg, root, cg, biasRight); - _.forEach(sorted.vs, function(v, i) { - lg.node(v).order = i; - }); - addSubgraphConstraints(lg, cg, sorted.vs); - }); -} - -function assignOrder(g, layering) { - _.forEach(layering, function(layer) { - _.forEach(layer, function(v, i) { - g.node(v).order = i; - }); - }); -} - -},{'../graphlib':7,'../lodash':10,'../util':29,'./add-subgraph-constraints':13,'./build-layer-graph':15,'./cross-count':16,'./init-order':18,'./sort-subgraph':20}],18:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'); - -module.exports = initOrder; - -/* - * Assigns an initial order value for each node by performing a DFS search - * starting from nodes in the first rank. Nodes are assigned an order in their - * rank as they are first visited. - * - * This approach comes from Gansner, et al., "A Technique for Drawing Directed - * Graphs." - * - * Returns a layering matrix with an array per layer and each layer sorted by - * the order of its nodes. - */ -function initOrder(g) { - var visited = {}, - simpleNodes = _.filter(g.nodes(), function(v) { - return !g.children(v).length; - }), - maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; })), - layers = _.map(_.range(maxRank + 1), function() { return []; }); - - function dfs(v) { - if (_.has(visited, v)) return; - visited[v] = true; - var node = g.node(v); - layers[node.rank].push(v); - _.forEach(g.successors(v), dfs); - } - - var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; }); - _.forEach(orderedVs, dfs); - - return layers; -} - -},{'../lodash':10}],19:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'); - -module.exports = resolveConflicts; - -/* - * Given a list of entries of the form {v, barycenter, weight} and a - * constraint graph this function will resolve any conflicts between the - * constraint graph and the barycenters for the entries. If the barycenters for - * an entry would violate a constraint in the constraint graph then we coalesce - * the nodes in the conflict into a new node that respects the contraint and - * aggregates barycenter and weight information. - * - * This implementation is based on the description in Forster, "A Fast and - * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it - * differs in some specific details. - * - * Pre-conditions: - * - * 1. Each entry has the form {v, barycenter, weight}, or if the node has - * no barycenter, then {v}. - * - * Returns: - * - * A new list of entries of the form {vs, i, barycenter, weight}. The list - * `vs` may either be a singleton or it may be an aggregation of nodes - * ordered such that they do not violate constraints from the constraint - * graph. The property `i` is the lowest original index of any of the - * elements in `vs`. - */ -function resolveConflicts(entries, cg) { - var mappedEntries = {}; - _.forEach(entries, function(entry, i) { - var tmp = mappedEntries[entry.v] = { - indegree: 0, - 'in': [], - out: [], - vs: [entry.v], - i: i - }; - if (!_.isUndefined(entry.barycenter)) { - tmp.barycenter = entry.barycenter; - tmp.weight = entry.weight; - } - }); - - _.forEach(cg.edges(), function(e) { - var entryV = mappedEntries[e.v], - entryW = mappedEntries[e.w]; - if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) { - entryW.indegree++; - entryV.out.push(mappedEntries[e.w]); - } - }); - - var sourceSet = _.filter(mappedEntries, function(entry) { - return !entry.indegree; - }); - - return doResolveConflicts(sourceSet); -} - -function doResolveConflicts(sourceSet) { - var entries = []; - - function handleIn(vEntry) { - return function(uEntry) { - if (uEntry.merged) { - return; - } - if (_.isUndefined(uEntry.barycenter) || - _.isUndefined(vEntry.barycenter) || - uEntry.barycenter >= vEntry.barycenter) { - mergeEntries(vEntry, uEntry); - } - }; - } - - function handleOut(vEntry) { - return function(wEntry) { - wEntry['in'].push(vEntry); - if (--wEntry.indegree === 0) { - sourceSet.push(wEntry); - } - }; - } - - while (sourceSet.length) { - var entry = sourceSet.pop(); - entries.push(entry); - _.forEach(entry['in'].reverse(), handleIn(entry)); - _.forEach(entry.out, handleOut(entry)); - } - - return _.map(_.filter(entries, function(entry) { return !entry.merged; }), - function(entry) { - return _.pick(entry, ['vs', 'i', 'barycenter', 'weight']); - }); - -} - -function mergeEntries(target, source) { - var sum = 0, - weight = 0; - - if (target.weight) { - sum += target.barycenter * target.weight; - weight += target.weight; - } - - if (source.weight) { - sum += source.barycenter * source.weight; - weight += source.weight; - } - - target.vs = source.vs.concat(target.vs); - target.barycenter = sum / weight; - target.weight = weight; - target.i = Math.min(source.i, target.i); - source.merged = true; -} - -},{'../lodash':10}],20:[function(require,module,exports){ -var _ = require('../lodash'), - barycenter = require('./barycenter'), - resolveConflicts = require('./resolve-conflicts'), - sort = require('./sort'); - -module.exports = sortSubgraph; - -function sortSubgraph(g, v, cg, biasRight) { - var movable = g.children(v), - node = g.node(v), - bl = node ? node.borderLeft : undefined, - br = node ? node.borderRight: undefined, - subgraphs = {}; - - if (bl) { - movable = _.filter(movable, function(w) { - return w !== bl && w !== br; - }); - } - - var barycenters = barycenter(g, movable); - _.forEach(barycenters, function(entry) { - if (g.children(entry.v).length) { - var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); - subgraphs[entry.v] = subgraphResult; - if (_.has(subgraphResult, 'barycenter')) { - mergeBarycenters(entry, subgraphResult); - } - } - }); - - var entries = resolveConflicts(barycenters, cg); - expandSubgraphs(entries, subgraphs); - - var result = sort(entries, biasRight); - - if (bl) { - result.vs = _.flatten([bl, result.vs, br], true); - if (g.predecessors(bl).length) { - var blPred = g.node(g.predecessors(bl)[0]), - brPred = g.node(g.predecessors(br)[0]); - if (!_.has(result, 'barycenter')) { - result.barycenter = 0; - result.weight = 0; - } - result.barycenter = (result.barycenter * result.weight + - blPred.order + brPred.order) / (result.weight + 2); - result.weight += 2; - } - } - - return result; -} - -function expandSubgraphs(entries, subgraphs) { - _.forEach(entries, function(entry) { - entry.vs = _.flatten(entry.vs.map(function(v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - }), true); - }); -} - -function mergeBarycenters(target, other) { - if (!_.isUndefined(target.barycenter)) { - target.barycenter = (target.barycenter * target.weight + - other.barycenter * other.weight) / - (target.weight + other.weight); - target.weight += other.weight; - } else { - target.barycenter = other.barycenter; - target.weight = other.weight; - } -} - -},{'../lodash':10,'./barycenter':14,'./resolve-conflicts':19,'./sort':21}],21:[function(require,module,exports){ -var _ = require('../lodash'), - util = require('../util'); - -module.exports = sort; - -function sort(entries, biasRight) { - var parts = util.partition(entries, function(entry) { - return _.has(entry, 'barycenter'); - }); - var sortable = parts.lhs, - unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }), - vs = [], - sum = 0, - weight = 0, - vsIndex = 0; - - sortable.sort(compareWithBias(!!biasRight)); - - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - - _.forEach(sortable, function (entry) { - vsIndex += entry.vs.length; - vs.push(entry.vs); - sum += entry.barycenter * entry.weight; - weight += entry.weight; - vsIndex = consumeUnsortable(vs, unsortable, vsIndex); - }); - - var result = { vs: _.flatten(vs, true) }; - if (weight) { - result.barycenter = sum / weight; - result.weight = weight; - } - return result; -} - -function consumeUnsortable(vs, unsortable, index) { - var last; - while (unsortable.length && (last = _.last(unsortable)).i <= index) { - unsortable.pop(); - vs.push(last.vs); - index++; - } - return index; -} - -function compareWithBias(bias) { - return function(entryV, entryW) { - if (entryV.barycenter < entryW.barycenter) { - return -1; - } else if (entryV.barycenter > entryW.barycenter) { - return 1; - } - - return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; - }; -} - -},{'../lodash':10,'../util':29}],22:[function(require,module,exports){ -var _ = require('./lodash'); - -module.exports = parentDummyChains; - -function parentDummyChains(g) { - var postorderNums = postorder(g); - - _.forEach(g.graph().dummyChains, function(v) { - var node = g.node(v), - edgeObj = node.edgeObj, - pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w), - path = pathData.path, - lca = pathData.lca, - pathIdx = 0, - pathV = path[pathIdx], - ascending = true; - - while (v !== edgeObj.w) { - node = g.node(v); - - if (ascending) { - while ((pathV = path[pathIdx]) !== lca && - g.node(pathV).maxRank < node.rank) { - pathIdx++; - } - - if (pathV === lca) { - ascending = false; - } - } - - if (!ascending) { - while (pathIdx < path.length - 1 && - g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) { - pathIdx++; - } - pathV = path[pathIdx]; - } - - g.setParent(v, pathV); - v = g.successors(v)[0]; - } - }); -} - -// Find a path from v to w through the lowest common ancestor (LCA). Return the -// full path and the LCA. -function findPath(g, postorderNums, v, w) { - var vPath = [], - wPath = [], - low = Math.min(postorderNums[v].low, postorderNums[w].low), - lim = Math.max(postorderNums[v].lim, postorderNums[w].lim), - parent, - lca; - - // Traverse up from v to find the LCA - parent = v; - do { - parent = g.parent(parent); - vPath.push(parent); - } while (parent && - (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); - lca = parent; - - // Traverse from w to LCA - parent = w; - while ((parent = g.parent(parent)) !== lca) { - wPath.push(parent); - } - - return { path: vPath.concat(wPath.reverse()), lca: lca }; -} - -function postorder(g) { - var result = {}, - lim = 0; - - function dfs(v) { - var low = lim; - _.forEach(g.children(v), dfs); - result[v] = { low: low, lim: lim++ }; - } - _.forEach(g.children(), dfs); - - return result; -} - -},{'./lodash':10}],23:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'), - Graph = require('../graphlib').Graph, - util = require('../util'); - -/* - * This module provides coordinate assignment based on Brandes and Köpf, "Fast - * and Simple Horizontal Coordinate Assignment." - */ - -module.exports = { - positionX: positionX, - findType1Conflicts: findType1Conflicts, - findType2Conflicts: findType2Conflicts, - addConflict: addConflict, - hasConflict: hasConflict, - verticalAlignment: verticalAlignment, - horizontalCompaction: horizontalCompaction, - alignCoordinates: alignCoordinates, - findSmallestWidthAlignment: findSmallestWidthAlignment, - balance: balance -}; - -/* - * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" - * property. A type-1 conflict is one where a non-inner segment crosses an - * inner segment. An inner segment is an edge with both incident nodes marked - * with the "dummy" property. - * - * This algorithm scans layer by layer, starting with the second, for type-1 - * conflicts between the current layer and the previous layer. For each layer - * it scans the nodes from left to right until it reaches one that is incident - * on an inner segment. It then scans predecessors to determine if they have - * edges that cross that inner segment. At the end a final scan is done for all - * nodes on the current rank to see if they cross the last visited inner - * segment. - * - * This algorithm (safely) assumes that a dummy node will only be incident on a - * single node in the layers being scanned. - */ -function findType1Conflicts(g, layering) { - var conflicts = {}; - - function visitLayer(prevLayer, layer) { - var - // last visited node in the previous layer that is incident on an inner - // segment. - k0 = 0, - // Tracks the last node in this layer scanned for crossings with a type-1 - // segment. - scanPos = 0, - prevLayerLength = prevLayer.length, - lastNode = _.last(layer); - - _.forEach(layer, function(v, i) { - var w = findOtherInnerSegmentNode(g, v), - k1 = w ? g.node(w).order : prevLayerLength; - - if (w || v === lastNode) { - _.forEach(layer.slice(scanPos, i +1), function(scanNode) { - _.forEach(g.predecessors(scanNode), function(u) { - var uLabel = g.node(u), - uPos = uLabel.order; - if ((uPos < k0 || k1 < uPos) && - !(uLabel.dummy && g.node(scanNode).dummy)) { - addConflict(conflicts, u, scanNode); - } - }); - }); - scanPos = i + 1; - k0 = k1; - } - }); - - return layer; - } - - _.reduce(layering, visitLayer); - return conflicts; -} - -function findType2Conflicts(g, layering) { - var conflicts = {}; - - function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { - var v; - _.forEach(_.range(southPos, southEnd), function(i) { - v = south[i]; - if (g.node(v).dummy) { - _.forEach(g.predecessors(v), function(u) { - var uNode = g.node(u); - if (uNode.dummy && - (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { - addConflict(conflicts, u, v); - } - }); - } - }); - } - - - function visitLayer(north, south) { - var prevNorthPos = -1, - nextNorthPos, - southPos = 0; - - _.forEach(south, function(v, southLookahead) { - if (g.node(v).dummy === 'border') { - var predecessors = g.predecessors(v); - if (predecessors.length) { - nextNorthPos = g.node(predecessors[0]).order; - scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); - southPos = southLookahead; - prevNorthPos = nextNorthPos; - } - } - scan(south, southPos, south.length, nextNorthPos, north.length); - }); - - return south; - } - - _.reduce(layering, visitLayer); - return conflicts; -} - -function findOtherInnerSegmentNode(g, v) { - if (g.node(v).dummy) { - return _.find(g.predecessors(v), function(u) { - return g.node(u).dummy; - }); - } -} - -function addConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - - var conflictsV = conflicts[v]; - if (!conflictsV) { - conflicts[v] = conflictsV = {}; - } - conflictsV[w] = true; -} - -function hasConflict(conflicts, v, w) { - if (v > w) { - var tmp = v; - v = w; - w = tmp; - } - return _.has(conflicts[v], w); -} - -/* - * Try to align nodes into vertical "blocks" where possible. This algorithm - * attempts to align a node with one of its median neighbors. If the edge - * connecting a neighbor is a type-1 conflict then we ignore that possibility. - * If a previous node has already formed a block with a node after the node - * we're trying to form a block with, we also ignore that possibility - our - * blocks would be split in that scenario. - */ -function verticalAlignment(g, layering, conflicts, neighborFn) { - var root = {}, - align = {}, - pos = {}; - - // We cache the position here based on the layering because the graph and - // layering may be out of sync. The layering matrix is manipulated to - // generate different extreme alignments. - _.forEach(layering, function(layer) { - _.forEach(layer, function(v, order) { - root[v] = v; - align[v] = v; - pos[v] = order; - }); - }); - - _.forEach(layering, function(layer) { - var prevIdx = -1; - _.forEach(layer, function(v) { - var ws = neighborFn(v); - if (ws.length) { - ws = _.sortBy(ws, function(w) { return pos[w]; }); - var mp = (ws.length - 1) / 2; - for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { - var w = ws[i]; - if (align[v] === v && - prevIdx < pos[w] && - !hasConflict(conflicts, v, w)) { - align[w] = v; - align[v] = root[v] = root[w]; - prevIdx = pos[w]; - } - } - } - }); - }); - - return { root: root, align: align }; -} - -function horizontalCompaction(g, layering, root, align, reverseSep) { - // This portion of the algorithm differs from BK due to a number of problems. - // Instead of their algorithm we construct a new block graph and do two - // sweeps. The first sweep places blocks with the smallest possible - // coordinates. The second sweep removes unused space by moving blocks to the - // greatest coordinates without violating separation. - var xs = {}, - blockG = buildBlockGraph(g, layering, root, reverseSep), - borderType = reverseSep ? 'borderLeft' : 'borderRight'; - - function iterate(setXsFunc, nextNodesFunc) { - var stack = blockG.nodes(); - var elem = stack.pop(); - var visited = {}; - while (elem) { - if (visited[elem]) { - setXsFunc(elem); - } else { - visited[elem] = true; - stack.push(elem); - stack = stack.concat(nextNodesFunc(elem)); - } - - elem = stack.pop(); - } - } - - // First pass, assign smallest coordinates - function pass1(elem) { - xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) { - return Math.max(acc, xs[e.v] + blockG.edge(e)); - }, 0); - } - - // Second pass, assign greatest coordinates - function pass2(elem) { - var min = blockG.outEdges(elem).reduce(function(acc, e) { - return Math.min(acc, xs[e.w] - blockG.edge(e)); - }, Number.POSITIVE_INFINITY); - - var node = g.node(elem); - if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { - xs[elem] = Math.max(xs[elem], min); - } - } - - iterate(pass1, blockG.predecessors.bind(blockG)); - iterate(pass2, blockG.successors.bind(blockG)); - - // Assign x coordinates to all nodes - _.forEach(align, function(v) { - xs[v] = xs[root[v]]; - }); - - return xs; -} - - -function buildBlockGraph(g, layering, root, reverseSep) { - var blockGraph = new Graph(), - graphLabel = g.graph(), - sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); - - _.forEach(layering, function(layer) { - var u; - _.forEach(layer, function(v) { - var vRoot = root[v]; - blockGraph.setNode(vRoot); - if (u) { - var uRoot = root[u], - prevMax = blockGraph.edge(uRoot, vRoot); - blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); - } - u = v; - }); - }); - - return blockGraph; -} - -/* - * Returns the alignment that has the smallest width of the given alignments. - */ -function findSmallestWidthAlignment(g, xss) { - return _.minBy(_.values(xss), function (xs) { - var max = Number.NEGATIVE_INFINITY; - var min = Number.POSITIVE_INFINITY; - - _.forIn(xs, function (x, v) { - var halfWidth = width(g, v) / 2; - - max = Math.max(x + halfWidth, max); - min = Math.min(x - halfWidth, min); - }); - - return max - min; - }); -} - -/* - * Align the coordinates of each of the layout alignments such that - * left-biased alignments have their minimum coordinate at the same point as - * the minimum coordinate of the smallest width alignment and right-biased - * alignments have their maximum coordinate at the same point as the maximum - * coordinate of the smallest width alignment. - */ -function alignCoordinates(xss, alignTo) { - var alignToVals = _.values(alignTo), - alignToMin = _.min(alignToVals), - alignToMax = _.max(alignToVals); - - _.forEach(['u', 'd'], function(vert) { - _.forEach(['l', 'r'], function(horiz) { - var alignment = vert + horiz, - xs = xss[alignment], - delta; - if (xs === alignTo) return; - - var xsVals = _.values(xs); - delta = horiz === 'l' ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals); - - if (delta) { - xss[alignment] = _.mapValues(xs, function(x) { return x + delta; }); - } - }); - }); -} - -function balance(xss, align) { - return _.mapValues(xss.ul, function(ignore, v) { - if (align) { - return xss[align.toLowerCase()][v]; - } else { - var xs = _.sortBy(_.map(xss, v)); - return (xs[1] + xs[2]) / 2; - } - }); -} - -function positionX(g) { - var layering = util.buildLayerMatrix(g), - conflicts = _.merge(findType1Conflicts(g, layering), - findType2Conflicts(g, layering)); - - var xss = {}, - adjustedLayering; - _.forEach(['u', 'd'], function(vert) { - adjustedLayering = vert === 'u' ? layering : _.values(layering).reverse(); - _.forEach(['l', 'r'], function(horiz) { - if (horiz === 'r') { - adjustedLayering = _.map(adjustedLayering, function(inner) { - return _.values(inner).reverse(); - }); - } - - var neighborFn = (vert === 'u' ? g.predecessors : g.successors).bind(g); - var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); - var xs = horizontalCompaction(g, adjustedLayering, - align.root, align.align, - horiz === 'r'); - if (horiz === 'r') { - xs = _.mapValues(xs, function(x) { return -x; }); - } - xss[vert + horiz] = xs; - }); - }); - - var smallestWidth = findSmallestWidthAlignment(g, xss); - alignCoordinates(xss, smallestWidth); - return balance(xss, g.graph().align); -} - -function sep(nodeSep, edgeSep, reverseSep) { - return function(g, v, w) { - var vLabel = g.node(v), - wLabel = g.node(w), - sum = 0, - delta; - - sum += vLabel.width / 2; - if (_.has(vLabel, 'labelpos')) { - switch (vLabel.labelpos.toLowerCase()) { - case 'l': delta = -vLabel.width / 2; break; - case 'r': delta = vLabel.width / 2; break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; - sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; - - sum += wLabel.width / 2; - if (_.has(wLabel, 'labelpos')) { - switch (wLabel.labelpos.toLowerCase()) { - case 'l': delta = wLabel.width / 2; break; - case 'r': delta = -wLabel.width / 2; break; - } - } - if (delta) { - sum += reverseSep ? delta : -delta; - } - delta = 0; - - return sum; - }; -} - -function width(g, v) { - return g.node(v).width; -} - -},{'../graphlib':7,'../lodash':10,'../util':29}],24:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'), - util = require('../util'), - positionX = require('./bk').positionX; - -module.exports = position; - -function position(g) { - g = util.asNonCompoundGraph(g); - - positionY(g); - _.forEach(positionX(g), function(x, v) { - g.node(v).x = x; - }); -} - -function positionY(g) { - var layering = util.buildLayerMatrix(g), - rankSep = g.graph().ranksep, - prevY = 0; - _.forEach(layering, function(layer) { - var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; })); - _.forEach(layer, function(v) { - g.node(v).y = prevY + maxHeight / 2; - }); - prevY += maxHeight + rankSep; - }); -} - - -},{'../lodash':10,'../util':29,'./bk':23}],25:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'), - Graph = require('../graphlib').Graph, - slack = require('./util').slack; - -module.exports = feasibleTree; - -/* - * Constructs a spanning tree with tight edges and adjusted the input node's - * ranks to achieve this. A tight edge is one that is has a length that matches - * its "minlen" attribute. - * - * The basic structure for this function is derived from Gansner, et al., "A - * Technique for Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a DAG. - * 2. Graph must be connected. - * 3. Graph must have at least one node. - * 5. Graph nodes must have been previously assigned a "rank" property that - * respects the "minlen" property of incident edges. - * 6. Graph edges must have a "minlen" property. - * - * Post-conditions: - * - * - Graph nodes will have their rank adjusted to ensure that all edges are - * tight. - * - * Returns a tree (undirected graph) that is constructed using only "tight" - * edges. - */ -function feasibleTree(g) { - var t = new Graph({ directed: false }); - - // Choose arbitrary node from which to start our tree - var start = g.nodes()[0], - size = g.nodeCount(); - t.setNode(start, {}); - - var edge, delta; - while (tightTree(t, g) < size) { - edge = findMinSlackEdge(t, g); - delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); - shiftRanks(t, g, delta); - } - - return t; -} - -/* - * Finds a maximal tree of tight edges and returns the number of nodes in the - * tree. - */ -function tightTree(t, g) { - function dfs(v) { - _.forEach(g.nodeEdges(v), function(e) { - var edgeV = e.v, - w = (v === edgeV) ? e.w : edgeV; - if (!t.hasNode(w) && !slack(g, e)) { - t.setNode(w, {}); - t.setEdge(v, w, {}); - dfs(w); - } - }); - } - - _.forEach(t.nodes(), dfs); - return t.nodeCount(); -} - -/* - * Finds the edge with the smallest slack that is incident on tree and returns - * it. - */ -function findMinSlackEdge(t, g) { - return _.minBy(g.edges(), function(e) { - if (t.hasNode(e.v) !== t.hasNode(e.w)) { - return slack(g, e); - } - }); -} - -function shiftRanks(t, g, delta) { - _.forEach(t.nodes(), function(v) { - g.node(v).rank += delta; - }); -} - -},{'../graphlib':7,'../lodash':10,'./util':28}],26:[function(require,module,exports){ -'use strict'; - -var rankUtil = require('./util'), - longestPath = rankUtil.longestPath, - feasibleTree = require('./feasible-tree'), - networkSimplex = require('./network-simplex'); - -module.exports = rank; - -/* - * Assigns a rank to each node in the input graph that respects the "minlen" - * constraint specified on edges between nodes. - * - * This basic structure is derived from Gansner, et al., "A Technique for - * Drawing Directed Graphs." - * - * Pre-conditions: - * - * 1. Graph must be a connected DAG - * 2. Graph nodes must be objects - * 3. Graph edges must have "weight" and "minlen" attributes - * - * Post-conditions: - * - * 1. Graph nodes will have a "rank" attribute based on the results of the - * algorithm. Ranks can start at any index (including negative), we'll - * fix them up later. - */ -function rank(g) { - switch(g.graph().ranker) { - case 'network-simplex': networkSimplexRanker(g); break; - case 'tight-tree': tightTreeRanker(g); break; - case 'longest-path': longestPathRanker(g); break; - default: networkSimplexRanker(g); - } -} - -// A fast and simple ranker, but results are far from optimal. -var longestPathRanker = longestPath; - -function tightTreeRanker(g) { - longestPath(g); - feasibleTree(g); -} - -function networkSimplexRanker(g) { - networkSimplex(g); -} - -},{'./feasible-tree':25,'./network-simplex':27,'./util':28}],27:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'), - feasibleTree = require('./feasible-tree'), - slack = require('./util').slack, - initRank = require('./util').longestPath, - preorder = require('../graphlib').alg.preorder, - postorder = require('../graphlib').alg.postorder, - simplify = require('../util').simplify; - -module.exports = networkSimplex; - -// Expose some internals for testing purposes -networkSimplex.initLowLimValues = initLowLimValues; -networkSimplex.initCutValues = initCutValues; -networkSimplex.calcCutValue = calcCutValue; -networkSimplex.leaveEdge = leaveEdge; -networkSimplex.enterEdge = enterEdge; -networkSimplex.exchangeEdges = exchangeEdges; - -/* - * The network simplex algorithm assigns ranks to each node in the input graph - * and iteratively improves the ranking to reduce the length of edges. - * - * Preconditions: - * - * 1. The input graph must be a DAG. - * 2. All nodes in the graph must have an object value. - * 3. All edges in the graph must have "minlen" and "weight" attributes. - * - * Postconditions: - * - * 1. All nodes in the graph will have an assigned "rank" attribute that has - * been optimized by the network simplex algorithm. Ranks start at 0. - * - * - * A rough sketch of the algorithm is as follows: - * - * 1. Assign initial ranks to each node. We use the longest path algorithm, - * which assigns ranks to the lowest position possible. In general this - * leads to very wide bottom ranks and unnecessarily long edges. - * 2. Construct a feasible tight tree. A tight tree is one such that all - * edges in the tree have no slack (difference between length of edge - * and minlen for the edge). This by itself greatly improves the assigned - * rankings by shorting edges. - * 3. Iteratively find edges that have negative cut values. Generally a - * negative cut value indicates that the edge could be removed and a new - * tree edge could be added to produce a more compact graph. - * - * Much of the algorithms here are derived from Gansner, et al., "A Technique - * for Drawing Directed Graphs." The structure of the file roughly follows the - * structure of the overall algorithm. - */ -function networkSimplex(g) { - g = simplify(g); - initRank(g); - var t = feasibleTree(g); - initLowLimValues(t); - initCutValues(t, g); - - var e, f; - while ((e = leaveEdge(t))) { - f = enterEdge(t, g, e); - exchangeEdges(t, g, e, f); - } -} - -/* - * Initializes cut values for all edges in the tree. - */ -function initCutValues(t, g) { - var vs = postorder(t, t.nodes()); - vs = vs.slice(0, vs.length - 1); - _.forEach(vs, function(v) { - assignCutValue(t, g, v); - }); -} - -function assignCutValue(t, g, child) { - var childLab = t.node(child), - parent = childLab.parent; - t.edge(child, parent).cutvalue = calcCutValue(t, g, child); -} - -/* - * Given the tight tree, its graph, and a child in the graph calculate and - * return the cut value for the edge between the child and its parent. - */ -function calcCutValue(t, g, child) { - var childLab = t.node(child), - parent = childLab.parent, - // True if the child is on the tail end of the edge in the directed graph - childIsTail = true, - // The graph's view of the tree edge we're inspecting - graphEdge = g.edge(child, parent), - // The accumulated cut value for the edge between this node and its parent - cutValue = 0; - - if (!graphEdge) { - childIsTail = false; - graphEdge = g.edge(parent, child); - } - - cutValue = graphEdge.weight; - - _.forEach(g.nodeEdges(child), function(e) { - var isOutEdge = e.v === child, - other = isOutEdge ? e.w : e.v; - - if (other !== parent) { - var pointsToHead = isOutEdge === childIsTail, - otherWeight = g.edge(e).weight; - - cutValue += pointsToHead ? otherWeight : -otherWeight; - if (isTreeEdge(t, child, other)) { - var otherCutValue = t.edge(child, other).cutvalue; - cutValue += pointsToHead ? -otherCutValue : otherCutValue; - } - } - }); - - return cutValue; -} - -function initLowLimValues(tree, root) { - if (arguments.length < 2) { - root = tree.nodes()[0]; - } - dfsAssignLowLim(tree, {}, 1, root); -} - -function dfsAssignLowLim(tree, visited, nextLim, v, parent) { - var low = nextLim, - label = tree.node(v); - - visited[v] = true; - _.forEach(tree.neighbors(v), function(w) { - if (!_.has(visited, w)) { - nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); - } - }); - - label.low = low; - label.lim = nextLim++; - if (parent) { - label.parent = parent; - } else { - // TODO should be able to remove this when we incrementally update low lim - delete label.parent; - } - - return nextLim; -} - -function leaveEdge(tree) { - return _.find(tree.edges(), function(e) { - return tree.edge(e).cutvalue < 0; - }); -} - -function enterEdge(t, g, edge) { - var v = edge.v, - w = edge.w; - - // For the rest of this function we assume that v is the tail and w is the - // head, so if we don't have this edge in the graph we should flip it to - // match the correct orientation. - if (!g.hasEdge(v, w)) { - v = edge.w; - w = edge.v; - } - - var vLabel = t.node(v), - wLabel = t.node(w), - tailLabel = vLabel, - flip = false; - - // If the root is in the tail of the edge then we need to flip the logic that - // checks for the head and tail nodes in the candidates function below. - if (vLabel.lim > wLabel.lim) { - tailLabel = wLabel; - flip = true; - } - - var candidates = _.filter(g.edges(), function(edge) { - return flip === isDescendant(t, t.node(edge.v), tailLabel) && - flip !== isDescendant(t, t.node(edge.w), tailLabel); - }); - - return _.minBy(candidates, function(edge) { return slack(g, edge); }); -} - -function exchangeEdges(t, g, e, f) { - var v = e.v, - w = e.w; - t.removeEdge(v, w); - t.setEdge(f.v, f.w, {}); - initLowLimValues(t); - initCutValues(t, g); - updateRanks(t, g); -} - -function updateRanks(t, g) { - var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; }), - vs = preorder(t, root); - vs = vs.slice(1); - _.forEach(vs, function(v) { - var parent = t.node(v).parent, - edge = g.edge(v, parent), - flipped = false; - - if (!edge) { - edge = g.edge(parent, v); - flipped = true; - } - - g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); - }); -} - -/* - * Returns true if the edge is in the tree. - */ -function isTreeEdge(tree, u, v) { - return tree.hasEdge(u, v); -} - -/* - * Returns true if the specified node is descendant of the root node per the - * assigned low and lim attributes in the tree. - */ -function isDescendant(tree, vLabel, rootLabel) { - return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; -} - -},{'../graphlib':7,'../lodash':10,'../util':29,'./feasible-tree':25,'./util':28}],28:[function(require,module,exports){ -'use strict'; - -var _ = require('../lodash'); - -module.exports = { - longestPath: longestPath, - slack: slack -}; - -/* - * Initializes ranks for the input graph using the longest path algorithm. This - * algorithm scales well and is fast in practice, it yields rather poor - * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom - * ranks wide and leaving edges longer than necessary. However, due to its - * speed, this algorithm is good for getting an initial ranking that can be fed - * into other algorithms. - * - * This algorithm does not normalize layers because it will be used by other - * algorithms in most cases. If using this algorithm directly, be sure to - * run normalize at the end. - * - * Pre-conditions: - * - * 1. Input graph is a DAG. - * 2. Input graph node labels can be assigned properties. - * - * Post-conditions: - * - * 1. Each node will be assign an (unnormalized) "rank" property. - */ -function longestPath(g) { - var visited = {}; - - function dfs(v) { - var label = g.node(v); - if (_.has(visited, v)) { - return label.rank; - } - visited[v] = true; - - var rank = _.min(_.map(g.outEdges(v), function(e) { - return dfs(e.w) - g.edge(e).minlen; - })); - - if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 - rank === undefined || // return value of _.map([]) for Lodash 4 - rank === null) { // return value of _.map([null]) - rank = 0; - } - - return (label.rank = rank); - } - - _.forEach(g.sources(), dfs); -} - -/* - * Returns the amount of slack for the given edge. The slack is defined as the - * difference between the length of the edge and its minimum length. - */ -function slack(g, e) { - return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; -} - -},{'../lodash':10}],29:[function(require,module,exports){ -'use strict'; - -var _ = require('./lodash'), - Graph = require('./graphlib').Graph; - -module.exports = { - addDummyNode: addDummyNode, - simplify: simplify, - asNonCompoundGraph: asNonCompoundGraph, - successorWeights: successorWeights, - predecessorWeights: predecessorWeights, - intersectRect: intersectRect, - buildLayerMatrix: buildLayerMatrix, - normalizeRanks: normalizeRanks, - removeEmptyRanks: removeEmptyRanks, - addBorderNode: addBorderNode, - maxRank: maxRank, - partition: partition, - time: time, - notime: notime -}; - -/* - * Adds a dummy node to the graph and return v. - */ -function addDummyNode(g, type, attrs, name) { - var v; - do { - v = _.uniqueId(name); - } while (g.hasNode(v)); - - attrs.dummy = type; - g.setNode(v, attrs); - return v; -} - -/* - * Returns a new graph with only simple edges. Handles aggregation of data - * associated with multi-edges. - */ -function simplify(g) { - var simplified = new Graph().setGraph(g.graph()); - _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); }); - _.forEach(g.edges(), function(e) { - var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }, - label = g.edge(e); - simplified.setEdge(e.v, e.w, { - weight: simpleLabel.weight + label.weight, - minlen: Math.max(simpleLabel.minlen, label.minlen) - }); - }); - return simplified; -} - -function asNonCompoundGraph(g) { - var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph()); - _.forEach(g.nodes(), function(v) { - if (!g.children(v).length) { - simplified.setNode(v, g.node(v)); - } - }); - _.forEach(g.edges(), function(e) { - simplified.setEdge(e, g.edge(e)); - }); - return simplified; -} - -function successorWeights(g) { - var weightMap = _.map(g.nodes(), function(v) { - var sucs = {}; - _.forEach(g.outEdges(v), function(e) { - sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; - }); - return sucs; - }); - return _.zipObject(g.nodes(), weightMap); -} - -function predecessorWeights(g) { - var weightMap = _.map(g.nodes(), function(v) { - var preds = {}; - _.forEach(g.inEdges(v), function(e) { - preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; - }); - return preds; - }); - return _.zipObject(g.nodes(), weightMap); -} - -/* - * Finds where a line starting at point ({x, y}) would intersect a rectangle - * ({x, y, width, height}) if it were pointing at the rectangle's center. - */ -function intersectRect(rect, point) { - var x = rect.x; - var y = rect.y; - - // Rectangle intersection algorithm from: - // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes - var dx = point.x - x; - var dy = point.y - y; - var w = rect.width / 2; - var h = rect.height / 2; - - if (!dx && !dy) { - throw new Error('Not possible to find intersection inside of the rectangle'); - } - - var sx, sy; - if (Math.abs(dy) * w > Math.abs(dx) * h) { - // Intersection is top or bottom of rect. - if (dy < 0) { - h = -h; - } - sx = h * dx / dy; - sy = h; - } else { - // Intersection is left or right of rect. - if (dx < 0) { - w = -w; - } - sx = w; - sy = w * dy / dx; - } - - return { x: x + sx, y: y + sy }; -} - -/* - * Given a DAG with each node assigned "rank" and "order" properties, this - * function will produce a matrix with the ids of each node. - */ -function buildLayerMatrix(g) { - var layering = _.map(_.range(maxRank(g) + 1), function() { return []; }); - _.forEach(g.nodes(), function(v) { - var node = g.node(v), - rank = node.rank; - if (!_.isUndefined(rank)) { - layering[rank][node.order] = v; - } - }); - return layering; -} - -/* - * Adjusts the ranks for all nodes in the graph such that all nodes v have - * rank(v) >= 0 and at least one node w has rank(w) = 0. - */ -function normalizeRanks(g) { - var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); - _.forEach(g.nodes(), function(v) { - var node = g.node(v); - if (_.has(node, 'rank')) { - node.rank -= min; - } - }); -} - -function removeEmptyRanks(g) { - // Ranks may not start at 0, so we need to offset them - var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); - - var layers = []; - _.forEach(g.nodes(), function(v) { - var rank = g.node(v).rank - offset; - if (!layers[rank]) { - layers[rank] = []; - } - layers[rank].push(v); - }); - - var delta = 0, - nodeRankFactor = g.graph().nodeRankFactor; - _.forEach(layers, function(vs, i) { - if (_.isUndefined(vs) && i % nodeRankFactor !== 0) { - --delta; - } else if (delta) { - _.forEach(vs, function(v) { g.node(v).rank += delta; }); - } - }); -} - -function addBorderNode(g, prefix, rank, order) { - var node = { - width: 0, - height: 0 - }; - if (arguments.length >= 4) { - node.rank = rank; - node.order = order; - } - return addDummyNode(g, 'border', node, prefix); -} - -function maxRank(g) { - return _.max(_.map(g.nodes(), function(v) { - var rank = g.node(v).rank; - if (!_.isUndefined(rank)) { - return rank; - } - })); -} - -/* - * Partition a collection into two groups: `lhs` and `rhs`. If the supplied - * function returns true for an entry it goes into `lhs`. Otherwise it goes - * into `rhs. - */ -function partition(collection, fn) { - var result = { lhs: [], rhs: [] }; - _.forEach(collection, function(value) { - if (fn(value)) { - result.lhs.push(value); - } else { - result.rhs.push(value); - } - }); - return result; -} - -/* - * Returns a new function that wraps `fn` with a timer. The wrapper logs the - * time it takes to execute the function. - */ -function time(name, fn) { - var start = _.now(); - try { - return fn(); - } finally { - console.log(name + ' time: ' + (_.now() - start) + 'ms'); - } -} - -function notime(name, fn) { - return fn(); -} - -},{'./graphlib':7,'./lodash':10}],30:[function(require,module,exports){ -module.exports = '0.8.4'; - -},{}],31:[function(require,module,exports){ -/** - * Copyright (c) 2014, Chris Pettitt - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var lib = require('./lib'); - -module.exports = { - Graph: lib.Graph, - json: require('./lib/json'), - alg: require('./lib/alg'), - version: lib.version -}; - -},{'./lib':47,'./lib/alg':38,'./lib/json':48}],32:[function(require,module,exports){ -var _ = require('../lodash'); - -module.exports = components; - -function components(g) { - var visited = {}, - cmpts = [], - cmpt; - - function dfs(v) { - if (_.has(visited, v)) return; - visited[v] = true; - cmpt.push(v); - _.each(g.successors(v), dfs); - _.each(g.predecessors(v), dfs); - } - - _.each(g.nodes(), function(v) { - cmpt = []; - dfs(v); - if (cmpt.length) { - cmpts.push(cmpt); - } - }); - - return cmpts; -} - -},{'../lodash':49}],33:[function(require,module,exports){ -var _ = require('../lodash'); - -module.exports = dfs; - -/* - * A helper that preforms a pre- or post-order traversal on the input graph - * and returns the nodes in the order they were visited. If the graph is - * undirected then this algorithm will navigate using neighbors. If the graph - * is directed then this algorithm will navigate using successors. - * - * Order must be one of "pre" or "post". - */ -function dfs(g, vs, order) { - if (!_.isArray(vs)) { - vs = [vs]; - } - - var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); - - var acc = [], - visited = {}; - _.each(vs, function(v) { - if (!g.hasNode(v)) { - throw new Error('Graph does not have node: ' + v); - } - - doDfs(g, v, order === 'post', visited, navigation, acc); - }); - return acc; -} - -function doDfs(g, v, postorder, visited, navigation, acc) { - if (!_.has(visited, v)) { - visited[v] = true; - - if (!postorder) { acc.push(v); } - _.each(navigation(v), function(w) { - doDfs(g, w, postorder, visited, navigation, acc); - }); - if (postorder) { acc.push(v); } - } -} - -},{'../lodash':49}],34:[function(require,module,exports){ -var dijkstra = require('./dijkstra'), - _ = require('../lodash'); - -module.exports = dijkstraAll; - -function dijkstraAll(g, weightFunc, edgeFunc) { - return _.transform(g.nodes(), function(acc, v) { - acc[v] = dijkstra(g, v, weightFunc, edgeFunc); - }, {}); -} - -},{'../lodash':49,'./dijkstra':35}],35:[function(require,module,exports){ -var _ = require('../lodash'), - PriorityQueue = require('../data/priority-queue'); - -module.exports = dijkstra; - -var DEFAULT_WEIGHT_FUNC = _.constant(1); - -function dijkstra(g, source, weightFn, edgeFn) { - return runDijkstra(g, String(source), - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || function(v) { return g.outEdges(v); }); -} - -function runDijkstra(g, source, weightFn, edgeFn) { - var results = {}, - pq = new PriorityQueue(), - v, vEntry; - - var updateNeighbors = function(edge) { - var w = edge.v !== v ? edge.v : edge.w, - wEntry = results[w], - weight = weightFn(edge), - distance = vEntry.distance + weight; - - if (weight < 0) { - throw new Error('dijkstra does not allow negative edge weights. ' + - 'Bad edge: ' + edge + ' Weight: ' + weight); - } - - if (distance < wEntry.distance) { - wEntry.distance = distance; - wEntry.predecessor = v; - pq.decrease(w, distance); - } - }; - - g.nodes().forEach(function(v) { - var distance = v === source ? 0 : Number.POSITIVE_INFINITY; - results[v] = { distance: distance }; - pq.add(v, distance); - }); - - while (pq.size() > 0) { - v = pq.removeMin(); - vEntry = results[v]; - if (vEntry.distance === Number.POSITIVE_INFINITY) { - break; - } - - edgeFn(v).forEach(updateNeighbors); - } - - return results; -} - -},{'../data/priority-queue':45,'../lodash':49}],36:[function(require,module,exports){ -var _ = require('../lodash'), - tarjan = require('./tarjan'); - -module.exports = findCycles; - -function findCycles(g) { - return _.filter(tarjan(g), function(cmpt) { - return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0])); - }); -} - -},{'../lodash':49,'./tarjan':43}],37:[function(require,module,exports){ -var _ = require('../lodash'); - -module.exports = floydWarshall; - -var DEFAULT_WEIGHT_FUNC = _.constant(1); - -function floydWarshall(g, weightFn, edgeFn) { - return runFloydWarshall(g, - weightFn || DEFAULT_WEIGHT_FUNC, - edgeFn || function(v) { return g.outEdges(v); }); -} - -function runFloydWarshall(g, weightFn, edgeFn) { - var results = {}, - nodes = g.nodes(); - - nodes.forEach(function(v) { - results[v] = {}; - results[v][v] = { distance: 0 }; - nodes.forEach(function(w) { - if (v !== w) { - results[v][w] = { distance: Number.POSITIVE_INFINITY }; - } - }); - edgeFn(v).forEach(function(edge) { - var w = edge.v === v ? edge.w : edge.v, - d = weightFn(edge); - results[v][w] = { distance: d, predecessor: v }; - }); - }); - - nodes.forEach(function(k) { - var rowK = results[k]; - nodes.forEach(function(i) { - var rowI = results[i]; - nodes.forEach(function(j) { - var ik = rowI[k]; - var kj = rowK[j]; - var ij = rowI[j]; - var altDistance = ik.distance + kj.distance; - if (altDistance < ij.distance) { - ij.distance = altDistance; - ij.predecessor = kj.predecessor; - } - }); - }); - }); - - return results; -} - -},{'../lodash':49}],38:[function(require,module,exports){ -module.exports = { - components: require('./components'), - dijkstra: require('./dijkstra'), - dijkstraAll: require('./dijkstra-all'), - findCycles: require('./find-cycles'), - floydWarshall: require('./floyd-warshall'), - isAcyclic: require('./is-acyclic'), - postorder: require('./postorder'), - preorder: require('./preorder'), - prim: require('./prim'), - tarjan: require('./tarjan'), - topsort: require('./topsort') -}; - -},{'./components':32,'./dijkstra':35,'./dijkstra-all':34,'./find-cycles':36,'./floyd-warshall':37,'./is-acyclic':39,'./postorder':40,'./preorder':41,'./prim':42,'./tarjan':43,'./topsort':44}],39:[function(require,module,exports){ -var topsort = require('./topsort'); - -module.exports = isAcyclic; - -function isAcyclic(g) { - try { - topsort(g); - } catch (e) { - if (e instanceof topsort.CycleException) { - return false; - } - throw e; - } - return true; -} - -},{'./topsort':44}],40:[function(require,module,exports){ -var dfs = require('./dfs'); - -module.exports = postorder; - -function postorder(g, vs) { - return dfs(g, vs, 'post'); -} - -},{'./dfs':33}],41:[function(require,module,exports){ -var dfs = require('./dfs'); - -module.exports = preorder; - -function preorder(g, vs) { - return dfs(g, vs, 'pre'); -} - -},{'./dfs':33}],42:[function(require,module,exports){ -var _ = require('../lodash'), - Graph = require('../graph'), - PriorityQueue = require('../data/priority-queue'); - -module.exports = prim; - -function prim(g, weightFunc) { - var result = new Graph(), - parents = {}, - pq = new PriorityQueue(), - v; - - function updateNeighbors(edge) { - var w = edge.v === v ? edge.w : edge.v, - pri = pq.priority(w); - if (pri !== undefined) { - var edgeWeight = weightFunc(edge); - if (edgeWeight < pri) { - parents[w] = v; - pq.decrease(w, edgeWeight); - } - } - } - - if (g.nodeCount() === 0) { - return result; - } - - _.each(g.nodes(), function(v) { - pq.add(v, Number.POSITIVE_INFINITY); - result.setNode(v); - }); - - // Start from an arbitrary node - pq.decrease(g.nodes()[0], 0); - - var init = false; - while (pq.size() > 0) { - v = pq.removeMin(); - if (_.has(parents, v)) { - result.setEdge(v, parents[v]); - } else if (init) { - throw new Error('Input graph is not connected: ' + g); - } else { - init = true; - } - - g.nodeEdges(v).forEach(updateNeighbors); - } - - return result; -} - -},{'../data/priority-queue':45,'../graph':46,'../lodash':49}],43:[function(require,module,exports){ -var _ = require('../lodash'); - -module.exports = tarjan; - -function tarjan(g) { - var index = 0, - stack = [], - visited = {}, // node id -> { onStack, lowlink, index } - results = []; - - function dfs(v) { - var entry = visited[v] = { - onStack: true, - lowlink: index, - index: index++ - }; - stack.push(v); - - g.successors(v).forEach(function(w) { - if (!_.has(visited, w)) { - dfs(w); - entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink); - } else if (visited[w].onStack) { - entry.lowlink = Math.min(entry.lowlink, visited[w].index); - } - }); - - if (entry.lowlink === entry.index) { - var cmpt = [], - w; - do { - w = stack.pop(); - visited[w].onStack = false; - cmpt.push(w); - } while (v !== w); - results.push(cmpt); - } - } - - g.nodes().forEach(function(v) { - if (!_.has(visited, v)) { - dfs(v); - } - }); - - return results; -} - -},{'../lodash':49}],44:[function(require,module,exports){ -var _ = require('../lodash'); - -module.exports = topsort; -topsort.CycleException = CycleException; - -function topsort(g) { - var visited = {}, - stack = {}, - results = []; - - function visit(node) { - if (_.has(stack, node)) { - throw new CycleException(); - } - - if (!_.has(visited, node)) { - stack[node] = true; - visited[node] = true; - _.each(g.predecessors(node), visit); - delete stack[node]; - results.push(node); - } - } - - _.each(g.sinks(), visit); - - if (_.size(visited) !== g.nodeCount()) { - throw new CycleException(); - } - - return results; -} - -function CycleException() {} -CycleException.prototype = new Error(); // must be an instance of Error to pass testing -},{'../lodash':49}],45:[function(require,module,exports){ -var _ = require('../lodash'); - -module.exports = PriorityQueue; - -/** - * A min-priority queue data structure. This algorithm is derived from Cormen, - * et al., "Introduction to Algorithms". The basic idea of a min-priority - * queue is that you can efficiently (in O(1) time) get the smallest key in - * the queue. Adding and removing elements takes O(log n) time. A key can - * have its priority decreased in O(log n) time. - */ -function PriorityQueue() { - this._arr = []; - this._keyIndices = {}; -} - -/** - * Returns the number of elements in the queue. Takes `O(1)` time. - */ -PriorityQueue.prototype.size = function() { - return this._arr.length; -}; - -/** - * Returns the keys that are in the queue. Takes `O(n)` time. - */ -PriorityQueue.prototype.keys = function() { - return this._arr.map(function(x) { return x.key; }); -}; - -/** - * Returns `true` if **key** is in the queue and `false` if not. - */ -PriorityQueue.prototype.has = function(key) { - return _.has(this._keyIndices, key); -}; - -/** - * Returns the priority for **key**. If **key** is not present in the queue - * then this function returns `undefined`. Takes `O(1)` time. - * - * @param {Object} key - */ -PriorityQueue.prototype.priority = function(key) { - var index = this._keyIndices[key]; - if (index !== undefined) { - return this._arr[index].priority; - } -}; - -/** - * Returns the key for the minimum element in this queue. If the queue is - * empty this function throws an Error. Takes `O(1)` time. - */ -PriorityQueue.prototype.min = function() { - if (this.size() === 0) { - throw new Error('Queue underflow'); - } - return this._arr[0].key; -}; - -/** - * Inserts a new key into the priority queue. If the key already exists in - * the queue this function returns `false`; otherwise it will return `true`. - * Takes `O(n)` time. - * - * @param {Object} key the key to add - * @param {Number} priority the initial priority for the key - */ -PriorityQueue.prototype.add = function(key, priority) { - var keyIndices = this._keyIndices; - key = String(key); - if (!_.has(keyIndices, key)) { - var arr = this._arr; - var index = arr.length; - keyIndices[key] = index; - arr.push({key: key, priority: priority}); - this._decrease(index); - return true; - } - return false; -}; - -/** - * Removes and returns the smallest key in the queue. Takes `O(log n)` time. - */ -PriorityQueue.prototype.removeMin = function() { - this._swap(0, this._arr.length - 1); - var min = this._arr.pop(); - delete this._keyIndices[min.key]; - this._heapify(0); - return min.key; -}; - -/** - * Decreases the priority for **key** to **priority**. If the new priority is - * greater than the previous priority, this function will throw an Error. - * - * @param {Object} key the key for which to raise priority - * @param {Number} priority the new priority for the key - */ -PriorityQueue.prototype.decrease = function(key, priority) { - var index = this._keyIndices[key]; - if (priority > this._arr[index].priority) { - throw new Error('New priority is greater than current priority. ' + - 'Key: ' + key + ' Old: ' + this._arr[index].priority + ' New: ' + priority); - } - this._arr[index].priority = priority; - this._decrease(index); -}; - -PriorityQueue.prototype._heapify = function(i) { - var arr = this._arr; - var l = 2 * i, - r = l + 1, - largest = i; - if (l < arr.length) { - largest = arr[l].priority < arr[largest].priority ? l : largest; - if (r < arr.length) { - largest = arr[r].priority < arr[largest].priority ? r : largest; - } - if (largest !== i) { - this._swap(i, largest); - this._heapify(largest); - } - } -}; - -PriorityQueue.prototype._decrease = function(index) { - var arr = this._arr; - var priority = arr[index].priority; - var parent; - while (index !== 0) { - parent = index >> 1; - if (arr[parent].priority < priority) { - break; - } - this._swap(index, parent); - index = parent; - } -}; - -PriorityQueue.prototype._swap = function(i, j) { - var arr = this._arr; - var keyIndices = this._keyIndices; - var origArrI = arr[i]; - var origArrJ = arr[j]; - arr[i] = origArrJ; - arr[j] = origArrI; - keyIndices[origArrJ.key] = i; - keyIndices[origArrI.key] = j; -}; - -},{'../lodash':49}],46:[function(require,module,exports){ -'use strict'; - -var _ = require('./lodash'); - -module.exports = Graph; - -var DEFAULT_EDGE_NAME = '\x00', - GRAPH_NODE = '\x00', - EDGE_KEY_DELIM = '\x01'; - -// Implementation notes: -// -// * Node id query functions should return string ids for the nodes -// * Edge id query functions should return an "edgeObj", edge object, that is -// composed of enough information to uniquely identify an edge: {v, w, name}. -// * Internally we use an "edgeId", a stringified form of the edgeObj, to -// reference edges. This is because we need a performant way to look these -// edges up and, object properties, which have string keys, are the closest -// we're going to get to a performant hashtable in JavaScript. - -function Graph(opts) { - this._isDirected = _.has(opts, 'directed') ? opts.directed : true; - this._isMultigraph = _.has(opts, 'multigraph') ? opts.multigraph : false; - this._isCompound = _.has(opts, 'compound') ? opts.compound : false; - - // Label for the graph itself - this._label = undefined; - - // Defaults to be set when creating a new node - this._defaultNodeLabelFn = _.constant(undefined); - - // Defaults to be set when creating a new edge - this._defaultEdgeLabelFn = _.constant(undefined); - - // v -> label - this._nodes = {}; - - if (this._isCompound) { - // v -> parent - this._parent = {}; - - // v -> children - this._children = {}; - this._children[GRAPH_NODE] = {}; - } - - // v -> edgeObj - this._in = {}; - - // u -> v -> Number - this._preds = {}; - - // v -> edgeObj - this._out = {}; - - // v -> w -> Number - this._sucs = {}; - - // e -> edgeObj - this._edgeObjs = {}; - - // e -> label - this._edgeLabels = {}; -} - -/* Number of nodes in the graph. Should only be changed by the implementation. */ -Graph.prototype._nodeCount = 0; - -/* Number of edges in the graph. Should only be changed by the implementation. */ -Graph.prototype._edgeCount = 0; - - -/* === Graph functions ========= */ - -Graph.prototype.isDirected = function() { - return this._isDirected; -}; - -Graph.prototype.isMultigraph = function() { - return this._isMultigraph; -}; - -Graph.prototype.isCompound = function() { - return this._isCompound; -}; - -Graph.prototype.setGraph = function(label) { - this._label = label; - return this; -}; - -Graph.prototype.graph = function() { - return this._label; -}; - - -/* === Node functions ========== */ - -Graph.prototype.setDefaultNodeLabel = function(newDefault) { - if (!_.isFunction(newDefault)) { - newDefault = _.constant(newDefault); - } - this._defaultNodeLabelFn = newDefault; - return this; -}; - -Graph.prototype.nodeCount = function() { - return this._nodeCount; -}; - -Graph.prototype.nodes = function() { - return _.keys(this._nodes); -}; - -Graph.prototype.sources = function() { - var self = this; - return _.filter(this.nodes(), function(v) { - return _.isEmpty(self._in[v]); - }); -}; - -Graph.prototype.sinks = function() { - var self = this; - return _.filter(this.nodes(), function(v) { - return _.isEmpty(self._out[v]); - }); -}; - -Graph.prototype.setNodes = function(vs, value) { - var args = arguments; - var self = this; - _.each(vs, function(v) { - if (args.length > 1) { - self.setNode(v, value); - } else { - self.setNode(v); - } - }); - return this; -}; - -Graph.prototype.setNode = function(v, value) { - if (_.has(this._nodes, v)) { - if (arguments.length > 1) { - this._nodes[v] = value; - } - return this; - } - - this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); - if (this._isCompound) { - this._parent[v] = GRAPH_NODE; - this._children[v] = {}; - this._children[GRAPH_NODE][v] = true; - } - this._in[v] = {}; - this._preds[v] = {}; - this._out[v] = {}; - this._sucs[v] = {}; - ++this._nodeCount; - return this; -}; - -Graph.prototype.node = function(v) { - return this._nodes[v]; -}; - -Graph.prototype.hasNode = function(v) { - return _.has(this._nodes, v); -}; - -Graph.prototype.removeNode = function(v) { - var self = this; - if (_.has(this._nodes, v)) { - var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); }; - delete this._nodes[v]; - if (this._isCompound) { - this._removeFromParentsChildList(v); - delete this._parent[v]; - _.each(this.children(v), function(child) { - self.setParent(child); - }); - delete this._children[v]; - } - _.each(_.keys(this._in[v]), removeEdge); - delete this._in[v]; - delete this._preds[v]; - _.each(_.keys(this._out[v]), removeEdge); - delete this._out[v]; - delete this._sucs[v]; - --this._nodeCount; - } - return this; -}; - -Graph.prototype.setParent = function(v, parent) { - if (!this._isCompound) { - throw new Error('Cannot set parent in a non-compound graph'); - } - - if (_.isUndefined(parent)) { - parent = GRAPH_NODE; - } else { - // Coerce parent to string - parent += ''; - for (var ancestor = parent; - !_.isUndefined(ancestor); - ancestor = this.parent(ancestor)) { - if (ancestor === v) { - throw new Error('Setting ' + parent+ ' as parent of ' + v + - ' would create a cycle'); - } - } - - this.setNode(parent); - } - - this.setNode(v); - this._removeFromParentsChildList(v); - this._parent[v] = parent; - this._children[parent][v] = true; - return this; -}; - -Graph.prototype._removeFromParentsChildList = function(v) { - delete this._children[this._parent[v]][v]; -}; - -Graph.prototype.parent = function(v) { - if (this._isCompound) { - var parent = this._parent[v]; - if (parent !== GRAPH_NODE) { - return parent; - } - } -}; - -Graph.prototype.children = function(v) { - if (_.isUndefined(v)) { - v = GRAPH_NODE; - } - - if (this._isCompound) { - var children = this._children[v]; - if (children) { - return _.keys(children); - } - } else if (v === GRAPH_NODE) { - return this.nodes(); - } else if (this.hasNode(v)) { - return []; - } -}; - -Graph.prototype.predecessors = function(v) { - var predsV = this._preds[v]; - if (predsV) { - return _.keys(predsV); - } -}; - -Graph.prototype.successors = function(v) { - var sucsV = this._sucs[v]; - if (sucsV) { - return _.keys(sucsV); - } -}; - -Graph.prototype.neighbors = function(v) { - var preds = this.predecessors(v); - if (preds) { - return _.union(preds, this.successors(v)); - } -}; - -Graph.prototype.isLeaf = function (v) { - var neighbors; - if (this.isDirected()) { - neighbors = this.successors(v); - } else { - neighbors = this.neighbors(v); - } - return neighbors.length === 0; -}; - -Graph.prototype.filterNodes = function(filter) { - var copy = new this.constructor({ - directed: this._isDirected, - multigraph: this._isMultigraph, - compound: this._isCompound - }); - - copy.setGraph(this.graph()); - - var self = this; - _.each(this._nodes, function(value, v) { - if (filter(v)) { - copy.setNode(v, value); - } - }); - - _.each(this._edgeObjs, function(e) { - if (copy.hasNode(e.v) && copy.hasNode(e.w)) { - copy.setEdge(e, self.edge(e)); - } - }); - - var parents = {}; - function findParent(v) { - var parent = self.parent(v); - if (parent === undefined || copy.hasNode(parent)) { - parents[v] = parent; - return parent; - } else if (parent in parents) { - return parents[parent]; - } else { - return findParent(parent); - } - } - - if (this._isCompound) { - _.each(copy.nodes(), function(v) { - copy.setParent(v, findParent(v)); - }); - } - - return copy; -}; - -/* === Edge functions ========== */ - -Graph.prototype.setDefaultEdgeLabel = function(newDefault) { - if (!_.isFunction(newDefault)) { - newDefault = _.constant(newDefault); - } - this._defaultEdgeLabelFn = newDefault; - return this; -}; - -Graph.prototype.edgeCount = function() { - return this._edgeCount; -}; - -Graph.prototype.edges = function() { - return _.values(this._edgeObjs); -}; - -Graph.prototype.setPath = function(vs, value) { - var self = this, - args = arguments; - _.reduce(vs, function(v, w) { - if (args.length > 1) { - self.setEdge(v, w, value); - } else { - self.setEdge(v, w); - } - return w; - }); - return this; -}; - -/* - * setEdge(v, w, [value, [name]]) - * setEdge({ v, w, [name] }, [value]) - */ -Graph.prototype.setEdge = function() { - var v, w, name, value, - valueSpecified = false, - arg0 = arguments[0]; - - if (typeof arg0 === 'object' && arg0 !== null && 'v' in arg0) { - v = arg0.v; - w = arg0.w; - name = arg0.name; - if (arguments.length === 2) { - value = arguments[1]; - valueSpecified = true; - } - } else { - v = arg0; - w = arguments[1]; - name = arguments[3]; - if (arguments.length > 2) { - value = arguments[2]; - valueSpecified = true; - } - } - - v = '' + v; - w = '' + w; - if (!_.isUndefined(name)) { - name = '' + name; - } - - var e = edgeArgsToId(this._isDirected, v, w, name); - if (_.has(this._edgeLabels, e)) { - if (valueSpecified) { - this._edgeLabels[e] = value; - } - return this; - } - - if (!_.isUndefined(name) && !this._isMultigraph) { - throw new Error('Cannot set a named edge when isMultigraph = false'); - } - - // It didn't exist, so we need to create it. - // First ensure the nodes exist. - this.setNode(v); - this.setNode(w); - - this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); - - var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); - // Ensure we add undirected edges in a consistent way. - v = edgeObj.v; - w = edgeObj.w; - - Object.freeze(edgeObj); - this._edgeObjs[e] = edgeObj; - incrementOrInitEntry(this._preds[w], v); - incrementOrInitEntry(this._sucs[v], w); - this._in[w][e] = edgeObj; - this._out[v][e] = edgeObj; - this._edgeCount++; - return this; -}; - -Graph.prototype.edge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)); - return this._edgeLabels[e]; -}; - -Graph.prototype.hasEdge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)); - return _.has(this._edgeLabels, e); -}; - -Graph.prototype.removeEdge = function(v, w, name) { - var e = (arguments.length === 1 - ? edgeObjToId(this._isDirected, arguments[0]) - : edgeArgsToId(this._isDirected, v, w, name)), - edge = this._edgeObjs[e]; - if (edge) { - v = edge.v; - w = edge.w; - delete this._edgeLabels[e]; - delete this._edgeObjs[e]; - decrementOrRemoveEntry(this._preds[w], v); - decrementOrRemoveEntry(this._sucs[v], w); - delete this._in[w][e]; - delete this._out[v][e]; - this._edgeCount--; - } - return this; -}; - -Graph.prototype.inEdges = function(v, u) { - var inV = this._in[v]; - if (inV) { - var edges = _.values(inV); - if (!u) { - return edges; - } - return _.filter(edges, function(edge) { return edge.v === u; }); - } -}; - -Graph.prototype.outEdges = function(v, w) { - var outV = this._out[v]; - if (outV) { - var edges = _.values(outV); - if (!w) { - return edges; - } - return _.filter(edges, function(edge) { return edge.w === w; }); - } -}; - -Graph.prototype.nodeEdges = function(v, w) { - var inEdges = this.inEdges(v, w); - if (inEdges) { - return inEdges.concat(this.outEdges(v, w)); - } -}; - -function incrementOrInitEntry(map, k) { - if (map[k]) { - map[k]++; - } else { - map[k] = 1; - } -} - -function decrementOrRemoveEntry(map, k) { - if (!--map[k]) { delete map[k]; } -} - -function edgeArgsToId(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + - (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name); -} - -function edgeArgsToObj(isDirected, v_, w_, name) { - var v = '' + v_; - var w = '' + w_; - if (!isDirected && v > w) { - var tmp = v; - v = w; - w = tmp; - } - var edgeObj = { v: v, w: w }; - if (name) { - edgeObj.name = name; - } - return edgeObj; -} - -function edgeObjToId(isDirected, edgeObj) { - return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); -} - -},{'./lodash':49}],47:[function(require,module,exports){ -// Includes only the "core" of graphlib -module.exports = { - Graph: require('./graph'), - version: require('./version') -}; - -},{'./graph':46,'./version':50}],48:[function(require,module,exports){ -var _ = require('./lodash'), - Graph = require('./graph'); - -module.exports = { - write: write, - read: read -}; - -function write(g) { - var json = { - options: { - directed: g.isDirected(), - multigraph: g.isMultigraph(), - compound: g.isCompound() - }, - nodes: writeNodes(g), - edges: writeEdges(g) - }; - if (!_.isUndefined(g.graph())) { - json.value = _.clone(g.graph()); - } - return json; -} - -function writeNodes(g) { - return _.map(g.nodes(), function(v) { - var nodeValue = g.node(v), - parent = g.parent(v), - node = { v: v }; - if (!_.isUndefined(nodeValue)) { - node.value = nodeValue; - } - if (!_.isUndefined(parent)) { - node.parent = parent; - } - return node; - }); -} - -function writeEdges(g) { - return _.map(g.edges(), function(e) { - var edgeValue = g.edge(e), - edge = { v: e.v, w: e.w }; - if (!_.isUndefined(e.name)) { - edge.name = e.name; - } - if (!_.isUndefined(edgeValue)) { - edge.value = edgeValue; - } - return edge; - }); -} - -function read(json) { - var g = new Graph(json.options).setGraph(json.value); - _.each(json.nodes, function(entry) { - g.setNode(entry.v, entry.value); - if (entry.parent) { - g.setParent(entry.v, entry.parent); - } - }); - _.each(json.edges, function(entry) { - g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); - }); - return g; -} - -},{'./graph':46,'./lodash':49}],49:[function(require,module,exports){ -/* global window */ - -var lodash; - -if (typeof require === 'function') { - try { - lodash = { - clone: require('lodash/clone'), - constant: require('lodash/constant'), - each: require('lodash/each'), - filter: require('lodash/filter'), - has: require('lodash/has'), - isArray: require('lodash/isArray'), - isEmpty: require('lodash/isEmpty'), - isFunction: require('lodash/isFunction'), - isUndefined: require('lodash/isUndefined'), - keys: require('lodash/keys'), - map: require('lodash/map'), - reduce: require('lodash/reduce'), - size: require('lodash/size'), - transform: require('lodash/transform'), - union: require('lodash/union'), - values: require('lodash/values') - }; - } catch (e) {} -} - -if (!lodash) { - lodash = window._; -} - -module.exports = lodash; - -},{'lodash/clone':226,'lodash/constant':228,'lodash/each':230,'lodash/filter':232,'lodash/has':239,'lodash/isArray':243,'lodash/isEmpty':247,'lodash/isFunction':248,'lodash/isUndefined':258,'lodash/keys':259,'lodash/map':262,'lodash/reduce':274,'lodash/size':275,'lodash/transform':284,'lodash/union':285,'lodash/values':287}],50:[function(require,module,exports){ -module.exports = '2.1.7'; - -},{}],51:[function(require,module,exports){ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'); - -module.exports = DataView; - -},{'./_getNative':163,'./_root':208}],52:[function(require,module,exports){ -var hashClear = require('./_hashClear'), - hashDelete = require('./_hashDelete'), - hashGet = require('./_hashGet'), - hashHas = require('./_hashHas'), - hashSet = require('./_hashSet'); - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -module.exports = Hash; - -},{'./_hashClear':172,'./_hashDelete':173,'./_hashGet':174,'./_hashHas':175,'./_hashSet':176}],53:[function(require,module,exports){ -var listCacheClear = require('./_listCacheClear'), - listCacheDelete = require('./_listCacheDelete'), - listCacheGet = require('./_listCacheGet'), - listCacheHas = require('./_listCacheHas'), - listCacheSet = require('./_listCacheSet'); - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -module.exports = ListCache; - -},{'./_listCacheClear':188,'./_listCacheDelete':189,'./_listCacheGet':190,'./_listCacheHas':191,'./_listCacheSet':192}],54:[function(require,module,exports){ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'); - -module.exports = Map; - -},{'./_getNative':163,'./_root':208}],55:[function(require,module,exports){ -var mapCacheClear = require('./_mapCacheClear'), - mapCacheDelete = require('./_mapCacheDelete'), - mapCacheGet = require('./_mapCacheGet'), - mapCacheHas = require('./_mapCacheHas'), - mapCacheSet = require('./_mapCacheSet'); - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -module.exports = MapCache; - -},{'./_mapCacheClear':193,'./_mapCacheDelete':194,'./_mapCacheGet':195,'./_mapCacheHas':196,'./_mapCacheSet':197}],56:[function(require,module,exports){ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Promise = getNative(root, 'Promise'); - -module.exports = Promise; - -},{'./_getNative':163,'./_root':208}],57:[function(require,module,exports){ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var Set = getNative(root, 'Set'); - -module.exports = Set; - -},{'./_getNative':163,'./_root':208}],58:[function(require,module,exports){ -var MapCache = require('./_MapCache'), - setCacheAdd = require('./_setCacheAdd'), - setCacheHas = require('./_setCacheHas'); - -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } -} - -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; -SetCache.prototype.has = setCacheHas; - -module.exports = SetCache; - -},{'./_MapCache':55,'./_setCacheAdd':210,'./_setCacheHas':211}],59:[function(require,module,exports){ -var ListCache = require('./_ListCache'), - stackClear = require('./_stackClear'), - stackDelete = require('./_stackDelete'), - stackGet = require('./_stackGet'), - stackHas = require('./_stackHas'), - stackSet = require('./_stackSet'); - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; -} - -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -module.exports = Stack; - -},{'./_ListCache':53,'./_stackClear':215,'./_stackDelete':216,'./_stackGet':217,'./_stackHas':218,'./_stackSet':219}],60:[function(require,module,exports){ -var root = require('./_root'); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; - -},{'./_root':208}],61:[function(require,module,exports){ -var root = require('./_root'); - -/** Built-in value references. */ -var Uint8Array = root.Uint8Array; - -module.exports = Uint8Array; - -},{'./_root':208}],62:[function(require,module,exports){ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var WeakMap = getNative(root, 'WeakMap'); - -module.exports = WeakMap; - -},{'./_getNative':163,'./_root':208}],63:[function(require,module,exports){ -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -module.exports = apply; - -},{}],64:[function(require,module,exports){ -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEach; - -},{}],65:[function(require,module,exports){ -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } - } - return result; -} - -module.exports = arrayFilter; - -},{}],66:[function(require,module,exports){ -var baseIndexOf = require('./_baseIndexOf'); - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; -} - -module.exports = arrayIncludes; - -},{'./_baseIndexOf':95}],67:[function(require,module,exports){ -/** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; -} - -module.exports = arrayIncludesWith; - -},{}],68:[function(require,module,exports){ -var baseTimes = require('./_baseTimes'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isIndex = require('./_isIndex'), - isTypedArray = require('./isTypedArray'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } - } - return result; -} - -module.exports = arrayLikeKeys; - -},{'./_baseTimes':125,'./_isIndex':181,'./isArguments':242,'./isArray':243,'./isBuffer':246,'./isTypedArray':257}],69:[function(require,module,exports){ -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -module.exports = arrayMap; - -},{}],70:[function(require,module,exports){ -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -module.exports = arrayPush; - -},{}],71:[function(require,module,exports){ -/** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); - } - return accumulator; -} - -module.exports = arrayReduce; - -},{}],72:[function(require,module,exports){ -/** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -module.exports = arraySome; - -},{}],73:[function(require,module,exports){ -var baseProperty = require('./_baseProperty'); - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = baseProperty('length'); - -module.exports = asciiSize; - -},{'./_baseProperty':117}],74:[function(require,module,exports){ -var baseAssignValue = require('./_baseAssignValue'), - eq = require('./eq'); - -/** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -module.exports = assignMergeValue; - -},{'./_baseAssignValue':79,'./eq':231}],75:[function(require,module,exports){ -var baseAssignValue = require('./_baseAssignValue'), - eq = require('./eq'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } -} - -module.exports = assignValue; - -},{'./_baseAssignValue':79,'./eq':231}],76:[function(require,module,exports){ -var eq = require('./eq'); - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -module.exports = assocIndexOf; - -},{'./eq':231}],77:[function(require,module,exports){ -var copyObject = require('./_copyObject'), - keys = require('./keys'); - -/** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -module.exports = baseAssign; - -},{'./_copyObject':143,'./keys':259}],78:[function(require,module,exports){ -var copyObject = require('./_copyObject'), - keysIn = require('./keysIn'); - -/** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); -} - -module.exports = baseAssignIn; - -},{'./_copyObject':143,'./keysIn':260}],79:[function(require,module,exports){ -var defineProperty = require('./_defineProperty'); - -/** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } -} - -module.exports = baseAssignValue; - -},{'./_defineProperty':153}],80:[function(require,module,exports){ -var Stack = require('./_Stack'), - arrayEach = require('./_arrayEach'), - assignValue = require('./_assignValue'), - baseAssign = require('./_baseAssign'), - baseAssignIn = require('./_baseAssignIn'), - cloneBuffer = require('./_cloneBuffer'), - copyArray = require('./_copyArray'), - copySymbols = require('./_copySymbols'), - copySymbolsIn = require('./_copySymbolsIn'), - getAllKeys = require('./_getAllKeys'), - getAllKeysIn = require('./_getAllKeysIn'), - getTag = require('./_getTag'), - initCloneArray = require('./_initCloneArray'), - initCloneByTag = require('./_initCloneByTag'), - initCloneObject = require('./_initCloneObject'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isMap = require('./isMap'), - isObject = require('./isObject'), - isSet = require('./isSet'), - keys = require('./keys'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - - return result; - } - - if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - - return result; - } - - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); - - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} - -module.exports = baseClone; - -},{'./_Stack':59,'./_arrayEach':64,'./_assignValue':75,'./_baseAssign':77,'./_baseAssignIn':78,'./_cloneBuffer':135,'./_copyArray':142,'./_copySymbols':144,'./_copySymbolsIn':145,'./_getAllKeys':159,'./_getAllKeysIn':160,'./_getTag':168,'./_initCloneArray':177,'./_initCloneByTag':178,'./_initCloneObject':179,'./isArray':243,'./isBuffer':246,'./isMap':250,'./isObject':251,'./isSet':254,'./keys':259}],81:[function(require,module,exports){ -var isObject = require('./isObject'); - -/** Built-in value references. */ -var objectCreate = Object.create; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); - -module.exports = baseCreate; - -},{'./isObject':251}],82:[function(require,module,exports){ -var baseForOwn = require('./_baseForOwn'), - createBaseEach = require('./_createBaseEach'); - -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); - -module.exports = baseEach; - -},{'./_baseForOwn':88,'./_createBaseEach':148}],83:[function(require,module,exports){ -var isSymbol = require('./isSymbol'); - -/** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; -} - -module.exports = baseExtremum; - -},{'./isSymbol':256}],84:[function(require,module,exports){ -var baseEach = require('./_baseEach'); - -/** - * The base implementation of `_.filter` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ -function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); - } - }); - return result; -} - -module.exports = baseFilter; - -},{'./_baseEach':82}],85:[function(require,module,exports){ -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -module.exports = baseFindIndex; - -},{}],86:[function(require,module,exports){ -var arrayPush = require('./_arrayPush'), - isFlattenable = require('./_isFlattenable'); - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -module.exports = baseFlatten; - -},{'./_arrayPush':70,'./_isFlattenable':180}],87:[function(require,module,exports){ -var createBaseFor = require('./_createBaseFor'); - -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -module.exports = baseFor; - -},{'./_createBaseFor':149}],88:[function(require,module,exports){ -var baseFor = require('./_baseFor'), - keys = require('./keys'); - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} - -module.exports = baseForOwn; - -},{'./_baseFor':87,'./keys':259}],89:[function(require,module,exports){ -var castPath = require('./_castPath'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -module.exports = baseGet; - -},{'./_castPath':133,'./_toKey':223}],90:[function(require,module,exports){ -var arrayPush = require('./_arrayPush'), - isArray = require('./isArray'); - -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} - -module.exports = baseGetAllKeys; - -},{'./_arrayPush':70,'./isArray':243}],91:[function(require,module,exports){ -var Symbol = require('./_Symbol'), - getRawTag = require('./_getRawTag'), - objectToString = require('./_objectToString'); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; - -},{'./_Symbol':60,'./_getRawTag':165,'./_objectToString':205}],92:[function(require,module,exports){ -/** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ -function baseGt(value, other) { - return value > other; -} - -module.exports = baseGt; - -},{}],93:[function(require,module,exports){ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.has` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); -} - -module.exports = baseHas; - -},{}],94:[function(require,module,exports){ -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); -} - -module.exports = baseHasIn; - -},{}],95:[function(require,module,exports){ -var baseFindIndex = require('./_baseFindIndex'), - baseIsNaN = require('./_baseIsNaN'), - strictIndexOf = require('./_strictIndexOf'); - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); -} - -module.exports = baseIndexOf; - -},{'./_baseFindIndex':85,'./_baseIsNaN':101,'./_strictIndexOf':220}],96:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; - -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; -} - -module.exports = baseIsArguments; - -},{'./_baseGetTag':91,'./isObjectLike':252}],97:[function(require,module,exports){ -var baseIsEqualDeep = require('./_baseIsEqualDeep'), - isObjectLike = require('./isObjectLike'); - -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -module.exports = baseIsEqual; - -},{'./_baseIsEqualDeep':98,'./isObjectLike':252}],98:[function(require,module,exports){ -var Stack = require('./_Stack'), - equalArrays = require('./_equalArrays'), - equalByTag = require('./_equalByTag'), - equalObjects = require('./_equalObjects'), - getTag = require('./_getTag'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isTypedArray = require('./isTypedArray'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { - return false; - } - objIsArr = true; - objIsObj = false; - } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); - } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); - } - } - if (!isSameTag) { - return false; - } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); -} - -module.exports = baseIsEqualDeep; - -},{'./_Stack':59,'./_equalArrays':154,'./_equalByTag':155,'./_equalObjects':156,'./_getTag':168,'./isArray':243,'./isBuffer':246,'./isTypedArray':257}],99:[function(require,module,exports){ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; - -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; -} - -module.exports = baseIsMap; - -},{'./_getTag':168,'./isObjectLike':252}],100:[function(require,module,exports){ -var Stack = require('./_Stack'), - baseIsEqual = require('./_baseIsEqual'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; -} - -module.exports = baseIsMatch; - -},{'./_Stack':59,'./_baseIsEqual':97}],101:[function(require,module,exports){ -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -module.exports = baseIsNaN; - -},{}],102:[function(require,module,exports){ -var isFunction = require('./isFunction'), - isMasked = require('./_isMasked'), - isObject = require('./isObject'), - toSource = require('./_toSource'); - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -module.exports = baseIsNative; - -},{'./_isMasked':185,'./_toSource':224,'./isFunction':248,'./isObject':251}],103:[function(require,module,exports){ -var getTag = require('./_getTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; -} - -module.exports = baseIsSet; - -},{'./_getTag':168,'./isObjectLike':252}],104:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - isLength = require('./isLength'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -module.exports = baseIsTypedArray; - -},{'./_baseGetTag':91,'./isLength':249,'./isObjectLike':252}],105:[function(require,module,exports){ -var baseMatches = require('./_baseMatches'), - baseMatchesProperty = require('./_baseMatchesProperty'), - identity = require('./identity'), - isArray = require('./isArray'), - property = require('./property'); - -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); -} - -module.exports = baseIteratee; - -},{'./_baseMatches':110,'./_baseMatchesProperty':111,'./identity':241,'./isArray':243,'./property':272}],106:[function(require,module,exports){ -var isPrototype = require('./_isPrototype'), - nativeKeys = require('./_nativeKeys'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -module.exports = baseKeys; - -},{'./_isPrototype':186,'./_nativeKeys':202}],107:[function(require,module,exports){ -var isObject = require('./isObject'), - isPrototype = require('./_isPrototype'), - nativeKeysIn = require('./_nativeKeysIn'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = baseKeysIn; - -},{'./_isPrototype':186,'./_nativeKeysIn':203,'./isObject':251}],108:[function(require,module,exports){ -/** - * The base implementation of `_.lt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - */ -function baseLt(value, other) { - return value < other; -} - -module.exports = baseLt; - -},{}],109:[function(require,module,exports){ -var baseEach = require('./_baseEach'), - isArrayLike = require('./isArrayLike'); - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -module.exports = baseMap; - -},{'./_baseEach':82,'./isArrayLike':244}],110:[function(require,module,exports){ -var baseIsMatch = require('./_baseIsMatch'), - getMatchData = require('./_getMatchData'), - matchesStrictComparable = require('./_matchesStrictComparable'); - -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; -} - -module.exports = baseMatches; - -},{'./_baseIsMatch':100,'./_getMatchData':162,'./_matchesStrictComparable':199}],111:[function(require,module,exports){ -var baseIsEqual = require('./_baseIsEqual'), - get = require('./get'), - hasIn = require('./hasIn'), - isKey = require('./_isKey'), - isStrictComparable = require('./_isStrictComparable'), - matchesStrictComparable = require('./_matchesStrictComparable'), - toKey = require('./_toKey'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); - } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; -} - -module.exports = baseMatchesProperty; - -},{'./_baseIsEqual':97,'./_isKey':183,'./_isStrictComparable':187,'./_matchesStrictComparable':199,'./_toKey':223,'./get':238,'./hasIn':240}],112:[function(require,module,exports){ -var Stack = require('./_Stack'), - assignMergeValue = require('./_assignMergeValue'), - baseFor = require('./_baseFor'), - baseMergeDeep = require('./_baseMergeDeep'), - isObject = require('./isObject'), - keysIn = require('./keysIn'), - safeGet = require('./_safeGet'); - -/** - * The base implementation of `_.merge` without support for multiple sources. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - if (isObject(srcValue)) { - stack || (stack = new Stack); - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); -} - -module.exports = baseMerge; - -},{'./_Stack':59,'./_assignMergeValue':74,'./_baseFor':87,'./_baseMergeDeep':113,'./_safeGet':209,'./isObject':251,'./keysIn':260}],113:[function(require,module,exports){ -var assignMergeValue = require('./_assignMergeValue'), - cloneBuffer = require('./_cloneBuffer'), - cloneTypedArray = require('./_cloneTypedArray'), - copyArray = require('./_copyArray'), - initCloneObject = require('./_initCloneObject'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLikeObject = require('./isArrayLikeObject'), - isBuffer = require('./isBuffer'), - isFunction = require('./isFunction'), - isObject = require('./isObject'), - isPlainObject = require('./isPlainObject'), - isTypedArray = require('./isTypedArray'), - safeGet = require('./_safeGet'), - toPlainObject = require('./toPlainObject'); - -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); -} - -module.exports = baseMergeDeep; - -},{'./_assignMergeValue':74,'./_cloneBuffer':135,'./_cloneTypedArray':139,'./_copyArray':142,'./_initCloneObject':179,'./_safeGet':209,'./isArguments':242,'./isArray':243,'./isArrayLikeObject':245,'./isBuffer':246,'./isFunction':248,'./isObject':251,'./isPlainObject':253,'./isTypedArray':257,'./toPlainObject':282}],114:[function(require,module,exports){ -var arrayMap = require('./_arrayMap'), - baseIteratee = require('./_baseIteratee'), - baseMap = require('./_baseMap'), - baseSortBy = require('./_baseSortBy'), - baseUnary = require('./_baseUnary'), - compareMultiple = require('./_compareMultiple'), - identity = require('./identity'); - -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - var index = -1; - iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee)); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); - - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); -} - -module.exports = baseOrderBy; - -},{'./_arrayMap':69,'./_baseIteratee':105,'./_baseMap':109,'./_baseSortBy':124,'./_baseUnary':127,'./_compareMultiple':141,'./identity':241}],115:[function(require,module,exports){ -var basePickBy = require('./_basePickBy'), - hasIn = require('./hasIn'); - -/** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ -function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); -} - -module.exports = basePick; - -},{'./_basePickBy':116,'./hasIn':240}],116:[function(require,module,exports){ -var baseGet = require('./_baseGet'), - baseSet = require('./_baseSet'), - castPath = require('./_castPath'); - -/** - * The base implementation of `_.pickBy` without support for iteratee shorthands. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. - */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); - - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } - } - return result; -} - -module.exports = basePickBy; - -},{'./_baseGet':89,'./_baseSet':122,'./_castPath':133}],117:[function(require,module,exports){ -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -module.exports = baseProperty; - -},{}],118:[function(require,module,exports){ -var baseGet = require('./_baseGet'); - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; -} - -module.exports = basePropertyDeep; - -},{'./_baseGet':89}],119:[function(require,module,exports){ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeCeil = Math.ceil, - nativeMax = Math.max; - -/** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. - * - * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. - */ -function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); - - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; -} - -module.exports = baseRange; - -},{}],120:[function(require,module,exports){ -/** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ -function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; -} - -module.exports = baseReduce; - -},{}],121:[function(require,module,exports){ -var identity = require('./identity'), - overRest = require('./_overRest'), - setToString = require('./_setToString'); - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} - -module.exports = baseRest; - -},{'./_overRest':207,'./_setToString':213,'./identity':241}],122:[function(require,module,exports){ -var assignValue = require('./_assignValue'), - castPath = require('./_castPath'), - isIndex = require('./_isIndex'), - isObject = require('./isObject'), - toKey = require('./_toKey'); - -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; -} - -module.exports = baseSet; - -},{'./_assignValue':75,'./_castPath':133,'./_isIndex':181,'./_toKey':223,'./isObject':251}],123:[function(require,module,exports){ -var constant = require('./constant'), - defineProperty = require('./_defineProperty'), - identity = require('./identity'); - -/** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; - -module.exports = baseSetToString; - -},{'./_defineProperty':153,'./constant':228,'./identity':241}],124:[function(require,module,exports){ -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; - } - return array; -} - -module.exports = baseSortBy; - -},{}],125:[function(require,module,exports){ -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -module.exports = baseTimes; - -},{}],126:[function(require,module,exports){ -var Symbol = require('./_Symbol'), - arrayMap = require('./_arrayMap'), - isArray = require('./isArray'), - isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = baseToString; - -},{'./_Symbol':60,'./_arrayMap':69,'./isArray':243,'./isSymbol':256}],127:[function(require,module,exports){ -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -module.exports = baseUnary; - -},{}],128:[function(require,module,exports){ -var SetCache = require('./_SetCache'), - arrayIncludes = require('./_arrayIncludes'), - arrayIncludesWith = require('./_arrayIncludesWith'), - cacheHas = require('./_cacheHas'), - createSet = require('./_createSet'), - setToArray = require('./_setToArray'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -module.exports = baseUniq; - -},{'./_SetCache':58,'./_arrayIncludes':66,'./_arrayIncludesWith':67,'./_cacheHas':131,'./_createSet':152,'./_setToArray':212}],129:[function(require,module,exports){ -var arrayMap = require('./_arrayMap'); - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} - -module.exports = baseValues; - -},{'./_arrayMap':69}],130:[function(require,module,exports){ -/** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. - * - * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. - */ -function baseZipObject(props, values, assignFunc) { - var index = -1, - length = props.length, - valsLength = values.length, - result = {}; - - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); - } - return result; -} - -module.exports = baseZipObject; - -},{}],131:[function(require,module,exports){ -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -module.exports = cacheHas; - -},{}],132:[function(require,module,exports){ -var identity = require('./identity'); - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : identity; -} - -module.exports = castFunction; - -},{'./identity':241}],133:[function(require,module,exports){ -var isArray = require('./isArray'), - isKey = require('./_isKey'), - stringToPath = require('./_stringToPath'), - toString = require('./toString'); - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); -} - -module.exports = castPath; - -},{'./_isKey':183,'./_stringToPath':222,'./isArray':243,'./toString':283}],134:[function(require,module,exports){ -var Uint8Array = require('./_Uint8Array'); - -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; -} - -module.exports = cloneArrayBuffer; - -},{'./_Uint8Array':61}],135:[function(require,module,exports){ -var root = require('./_root'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; - -/** - * Creates a clone of `buffer`. - * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); - - buffer.copy(result); - return result; -} - -module.exports = cloneBuffer; - -},{'./_root':208}],136:[function(require,module,exports){ -var cloneArrayBuffer = require('./_cloneArrayBuffer'); - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); -} - -module.exports = cloneDataView; - -},{'./_cloneArrayBuffer':134}],137:[function(require,module,exports){ -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} - -module.exports = cloneRegExp; - -},{}],138:[function(require,module,exports){ -var Symbol = require('./_Symbol'); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; -} - -module.exports = cloneSymbol; - -},{'./_Symbol':60}],139:[function(require,module,exports){ -var cloneArrayBuffer = require('./_cloneArrayBuffer'); - -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} - -module.exports = cloneTypedArray; - -},{'./_cloneArrayBuffer':134}],140:[function(require,module,exports){ -var isSymbol = require('./isSymbol'); - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } - } - return 0; -} - -module.exports = compareAscending; - -},{'./isSymbol':256}],141:[function(require,module,exports){ -var compareAscending = require('./_compareAscending'); - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; -} - -module.exports = compareMultiple; - -},{'./_compareAscending':140}],142:[function(require,module,exports){ -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -module.exports = copyArray; - -},{}],143:[function(require,module,exports){ -var assignValue = require('./_assignValue'), - baseAssignValue = require('./_baseAssignValue'); - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } - } - return object; -} - -module.exports = copyObject; - -},{'./_assignValue':75,'./_baseAssignValue':79}],144:[function(require,module,exports){ -var copyObject = require('./_copyObject'), - getSymbols = require('./_getSymbols'); - -/** - * Copies own symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} - -module.exports = copySymbols; - -},{'./_copyObject':143,'./_getSymbols':166}],145:[function(require,module,exports){ -var copyObject = require('./_copyObject'), - getSymbolsIn = require('./_getSymbolsIn'); - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); -} - -module.exports = copySymbolsIn; - -},{'./_copyObject':143,'./_getSymbolsIn':167}],146:[function(require,module,exports){ -var root = require('./_root'); - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -module.exports = coreJsData; - -},{'./_root':208}],147:[function(require,module,exports){ -var baseRest = require('./_baseRest'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -module.exports = createAssigner; - -},{'./_baseRest':121,'./_isIterateeCall':182}],148:[function(require,module,exports){ -var isArrayLike = require('./isArrayLike'); - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -module.exports = createBaseEach; - -},{'./isArrayLike':244}],149:[function(require,module,exports){ -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -module.exports = createBaseFor; - -},{}],150:[function(require,module,exports){ -var baseIteratee = require('./_baseIteratee'), - isArrayLike = require('./isArrayLike'), - keys = require('./keys'); - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. - */ -function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = baseIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; -} - -module.exports = createFind; - -},{'./_baseIteratee':105,'./isArrayLike':244,'./keys':259}],151:[function(require,module,exports){ -var baseRange = require('./_baseRange'), - isIterateeCall = require('./_isIterateeCall'), - toFinite = require('./toFinite'); - -/** - * Creates a `_.range` or `_.rangeRight` function. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. - */ -function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); - } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; -} - -module.exports = createRange; - -},{'./_baseRange':119,'./_isIterateeCall':182,'./toFinite':279}],152:[function(require,module,exports){ -var Set = require('./_Set'), - noop = require('./noop'), - setToArray = require('./_setToArray'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); -}; - -module.exports = createSet; - -},{'./_Set':57,'./_setToArray':212,'./noop':269}],153:[function(require,module,exports){ -var getNative = require('./_getNative'); - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -module.exports = defineProperty; - -},{'./_getNative':163}],154:[function(require,module,exports){ -var SetCache = require('./_SetCache'), - arraySome = require('./_arraySome'), - cacheHas = require('./_cacheHas'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(array); - if (stacked && stack.get(other)) { - return stacked == other; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} - -module.exports = equalArrays; - -},{'./_SetCache':58,'./_arraySome':72,'./_cacheHas':131}],155:[function(require,module,exports){ -var Symbol = require('./_Symbol'), - Uint8Array = require('./_Uint8Array'), - eq = require('./eq'), - equalArrays = require('./_equalArrays'), - mapToArray = require('./_mapToArray'), - setToArray = require('./_setToArray'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]'; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; -} - -module.exports = equalByTag; - -},{'./_Symbol':60,'./_Uint8Array':61,'./_equalArrays':154,'./_mapToArray':198,'./_setToArray':212,'./eq':231}],156:[function(require,module,exports){ -var getAllKeys = require('./_getAllKeys'); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked && stack.get(other)) { - return stacked == other; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} - -module.exports = equalObjects; - -},{'./_getAllKeys':159}],157:[function(require,module,exports){ -var flatten = require('./flatten'), - overRest = require('./_overRest'), - setToString = require('./_setToString'); - -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); -} - -module.exports = flatRest; - -},{'./_overRest':207,'./_setToString':213,'./flatten':235}],158:[function(require,module,exports){ -(function (global){ -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; - -}).call(this,typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {}) -},{}],159:[function(require,module,exports){ -var baseGetAllKeys = require('./_baseGetAllKeys'), - getSymbols = require('./_getSymbols'), - keys = require('./keys'); - -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} - -module.exports = getAllKeys; - -},{'./_baseGetAllKeys':90,'./_getSymbols':166,'./keys':259}],160:[function(require,module,exports){ -var baseGetAllKeys = require('./_baseGetAllKeys'), - getSymbolsIn = require('./_getSymbolsIn'), - keysIn = require('./keysIn'); - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); -} - -module.exports = getAllKeysIn; - -},{'./_baseGetAllKeys':90,'./_getSymbolsIn':167,'./keysIn':260}],161:[function(require,module,exports){ -var isKeyable = require('./_isKeyable'); - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -module.exports = getMapData; - -},{'./_isKeyable':184}],162:[function(require,module,exports){ -var isStrictComparable = require('./_isStrictComparable'), - keys = require('./keys'); - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; -} - -module.exports = getMatchData; - -},{'./_isStrictComparable':187,'./keys':259}],163:[function(require,module,exports){ -var baseIsNative = require('./_baseIsNative'), - getValue = require('./_getValue'); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -module.exports = getNative; - -},{'./_baseIsNative':102,'./_getValue':169}],164:[function(require,module,exports){ -var overArg = require('./_overArg'); - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -module.exports = getPrototype; - -},{'./_overArg':206}],165:[function(require,module,exports){ -var Symbol = require('./_Symbol'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -module.exports = getRawTag; - -},{'./_Symbol':60}],166:[function(require,module,exports){ -var arrayFilter = require('./_arrayFilter'), - stubArray = require('./stubArray'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; - } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -module.exports = getSymbols; - -},{'./_arrayFilter':65,'./stubArray':277}],167:[function(require,module,exports){ -var arrayPush = require('./_arrayPush'), - getPrototype = require('./_getPrototype'), - getSymbols = require('./_getSymbols'), - stubArray = require('./stubArray'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; - -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; -}; - -module.exports = getSymbolsIn; - -},{'./_arrayPush':70,'./_getPrototype':164,'./_getSymbols':166,'./stubArray':277}],168:[function(require,module,exports){ -var DataView = require('./_DataView'), - Map = require('./_Map'), - Promise = require('./_Promise'), - Set = require('./_Set'), - WeakMap = require('./_WeakMap'), - baseGetTag = require('./_baseGetTag'), - toSource = require('./_toSource'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; - -var dataViewTag = '[object DataView]'; - -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** - * Gets the `toStringTag` of `value`. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} - -module.exports = getTag; - -},{'./_DataView':51,'./_Map':54,'./_Promise':56,'./_Set':57,'./_WeakMap':62,'./_baseGetTag':91,'./_toSource':224}],169:[function(require,module,exports){ -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -module.exports = getValue; - -},{}],170:[function(require,module,exports){ -var castPath = require('./_castPath'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isIndex = require('./_isIndex'), - isLength = require('./isLength'), - toKey = require('./_toKey'); - -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); -} - -module.exports = hasPath; - -},{'./_castPath':133,'./_isIndex':181,'./_toKey':223,'./isArguments':242,'./isArray':243,'./isLength':249}],171:[function(require,module,exports){ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsZWJ = '\\u200d'; - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -module.exports = hasUnicode; - -},{}],172:[function(require,module,exports){ -var nativeCreate = require('./_nativeCreate'); - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; -} - -module.exports = hashClear; - -},{'./_nativeCreate':201}],173:[function(require,module,exports){ -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} - -module.exports = hashDelete; - -},{}],174:[function(require,module,exports){ -var nativeCreate = require('./_nativeCreate'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -module.exports = hashGet; - -},{'./_nativeCreate':201}],175:[function(require,module,exports){ -var nativeCreate = require('./_nativeCreate'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); -} - -module.exports = hashHas; - -},{'./_nativeCreate':201}],176:[function(require,module,exports){ -var nativeCreate = require('./_nativeCreate'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -module.exports = hashSet; - -},{'./_nativeCreate':201}],177:[function(require,module,exports){ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; -} - -module.exports = initCloneArray; - -},{}],178:[function(require,module,exports){ -var cloneArrayBuffer = require('./_cloneArrayBuffer'), - cloneDataView = require('./_cloneDataView'), - cloneRegExp = require('./_cloneRegExp'), - cloneSymbol = require('./_cloneSymbol'), - cloneTypedArray = require('./_cloneTypedArray'); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return cloneSymbol(object); - } -} - -module.exports = initCloneByTag; - -},{'./_cloneArrayBuffer':134,'./_cloneDataView':136,'./_cloneRegExp':137,'./_cloneSymbol':138,'./_cloneTypedArray':139}],179:[function(require,module,exports){ -var baseCreate = require('./_baseCreate'), - getPrototype = require('./_getPrototype'), - isPrototype = require('./_isPrototype'); - -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} - -module.exports = initCloneObject; - -},{'./_baseCreate':81,'./_getPrototype':164,'./_isPrototype':186}],180:[function(require,module,exports){ -var Symbol = require('./_Symbol'), - isArguments = require('./isArguments'), - isArray = require('./isArray'); - -/** Built-in value references. */ -var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -module.exports = isFlattenable; - -},{'./_Symbol':60,'./isArguments':242,'./isArray':243}],181:[function(require,module,exports){ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); -} - -module.exports = isIndex; - -},{}],182:[function(require,module,exports){ -var eq = require('./eq'), - isArrayLike = require('./isArrayLike'), - isIndex = require('./_isIndex'), - isObject = require('./isObject'); - -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} - -module.exports = isIterateeCall; - -},{'./_isIndex':181,'./eq':231,'./isArrayLike':244,'./isObject':251}],183:[function(require,module,exports){ -var isArray = require('./isArray'), - isSymbol = require('./isSymbol'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -module.exports = isKey; - -},{'./isArray':243,'./isSymbol':256}],184:[function(require,module,exports){ -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -module.exports = isKeyable; - -},{}],185:[function(require,module,exports){ -var coreJsData = require('./_coreJsData'); - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -module.exports = isMasked; - -},{'./_coreJsData':146}],186:[function(require,module,exports){ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -module.exports = isPrototype; - -},{}],187:[function(require,module,exports){ -var isObject = require('./isObject'); - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} - -module.exports = isStrictComparable; - -},{'./isObject':251}],188:[function(require,module,exports){ -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} - -module.exports = listCacheClear; - -},{}],189:[function(require,module,exports){ -var assocIndexOf = require('./_assocIndexOf'); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} - -module.exports = listCacheDelete; - -},{'./_assocIndexOf':76}],190:[function(require,module,exports){ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -module.exports = listCacheGet; - -},{'./_assocIndexOf':76}],191:[function(require,module,exports){ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -module.exports = listCacheHas; - -},{'./_assocIndexOf':76}],192:[function(require,module,exports){ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -module.exports = listCacheSet; - -},{'./_assocIndexOf':76}],193:[function(require,module,exports){ -var Hash = require('./_Hash'), - ListCache = require('./_ListCache'), - Map = require('./_Map'); - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -module.exports = mapCacheClear; - -},{'./_Hash':52,'./_ListCache':53,'./_Map':54}],194:[function(require,module,exports){ -var getMapData = require('./_getMapData'); - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} - -module.exports = mapCacheDelete; - -},{'./_getMapData':161}],195:[function(require,module,exports){ -var getMapData = require('./_getMapData'); - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -module.exports = mapCacheGet; - -},{'./_getMapData':161}],196:[function(require,module,exports){ -var getMapData = require('./_getMapData'); - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -module.exports = mapCacheHas; - -},{'./_getMapData':161}],197:[function(require,module,exports){ -var getMapData = require('./_getMapData'); - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} - -module.exports = mapCacheSet; - -},{'./_getMapData':161}],198:[function(require,module,exports){ -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; -} - -module.exports = mapToArray; - -},{}],199:[function(require,module,exports){ -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} - -module.exports = matchesStrictComparable; - -},{}],200:[function(require,module,exports){ -var memoize = require('./memoize'); - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -module.exports = memoizeCapped; - -},{'./memoize':265}],201:[function(require,module,exports){ -var getNative = require('./_getNative'); - -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); - -module.exports = nativeCreate; - -},{'./_getNative':163}],202:[function(require,module,exports){ -var overArg = require('./_overArg'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); - -module.exports = nativeKeys; - -},{'./_overArg':206}],203:[function(require,module,exports){ -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} - -module.exports = nativeKeysIn; - -},{}],204:[function(require,module,exports){ -var freeGlobal = require('./_freeGlobal'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; - - if (types) { - return types; - } - - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); - -module.exports = nodeUtil; - -},{'./_freeGlobal':158}],205:[function(require,module,exports){ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -module.exports = objectToString; - -},{}],206:[function(require,module,exports){ -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -module.exports = overArg; - -},{}],207:[function(require,module,exports){ -var apply = require('./_apply'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; -} - -module.exports = overRest; - -},{'./_apply':63}],208:[function(require,module,exports){ -var freeGlobal = require('./_freeGlobal'); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - -},{'./_freeGlobal':158}],209:[function(require,module,exports){ -/** - * Gets the value at `key`, unless `key` is "__proto__". - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function safeGet(object, key) { - return key == '__proto__' - ? undefined - : object[key]; -} - -module.exports = safeGet; - -},{}],210:[function(require,module,exports){ -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the array cache. - * - * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. - */ -function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; -} - -module.exports = setCacheAdd; - -},{}],211:[function(require,module,exports){ -/** - * Checks if `value` is in the array cache. - * - * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. - */ -function setCacheHas(value) { - return this.__data__.has(value); -} - -module.exports = setCacheHas; - -},{}],212:[function(require,module,exports){ -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - -module.exports = setToArray; - -},{}],213:[function(require,module,exports){ -var baseSetToString = require('./_baseSetToString'), - shortOut = require('./_shortOut'); - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = shortOut(baseSetToString); - -module.exports = setToString; - -},{'./_baseSetToString':123,'./_shortOut':214}],214:[function(require,module,exports){ -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; - -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; -} - -module.exports = shortOut; - -},{}],215:[function(require,module,exports){ -var ListCache = require('./_ListCache'); - -/** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack - */ -function stackClear() { - this.__data__ = new ListCache; - this.size = 0; -} - -module.exports = stackClear; - -},{'./_ListCache':53}],216:[function(require,module,exports){ -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); - - this.size = data.size; - return result; -} - -module.exports = stackDelete; - -},{}],217:[function(require,module,exports){ -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} - -module.exports = stackGet; - -},{}],218:[function(require,module,exports){ -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} - -module.exports = stackHas; - -},{}],219:[function(require,module,exports){ -var ListCache = require('./_ListCache'), - Map = require('./_Map'), - MapCache = require('./_MapCache'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; -} - -module.exports = stackSet; - -},{'./_ListCache':53,'./_Map':54,'./_MapCache':55}],220:[function(require,module,exports){ -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -module.exports = strictIndexOf; - -},{}],221:[function(require,module,exports){ -var asciiSize = require('./_asciiSize'), - hasUnicode = require('./_hasUnicode'), - unicodeSize = require('./_unicodeSize'); - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); -} - -module.exports = stringSize; - -},{'./_asciiSize':73,'./_hasUnicode':171,'./_unicodeSize':225}],222:[function(require,module,exports){ -var memoizeCapped = require('./_memoizeCapped'); - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -module.exports = stringToPath; - -},{'./_memoizeCapped':200}],223:[function(require,module,exports){ -var isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = toKey; - -},{'./isSymbol':256}],224:[function(require,module,exports){ -/** Used for built-in method references. */ -var funcProto = Function.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -module.exports = toSource; - -},{}],225:[function(require,module,exports){ -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; - } - return result; -} - -module.exports = unicodeSize; - -},{}],226:[function(require,module,exports){ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_SYMBOLS_FLAG = 4; - -/** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true - */ -function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); -} - -module.exports = clone; - -},{'./_baseClone':80}],227:[function(require,module,exports){ -var baseClone = require('./_baseClone'); - -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; - -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} - -module.exports = cloneDeep; - -},{'./_baseClone':80}],228:[function(require,module,exports){ -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} - -module.exports = constant; - -},{}],229:[function(require,module,exports){ -var baseRest = require('./_baseRest'), - eq = require('./eq'), - isIterateeCall = require('./_isIterateeCall'), - keysIn = require('./keysIn'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; - - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; - } - } - } - - return object; -}); - -module.exports = defaults; - -},{'./_baseRest':121,'./_isIterateeCall':182,'./eq':231,'./keysIn':260}],230:[function(require,module,exports){ -module.exports = require('./forEach'); - -},{'./forEach':236}],231:[function(require,module,exports){ -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -module.exports = eq; - -},{}],232:[function(require,module,exports){ -var arrayFilter = require('./_arrayFilter'), - baseFilter = require('./_baseFilter'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); - -/** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * **Note:** Unlike `_.remove`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] - * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] - */ -function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, baseIteratee(predicate, 3)); -} - -module.exports = filter; - -},{'./_arrayFilter':65,'./_baseFilter':84,'./_baseIteratee':105,'./isArray':243}],233:[function(require,module,exports){ -var createFind = require('./_createFind'), - findIndex = require('./findIndex'); - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ -var find = createFind(findIndex); - -module.exports = find; - -},{'./_createFind':150,'./findIndex':234}],234:[function(require,module,exports){ -var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - toInteger = require('./toInteger'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. - * @example - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 - * - * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 - */ -function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseFindIndex(array, baseIteratee(predicate, 3), index); -} - -module.exports = findIndex; - -},{'./_baseFindIndex':85,'./_baseIteratee':105,'./toInteger':280}],235:[function(require,module,exports){ -var baseFlatten = require('./_baseFlatten'); - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; -} - -module.exports = flatten; - -},{'./_baseFlatten':86}],236:[function(require,module,exports){ -var arrayEach = require('./_arrayEach'), - baseEach = require('./_baseEach'), - castFunction = require('./_castFunction'), - isArray = require('./isArray'); - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, castFunction(iteratee)); -} - -module.exports = forEach; - -},{'./_arrayEach':64,'./_baseEach':82,'./_castFunction':132,'./isArray':243}],237:[function(require,module,exports){ -var baseFor = require('./_baseFor'), - castFunction = require('./_castFunction'), - keysIn = require('./keysIn'); - -/** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). - */ -function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, castFunction(iteratee), keysIn); -} - -module.exports = forIn; - -},{'./_baseFor':87,'./_castFunction':132,'./keysIn':260}],238:[function(require,module,exports){ -var baseGet = require('./_baseGet'); - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; -} - -module.exports = get; - -},{'./_baseGet':89}],239:[function(require,module,exports){ -var baseHas = require('./_baseHas'), - hasPath = require('./_hasPath'); - -/** - * Checks if `path` is a direct property of `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b'); - * // => true - * - * _.has(object, ['a', 'b']); - * // => true - * - * _.has(other, 'a'); - * // => false - */ -function has(object, path) { - return object != null && hasPath(object, path, baseHas); -} - -module.exports = has; - -},{'./_baseHas':93,'./_hasPath':170}],240:[function(require,module,exports){ -var baseHasIn = require('./_baseHasIn'), - hasPath = require('./_hasPath'); - -/** - * Checks if `path` is a direct or inherited property of `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - * @example - * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); - * // => true - * - * _.hasIn(object, 'a.b'); - * // => true - * - * _.hasIn(object, ['a', 'b']); - * // => true - * - * _.hasIn(object, 'b'); - * // => false - */ -function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); -} - -module.exports = hasIn; - -},{'./_baseHasIn':94,'./_hasPath':170}],241:[function(require,module,exports){ -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; - -},{}],242:[function(require,module,exports){ -var baseIsArguments = require('./_baseIsArguments'), - isObjectLike = require('./isObjectLike'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); -}; - -module.exports = isArguments; - -},{'./_baseIsArguments':96,'./isObjectLike':252}],243:[function(require,module,exports){ -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; - -},{}],244:[function(require,module,exports){ -var isFunction = require('./isFunction'), - isLength = require('./isLength'); - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -module.exports = isArrayLike; - -},{'./isFunction':248,'./isLength':249}],245:[function(require,module,exports){ -var isArrayLike = require('./isArrayLike'), - isObjectLike = require('./isObjectLike'); - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -module.exports = isArrayLikeObject; - -},{'./isArrayLike':244,'./isObjectLike':252}],246:[function(require,module,exports){ -var root = require('./_root'), - stubFalse = require('./stubFalse'); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; - -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; - -module.exports = isBuffer; - -},{'./_root':208,'./stubFalse':278}],247:[function(require,module,exports){ -var baseKeys = require('./_baseKeys'), - getTag = require('./_getTag'), - isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLike = require('./isArrayLike'), - isBuffer = require('./isBuffer'), - isPrototype = require('./_isPrototype'), - isTypedArray = require('./isTypedArray'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } - if (isPrototype(value)) { - return !baseKeys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; -} - -module.exports = isEmpty; - -},{'./_baseKeys':106,'./_getTag':168,'./_isPrototype':186,'./isArguments':242,'./isArray':243,'./isArrayLike':244,'./isBuffer':246,'./isTypedArray':257}],248:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -module.exports = isFunction; - -},{'./_baseGetTag':91,'./isObject':251}],249:[function(require,module,exports){ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = isLength; - -},{}],250:[function(require,module,exports){ -var baseIsMap = require('./_baseIsMap'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsMap = nodeUtil && nodeUtil.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - -module.exports = isMap; - -},{'./_baseIsMap':99,'./_baseUnary':127,'./_nodeUtil':204}],251:[function(require,module,exports){ -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - -},{}],252:[function(require,module,exports){ -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; - -},{}],253:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - getPrototype = require('./_getPrototype'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} - -module.exports = isPlainObject; - -},{'./_baseGetTag':91,'./_getPrototype':164,'./isObjectLike':252}],254:[function(require,module,exports){ -var baseIsSet = require('./_baseIsSet'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsSet = nodeUtil && nodeUtil.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - -module.exports = isSet; - -},{'./_baseIsSet':103,'./_baseUnary':127,'./_nodeUtil':204}],255:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - isArray = require('./isArray'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); -} - -module.exports = isString; - -},{'./_baseGetTag':91,'./isArray':243,'./isObjectLike':252}],256:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -module.exports = isSymbol; - -},{'./_baseGetTag':91,'./isObjectLike':252}],257:[function(require,module,exports){ -var baseIsTypedArray = require('./_baseIsTypedArray'), - baseUnary = require('./_baseUnary'), - nodeUtil = require('./_nodeUtil'); - -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -module.exports = isTypedArray; - -},{'./_baseIsTypedArray':104,'./_baseUnary':127,'./_nodeUtil':204}],258:[function(require,module,exports){ -/** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - * - * _.isUndefined(null); - * // => false - */ -function isUndefined(value) { - return value === undefined; -} - -module.exports = isUndefined; - -},{}],259:[function(require,module,exports){ -var arrayLikeKeys = require('./_arrayLikeKeys'), - baseKeys = require('./_baseKeys'), - isArrayLike = require('./isArrayLike'); - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -module.exports = keys; - -},{'./_arrayLikeKeys':68,'./_baseKeys':106,'./isArrayLike':244}],260:[function(require,module,exports){ -var arrayLikeKeys = require('./_arrayLikeKeys'), - baseKeysIn = require('./_baseKeysIn'), - isArrayLike = require('./isArrayLike'); - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); -} - -module.exports = keysIn; - -},{'./_arrayLikeKeys':68,'./_baseKeysIn':107,'./isArrayLike':244}],261:[function(require,module,exports){ -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; -} - -module.exports = last; - -},{}],262:[function(require,module,exports){ -var arrayMap = require('./_arrayMap'), - baseIteratee = require('./_baseIteratee'), - baseMap = require('./_baseMap'), - isArray = require('./isArray'); - -/** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. - * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] - */ -function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, baseIteratee(iteratee, 3)); -} - -module.exports = map; - -},{'./_arrayMap':69,'./_baseIteratee':105,'./_baseMap':109,'./isArray':243}],263:[function(require,module,exports){ -var baseAssignValue = require('./_baseAssignValue'), - baseForOwn = require('./_baseForOwn'), - baseIteratee = require('./_baseIteratee'); - -/** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys - * @example - * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - */ -function mapValues(object, iteratee) { - var result = {}; - iteratee = baseIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, key, iteratee(value, key, object)); - }); - return result; -} - -module.exports = mapValues; - -},{'./_baseAssignValue':79,'./_baseForOwn':88,'./_baseIteratee':105}],264:[function(require,module,exports){ -var baseExtremum = require('./_baseExtremum'), - baseGt = require('./_baseGt'), - identity = require('./identity'); - -/** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ -function max(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseGt) - : undefined; -} - -module.exports = max; - -},{'./_baseExtremum':83,'./_baseGt':92,'./identity':241}],265:[function(require,module,exports){ -var MapCache = require('./_MapCache'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} - -// Expose `MapCache`. -memoize.Cache = MapCache; - -module.exports = memoize; - -},{'./_MapCache':55}],266:[function(require,module,exports){ -var baseMerge = require('./_baseMerge'), - createAssigner = require('./_createAssigner'); - -/** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @example - * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; - * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } - */ -var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); -}); - -module.exports = merge; - -},{'./_baseMerge':112,'./_createAssigner':147}],267:[function(require,module,exports){ -var baseExtremum = require('./_baseExtremum'), - baseLt = require('./_baseLt'), - identity = require('./identity'); - -/** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ -function min(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseLt) - : undefined; -} - -module.exports = min; - -},{'./_baseExtremum':83,'./_baseLt':108,'./identity':241}],268:[function(require,module,exports){ -var baseExtremum = require('./_baseExtremum'), - baseIteratee = require('./_baseIteratee'), - baseLt = require('./_baseLt'); - -/** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ -function minBy(array, iteratee) { - return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt) - : undefined; -} - -module.exports = minBy; - -},{'./_baseExtremum':83,'./_baseIteratee':105,'./_baseLt':108}],269:[function(require,module,exports){ -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -module.exports = noop; - -},{}],270:[function(require,module,exports){ -var root = require('./_root'); - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return root.Date.now(); -}; - -module.exports = now; - -},{'./_root':208}],271:[function(require,module,exports){ -var basePick = require('./_basePick'), - flatRest = require('./_flatRest'); - -/** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } - */ -var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); -}); - -module.exports = pick; - -},{'./_basePick':115,'./_flatRest':157}],272:[function(require,module,exports){ -var baseProperty = require('./_baseProperty'), - basePropertyDeep = require('./_basePropertyDeep'), - isKey = require('./_isKey'), - toKey = require('./_toKey'); - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); -} - -module.exports = property; - -},{'./_baseProperty':117,'./_basePropertyDeep':118,'./_isKey':183,'./_toKey':223}],273:[function(require,module,exports){ -var createRange = require('./_createRange'); - -/** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ -var range = createRange(); - -module.exports = range; - -},{'./_createRange':151}],274:[function(require,module,exports){ -var arrayReduce = require('./_arrayReduce'), - baseEach = require('./_baseEach'), - baseIteratee = require('./_baseIteratee'), - baseReduce = require('./_baseReduce'), - isArray = require('./isArray'); - -/** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. - * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight - * @example - * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 - * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) - */ -function reduce(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduce : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); -} - -module.exports = reduce; - -},{'./_arrayReduce':71,'./_baseEach':82,'./_baseIteratee':105,'./_baseReduce':120,'./isArray':243}],275:[function(require,module,exports){ -var baseKeys = require('./_baseKeys'), - getTag = require('./_getTag'), - isArrayLike = require('./isArrayLike'), - isString = require('./isString'), - stringSize = require('./_stringSize'); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; - -/** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. - * @example - * - * _.size([1, 2, 3]); - * // => 3 - * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 - * - * _.size('pebbles'); - * // => 7 - */ -function size(collection) { - if (collection == null) { - return 0; - } - if (isArrayLike(collection)) { - return isString(collection) ? stringSize(collection) : collection.length; - } - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return baseKeys(collection).length; -} - -module.exports = size; - -},{'./_baseKeys':106,'./_getTag':168,'./_stringSize':221,'./isArrayLike':244,'./isString':255}],276:[function(require,module,exports){ -var baseFlatten = require('./_baseFlatten'), - baseOrderBy = require('./_baseOrderBy'), - baseRest = require('./_baseRest'), - isIterateeCall = require('./_isIterateeCall'); - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]] - */ -var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); -}); - -module.exports = sortBy; - -},{'./_baseFlatten':86,'./_baseOrderBy':114,'./_baseRest':121,'./_isIterateeCall':182}],277:[function(require,module,exports){ -/** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ -function stubArray() { - return []; -} - -module.exports = stubArray; - -},{}],278:[function(require,module,exports){ -/** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ -function stubFalse() { - return false; -} - -module.exports = stubFalse; - -},{}],279:[function(require,module,exports){ -var toNumber = require('./toNumber'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -module.exports = toFinite; - -},{'./toNumber':281}],280:[function(require,module,exports){ -var toFinite = require('./toFinite'); - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -module.exports = toInteger; - -},{'./toFinite':279}],281:[function(require,module,exports){ -var isObject = require('./isObject'), - isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = toNumber; - -},{'./isObject':251,'./isSymbol':256}],282:[function(require,module,exports){ -var copyObject = require('./_copyObject'), - keysIn = require('./keysIn'); - -/** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return copyObject(value, keysIn(value)); -} - -module.exports = toPlainObject; - -},{'./_copyObject':143,'./keysIn':260}],283:[function(require,module,exports){ -var baseToString = require('./_baseToString'); - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -module.exports = toString; - -},{'./_baseToString':126}],284:[function(require,module,exports){ -var arrayEach = require('./_arrayEach'), - baseCreate = require('./_baseCreate'), - baseForOwn = require('./_baseForOwn'), - baseIteratee = require('./_baseIteratee'), - getPrototype = require('./_getPrototype'), - isArray = require('./isArray'), - isBuffer = require('./isBuffer'), - isFunction = require('./isFunction'), - isObject = require('./isObject'), - isTypedArray = require('./isTypedArray'); - -/** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own - * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. If `accumulator` is not - * provided, a new object with the same `[[Prototype]]` will be used. The - * iteratee is invoked with four arguments: (accumulator, value, key, object). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @returns {*} Returns the accumulated value. - * @example - * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }, []); - * // => [4, 9] - * - * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } - */ -function transform(object, iteratee, accumulator) { - var isArr = isArray(object), - isArrLike = isArr || isBuffer(object) || isTypedArray(object); - - iteratee = baseIteratee(iteratee, 4); - if (accumulator == null) { - var Ctor = object && object.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor : []; - } - else if (isObject(object)) { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - else { - accumulator = {}; - } - } - (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; -} - -module.exports = transform; - -},{'./_arrayEach':64,'./_baseCreate':81,'./_baseForOwn':88,'./_baseIteratee':105,'./_getPrototype':164,'./isArray':243,'./isBuffer':246,'./isFunction':248,'./isObject':251,'./isTypedArray':257}],285:[function(require,module,exports){ -var baseFlatten = require('./_baseFlatten'), - baseRest = require('./_baseRest'), - baseUniq = require('./_baseUniq'), - isArrayLikeObject = require('./isArrayLikeObject'); - -/** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([2], [1, 2]); - * // => [2, 1] - */ -var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); -}); - -module.exports = union; - -},{'./_baseFlatten':86,'./_baseRest':121,'./_baseUniq':128,'./isArrayLikeObject':245}],286:[function(require,module,exports){ -var toString = require('./toString'); - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return toString(prefix) + id; -} - -module.exports = uniqueId; - -},{'./toString':283}],287:[function(require,module,exports){ -var baseValues = require('./_baseValues'), - keys = require('./keys'); - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : baseValues(object, keys(object)); -} - -module.exports = values; - -},{'./_baseValues':129,'./keys':259}],288:[function(require,module,exports){ -var assignValue = require('./_assignValue'), - baseZipObject = require('./_baseZipObject'); - -/** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. - * - * @static - * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. - * @example - * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } - */ -function zipObject(props, values) { - return baseZipObject(props || [], values || [], assignValue); -} - -module.exports = zipObject; - -},{'./_assignValue':75,'./_baseZipObject':130}]},{},[1])(1) -}); diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py index d6666e8b74..5cb98e6781 100644 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py +++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_inspector_overlay.py @@ -39,13 +39,24 @@ def check_size(filename, data, max_size): def rollup(input_path, output_path, filename, max_size, rollup_plugin): target = join(input_path, filename) - rollup_process = subprocess.Popen( - [devtools_paths.node_path(), - devtools_paths.rollup_path()] + - ['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] + - ['--plugin', rollup_plugin], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + if sys.version_info[0] < 3: + rollup_process = subprocess.Popen( + [devtools_paths.node_path(), + devtools_paths.rollup_path()] + + ['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] + + ['--plugin', rollup_plugin], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + else: + rollup_process = subprocess.Popen( + [devtools_paths.node_path(), + devtools_paths.rollup_path()] + + ['--format', 'iife', '-n', 'InspectorOverlay'] + ['--input', target] + + ['--plugin', rollup_plugin], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True) + out, error = rollup_process.communicate() if not out: raise Exception("rollup failed: " + error) diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py index fa8e73d34a..414d59ec56 100644 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py +++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/build_release_applications.py @@ -10,14 +10,17 @@ and the application loader into a single script. """ -from cStringIO import StringIO +import sys +if sys.version_info.major == 3: + from io import StringIO # for Python 3 +else: + from cStringIO import StringIO # for Python 2 from os import path from os.path import join import copy import os import re import shutil -import sys import subprocess from modular_build import read_file, write_file, bail_error @@ -37,6 +40,9 @@ finally: sys.path = original_sys_path +if sys.version_info.major == 3: + unicode = str + FRONT_END_DIRECTORY = path.join(os.path.dirname(path.abspath(__file__)), '..', '..', 'front_end') @@ -145,8 +151,11 @@ def _write_module_resources(self, resource_names, output): resource_content = read_file(path.join(self.application_dir, resource_name)) if not (resource_name.endswith('.html') or resource_name.endswith('md')): - resource_content += resource_source_url(resource_name).encode( - 'utf-8') + if sys.version_info[0] < 3: + resource_content += resource_source_url(resource_name).encode( + 'utf-8') + else: + resource_content += resource_source_url(resource_name) resource_content = resource_content.replace('\\', '\\\\') resource_content = resource_content.replace('\n', '\\n') resource_content = resource_content.replace('"', '\\"') @@ -173,7 +182,9 @@ def _concatenate_autostart_modules(self, output): def _concatenate_application_script(self, output): output.write('Root.allDescriptors.push(...%s);' % self._release_module_descriptors()) if self.descriptors.extends: - output.write('Root.applicationDescriptor.modules.push(...%s);' % json.dumps(self.descriptors.application.values())) + output.write( + 'Root.applicationDescriptor.modules.push(...%s);' % + json.dumps(list(self.descriptors.application.values()))) else: output.write('Root.applicationDescriptor = %s;' % self.descriptors.application_json()) diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py index be510c48d7..c6a59c9029 100644 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py +++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/generate_devtools_grd.py @@ -123,7 +123,7 @@ def main(argv): try: os.makedirs(path.join(output_directory, 'Images')) - except OSError, e: + except OSError as e: if e.errno != errno.EEXIST: raise e @@ -147,7 +147,7 @@ def main(argv): shutil.copy(path.join(dirname, filename), path.join(output_directory, 'Images')) add_file_to_grd(doc, path.join('Images', filename)) - with open(parsed_args.output_filename, 'w') as output_file: + with open(parsed_args.output_filename, 'wb') as output_file: output_file.write(doc.toxml(encoding='UTF-8')) diff --git a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py index 0ba695d381..bb1da2f9f8 100644 --- a/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py +++ b/src/3rdparty/chromium/third_party/devtools-frontend/src/scripts/build/modular_build.py @@ -7,6 +7,8 @@ Utilities for the modular DevTools build. """ +from __future__ import print_function + import collections from os import path import os @@ -40,7 +42,7 @@ def load_and_parse_json(filename): try: return json.loads(read_file(filename)) except: - print 'ERROR: Failed to parse %s' % filename + print('ERROR: Failed to parse %s' % filename) raise class Descriptors: @@ -57,7 +59,7 @@ def __init__(self, application_name, application_dir, def application_json(self): result = dict() - result['modules'] = self.application.values() + result['modules'] = list(self.application.values()) return json.dumps(result) def all_compiled_files(self): diff --git a/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h b/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h index 6298f5ed19..ca7e2dffc1 100644 --- a/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h +++ b/src/3rdparty/chromium/third_party/ffmpeg/libavcodec/x86/mathops.h @@ -35,12 +35,20 @@ static av_always_inline av_const int MULL(int a, int b, unsigned shift) { int rt, dummy; + if (__builtin_constant_p(shift)) __asm__ ( "imull %3 \n\t" "shrdl %4, %%edx, %%eax \n\t" :"=a"(rt), "=d"(dummy) - :"a"(a), "rm"(b), "ci"((uint8_t)shift) + :"a"(a), "rm"(b), "i"(shift & 0x1F) ); + else + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) + :"a"(a), "rm"(b), "c"((uint8_t)shift) + ); return rt; } @@ -113,19 +121,31 @@ __asm__ volatile(\ // avoid +32 for shift optimization (gcc should do that ...) #define NEG_SSR32 NEG_SSR32 static inline int32_t NEG_SSR32( int32_t a, int8_t s){ + if (__builtin_constant_p(s)) __asm__ ("sarl %1, %0\n\t" : "+r" (a) - : "ic" ((uint8_t)(-s)) + : "i" (-s & 0x1F) ); + else + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) + : "c" ((uint8_t)(-s)) + ); return a; } #define NEG_USR32 NEG_USR32 static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ + if (__builtin_constant_p(s)) __asm__ ("shrl %1, %0\n\t" : "+r" (a) - : "ic" ((uint8_t)(-s)) + : "i" (-s & 0x1F) ); + else + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) + : "c" ((uint8_t)(-s)) + ); return a; } diff --git a/src/3rdparty/chromium/third_party/jinja2/tests.py b/src/3rdparty/chromium/third_party/jinja2/tests.py index 0adc3d4dbc..d3e56108cf 100644 --- a/src/3rdparty/chromium/third_party/jinja2/tests.py +++ b/src/3rdparty/chromium/third_party/jinja2/tests.py @@ -10,7 +10,11 @@ """ import operator import re -from collections import Mapping +import sys +if sys.version_info[0] > 2: + from collections.abc import Mapping +else: + from collections import Mapping from jinja2.runtime import Undefined from jinja2._compat import text_type, string_types, integer_types import decimal diff --git a/src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c b/src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c index aeed719d1f..369adbdcba 100644 --- a/src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c +++ b/src/3rdparty/chromium/third_party/libvpx/source/libvpx/vp8/encoder/onyx_if.c @@ -1445,6 +1445,11 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) { last_h = cpi->oxcf.Height; prev_number_of_layers = cpi->oxcf.number_of_layers; + if (cpi->initial_width) { + // TODO(https://crbug.com/1486441): Allow changing thread counts; the + // allocation is done once in vp8_create_compressor(). + oxcf->multi_threaded = cpi->oxcf.multi_threaded; + } cpi->oxcf = *oxcf; switch (cpi->oxcf.Mode) { diff --git a/src/3rdparty/chromium/third_party/libwebp/src/dec/vp8l_dec.c b/src/3rdparty/chromium/third_party/libwebp/src/dec/vp8l_dec.c index 93615d4ed2..0d38314db8 100644 --- a/src/3rdparty/chromium/third_party/libwebp/src/dec/vp8l_dec.c +++ b/src/3rdparty/chromium/third_party/libwebp/src/dec/vp8l_dec.c @@ -253,11 +253,11 @@ static int ReadHuffmanCodeLengths( int symbol; int max_symbol; int prev_code_len = DEFAULT_CODE_LENGTH; - HuffmanCode table[1 << LENGTHS_TABLE_BITS]; + HuffmanTables tables; - if (!VP8LBuildHuffmanTable(table, LENGTHS_TABLE_BITS, - code_length_code_lengths, - NUM_CODE_LENGTH_CODES)) { + if (!VP8LHuffmanTablesAllocate(1 << LENGTHS_TABLE_BITS, &tables) || + !VP8LBuildHuffmanTable(&tables, LENGTHS_TABLE_BITS, + code_length_code_lengths, NUM_CODE_LENGTH_CODES)) { goto End; } @@ -277,7 +277,7 @@ static int ReadHuffmanCodeLengths( int code_len; if (max_symbol-- == 0) break; VP8LFillBitWindow(br); - p = &table[VP8LPrefetchBits(br) & LENGTHS_TABLE_MASK]; + p = &tables.curr_segment->start[VP8LPrefetchBits(br) & LENGTHS_TABLE_MASK]; VP8LSetBitPos(br, br->bit_pos_ + p->bits); code_len = p->value; if (code_len < kCodeLengthLiterals) { @@ -300,6 +300,7 @@ static int ReadHuffmanCodeLengths( ok = 1; End: + VP8LHuffmanTablesDeallocate(&tables); if (!ok) dec->status_ = VP8_STATUS_BITSTREAM_ERROR; return ok; } @@ -307,7 +308,8 @@ static int ReadHuffmanCodeLengths( // 'code_lengths' is pre-allocated temporary buffer, used for creating Huffman // tree. static int ReadHuffmanCode(int alphabet_size, VP8LDecoder* const dec, - int* const code_lengths, HuffmanCode* const table) { + int* const code_lengths, + HuffmanTables* const table) { int ok = 0; int size = 0; VP8LBitReader* const br = &dec->br_; @@ -362,8 +364,7 @@ static int ReadHuffmanCodes(VP8LDecoder* const dec, int xsize, int ysize, VP8LMetadata* const hdr = &dec->hdr_; uint32_t* huffman_image = NULL; HTreeGroup* htree_groups = NULL; - HuffmanCode* huffman_tables = NULL; - HuffmanCode* huffman_table = NULL; + HuffmanTables* huffman_tables = &hdr->huffman_tables_; int num_htree_groups = 1; int num_htree_groups_max = 1; int max_alphabet_size = 0; @@ -372,6 +373,10 @@ static int ReadHuffmanCodes(VP8LDecoder* const dec, int xsize, int ysize, int* mapping = NULL; int ok = 0; + // Check the table has been 0 initialized (through InitMetadata). + assert(huffman_tables->root.start == NULL); + assert(huffman_tables->curr_segment == NULL); + if (allow_recursion && VP8LReadBits(br, 1)) { // use meta Huffman codes. const int huffman_precision = VP8LReadBits(br, 3) + 2; @@ -434,16 +439,15 @@ static int ReadHuffmanCodes(VP8LDecoder* const dec, int xsize, int ysize, code_lengths = (int*)WebPSafeCalloc((uint64_t)max_alphabet_size, sizeof(*code_lengths)); - huffman_tables = (HuffmanCode*)WebPSafeMalloc(num_htree_groups * table_size, - sizeof(*huffman_tables)); htree_groups = VP8LHtreeGroupsNew(num_htree_groups); - if (htree_groups == NULL || code_lengths == NULL || huffman_tables == NULL) { + if (htree_groups == NULL || code_lengths == NULL || + !VP8LHuffmanTablesAllocate(num_htree_groups * table_size, + huffman_tables)) { dec->status_ = VP8_STATUS_OUT_OF_MEMORY; goto Error; } - huffman_table = huffman_tables; for (i = 0; i < num_htree_groups_max; ++i) { // If the index "i" is unused in the Huffman image, just make sure the // coefficients are valid but do not store them. @@ -468,19 +472,20 @@ static int ReadHuffmanCodes(VP8LDecoder* const dec, int xsize, int ysize, int max_bits = 0; for (j = 0; j < HUFFMAN_CODES_PER_META_CODE; ++j) { int alphabet_size = kAlphabetSize[j]; - htrees[j] = huffman_table; if (j == 0 && color_cache_bits > 0) { alphabet_size += (1 << color_cache_bits); } - size = ReadHuffmanCode(alphabet_size, dec, code_lengths, huffman_table); + size = + ReadHuffmanCode(alphabet_size, dec, code_lengths, huffman_tables); + htrees[j] = huffman_tables->curr_segment->curr_table; if (size == 0) { goto Error; } if (is_trivial_literal && kLiteralMap[j] == 1) { - is_trivial_literal = (huffman_table->bits == 0); + is_trivial_literal = (htrees[j]->bits == 0); } - total_size += huffman_table->bits; - huffman_table += size; + total_size += htrees[j]->bits; + huffman_tables->curr_segment->curr_table += size; if (j <= ALPHA) { int local_max_bits = code_lengths[0]; int k; @@ -515,14 +520,13 @@ static int ReadHuffmanCodes(VP8LDecoder* const dec, int xsize, int ysize, hdr->huffman_image_ = huffman_image; hdr->num_htree_groups_ = num_htree_groups; hdr->htree_groups_ = htree_groups; - hdr->huffman_tables_ = huffman_tables; Error: WebPSafeFree(code_lengths); WebPSafeFree(mapping); if (!ok) { WebPSafeFree(huffman_image); - WebPSafeFree(huffman_tables); + VP8LHuffmanTablesDeallocate(huffman_tables); VP8LHtreeGroupsFree(htree_groups); } return ok; @@ -1354,7 +1358,7 @@ static void ClearMetadata(VP8LMetadata* const hdr) { assert(hdr != NULL); WebPSafeFree(hdr->huffman_image_); - WebPSafeFree(hdr->huffman_tables_); + VP8LHuffmanTablesDeallocate(&hdr->huffman_tables_); VP8LHtreeGroupsFree(hdr->htree_groups_); VP8LColorCacheClear(&hdr->color_cache_); VP8LColorCacheClear(&hdr->saved_color_cache_); @@ -1670,7 +1674,7 @@ int VP8LDecodeImage(VP8LDecoder* const dec) { // Sanity checks. if (dec == NULL) return 0; - assert(dec->hdr_.huffman_tables_ != NULL); + assert(dec->hdr_.huffman_tables_.root.start != NULL); assert(dec->hdr_.htree_groups_ != NULL); assert(dec->hdr_.num_htree_groups_ > 0); diff --git a/src/3rdparty/chromium/third_party/libwebp/src/dec/vp8li_dec.h b/src/3rdparty/chromium/third_party/libwebp/src/dec/vp8li_dec.h index 72b2e86120..32540a4b88 100644 --- a/src/3rdparty/chromium/third_party/libwebp/src/dec/vp8li_dec.h +++ b/src/3rdparty/chromium/third_party/libwebp/src/dec/vp8li_dec.h @@ -51,7 +51,7 @@ typedef struct { uint32_t* huffman_image_; int num_htree_groups_; HTreeGroup* htree_groups_; - HuffmanCode* huffman_tables_; + HuffmanTables huffman_tables_; } VP8LMetadata; typedef struct VP8LDecoder VP8LDecoder; diff --git a/src/3rdparty/chromium/third_party/libwebp/src/utils/huffman_utils.c b/src/3rdparty/chromium/third_party/libwebp/src/utils/huffman_utils.c index 0cba0fbb7d..9efd6283ac 100644 --- a/src/3rdparty/chromium/third_party/libwebp/src/utils/huffman_utils.c +++ b/src/3rdparty/chromium/third_party/libwebp/src/utils/huffman_utils.c @@ -177,21 +177,24 @@ static int BuildHuffmanTable(HuffmanCode* const root_table, int root_bits, if (num_open < 0) { return 0; } - if (root_table == NULL) continue; for (; count[len] > 0; --count[len]) { HuffmanCode code; if ((key & mask) != low) { - table += table_size; + if (root_table != NULL) table += table_size; table_bits = NextTableBitSize(count, len, root_bits); table_size = 1 << table_bits; total_size += table_size; low = key & mask; - root_table[low].bits = (uint8_t)(table_bits + root_bits); - root_table[low].value = (uint16_t)((table - root_table) - low); + if (root_table != NULL) { + root_table[low].bits = (uint8_t)(table_bits + root_bits); + root_table[low].value = (uint16_t)((table - root_table) - low); + } + } + if (root_table != NULL) { + code.bits = (uint8_t)(len - root_bits); + code.value = (uint16_t)sorted[symbol++]; + ReplicateValue(&table[key >> root_bits], step, table_size, code); } - code.bits = (uint8_t)(len - root_bits); - code.value = (uint16_t)sorted[symbol++]; - ReplicateValue(&table[key >> root_bits], step, table_size, code); key = GetNextKey(key, len); } } @@ -211,25 +214,83 @@ static int BuildHuffmanTable(HuffmanCode* const root_table, int root_bits, ((1 << MAX_CACHE_BITS) + NUM_LITERAL_CODES + NUM_LENGTH_CODES) // Cut-off value for switching between heap and stack allocation. #define SORTED_SIZE_CUTOFF 512 -int VP8LBuildHuffmanTable(HuffmanCode* const root_table, int root_bits, +int VP8LBuildHuffmanTable(HuffmanTables* const root_table, int root_bits, const int code_lengths[], int code_lengths_size) { - int total_size; + const int total_size = + BuildHuffmanTable(NULL, root_bits, code_lengths, code_lengths_size, NULL); assert(code_lengths_size <= MAX_CODE_LENGTHS_SIZE); - if (root_table == NULL) { - total_size = BuildHuffmanTable(NULL, root_bits, - code_lengths, code_lengths_size, NULL); - } else if (code_lengths_size <= SORTED_SIZE_CUTOFF) { + if (total_size == 0 || root_table == NULL) return total_size; + + if (root_table->curr_segment->curr_table + total_size >= + root_table->curr_segment->start + root_table->curr_segment->size) { + // If 'root_table' does not have enough memory, allocate a new segment. + // The available part of root_table->curr_segment is left unused because we + // need a contiguous buffer. + const int segment_size = root_table->curr_segment->size; + struct HuffmanTablesSegment* next = + (HuffmanTablesSegment*)WebPSafeMalloc(1, sizeof(*next)); + if (next == NULL) return 0; + // Fill the new segment. + // We need at least 'total_size' but if that value is small, it is better to + // allocate a big chunk to prevent more allocations later. 'segment_size' is + // therefore chosen (any other arbitrary value could be chosen). + next->size = total_size > segment_size ? total_size : segment_size; + next->start = + (HuffmanCode*)WebPSafeMalloc(next->size, sizeof(*next->start)); + if (next->start == NULL) { + WebPSafeFree(next); + return 0; + } + next->curr_table = next->start; + next->next = NULL; + // Point to the new segment. + root_table->curr_segment->next = next; + root_table->curr_segment = next; + } + if (code_lengths_size <= SORTED_SIZE_CUTOFF) { // use local stack-allocated array. uint16_t sorted[SORTED_SIZE_CUTOFF]; - total_size = BuildHuffmanTable(root_table, root_bits, - code_lengths, code_lengths_size, sorted); - } else { // rare case. Use heap allocation. + BuildHuffmanTable(root_table->curr_segment->curr_table, root_bits, + code_lengths, code_lengths_size, sorted); + } else { // rare case. Use heap allocation. uint16_t* const sorted = (uint16_t*)WebPSafeMalloc(code_lengths_size, sizeof(*sorted)); if (sorted == NULL) return 0; - total_size = BuildHuffmanTable(root_table, root_bits, - code_lengths, code_lengths_size, sorted); + BuildHuffmanTable(root_table->curr_segment->curr_table, root_bits, + code_lengths, code_lengths_size, sorted); WebPSafeFree(sorted); } return total_size; } + +int VP8LHuffmanTablesAllocate(int size, HuffmanTables* huffman_tables) { + // Have 'segment' point to the first segment for now, 'root'. + HuffmanTablesSegment* const root = &huffman_tables->root; + huffman_tables->curr_segment = root; + // Allocate root. + root->start = (HuffmanCode*)WebPSafeMalloc(size, sizeof(*root->start)); + if (root->start == NULL) return 0; + root->curr_table = root->start; + root->next = NULL; + root->size = size; + return 1; +} + +void VP8LHuffmanTablesDeallocate(HuffmanTables* const huffman_tables) { + HuffmanTablesSegment *current, *next; + if (huffman_tables == NULL) return; + // Free the root node. + current = &huffman_tables->root; + next = current->next; + WebPSafeFree(current->start); + current->start = NULL; + current->next = NULL; + current = next; + // Free the following nodes. + while (current != NULL) { + next = current->next; + WebPSafeFree(current->start); + WebPSafeFree(current); + current = next; + } +} diff --git a/src/3rdparty/chromium/third_party/libwebp/src/utils/huffman_utils.h b/src/3rdparty/chromium/third_party/libwebp/src/utils/huffman_utils.h index 13b7ad1ac4..98415c5328 100644 --- a/src/3rdparty/chromium/third_party/libwebp/src/utils/huffman_utils.h +++ b/src/3rdparty/chromium/third_party/libwebp/src/utils/huffman_utils.h @@ -43,6 +43,29 @@ typedef struct { // or non-literal symbol otherwise } HuffmanCode32; +// Contiguous memory segment of HuffmanCodes. +typedef struct HuffmanTablesSegment { + HuffmanCode* start; + // Pointer to where we are writing into the segment. Starts at 'start' and + // cannot go beyond 'start' + 'size'. + HuffmanCode* curr_table; + // Pointer to the next segment in the chain. + struct HuffmanTablesSegment* next; + int size; +} HuffmanTablesSegment; + +// Chained memory segments of HuffmanCodes. +typedef struct HuffmanTables { + HuffmanTablesSegment root; + // Currently processed segment. At first, this is 'root'. + HuffmanTablesSegment* curr_segment; +} HuffmanTables; + +// Allocates a HuffmanTables with 'size' contiguous HuffmanCodes. Returns 0 on +// memory allocation error, 1 otherwise. +int VP8LHuffmanTablesAllocate(int size, HuffmanTables* huffman_tables); +void VP8LHuffmanTablesDeallocate(HuffmanTables* const huffman_tables); + #define HUFFMAN_PACKED_BITS 6 #define HUFFMAN_PACKED_TABLE_SIZE (1u << HUFFMAN_PACKED_BITS) @@ -78,9 +101,7 @@ void VP8LHtreeGroupsFree(HTreeGroup* const htree_groups); // the huffman table. // Returns built table size or 0 in case of error (invalid tree or // memory error). -// If root_table is NULL, it returns 0 if a lookup cannot be built, something -// > 0 otherwise (but not the table size). -int VP8LBuildHuffmanTable(HuffmanCode* const root_table, int root_bits, +int VP8LBuildHuffmanTable(HuffmanTables* const root_table, int root_bits, const int code_lengths[], int code_lengths_size); #ifdef __cplusplus diff --git a/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/pwl/cpwl_combo_box.h b/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/pwl/cpwl_combo_box.h index 67c49d2545..cf1a8750c1 100644 --- a/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/pwl/cpwl_combo_box.h +++ b/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/pwl/cpwl_combo_box.h @@ -95,7 +95,7 @@ class CPWL_ComboBox final : public CPWL_Wnd { void CreateListBox(const CreateParams& cp); // Returns |true| iff this instance is still allocated. - [[nodiscard]] bool SetPopup(bool bPopup); + bool SetPopup(bool bPopup); UnownedPtr m_pEdit; UnownedPtr m_pButton; diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization.h index 28c8271fd6..3957e0cdf7 100644 --- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization.h +++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization.h @@ -120,6 +120,21 @@ AslrMask(uintptr_t bits) { return AslrAddress(0x20000000ULL); } + #elif defined(OS_LINUX) + + // Linux on arm64 can use 39, 42, 48, or 52-bit user space, depending on + // page size and number of levels of translation pages used. We use + // 39-bit as base as all setups should support this, lowered to 38-bit + // as ASLROffset() could cause a carry. + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE uintptr_t + ASLRMask() { + return AslrMask(38); + } + PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE uintptr_t + ASLROffset() { + return AslrAddress(0x1000000000ULL); + } + #else // ARM64 on Linux has 39-bit user space. Use 38 bits since kASLROffset diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator.cc b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator.cc index 91d00d2fbc..597d5f84cb 100644 --- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator.cc +++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator.cc @@ -255,5 +255,13 @@ uint32_t GetAllocPageErrorCode() { return s_allocPageErrorCode; } +#if defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + +namespace internal { +PageCharacteristics page_characteristics; +} + +#endif // defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + } // namespace base } // namespace pdfium diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h index fdc65ac47b..6f2a38bbac 100644 --- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h +++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/page_allocator_constants.h @@ -24,6 +24,31 @@ // elimination. #define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) +#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) +// This should work for all POSIX (if needed), but currently all other +// supported OS/architecture combinations use either hard-coded values +// (such as x86) or have means to determine these values without needing +// atomics (such as macOS on arm64). + +// Page allocator constants are run-time constant +#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const)) + +#include +#include + +namespace pdfium::base::internal { + +// Holds the current page size and shift, where size = 1 << shift +// Use PageAllocationGranularity(), PageAllocationGranularityShift() +// to initialize and retrieve these values safely. +struct PageCharacteristics { + std::atomic size; + std::atomic shift; +}; +extern PageCharacteristics page_characteristics; + +} // namespace base::internal + #else // When defined, page size constants are fixed at compile time. When not @@ -37,11 +62,13 @@ #endif namespace pdfium { -namespace { -#if !defined(OS_APPLE) +namespace base { +// Forward declaration, implementation below +PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t +PageAllocationGranularity(); -constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { +PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PageAllocationGranularityShift() { #if defined(OS_WIN) || defined(ARCH_CPU_PPC64) // Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page // sizes. Since 64kB is the de facto standard on the platform and binaries @@ -50,21 +77,37 @@ constexpr ALWAYS_INLINE int PageAllocationGranularityShift() { return 16; // 64kB #elif defined(_MIPS_ARCH_LOONGSON) return 14; // 16kB +#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + // arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16) + // page sizes. Retrieve from or initialize cache. + int shift = base::internal::page_characteristics.shift.load(std::memory_order_relaxed); + if (UNLIKELY(shift == 0)) { + shift = __builtin_ctz((int)base::PageAllocationGranularity()); + base::internal::page_characteristics.shift.store(shift, std::memory_order_relaxed); + } + return shift; +#elif defined(OS_APPLE) + return vm_page_shift; #else return 12; // 4kB #endif } -#endif - -} // namespace - -namespace base { - PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t PageAllocationGranularity() { #if defined(OS_APPLE) + // This is literally equivalent to |1 << PageAllocationGranularityShift()| + // below, but was separated out for OS_APPLE to avoid << on a non-constexpr. return vm_page_size; +#elif defined(OS_LINUX) && defined(ARCH_CPU_ARM64) + // arm64 supports 4kb, 16kb, and 64kb page sizes. Retrieve from or + // initialize cache. + int size = internal::page_characteristics.size.load(std::memory_order_relaxed); + if (UNLIKELY(size == 0)) { + size = getpagesize(); + internal::page_characteristics.size.store(size, std::memory_order_relaxed); + } + return size; #else return 1ULL << PageAllocationGranularityShift(); #endif diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cc b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cc index 2e5e87fa7e..89b9f6217a 100644 --- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cc +++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc.cc @@ -486,7 +486,7 @@ static size_t PartitionPurgePage(internal::PartitionPage* page, bool discard) { #if defined(PAGE_ALLOCATOR_CONSTANTS_ARE_CONSTEXPR) constexpr size_t kMaxSlotCount = (PartitionPageSize() * kMaxPartitionPagesPerSlotSpan) / SystemPageSize(); -#elif defined(OS_APPLE) +#elif defined(OS_APPLE) || (defined(OS_LINUX) && defined(ARCH_CPU_ARM64)) // It's better for slot_usage to be stack-allocated and fixed-size, which // demands that its size be constexpr. On OS_APPLE, PartitionPageSize() is // always SystemPageSize() << 2, so regardless of what the run time page size diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h index 71d63ba414..a6d8362674 100644 --- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h +++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/partition_alloc_constants.h @@ -50,10 +50,11 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PartitionPageShift() { return 18; // 256 KiB } -#elif defined(OS_APPLE) +#elif defined(OS_APPLE) || \ + (defined(OS_LINUX) && defined(ARCH_CPU_ARM64)) PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int PartitionPageShift() { - return vm_page_shift + 2; + return PageAllocationGranularityShift() + 2; } #else PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE int diff --git a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h index 18ca770261..ec46e69f81 100644 --- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h +++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h @@ -67,19 +67,14 @@ class CircularQueue { ignore_result(generation); } - T* operator->() { + T* operator->() const { #if PERFETTO_DCHECK_IS_ON() PERFETTO_DCHECK(generation_ == queue_->generation()); #endif return queue_->Get(pos_); } - const T* operator->() const { - return const_cast::Iterator*>(this)->operator->(); - } - - T& operator*() { return *(operator->()); } - const T& operator*() const { return *(operator->()); } + T& operator*() const { return *(operator->()); } value_type& operator[](difference_type i) { return *(*this + i); } diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h index 4796ae4edc..30e534b216 100644 --- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h +++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/storage/metadata.h @@ -59,8 +59,10 @@ namespace metadata { F(kMulti, "multi") // clang-format +#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) // Ignore GCC warning about a missing argument for a variadic macro parameter. #pragma GCC system_header +#endif #define PERFETTO_TP_META_TYPE_ENUM(varname, ...) varname enum class KeyType : size_t { diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/storage/stats.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/storage/stats.h index 7f14803244..30b56c6254 100644 --- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/storage/stats.h +++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/storage/stats.h @@ -189,7 +189,9 @@ enum Source { }; // Ignore GCC warning about a missing argument for a variadic macro parameter. +#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) #pragma GCC system_header +#endif // Declares an enum of literals (one for each stat). The enum values of each // literal corresponds to the string index in the arrays below. diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h index 875efd62e0..1ca5068cc3 100644 --- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h +++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/tables/macros_internal.h @@ -140,7 +140,9 @@ class MacroTable : public Table { } // namespace macros_internal // Ignore GCC warning about a missing argument for a variadic macro parameter. +#if PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) #pragma GCC system_header +#endif // Basic helper macros. #define PERFETTO_TP_NOOP(...) diff --git a/src/3rdparty/chromium/third_party/skia/src/core/SkPath.cpp b/src/3rdparty/chromium/third_party/skia/src/core/SkPath.cpp index 00da5e02a5..11d2107de0 100644 --- a/src/3rdparty/chromium/third_party/skia/src/core/SkPath.cpp +++ b/src/3rdparty/chromium/third_party/skia/src/core/SkPath.cpp @@ -27,6 +27,7 @@ #include "src/pathops/SkPathOpsPoint.h" #include +#include #include struct SkPath_Storage_Equivalent { @@ -3345,40 +3346,50 @@ static PathInfo validate_verbs(const uint8_t vbs[], int verbCount) { bool needMove = true; bool invalid = false; - for (int i = 0; i < verbCount; ++i) { - switch ((SkPathVerb)vbs[i]) { - case SkPathVerb::kMove: - needMove = false; - info.points += 1; - break; - case SkPathVerb::kLine: - invalid |= needMove; - info.segmentMask |= kLine_SkPathSegmentMask; - info.points += 1; - break; - case SkPathVerb::kQuad: - invalid |= needMove; - info.segmentMask |= kQuad_SkPathSegmentMask; - info.points += 2; - break; - case SkPathVerb::kConic: - invalid |= needMove; - info.segmentMask |= kConic_SkPathSegmentMask; - info.points += 2; - info.weights += 1; - break; - case SkPathVerb::kCubic: - invalid |= needMove; - info.segmentMask |= kCubic_SkPathSegmentMask; - info.points += 3; - break; - case SkPathVerb::kClose: - invalid |= needMove; - needMove = true; - break; - default: - invalid = true; - break; + + if (verbCount >= (INT_MAX / 3)) { + // A path with an extremely high number of quad, conic or cubic verbs could cause + // `info.points` to overflow. To prevent against this, we reject extremely large paths. This + // check is conservative and assumes the worst case (in particular, it assumes that every + // verb consumes 3 points, which would only happen for a path composed entirely of cubics). + // This limits us to 700 million verbs, which is large enough for any reasonable use case. + invalid = true; + } else { + for (int i = 0; i < verbCount; ++i) { + switch ((SkPathVerb)vbs[i]) { + case SkPathVerb::kMove: + needMove = false; + info.points += 1; + break; + case SkPathVerb::kLine: + invalid |= needMove; + info.segmentMask |= kLine_SkPathSegmentMask; + info.points += 1; + break; + case SkPathVerb::kQuad: + invalid |= needMove; + info.segmentMask |= kQuad_SkPathSegmentMask; + info.points += 2; + break; + case SkPathVerb::kConic: + invalid |= needMove; + info.segmentMask |= kConic_SkPathSegmentMask; + info.points += 2; + info.weights += 1; + break; + case SkPathVerb::kCubic: + invalid |= needMove; + info.segmentMask |= kCubic_SkPathSegmentMask; + info.points += 3; + break; + case SkPathVerb::kClose: + invalid |= needMove; + needMove = true; + break; + default: + invalid = true; + break; + } } } info.valid = !invalid; diff --git a/src/3rdparty/chromium/third_party/skia/src/gpu/ops/GrDrawVerticesOp.cpp b/src/3rdparty/chromium/third_party/skia/src/gpu/ops/GrDrawVerticesOp.cpp index 0a80e67432..e50293b4df 100644 --- a/src/3rdparty/chromium/third_party/skia/src/gpu/ops/GrDrawVerticesOp.cpp +++ b/src/3rdparty/chromium/third_party/skia/src/gpu/ops/GrDrawVerticesOp.cpp @@ -757,7 +757,11 @@ GrOp::CombineResult DrawVerticesOp::onCombineIfPossible(GrOp* t, GrRecordingCont return CombineResult::kCannotCombine; } - if (fVertexCount + that->fVertexCount > SkTo(UINT16_MAX)) { + if (fVertexCount > INT32_MAX - that->fVertexCount) { + return CombineResult::kCannotCombine; + } + + if (fVertexCount > SkTo(UINT16_MAX) - that->fVertexCount) { return CombineResult::kCannotCombine; } diff --git a/src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c b/src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c index d7766b7d7e..a0feb5d200 100644 --- a/src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c +++ b/src/3rdparty/chromium/third_party/sqlite/src/amalgamation/sqlite3.c @@ -18804,6 +18804,7 @@ struct NameContext { int nRef; /* Number of names resolved by this context */ int nNcErr; /* Number of errors encountered while resolving names */ int ncFlags; /* Zero or more NC_* flags defined below */ + int nNestedSelect; /* Number of nested selects using this NC */ Select *pWinSelect; /* SELECT statement for any window functions */ }; @@ -104749,11 +104750,12 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ while( pNC2 && sqlite3ReferencesSrcList(pParse, pExpr, pNC2->pSrcList)==0 ){ - pExpr->op2++; + pExpr->op2 += (1 + pNC2->nNestedSelect); pNC2 = pNC2->pNext; } assert( pDef!=0 || IN_RENAME_OBJECT ); if( pNC2 && pDef ){ + pExpr->op2 += pNC2->nNestedSelect; assert( SQLITE_FUNC_MINMAX==NC_MinMaxAgg ); assert( SQLITE_FUNC_ANYORDER==NC_OrderAgg ); testcase( (pDef->funcFlags & SQLITE_FUNC_MINMAX)!=0 ); @@ -105314,6 +105316,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){ /* Recursively resolve names in all subqueries in the FROM clause */ + if( pOuterNC ) pOuterNC->nNestedSelect++; for(i=0; ipSrc->nSrc; i++){ SrcItem *pItem = &p->pSrc->a[i]; if( pItem->pSelect && (pItem->pSelect->selFlags & SF_Resolved)==0 ){ @@ -105338,6 +105341,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){ } } } + if( pOuterNC ) pOuterNC->nNestedSelect--; /* Set up the local name-context to pass to sqlite3ResolveExprNames() to ** resolve the result-set expression list. @@ -218678,15 +218682,19 @@ static int sessionReadRecord( } } if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){ - sqlite3_int64 v = sessionGetI64(aVal); - if( eType==SQLITE_INTEGER ){ - sqlite3VdbeMemSetInt64(apOut[i], v); + if( (pIn->nData-pIn->iNext)<8 ){ + rc = SQLITE_CORRUPT_BKPT; }else{ - double d; - memcpy(&d, &v, 8); - sqlite3VdbeMemSetDouble(apOut[i], d); + sqlite3_int64 v = sessionGetI64(aVal); + if( eType==SQLITE_INTEGER ){ + sqlite3VdbeMemSetInt64(apOut[i], v); + }else{ + double d; + memcpy(&d, &v, 8); + sqlite3VdbeMemSetDouble(apOut[i], d); + } + pIn->iNext += 8; } - pIn->iNext += 8; } } } diff --git a/src/3rdparty/chromium/third_party/sqlite/src/amalgamation_dev/sqlite3.c b/src/3rdparty/chromium/third_party/sqlite/src/amalgamation_dev/sqlite3.c index 0819ea6a61..5c72a44dd6 100644 --- a/src/3rdparty/chromium/third_party/sqlite/src/amalgamation_dev/sqlite3.c +++ b/src/3rdparty/chromium/third_party/sqlite/src/amalgamation_dev/sqlite3.c @@ -18817,6 +18817,7 @@ struct NameContext { int nRef; /* Number of names resolved by this context */ int nNcErr; /* Number of errors encountered while resolving names */ int ncFlags; /* Zero or more NC_* flags defined below */ + int nNestedSelect; /* Number of nested selects using this NC */ Select *pWinSelect; /* SELECT statement for any window functions */ }; @@ -104762,11 +104763,12 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ while( pNC2 && sqlite3ReferencesSrcList(pParse, pExpr, pNC2->pSrcList)==0 ){ - pExpr->op2++; + pExpr->op2 += (1 + pNC2->nNestedSelect); pNC2 = pNC2->pNext; } assert( pDef!=0 || IN_RENAME_OBJECT ); if( pNC2 && pDef ){ + pExpr->op2 += pNC2->nNestedSelect; assert( SQLITE_FUNC_MINMAX==NC_MinMaxAgg ); assert( SQLITE_FUNC_ANYORDER==NC_OrderAgg ); testcase( (pDef->funcFlags & SQLITE_FUNC_MINMAX)!=0 ); @@ -105327,6 +105329,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){ /* Recursively resolve names in all subqueries in the FROM clause */ + if( pOuterNC ) pOuterNC->nNestedSelect++; for(i=0; ipSrc->nSrc; i++){ SrcItem *pItem = &p->pSrc->a[i]; if( pItem->pSelect && (pItem->pSelect->selFlags & SF_Resolved)==0 ){ @@ -105351,6 +105354,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){ } } } + if( pOuterNC ) pOuterNC->nNestedSelect--; /* Set up the local name-context to pass to sqlite3ResolveExprNames() to ** resolve the result-set expression list. diff --git a/src/3rdparty/chromium/third_party/sqlite/src/src/resolve.c b/src/3rdparty/chromium/third_party/sqlite/src/src/resolve.c index 4b36ecca34..c5228a7f09 100644 --- a/src/3rdparty/chromium/third_party/sqlite/src/src/resolve.c +++ b/src/3rdparty/chromium/third_party/sqlite/src/src/resolve.c @@ -1211,11 +1211,12 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ while( pNC2 && sqlite3ReferencesSrcList(pParse, pExpr, pNC2->pSrcList)==0 ){ - pExpr->op2++; + pExpr->op2 += (1 + pNC2->nNestedSelect); pNC2 = pNC2->pNext; } assert( pDef!=0 || IN_RENAME_OBJECT ); if( pNC2 && pDef ){ + pExpr->op2 += pNC2->nNestedSelect; assert( SQLITE_FUNC_MINMAX==NC_MinMaxAgg ); assert( SQLITE_FUNC_ANYORDER==NC_OrderAgg ); testcase( (pDef->funcFlags & SQLITE_FUNC_MINMAX)!=0 ); @@ -1776,6 +1777,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){ /* Recursively resolve names in all subqueries in the FROM clause */ + if( pOuterNC ) pOuterNC->nNestedSelect++; for(i=0; ipSrc->nSrc; i++){ SrcItem *pItem = &p->pSrc->a[i]; if( pItem->pSelect && (pItem->pSelect->selFlags & SF_Resolved)==0 ){ @@ -1800,7 +1802,8 @@ static int resolveSelectStep(Walker *pWalker, Select *p){ } } } - + if( pOuterNC ) pOuterNC->nNestedSelect--; + /* Set up the local name-context to pass to sqlite3ResolveExprNames() to ** resolve the result-set expression list. */ diff --git a/src/3rdparty/chromium/third_party/sqlite/src/src/sqliteInt.h b/src/3rdparty/chromium/third_party/sqlite/src/src/sqliteInt.h index 2614f4be45..07bc4def10 100644 --- a/src/3rdparty/chromium/third_party/sqlite/src/src/sqliteInt.h +++ b/src/3rdparty/chromium/third_party/sqlite/src/src/sqliteInt.h @@ -3321,6 +3321,7 @@ struct NameContext { int nRef; /* Number of names resolved by this context */ int nNcErr; /* Number of errors encountered while resolving names */ int ncFlags; /* Zero or more NC_* flags defined below */ + int nNestedSelect; /* Number of nested selects using this NC */ Select *pWinSelect; /* SELECT statement for any window functions */ }; diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/pacing/packet_router.cc b/src/3rdparty/chromium/third_party/webrtc/modules/pacing/packet_router.cc index 5317f510c9..f70fe988a5 100644 --- a/src/3rdparty/chromium/third_party/webrtc/modules/pacing/packet_router.cc +++ b/src/3rdparty/chromium/third_party/webrtc/modules/pacing/packet_router.cc @@ -91,7 +91,10 @@ void PacketRouter::AddSendRtpModuleToMap(RtpRtcpInterface* rtp_module, void PacketRouter::RemoveSendRtpModuleFromMap(uint32_t ssrc) { auto kv = send_modules_map_.find(ssrc); - RTC_DCHECK(kv != send_modules_map_.end()); + if (kv == send_modules_map_.end()) { + RTC_LOG(LS_ERROR) << "No send module found for ssrc " << ssrc; + return; + } send_modules_list_.remove(kv->second); send_modules_map_.erase(kv); } diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc b/src/3rdparty/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc index 15e059e85c..9ad4aa97c3 100644 --- a/src/3rdparty/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc +++ b/src/3rdparty/chromium/third_party/webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc @@ -94,8 +94,8 @@ size_t RefIndicesLength(const RTPVideoHeaderVP9& hdr) { if (!hdr.inter_pic_predicted || !hdr.flexible_mode) return 0; - RTC_DCHECK_GT(hdr.num_ref_pics, 0U); - RTC_DCHECK_LE(hdr.num_ref_pics, kMaxVp9RefPics); + RTC_CHECK_GT(hdr.num_ref_pics, 0U); + RTC_CHECK_LE(hdr.num_ref_pics, kMaxVp9RefPics); return hdr.num_ref_pics; } @@ -123,9 +123,9 @@ size_t SsDataLength(const RTPVideoHeaderVP9& hdr) { if (!hdr.ss_data_available) return 0; - RTC_DCHECK_GT(hdr.num_spatial_layers, 0U); - RTC_DCHECK_LE(hdr.num_spatial_layers, kMaxVp9NumberOfSpatialLayers); - RTC_DCHECK_LE(hdr.gof.num_frames_in_gof, kMaxVp9FramesInGof); + RTC_CHECK_GT(hdr.num_spatial_layers, 0U); + RTC_CHECK_LE(hdr.num_spatial_layers, kMaxVp9NumberOfSpatialLayers); + RTC_CHECK_LE(hdr.gof.num_frames_in_gof, kMaxVp9FramesInGof); size_t length = 1; // V if (hdr.spatial_layer_resolution_present) { length += 4 * hdr.num_spatial_layers; // Y @@ -136,7 +136,7 @@ size_t SsDataLength(const RTPVideoHeaderVP9& hdr) { // N_G length += hdr.gof.num_frames_in_gof; // T, U, R for (size_t i = 0; i < hdr.gof.num_frames_in_gof; ++i) { - RTC_DCHECK_LE(hdr.gof.num_ref_pics[i], kMaxVp9RefPics); + RTC_CHECK_LE(hdr.gof.num_ref_pics[i], kMaxVp9RefPics); length += hdr.gof.num_ref_pics[i]; // R times } return length; @@ -248,9 +248,9 @@ bool WriteRefIndices(const RTPVideoHeaderVP9& vp9, // +-+-+-+-+-+-+-+-+ -| -| // bool WriteSsData(const RTPVideoHeaderVP9& vp9, rtc::BitBufferWriter* writer) { - RTC_DCHECK_GT(vp9.num_spatial_layers, 0U); - RTC_DCHECK_LE(vp9.num_spatial_layers, kMaxVp9NumberOfSpatialLayers); - RTC_DCHECK_LE(vp9.gof.num_frames_in_gof, kMaxVp9FramesInGof); + RTC_CHECK_GT(vp9.num_spatial_layers, 0U); + RTC_CHECK_LE(vp9.num_spatial_layers, kMaxVp9NumberOfSpatialLayers); + RTC_CHECK_LE(vp9.gof.num_frames_in_gof, kMaxVp9FramesInGof); bool g_bit = vp9.gof.num_frames_in_gof > 0; RETURN_FALSE_ON_ERROR(writer->WriteBits(vp9.num_spatial_layers - 1, 3)); @@ -288,6 +288,8 @@ bool WriteSsData(const RTPVideoHeaderVP9& vp9, rtc::BitBufferWriter* writer) { // current API to invoke SVC is not flexible enough. RTPVideoHeaderVP9 RemoveInactiveSpatialLayers( const RTPVideoHeaderVP9& original_header) { + RTC_CHECK_LE(original_header.num_spatial_layers, + kMaxVp9NumberOfSpatialLayers); RTPVideoHeaderVP9 hdr(original_header); if (original_header.first_active_layer == 0) return hdr; @@ -314,7 +316,7 @@ RtpPacketizerVp9::RtpPacketizerVp9(rtc::ArrayView payload, header_size_(PayloadDescriptorLengthMinusSsData(hdr_)), first_packet_extra_header_size_(SsDataLength(hdr_)), remaining_payload_(payload) { - RTC_DCHECK_EQ(hdr_.first_active_layer, 0); + RTC_CHECK_EQ(hdr_.first_active_layer, 0); limits.max_payload_len -= header_size_; limits.first_packet_reduction_len += first_packet_extra_header_size_; @@ -357,8 +359,8 @@ bool RtpPacketizerVp9::NextPacket(RtpPacketToSend* packet) { // Ensure end_of_picture is always set on top spatial layer when it is not // dropped. - RTC_DCHECK(hdr_.spatial_idx < hdr_.num_spatial_layers - 1 || - hdr_.end_of_picture); + RTC_CHECK(hdr_.spatial_idx < hdr_.num_spatial_layers - 1 || + hdr_.end_of_picture); packet->SetMarker(layer_end && hdr_.end_of_picture); return true; diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/file_wrapper.h b/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/file_wrapper.h index 42c463cb15..7c2532c6f4 100644 --- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/file_wrapper.h +++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/file_wrapper.h @@ -11,6 +11,7 @@ #ifndef RTC_BASE_SYSTEM_FILE_WRAPPER_H_ #define RTC_BASE_SYSTEM_FILE_WRAPPER_H_ +#include #include #include diff --git a/src/3rdparty/chromium/third_party/zlib/contrib/minizip/README.chromium b/src/3rdparty/chromium/third_party/zlib/contrib/minizip/README.chromium index 1ad489a678..23d5428fb9 100644 --- a/src/3rdparty/chromium/third_party/zlib/contrib/minizip/README.chromium +++ b/src/3rdparty/chromium/third_party/zlib/contrib/minizip/README.chromium @@ -13,3 +13,6 @@ Local Modifications: - Add parsing of the 'Info-ZIP Unicode Path Extra Field' as described in https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT section 4.6.9. (see crrev.com/1002476) + +- Check for overly long filename, comment, or extra field in + zipOpenNewFileInZip4_64 (crbug.com/1470539). diff --git a/src/3rdparty/chromium/third_party/zlib/contrib/minizip/zip.c b/src/3rdparty/chromium/third_party/zlib/contrib/minizip/zip.c index 65c0c72518..cccdc65396 100644 --- a/src/3rdparty/chromium/third_party/zlib/contrib/minizip/zip.c +++ b/src/3rdparty/chromium/third_party/zlib/contrib/minizip/zip.c @@ -1083,6 +1083,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, return ZIP_PARAMERROR; #endif + // The filename and comment length must fit in 16 bits. + if ((filename!=NULL) && (strlen(filename)>0xffff)) + return ZIP_PARAMERROR; + if ((comment!=NULL) && (strlen(comment)>0xffff)) + return ZIP_PARAMERROR; + // The extra field length must fit in 16 bits. If the member also requires + // a Zip64 extra block, that will also need to fit within that 16-bit + // length, but that will be checked for later. + if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff)) + return ZIP_PARAMERROR; + zi = (zip64_internal*)file; if (zi->in_opened_file_inzip == 1) diff --git a/src/3rdparty/chromium/tools/generate_stubs/generate_stubs.py b/src/3rdparty/chromium/tools/generate_stubs/generate_stubs.py index ed3b89c290..0e2e72e0be 100755 --- a/src/3rdparty/chromium/tools/generate_stubs/generate_stubs.py +++ b/src/3rdparty/chromium/tools/generate_stubs/generate_stubs.py @@ -68,12 +68,12 @@ def __str__(self): # From that, all preceding characters are considered the return value. # Trailing characters should have a substring matching the form (.*). That # is considered the arguments. -SIGNATURE_REGEX = re.compile('(?P.+?)' - '(?P[_a-zA-Z][_a-zA-Z0-9]+)\s*' - '\((?P.*?)\)') +SIGNATURE_REGEX = re.compile(r'(?P.+?)' + r'(?P[_a-zA-Z][_a-zA-Z0-9]+)\s*' + r'\((?P.*?)\)') # Used for generating C++ identifiers. -INVALID_C_IDENT_CHARS = re.compile('[^_a-zA-Z0-9]') +INVALID_C_IDENT_CHARS = re.compile(r'[^_a-zA-Z0-9]') # Constants defining the supported file types options. FILE_TYPE_WIN_X86 = 'windows_lib' @@ -662,7 +662,7 @@ def StubFunction(cls, signature): return_prefix = 'return ' # Generate the argument list. - arguments = [re.split('[\*& ]', arg)[-1].strip() for arg in + arguments = [re.split(r'[\*& ]', arg)[-1].strip() for arg in signature['params']] # Remove square brackets from arrays, otherwise we will end with a # compilation failure. diff --git a/src/3rdparty/chromium/tools/grit/grit/util.py b/src/3rdparty/chromium/tools/grit/grit/util.py index 528d766ad6..6e8cdb0ebf 100644 --- a/src/3rdparty/chromium/tools/grit/grit/util.py +++ b/src/3rdparty/chromium/tools/grit/grit/util.py @@ -211,7 +211,7 @@ def ReadFile(filename, encoding): mode = 'rb' encoding = None else: - mode = 'rU' + mode = 'r' with io.open(abs(filename), mode, encoding=encoding) as f: return f.read() diff --git a/src/3rdparty/chromium/tools/metrics/histograms/enums.xml b/src/3rdparty/chromium/tools/metrics/histograms/enums.xml index df6704bbed..eb13c15eec 100644 --- a/src/3rdparty/chromium/tools/metrics/histograms/enums.xml +++ b/src/3rdparty/chromium/tools/metrics/histograms/enums.xml @@ -38011,6 +38011,10 @@ Called by update_gpu_driver_bug_workaround_entries.py.--> + + + + diff --git a/src/3rdparty/chromium/tools/metrics/structured/model.py b/src/3rdparty/chromium/tools/metrics/structured/model.py index 2d90bf20c6..befea2eda7 100644 --- a/src/3rdparty/chromium/tools/metrics/structured/model.py +++ b/src/3rdparty/chromium/tools/metrics/structured/model.py @@ -26,7 +26,7 @@ 'metric', attributes=[ ('name', unicode, r'^[A-Za-z0-9_.]+$'), - ('kind', unicode, r'^(?i)(|hashed-string|int)$'), + ('kind', unicode, r'(?i)^(|hashed-string|int)$'), ], alphabetization=[ (_OBSOLETE_TYPE.tag, lambda _: 1), diff --git a/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py b/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py index f9f61d90a5..44e46fae8c 100755 --- a/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py +++ b/src/3rdparty/chromium/tools/metrics/ukm/gen_builders.py @@ -48,9 +48,10 @@ def ReadFilteredData(path): data = ukm_model.UKM_XML_TYPE.Parse(ukm_file.read()) event_tag = ukm_model._EVENT_TYPE.tag metric_tag = ukm_model._METRIC_TYPE.tag - data[event_tag] = filter(ukm_model.IsNotObsolete, data[event_tag]) + data[event_tag] = list(filter(ukm_model.IsNotObsolete, data[event_tag])) for event in data[event_tag]: - event[metric_tag] = filter(ukm_model.IsNotObsolete, event[metric_tag]) + event[metric_tag] = list( + filter(ukm_model.IsNotObsolete, event[metric_tag])) return data diff --git a/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py b/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py index ec24dd5736..57decab3cc 100644 --- a/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py +++ b/src/3rdparty/chromium/tools/metrics/ukm/ukm_model.py @@ -42,7 +42,7 @@ _STATISTICS_TYPE = models.ObjectNodeType( 'statistics', attributes=[ - ('export', str, r'^(?i)(|true|false)$'), + ('export', str, r'(?i)^(|true|false)$'), ], children=[ models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False), @@ -94,7 +94,7 @@ 'event', attributes=[ ('name', str, r'^[A-Za-z0-9.]+$'), - ('singular', str, r'^(?i)(|true|false)$'), + ('singular', str, r'(?i)^(|true|false)$'), ], alphabetization=[ (_OBSOLETE_TYPE.tag, _KEEP_ORDER), diff --git a/src/3rdparty/chromium/ui/base/resource/data_pack.cc b/src/3rdparty/chromium/ui/base/resource/data_pack.cc index 09513e6aed..4e522c9ad7 100644 --- a/src/3rdparty/chromium/ui/base/resource/data_pack.cc +++ b/src/3rdparty/chromium/ui/base/resource/data_pack.cc @@ -400,7 +400,16 @@ bool DataPack::LoadImpl(std::unique_ptr data_source) { } } - // 3) Verify the aliases are within the appropriate bounds. + // 3) Verify the entries are ordered correctly. + for (size_t i = 0; i < resource_count_; ++i) { + if (resource_table_[i].file_offset > resource_table_[i + 1].file_offset) { + LOG(ERROR) << "Data pack file corruption: " + << "Entry #" << i + 1 << " before Entry #" << i << "."; + return false; + } + } + + // 4) Verify the aliases are within the appropriate bounds. for (size_t i = 0; i < alias_count_; ++i) { if (alias_table_[i].entry_index >= resource_count_) { LOG(ERROR) << "Data pack file corruption: " @@ -461,6 +470,14 @@ bool DataPack::GetStringPiece(uint16_t resource_id, << "file modified?"; return false; } + if (target->file_offset > next_entry->file_offset) { + size_t entry_index = target - resource_table_; + size_t next_index = next_entry - resource_table_; + LOG(ERROR) << "Entry #" << next_index << " in data pack is before Entry #" + << entry_index << ". This should have been caught when loading. " + << "Was the file modified?"; + return false; + } MaybePrintResourceId(resource_id); size_t length = next_entry->file_offset - target->file_offset; diff --git a/src/3rdparty/chromium/ui/base/resource/data_pack_literal.cc b/src/3rdparty/chromium/ui/base/resource/data_pack_literal.cc index f6669ed824..70e225b6e8 100644 --- a/src/3rdparty/chromium/ui/base/resource/data_pack_literal.cc +++ b/src/3rdparty/chromium/ui/base/resource/data_pack_literal.cc @@ -91,6 +91,18 @@ const char kSampleCorruptPakContents[] = { const size_t kSampleCorruptPakSize = sizeof(kSampleCorruptPakContents); +const uint8_t kSampleMisorderedPakContents[] = { + 0x05, 0x00, 0x00, 0x00, // version + 0x01, 0x00, 0x00, 0x00, // encoding + padding + 0x02, 0x00, 0x00, 0x00, // num_resources, num_aliases + 0x06, 0x00, 0x2a, 0x00, 0x00, 0x00, // index entry 6 (wrong order) + 0x04, 0x00, 0x1e, 0x00, 0x00, 0x00, // index entry 4 + 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, // extra entry for the size of last + 't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '4', + 't', 'h', 'i', 's', ' ', 'i', 's', ' ', 'i', 'd', ' ', '6'}; + +const size_t kSampleMisorderedPakSize = sizeof(kSampleMisorderedPakContents); + const char kSamplePakContents2x[] = { 0x04, 0x00, 0x00, 0x00, // header(version 0x01, 0x00, 0x00, 0x00, // no. entries diff --git a/src/3rdparty/chromium/ui/base/resource/data_pack_literal.h b/src/3rdparty/chromium/ui/base/resource/data_pack_literal.h index 83a8dc04c1..a7fcf2bf85 100644 --- a/src/3rdparty/chromium/ui/base/resource/data_pack_literal.h +++ b/src/3rdparty/chromium/ui/base/resource/data_pack_literal.h @@ -19,6 +19,8 @@ extern const char kEmptyPakContents[]; extern const size_t kEmptyPakSize; extern const char kSampleCorruptPakContents[]; extern const size_t kSampleCorruptPakSize; +extern const uint8_t kSampleMisorderedPakContents[]; +extern const size_t kSampleMisorderedPakSize; } // namespace ui diff --git a/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py b/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py index 8d800636c9..04fa18e93d 100755 --- a/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py +++ b/src/3rdparty/chromium/ui/ozone/generate_constructor_list.py @@ -45,12 +45,15 @@ } // namespace ui """ +try: + from StringIO import StringIO # for Python 2 +except ImportError: + from io import StringIO # for Python 3 import optparse import os import collections import re import sys -import string def GetTypedefName(typename): @@ -68,7 +71,7 @@ def GetConstructorName(typename, platform): This is just "Create" + typename + platform. """ - return 'Create' + typename + string.capitalize(platform) + return 'Create' + typename + platform.capitalize() def GenerateConstructorList(out, namespace, export, typenames, platforms, @@ -163,12 +166,14 @@ def main(argv): sys.exit(1) # Write to standard output or file specified by --output_cc. - out_cc = sys.stdout + out_cc = getattr(sys.stdout, 'buffer', sys.stdout) if options.output_cc: out_cc = open(options.output_cc, 'wb') - GenerateConstructorList(out_cc, options.namespace, options.export, + out_cc_str = StringIO() + GenerateConstructorList(out_cc_str, options.namespace, options.export, typenames, platforms, includes, usings) + out_cc.write(out_cc_str.getvalue().encode('utf-8')) if options.output_cc: out_cc.close() diff --git a/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py b/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py index d47c398259..2702b68b9b 100755 --- a/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py +++ b/src/3rdparty/chromium/ui/ozone/generate_ozone_platform_list.py @@ -49,12 +49,15 @@ """ +try: + from StringIO import StringIO # for Python 2 +except ImportError: + from io import StringIO # for Python 3 import optparse import os import collections import re import sys -import string def GetConstantName(name): @@ -63,7 +66,7 @@ def GetConstantName(name): We just capitalize the platform name and prepend "CreateOzonePlatform". """ - return 'kPlatform' + string.capitalize(name) + return 'kPlatform' + name.capitalize() def GeneratePlatformListText(out, platforms): @@ -149,9 +152,9 @@ def main(argv): platforms.insert(0, options.default) # Write to standard output or file specified by --output_{cc,h}. - out_cc = sys.stdout - out_h = sys.stdout - out_txt = sys.stdout + out_cc = getattr(sys.stdout, 'buffer', sys.stdout) + out_h = getattr(sys.stdout, 'buffer', sys.stdout) + out_txt = getattr(sys.stdout, 'buffer', sys.stdout) if options.output_cc: out_cc = open(options.output_cc, 'wb') if options.output_h: @@ -159,9 +162,16 @@ def main(argv): if options.output_txt: out_txt = open(options.output_txt, 'wb') - GeneratePlatformListText(out_txt, platforms) - GeneratePlatformListHeader(out_h, platforms) - GeneratePlatformListSource(out_cc, platforms) + out_txt_str = StringIO() + out_h_str = StringIO() + out_cc_str = StringIO() + + GeneratePlatformListText(out_txt_str, platforms) + out_txt.write(out_txt_str.getvalue().encode('utf-8')) + GeneratePlatformListHeader(out_h_str, platforms) + out_h.write(out_h_str.getvalue().encode('utf-8')) + GeneratePlatformListSource(out_cc_str, platforms) + out_cc.write(out_cc_str.getvalue().encode('utf-8')) if options.output_cc: out_cc.close() diff --git a/src/3rdparty/chromium/v8/include/v8-version.h b/src/3rdparty/chromium/v8/include/v8-version.h index f2a24d6b25..40d548592f 100644 --- a/src/3rdparty/chromium/v8/include/v8-version.h +++ b/src/3rdparty/chromium/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 8 #define V8_MINOR_VERSION 7 #define V8_BUILD_NUMBER 220 -#define V8_PATCH_LEVEL 39 +#define V8_PATCH_LEVEL 41 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/src/3rdparty/chromium/v8/src/builtins/promise-any.tq b/src/3rdparty/chromium/v8/src/builtins/promise-any.tq index 561ed622ae..360d7642b7 100644 --- a/src/3rdparty/chromium/v8/src/builtins/promise-any.tq +++ b/src/3rdparty/chromium/v8/src/builtins/promise-any.tq @@ -106,9 +106,10 @@ PromiseAnyRejectElementClosure( const index = identityHash - 1; // 6. Let errors be F.[[Errors]]. - let errors = *ContextSlot( + let errorsRef:&FixedArray = ContextSlot( context, PromiseAnyRejectElementContextSlots::kPromiseAnyRejectElementErrorsSlot); + let errors = *errorsRef; // 7. Let promiseCapability be F.[[Capability]]. @@ -134,10 +135,7 @@ PromiseAnyRejectElementClosure( IntPtrMax(SmiUntag(remainingElementsCount) - 1, index + 1); if (newCapacity > errors.length_intptr) deferred { errors = ExtractFixedArray(errors, 0, errors.length_intptr, newCapacity); - *ContextSlot( - context, - PromiseAnyRejectElementContextSlots:: - kPromiseAnyRejectElementErrorsSlot) = errors; + *errorsRef = errors; } errors.objects[index] = value; @@ -155,6 +153,10 @@ PromiseAnyRejectElementClosure( // b. Set error.[[AggregateErrors]] to errors. const error = ConstructAggregateError(errors); + + // After this point, errors escapes to user code. Clear the slot. + *errorsRef = kEmptyFixedArray; + // c. Return ? Call(promiseCapability.[[Reject]], undefined, « error »). const capability = *ContextSlot( context, diff --git a/src/3rdparty/chromium/v8/src/codegen/arm/register-arm.h b/src/3rdparty/chromium/v8/src/codegen/arm/register-arm.h index 6cb6c602c2..8deddc5804 100644 --- a/src/3rdparty/chromium/v8/src/codegen/arm/register-arm.h +++ b/src/3rdparty/chromium/v8/src/codegen/arm/register-arm.h @@ -119,6 +119,12 @@ GENERAL_REGISTERS(DECLARE_REGISTER) #undef DECLARE_REGISTER constexpr Register no_reg = Register::no_reg(); +// ARM calling convention +constexpr Register arg_reg_1 = r0; +constexpr Register arg_reg_2 = r1; +constexpr Register arg_reg_3 = r2; +constexpr Register arg_reg_4 = r3; + constexpr bool kPadArguments = false; constexpr bool kSimpleFPAliasing = false; constexpr bool kSimdMaskRegisters = false; diff --git a/src/3rdparty/chromium/v8/src/codegen/arm64/register-arm64.h b/src/3rdparty/chromium/v8/src/codegen/arm64/register-arm64.h index fbbb0a18da..06026a065b 100644 --- a/src/3rdparty/chromium/v8/src/codegen/arm64/register-arm64.h +++ b/src/3rdparty/chromium/v8/src/codegen/arm64/register-arm64.h @@ -482,6 +482,12 @@ ALIAS_REGISTER(VRegister, fp_scratch2, d31); #undef ALIAS_REGISTER +// Arm64 calling convention +constexpr Register arg_reg_1 = x0; +constexpr Register arg_reg_2 = x1; +constexpr Register arg_reg_3 = x2; +constexpr Register arg_reg_4 = x3; + // AreAliased returns true if any of the named registers overlap. Arguments set // to NoReg are ignored. The system stack pointer may be specified. V8_EXPORT_PRIVATE bool AreAliased( diff --git a/src/3rdparty/chromium/v8/src/codegen/compiler.cc b/src/3rdparty/chromium/v8/src/codegen/compiler.cc index f09658ebdf..f963b0d926 100644 --- a/src/3rdparty/chromium/v8/src/codegen/compiler.cc +++ b/src/3rdparty/chromium/v8/src/codegen/compiler.cc @@ -543,11 +543,11 @@ void InstallUnoptimizedCode(UnoptimizedCompilationInfo* compilation_info, shared_info->set_is_asm_wasm_broken(true); } - shared_info->set_bytecode_array(*compilation_info->bytecode_array()); - Handle feedback_metadata = FeedbackMetadata::New( isolate, compilation_info->feedback_vector_spec()); shared_info->set_feedback_metadata(*feedback_metadata); + + shared_info->set_bytecode_array(*compilation_info->bytecode_array()); } else { DCHECK(compilation_info->has_asm_wasm_data()); // We should only have asm/wasm data when finalizing on the main thread. diff --git a/src/3rdparty/chromium/v8/src/codegen/mips64/register-mips64.h b/src/3rdparty/chromium/v8/src/codegen/mips64/register-mips64.h index d7b45eda38..05aba9fcbd 100644 --- a/src/3rdparty/chromium/v8/src/codegen/mips64/register-mips64.h +++ b/src/3rdparty/chromium/v8/src/codegen/mips64/register-mips64.h @@ -362,6 +362,12 @@ DEFINE_REGISTER_NAMES(FPURegister, DOUBLE_REGISTERS) DEFINE_REGISTER_NAMES(MSARegister, SIMD128_REGISTERS) // Give alias names to registers for calling conventions. + +constexpr Register arg_reg_1 = a0; +constexpr Register arg_reg_2 = a1; +constexpr Register arg_reg_3 = a2; +constexpr Register arg_reg_4 = a3; + constexpr Register kReturnRegister0 = v0; constexpr Register kReturnRegister1 = v1; constexpr Register kReturnRegister2 = a0; diff --git a/src/3rdparty/chromium/v8/src/codegen/ppc/register-ppc.h b/src/3rdparty/chromium/v8/src/codegen/ppc/register-ppc.h index eded9622c4..352b951920 100644 --- a/src/3rdparty/chromium/v8/src/codegen/ppc/register-ppc.h +++ b/src/3rdparty/chromium/v8/src/codegen/ppc/register-ppc.h @@ -209,6 +209,12 @@ constexpr Register kConstantPoolRegister = r28; // Constant pool. constexpr Register kRootRegister = r29; // Roots array pointer. constexpr Register cp = r30; // JavaScript context pointer. +// PPC64 calling convention +constexpr Register arg_reg_1 = r3; +constexpr Register arg_reg_2 = r4; +constexpr Register arg_reg_3 = r5; +constexpr Register arg_reg_4 = r6; + constexpr bool kPadArguments = false; constexpr bool kSimpleFPAliasing = true; constexpr bool kSimdMaskRegisters = false; diff --git a/src/3rdparty/chromium/v8/src/codegen/s390/register-s390.h b/src/3rdparty/chromium/v8/src/codegen/s390/register-s390.h index 009248a65c..6904802d01 100644 --- a/src/3rdparty/chromium/v8/src/codegen/s390/register-s390.h +++ b/src/3rdparty/chromium/v8/src/codegen/s390/register-s390.h @@ -167,6 +167,12 @@ constexpr Register no_reg = Register::no_reg(); constexpr Register kRootRegister = r10; // Roots array pointer. constexpr Register cp = r13; // JavaScript context pointer. +// s390x calling convention +constexpr Register arg_reg_1 = r2; +constexpr Register arg_reg_2 = r3; +constexpr Register arg_reg_3 = r4; +constexpr Register arg_reg_4 = r5; + constexpr bool kPadArguments = false; constexpr bool kSimpleFPAliasing = true; constexpr bool kSimdMaskRegisters = false; diff --git a/src/3rdparty/chromium/v8/src/compiler/js-native-context-specialization.cc b/src/3rdparty/chromium/v8/src/compiler/js-native-context-specialization.cc index 2a4524f386..01e3a404cb 100644 --- a/src/3rdparty/chromium/v8/src/compiler/js-native-context-specialization.cc +++ b/src/3rdparty/chromium/v8/src/compiler/js-native-context-specialization.cc @@ -3102,15 +3102,21 @@ JSNativeContextSpecialization::BuildElementAccess( // the (potential) backing store growth would normalize and thus // the elements kind of the {receiver} would change to slow mode. // - // For PACKED_*_ELEMENTS the {index} must be within the range + // For JSArray PACKED_*_ELEMENTS the {index} must be within the range // [0,length+1[ to be valid. In case {index} equals {length}, // the {receiver} will be extended, but kept packed. + // + // Non-JSArray PACKED_*_ELEMENTS always grow by adding holes because they + // lack the magical length property, which requires a map transition. + // So we can assume that this did not happen if we did not see this map. Node* limit = IsHoleyElementsKind(elements_kind) ? graph()->NewNode(simplified()->NumberAdd(), elements_length, jsgraph()->Constant(JSObject::kMaxGap)) - : graph()->NewNode(simplified()->NumberAdd(), length, - jsgraph()->OneConstant()); + : receiver_is_jsarray + ? graph()->NewNode(simplified()->NumberAdd(), length, + jsgraph()->OneConstant()) + : elements_length; index = effect = graph()->NewNode( simplified()->CheckBounds( FeedbackSource(), CheckBoundsFlag::kConvertStringAndMinusZero), diff --git a/src/3rdparty/chromium/v8/src/execution/isolate.cc b/src/3rdparty/chromium/v8/src/execution/isolate.cc index c1c3bd1b24..99b851ef96 100644 --- a/src/3rdparty/chromium/v8/src/execution/isolate.cc +++ b/src/3rdparty/chromium/v8/src/execution/isolate.cc @@ -944,7 +944,13 @@ void CaptureAsyncStackTrace(Isolate* isolate, Handle promise, builder->AppendPromiseCombinatorFrame(function, combinator, FrameArray::kIsPromiseAll, context); - // Now peak into the Promise.all() resolve element context to + if (context->IsNativeContext()) { + // NativeContext is used as a marker that the closure was already + // called. We can't access the reject element context any more. + return; + } + + // Now peek into the Promise.all() resolve element context to // find the promise capability that's being resolved when all // the concurrent promises resolve. int const index = @@ -963,7 +969,13 @@ void CaptureAsyncStackTrace(Isolate* isolate, Handle promise, builder->AppendPromiseCombinatorFrame(function, combinator, FrameArray::kIsPromiseAny, context); - // Now peak into the Promise.any() reject element context to + if (context->IsNativeContext()) { + // NativeContext is used as a marker that the closure was already + // called. We can't access the reject element context any more. + return; + } + + // Now peek into the Promise.any() reject element context to // find the promise capability that's being resolved when any of // the concurrent promises resolve. int const index = PromiseBuiltins::kPromiseAnyRejectElementCapabilitySlot; diff --git a/src/3rdparty/chromium/v8/src/regexp/arm/regexp-macro-assembler-arm.cc b/src/3rdparty/chromium/v8/src/regexp/arm/regexp-macro-assembler-arm.cc index 78b586e265..5580b24308 100644 --- a/src/3rdparty/chromium/v8/src/regexp/arm/regexp-macro-assembler-arm.cc +++ b/src/3rdparty/chromium/v8/src/regexp/arm/regexp-macro-assembler-arm.cc @@ -670,11 +670,13 @@ Handle RegExpMacroAssemblerARM::GetCode(Handle source) { __ mov(r0, Operand(stack_limit)); __ ldr(r0, MemOperand(r0)); __ sub(r0, sp, r0, SetCC); + Operand extra_space_for_variables(num_registers_ * kPointerSize); + // Handle it if the stack pointer is already below the stack limit. __ b(ls, &stack_limit_hit); // Check if there is room for the variable number of registers above // the stack limit. - __ cmp(r0, Operand(num_registers_ * kPointerSize)); + __ cmp(r0, extra_space_for_variables); __ b(hs, &stack_ok); // Exit with OutOfMemory exception. There is not enough space on the stack // for our working registers. @@ -682,7 +684,7 @@ Handle RegExpMacroAssemblerARM::GetCode(Handle source) { __ jmp(&return_r0); __ bind(&stack_limit_hit); - CallCheckStackGuardState(); + CallCheckStackGuardState(extra_space_for_variables); __ cmp(r0, Operand::Zero()); // If returned value is non-zero, we exit with the returned value as result. __ b(ne, &return_r0); @@ -1048,16 +1050,18 @@ void RegExpMacroAssemblerARM::WriteStackPointerToRegister(int reg) { // Private methods: -void RegExpMacroAssemblerARM::CallCheckStackGuardState() { +void RegExpMacroAssemblerARM::CallCheckStackGuardState(Operand extra_space) { DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins()); DCHECK(!masm_->options().isolate_independent_code); - __ PrepareCallCFunction(3); + __ PrepareCallCFunction(4); + // Extra space for variables to consider in stack check. + __ mov(arg_reg_4, extra_space); // RegExp code frame pointer. - __ mov(r2, frame_pointer()); + __ mov(arg_reg_3, frame_pointer()); // Code of self. - __ mov(r1, Operand(masm_->CodeObject())); + __ mov(arg_reg_2, Operand(masm_->CodeObject())); // We need to make room for the return address on the stack. int stack_alignment = base::OS::ActivationFrameAlignment(); @@ -1101,7 +1105,8 @@ static T* frame_entry_address(Address re_frame, int frame_offset) { int RegExpMacroAssemblerARM::CheckStackGuardState(Address* return_address, Address raw_code, - Address re_frame) { + Address re_frame, + uintptr_t extra_space) { Code re_code = Code::cast(Object(raw_code)); return NativeRegExpMacroAssembler::CheckStackGuardState( frame_entry(re_frame, kIsolate), @@ -1110,7 +1115,8 @@ int RegExpMacroAssemblerARM::CheckStackGuardState(Address* return_address, return_address, re_code, frame_entry_address
(re_frame, kInputString), frame_entry_address(re_frame, kInputStart), - frame_entry_address(re_frame, kInputEnd)); + frame_entry_address(re_frame, kInputEnd), + extra_space); } diff --git a/src/3rdparty/chromium/v8/src/regexp/arm/regexp-macro-assembler-arm.h b/src/3rdparty/chromium/v8/src/regexp/arm/regexp-macro-assembler-arm.h index 910e5c4607..114120755f 100644 --- a/src/3rdparty/chromium/v8/src/regexp/arm/regexp-macro-assembler-arm.h +++ b/src/3rdparty/chromium/v8/src/regexp/arm/regexp-macro-assembler-arm.h @@ -89,7 +89,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerARM // returning. // {raw_code} is an Address because this is called via ExternalReference. static int CheckStackGuardState(Address* return_address, Address raw_code, - Address re_frame); + Address re_frame, uintptr_t extra_space); private: // Offsets from frame_pointer() of function parameters and stored registers. @@ -134,7 +134,8 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerARM // Generate a call to CheckStackGuardState. - void CallCheckStackGuardState(); + void CallCheckStackGuardState( + Operand extra_space_for_variables = Operand::Zero()); // The ebp-relative location of a regexp register. MemOperand register_location(int register_index); diff --git a/src/3rdparty/chromium/v8/src/regexp/arm64/regexp-macro-assembler-arm64.cc b/src/3rdparty/chromium/v8/src/regexp/arm64/regexp-macro-assembler-arm64.cc index ac33f8631f..aaab0c5234 100644 --- a/src/3rdparty/chromium/v8/src/regexp/arm64/regexp-macro-assembler-arm64.cc +++ b/src/3rdparty/chromium/v8/src/regexp/arm64/regexp-macro-assembler-arm64.cc @@ -781,13 +781,14 @@ Handle RegExpMacroAssemblerARM64::GetCode(Handle source) { __ Mov(x10, stack_limit); __ Ldr(x10, MemOperand(x10)); __ Subs(x10, sp, x10); + Operand extra_space_for_variables(num_wreg_to_allocate * kWRegSize); // Handle it if the stack pointer is already below the stack limit. __ B(ls, &stack_limit_hit); // Check if there is room for the variable number of registers above // the stack limit. - __ Cmp(x10, num_wreg_to_allocate * kWRegSize); + __ Cmp(x10, extra_space_for_variables); __ B(hs, &stack_ok); // Exit with OutOfMemory exception. There is not enough space on the stack @@ -796,7 +797,7 @@ Handle RegExpMacroAssemblerARM64::GetCode(Handle source) { __ B(&return_w0); __ Bind(&stack_limit_hit); - CallCheckStackGuardState(x10); + CallCheckStackGuardState(x10, extra_space_for_variables); // If returned value is non-zero, we exit with the returned value as result. __ Cbnz(w0, &return_w0); @@ -1332,13 +1333,14 @@ static T* frame_entry_address(Address re_frame, int frame_offset) { int RegExpMacroAssemblerARM64::CheckStackGuardState( Address* return_address, Address raw_code, Address re_frame, - int start_index, const byte** input_start, const byte** input_end) { + int start_index, const byte** input_start, const byte** input_end, + uintptr_t extra_space) { Code re_code = Code::cast(Object(raw_code)); return NativeRegExpMacroAssembler::CheckStackGuardState( frame_entry(re_frame, kIsolate), start_index, static_cast(frame_entry(re_frame, kDirectCall)), return_address, re_code, frame_entry_address
(re_frame, kInput), - input_start, input_end); + input_start, input_end, extra_space); } @@ -1357,7 +1359,8 @@ void RegExpMacroAssemblerARM64::CheckPosition(int cp_offset, // Private methods: -void RegExpMacroAssemblerARM64::CallCheckStackGuardState(Register scratch) { +void RegExpMacroAssemblerARM64::CallCheckStackGuardState(Register scratch, + Operand extra_space) { DCHECK(!isolate()->IsGeneratingEmbeddedBuiltins()); DCHECK(!masm_->options().isolate_independent_code); @@ -1372,6 +1375,7 @@ void RegExpMacroAssemblerARM64::CallCheckStackGuardState(Register scratch) { __ Claim(xreg_to_claim); + __ Mov(x6, extra_space); // CheckStackGuardState needs the end and start addresses of the input string. __ Poke(input_end(), 2 * kSystemPointerSize); __ Add(x5, sp, 2 * kSystemPointerSize); diff --git a/src/3rdparty/chromium/v8/src/regexp/arm64/regexp-macro-assembler-arm64.h b/src/3rdparty/chromium/v8/src/regexp/arm64/regexp-macro-assembler-arm64.h index aeb49aa9ff..e4c4b0ac34 100644 --- a/src/3rdparty/chromium/v8/src/regexp/arm64/regexp-macro-assembler-arm64.h +++ b/src/3rdparty/chromium/v8/src/regexp/arm64/regexp-macro-assembler-arm64.h @@ -97,7 +97,8 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerARM64 static int CheckStackGuardState(Address* return_address, Address raw_code, Address re_frame, int start_offset, const byte** input_start, - const byte** input_end); + const byte** input_end, + uintptr_t extra_space); private: // Above the frame pointer - Stored registers and stack passed parameters. @@ -145,7 +146,8 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerARM64 void CheckStackLimit(); // Generate a call to CheckStackGuardState. - void CallCheckStackGuardState(Register scratch); + void CallCheckStackGuardState(Register scratch, + Operand extra_space = Operand(0)); // Location of a 32 bit position register. MemOperand register_location(int register_index); diff --git a/src/3rdparty/chromium/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc b/src/3rdparty/chromium/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc index 2135e977a7..d5fbd96067 100644 --- a/src/3rdparty/chromium/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc +++ b/src/3rdparty/chromium/v8/src/regexp/ia32/regexp-macro-assembler-ia32.cc @@ -700,11 +700,13 @@ Handle RegExpMacroAssemblerIA32::GetCode(Handle source) { ExternalReference::address_of_jslimit(isolate()); __ mov(ecx, esp); __ sub(ecx, StaticVariable(stack_limit)); + Immediate extra_space_for_variables(num_registers_ * kSystemPointerSize); + // Handle it if the stack pointer is already below the stack limit. __ j(below_equal, &stack_limit_hit); // Check if there is room for the variable number of registers above // the stack limit. - __ cmp(ecx, num_registers_ * kSystemPointerSize); + __ cmp(ecx, extra_space_for_variables); __ j(above_equal, &stack_ok); // Exit with OutOfMemory exception. There is not enough space on the stack // for our working registers. @@ -712,7 +714,7 @@ Handle RegExpMacroAssemblerIA32::GetCode(Handle source) { __ jmp(&return_eax); __ bind(&stack_limit_hit); - CallCheckStackGuardState(ebx); + CallCheckStackGuardState(ebx, extra_space_for_variables); __ or_(eax, eax); // If returned value is non-zero, we exit with the returned value as result. __ j(not_zero, &return_eax); @@ -1080,9 +1082,12 @@ void RegExpMacroAssemblerIA32::WriteStackPointerToRegister(int reg) { // Private methods: -void RegExpMacroAssemblerIA32::CallCheckStackGuardState(Register scratch) { - static const int num_arguments = 3; +void RegExpMacroAssemblerIA32::CallCheckStackGuardState(Register scratch, + Immediate extra_space) { + static const int num_arguments = 4; __ PrepareCallCFunction(num_arguments, scratch); + // Extra space for variables. + __ mov(Operand(esp, 3 * kSystemPointerSize), extra_space); // RegExp code frame pointer. __ mov(Operand(esp, 2 * kSystemPointerSize), ebp); // Code of self. @@ -1113,7 +1118,8 @@ static T* frame_entry_address(Address re_frame, int frame_offset) { int RegExpMacroAssemblerIA32::CheckStackGuardState(Address* return_address, Address raw_code, - Address re_frame) { + Address re_frame, + uintptr_t extra_space) { Code re_code = Code::cast(Object(raw_code)); return NativeRegExpMacroAssembler::CheckStackGuardState( frame_entry(re_frame, kIsolate), @@ -1122,7 +1128,8 @@ int RegExpMacroAssemblerIA32::CheckStackGuardState(Address* return_address, return_address, re_code, frame_entry_address
(re_frame, kInputString), frame_entry_address(re_frame, kInputStart), - frame_entry_address(re_frame, kInputEnd)); + frame_entry_address(re_frame, kInputEnd), + extra_space); } diff --git a/src/3rdparty/chromium/v8/src/regexp/ia32/regexp-macro-assembler-ia32.h b/src/3rdparty/chromium/v8/src/regexp/ia32/regexp-macro-assembler-ia32.h index a30bff29a1..620e7fb298 100644 --- a/src/3rdparty/chromium/v8/src/regexp/ia32/regexp-macro-assembler-ia32.h +++ b/src/3rdparty/chromium/v8/src/regexp/ia32/regexp-macro-assembler-ia32.h @@ -88,7 +88,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerIA32 // returning. // {raw_code} is an Address because this is called via ExternalReference. static int CheckStackGuardState(Address* return_address, Address raw_code, - Address re_frame); + Address re_frame, uintptr_t extra_space); private: Operand StaticVariable(const ExternalReference& ext); @@ -133,7 +133,8 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerIA32 void CheckStackLimit(); // Generate a call to CheckStackGuardState. - void CallCheckStackGuardState(Register scratch); + void CallCheckStackGuardState(Register scratch, + Immediate extra_space = Immediate(0)); // The ebp-relative location of a regexp register. Operand register_location(int register_index); diff --git a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.cc b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.cc index cf4346309e..009027c103 100644 --- a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.cc +++ b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.cc @@ -168,14 +168,15 @@ bool NativeRegExpMacroAssembler::CanReadUnaligned() { int NativeRegExpMacroAssembler::CheckStackGuardState( Isolate* isolate, int start_index, RegExp::CallOrigin call_origin, Address* return_address, Code re_code, Address* subject, - const byte** input_start, const byte** input_end) { + const byte** input_start, const byte** input_end, + uintptr_t gap) { DisallowHeapAllocation no_gc; Address old_pc = PointerAuthentication::AuthenticatePC(return_address, 0); DCHECK_LE(re_code.raw_instruction_start(), old_pc); DCHECK_LE(old_pc, re_code.raw_instruction_end()); StackLimitCheck check(isolate); - bool js_has_overflowed = check.JsHasOverflowed(); + bool js_has_overflowed = check.JsHasOverflowed(gap); if (call_origin == RegExp::CallOrigin::kFromJs) { // Direct calls from JavaScript can be interrupted in two ways: diff --git a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h index 52465610cb..da233d3c73 100644 --- a/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h +++ b/src/3rdparty/chromium/v8/src/regexp/regexp-macro-assembler.h @@ -261,7 +261,7 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler { RegExp::CallOrigin call_origin, Address* return_address, Code re_code, Address* subject, const byte** input_start, - const byte** input_end); + const byte** input_end, uintptr_t gap); // Byte map of one byte characters with a 0xff if the character is a word // character (digit, letter or underscore) and 0x00 otherwise. diff --git a/src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.cc b/src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.cc index da0397689f..6ae1114f24 100644 --- a/src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.cc +++ b/src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.cc @@ -736,11 +736,13 @@ Handle RegExpMacroAssemblerX64::GetCode(Handle source) { __ movq(rcx, rsp); __ Move(kScratchRegister, stack_limit); __ subq(rcx, Operand(kScratchRegister, 0)); + Immediate extra_space_for_variables(num_registers_ * kSystemPointerSize); + // Handle it if the stack pointer is already below the stack limit. __ j(below_equal, &stack_limit_hit); // Check if there is room for the variable number of registers above // the stack limit. - __ cmpq(rcx, Immediate(num_registers_ * kSystemPointerSize)); + __ cmpq(rcx, extra_space_for_variables); __ j(above_equal, &stack_ok); // Exit with OutOfMemory exception. There is not enough space on the stack // for our working registers. @@ -749,7 +751,8 @@ Handle RegExpMacroAssemblerX64::GetCode(Handle source) { __ bind(&stack_limit_hit); __ Move(code_object_pointer(), masm_.CodeObject()); - CallCheckStackGuardState(); // Preserves no registers beside rbp and rsp. + // CallCheckStackGuardState preserves no registers beside rbp and rsp. + CallCheckStackGuardState(extra_space_for_variables); __ testq(rax, rax); // If returned value is non-zero, we exit with the returned value as result. __ j(not_zero, &return_rax); @@ -1147,27 +1150,31 @@ void RegExpMacroAssemblerX64::WriteStackPointerToRegister(int reg) { // Private methods: -void RegExpMacroAssemblerX64::CallCheckStackGuardState() { +void RegExpMacroAssemblerX64::CallCheckStackGuardState(Immediate extra_space) { // This function call preserves no register values. Caller should // store anything volatile in a C call or overwritten by this function. - static const int num_arguments = 3; + static const int num_arguments = 4; __ PrepareCallCFunction(num_arguments); #ifdef V8_TARGET_OS_WIN - // Second argument: Code of self. (Do this before overwriting r8). - __ movq(rdx, code_object_pointer()); + // Fourth argument: Extra space for variables. + __ movq(arg_reg_4, extra_space); + // Second argument: Code of self. (Do this before overwriting r8 (arg_reg_3)). + __ movq(arg_reg_2, code_object_pointer()); // Third argument: RegExp code frame pointer. - __ movq(r8, rbp); + __ movq(arg_reg_3, rbp); // First argument: Next address on the stack (will be address of // return address). - __ leaq(rcx, Operand(rsp, -kSystemPointerSize)); + __ leaq(arg_reg_1, Operand(rsp, -kSystemPointerSize)); #else + // Fourth argument: Extra space for variables. + __ movq(arg_reg_4, extra_space); // Third argument: RegExp code frame pointer. - __ movq(rdx, rbp); + __ movq(arg_reg_3, rbp); // Second argument: Code of self. - __ movq(rsi, code_object_pointer()); + __ movq(arg_reg_2, code_object_pointer()); // First argument: Next address on the stack (will be address of // return address). - __ leaq(rdi, Operand(rsp, -kSystemPointerSize)); + __ leaq(arg_reg_1, Operand(rsp, -kSystemPointerSize)); #endif ExternalReference stack_check = ExternalReference::re_check_stack_guard_state(isolate()); @@ -1189,7 +1196,8 @@ static T* frame_entry_address(Address re_frame, int frame_offset) { int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address, Address raw_code, - Address re_frame) { + Address re_frame, + uintptr_t extra_space) { Code re_code = Code::cast(Object(raw_code)); return NativeRegExpMacroAssembler::CheckStackGuardState( frame_entry(re_frame, kIsolate), @@ -1198,7 +1206,8 @@ int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address, return_address, re_code, frame_entry_address
(re_frame, kInputString), frame_entry_address(re_frame, kInputStart), - frame_entry_address(re_frame, kInputEnd)); + frame_entry_address(re_frame, kInputEnd), + extra_space); } diff --git a/src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.h b/src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.h index ea4d45edba..6e5dcd18c2 100644 --- a/src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.h +++ b/src/3rdparty/chromium/v8/src/regexp/x64/regexp-macro-assembler-x64.h @@ -82,7 +82,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerX64 // returning. // {raw_code} is an Address because this is called via ExternalReference. static int CheckStackGuardState(Address* return_address, Address raw_code, - Address re_frame); + Address re_frame, uintptr_t extra_space); private: // Offsets from rbp of function parameters and stored registers. @@ -166,7 +166,7 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerX64 void CheckStackLimit(); // Generate a call to CheckStackGuardState. - void CallCheckStackGuardState(); + void CallCheckStackGuardState(Immediate extra_space = Immediate(0)); // The rbp-relative location of a regexp register. Operand register_location(int register_index); diff --git a/src/3rdparty/chromium/v8/src/runtime/runtime-object.cc b/src/3rdparty/chromium/v8/src/runtime/runtime-object.cc index bd5d23dce4..075bc0c665 100644 --- a/src/3rdparty/chromium/v8/src/runtime/runtime-object.cc +++ b/src/3rdparty/chromium/v8/src/runtime/runtime-object.cc @@ -92,170 +92,10 @@ MaybeHandle Runtime::HasProperty(Isolate* isolate, : ReadOnlyRoots(isolate).false_value_handle(); } -namespace { - -void GeneralizeAllTransitionsToFieldAsMutable(Isolate* isolate, Handle map, - Handle name) { - InternalIndex descriptor(map->NumberOfOwnDescriptors()); - - Handle target_maps[kPropertyAttributesCombinationsCount]; - int target_maps_count = 0; - - // Collect all outgoing field transitions. - { - DisallowHeapAllocation no_gc; - TransitionsAccessor transitions(isolate, *map, &no_gc); - transitions.ForEachTransitionTo( - *name, - [&](Map target) { - DCHECK_EQ(descriptor, target.LastAdded()); - DCHECK_EQ(*name, target.GetLastDescriptorName(isolate)); - PropertyDetails details = target.GetLastDescriptorDetails(isolate); - // Currently, we track constness only for fields. - if (details.kind() == kData && - details.constness() == PropertyConstness::kConst) { - target_maps[target_maps_count++] = handle(target, isolate); - } - DCHECK_IMPLIES(details.kind() == kAccessor, - details.constness() == PropertyConstness::kConst); - }, - &no_gc); - CHECK_LE(target_maps_count, kPropertyAttributesCombinationsCount); - } - - for (int i = 0; i < target_maps_count; i++) { - Handle target = target_maps[i]; - PropertyDetails details = - target->instance_descriptors(isolate) - .GetDetails(descriptor); - Handle field_type( - target->instance_descriptors(isolate) - .GetFieldType(descriptor), - isolate); - Map::GeneralizeField(isolate, target, descriptor, - PropertyConstness::kMutable, details.representation(), - field_type); - DCHECK_EQ(PropertyConstness::kMutable, - target->instance_descriptors(isolate) - .GetDetails(descriptor) - .constness()); - } -} - -bool DeleteObjectPropertyFast(Isolate* isolate, Handle receiver, - Handle raw_key) { - // This implements a special case for fast property deletion: when the - // last property in an object is deleted, then instead of normalizing - // the properties, we can undo the last map transition, with a few - // prerequisites: - // (1) The receiver must be a regular object and the key a unique name. - Handle receiver_map(receiver->map(), isolate); - if (receiver_map->IsSpecialReceiverMap()) return false; - DCHECK(receiver_map->IsJSObjectMap()); - - if (!raw_key->IsUniqueName()) return false; - Handle key = Handle::cast(raw_key); - // (2) The property to be deleted must be the last property. - int nof = receiver_map->NumberOfOwnDescriptors(); - if (nof == 0) return false; - InternalIndex descriptor(nof - 1); - Handle descriptors(receiver_map->instance_descriptors(), - isolate); - if (descriptors->GetKey(descriptor) != *key) return false; - // (3) The property to be deleted must be deletable. - PropertyDetails details = descriptors->GetDetails(descriptor); - if (!details.IsConfigurable()) return false; - // (4) The map must have a back pointer. - Handle backpointer(receiver_map->GetBackPointer(), isolate); - if (!backpointer->IsMap()) return false; - Handle parent_map = Handle::cast(backpointer); - // (5) The last transition must have been caused by adding a property - // (and not any kind of special transition). - if (parent_map->NumberOfOwnDescriptors() != nof - 1) return false; - - // Preconditions successful. No more bailouts after this point. - - // Zap the property to avoid keeping objects alive. Zapping is not necessary - // for properties stored in the descriptor array. - if (details.location() == kField) { - DisallowHeapAllocation no_allocation; - - // Invalidate slots manually later in case we delete an in-object tagged - // property. In this case we might later store an untagged value in the - // recorded slot. - isolate->heap()->NotifyObjectLayoutChange(*receiver, no_allocation, - InvalidateRecordedSlots::kNo); - FieldIndex index = - FieldIndex::ForPropertyIndex(*receiver_map, details.field_index()); - // Special case deleting the last out-of object property. - if (!index.is_inobject() && index.outobject_array_index() == 0) { - DCHECK(!parent_map->HasOutOfObjectProperties()); - // Clear out the properties backing store. - receiver->SetProperties(ReadOnlyRoots(isolate).empty_fixed_array()); - } else { - Object filler = ReadOnlyRoots(isolate).one_pointer_filler_map(); - JSObject::cast(*receiver).RawFastPropertyAtPut(index, filler); - // We must clear any recorded slot for the deleted property, because - // subsequent object modifications might put a raw double there. - // Slot clearing is the reason why this entire function cannot currently - // be implemented in the DeleteProperty stub. - if (index.is_inobject() && !receiver_map->IsUnboxedDoubleField(index)) { - // We need to clear the recorded slot in this case because in-object - // slack tracking might not be finished. This ensures that we don't - // have recorded slots in free space. - isolate->heap()->ClearRecordedSlot(*receiver, - receiver->RawField(index.offset())); - MemoryChunk* chunk = MemoryChunk::FromHeapObject(*receiver); - chunk->InvalidateRecordedSlots(*receiver); - } - } - } - // If the {receiver_map} was marked stable before, then there could be - // optimized code that depends on the assumption that no object that - // reached this {receiver_map} transitions away from it without triggering - // the "deoptimize dependent code" mechanism. - receiver_map->NotifyLeafMapLayoutChange(isolate); - // Finally, perform the map rollback. - receiver->synchronized_set_map(*parent_map); -#if VERIFY_HEAP - receiver->HeapObjectVerify(isolate); - receiver->property_array().PropertyArrayVerify(isolate); -#endif - - // If the {descriptor} was "const" so far, we need to update the - // {receiver_map} here, otherwise we could get the constants wrong, i.e. - // - // o.x = 1; - // [change o.x's attributes or reconfigure property kind] - // delete o.x; - // o.x = 2; - // - // could trick V8 into thinking that `o.x` is still 1 even after the second - // assignment. - - // Step 1: Migrate object to an up-to-date shape. - if (parent_map->is_deprecated()) { - JSObject::MigrateInstance(isolate, Handle::cast(receiver)); - parent_map = handle(receiver->map(), isolate); - } - - // Step 2: Mark outgoing transitions from the up-to-date version of the - // parent_map to same property name of any kind or attributes as mutable. - // Also migrate object to the up-to-date map to make the object shapes - // converge sooner. - GeneralizeAllTransitionsToFieldAsMutable(isolate, parent_map, key); - - return true; -} - -} // namespace - Maybe Runtime::DeleteObjectProperty(Isolate* isolate, Handle receiver, Handle key, LanguageMode language_mode) { - if (DeleteObjectPropertyFast(isolate, receiver, key)) return Just(true); - bool success = false; LookupIterator::Key lookup_key(isolate, key, &success); if (!success) return Nothing(); diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri index e7f869a15f..a9df3d2432 100644 --- a/src/buildtools/config/support.pri +++ b/src/buildtools/config/support.pri @@ -21,7 +21,7 @@ defineReplace(qtwebengine_checkWebEngineCoreError) { !qtwebengine_checkForGperf(QtWebEngine):return(false) !qtwebengine_checkForBison(QtWebEngine):return(false) !qtwebengine_checkForFlex(QtWebEngine):return(false) - !qtwebengine_checkForPython2(QtWebEngine):return(false) + !qtwebengine_checkForPython(QtWebEngine):return(false) !qtwebengine_checkForNodejs(QtWebEngine):return(false) !qtwebengine_checkForSanitizer(QtWebEngine):return(false) linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false) @@ -51,7 +51,7 @@ defineReplace(qtwebengine_checkPdfError) { !qtwebengine_checkForGperf(QtPdf):return(false) !qtwebengine_checkForBison(QtPdf):return(false) !qtwebengine_checkForFlex(QtPdf):return(false) - !qtwebengine_checkForPython2(QtPdf):return(false) + !qtwebengine_checkForPython(QtPdf):return(false) !qtwebengine_checkForSanitizer(QtPdf):return(false) linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false) linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false) @@ -143,10 +143,10 @@ defineTest(qtwebengine_checkForFlex) { return(true) } -defineTest(qtwebengine_checkForPython2) { +defineTest(qtwebengine_checkForPython) { module = $$1 - !qtConfig(webengine-python2) { - qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build $${module}.") + !qtConfig(webengine-python) { + qtwebengine_skipBuild("Python version 2 (2.7.5 or later) or Python version 3 (3.6 or later) is required to build $${module}.") return(false) } return(true) diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json index 88d1790c17..5e5d9d725e 100644 --- a/src/buildtools/configure.json +++ b/src/buildtools/configure.json @@ -10,7 +10,8 @@ "options": { "build-qtwebengine-core": "boolean", "build-qtpdf": "boolean", - "webengine-jumbo-build": { "type": "optionalString", "name": "merge_limit"} + "webengine-jumbo-build": { "type": "optionalString", "name": "merge_limit"}, + "webengine-python-version": { "type": "optionalString", "name": "python_override", "values": ["python2", "python3"] } } }, "libraries": { @@ -212,6 +213,27 @@ { "type": "pkgConfig", "args": "libavcodec libavformat libavutil" } ] }, + "webengine-ffmpeg-support": { + "label": "compatible ffmpeg", + "type": "compile", + "test": { + "head": [ + "#include ", + "extern \"C\" {", + "#include ", + "}" + ], + "main": [ + "#if LIBAVFORMAT_VERSION_MAJOR >= 59", + "AVStream stream;", + "auto first_dts = av_stream_get_first_dts(&stream);", + "#endif" + ] + }, + "sources": [ + { "type": "pkgConfig", "args": "libavformat" } + ] + }, "webengine-opus": { "label": "opus", "sources": [ @@ -295,7 +317,7 @@ "label": "system ninja", "type": "detectNinja" }, - "webengine-python2": { + "webengine-python": { "label": "python2", "type": "detectPython2", "log": "location" @@ -374,7 +396,7 @@ && features.webengine-gperf && features.webengine-bison && features.webengine-flex - && features.webengine-python2 + && features.webengine-python && features.webengine-nodejs && (!config.sanitizer || features.webengine-sanitizer) && (!config.linux || features.pkg-config) @@ -400,7 +422,7 @@ && features.webengine-gperf && features.webengine-bison && features.webengine-flex - && features.webengine-python2 + && features.webengine-python && (!config.sanitizer || features.webengine-sanitizer) && (!config.linux || features.pkg-config) && (!config.linux || features.webengine-host-pkg-config) @@ -423,12 +445,12 @@ "autoDetect": "features.private_tests", "output": [ "privateFeature" ] }, - "webengine-python2": { + "webengine-python": { "label": "python2", - "condition": "tests.webengine-python2", + "condition": "tests.webengine-python", "output": [ "privateFeature", - { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } + { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python.location" } ] }, "webengine-gperf": { @@ -758,6 +780,11 @@ "type": "warning", "condition": "config.ios && config.simulator && config.device && features.build-qtpdf", "message": "Building fat libray with device and simulator architectures will disable NEON." + }, + { + "type": "fatal", + "condition": "features.webengine-system-ffmpeg && !libs.webengine-ffmpeg-support", + "message": "Unmodified ffmpeg >= 5.0 is not supported. Please configure with -qt-webengine-ffmpeg." } ], "summary": [ diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 0a444a277e..e15bd05f39 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -763,6 +763,15 @@ static void LaunchURL(const GURL& url, protocolHandlerRegistry->IsHandledProtocol(url.scheme())) return; +#if BUILDFLAG(ENABLE_EXTENSIONS) + if (guest_view::GuestViewBase::IsGuest(webContents)) { + // Use parent / top level contents delegate for launching URLs from guest views. + webContents = guest_view::GuestViewBase::GetTopLevelWebContents(webContents); + if (!webContents) + return; + } +#endif //BUILDFLAG(ENABLE_EXTENSIONS) + WebContentsDelegateQt *contentsDelegate = static_cast(webContents->GetDelegate()); contentsDelegate->launchExternalURL(toQt(url), page_transition, is_main_frame, has_user_gesture); } diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc index 6b450b98c5..9f75beb850 100644 --- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc +++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc @@ -126,6 +126,10 @@ \note \QWE cannot be built for the 32-bit mode of \macos (using the \c macx-clang-32 \c mkspec). + \note Universal debug or debug-and-release builds of \QWE on \macos are not supported in Qt 5 + due to memory constraints of the build toolchain. Use the configure options \c -force-debug-info + and \c -separate-debug-info for a build that can be used with a debugger. + \section1 Using Earlier Qt Versions to Build \QWE Building \QWE with earlier Qt versions (down to the last LTS