Date: Tuesday, April 12, 2022 @ 03:45:45 Author: foutrelis Revision: 442307
archrelease: copy trunk to extra-x86_64 Added: chromium/repos/extra-x86_64/PKGBUILD (from rev 442306, chromium/trunk/PKGBUILD) chromium/repos/extra-x86_64/enable-GlobalMediaControlsCastStartStop.patch (from rev 442306, chromium/trunk/enable-GlobalMediaControlsCastStartStop.patch) chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch (from rev 442306, chromium/trunk/sql-make-VirtualCursor-standard-layout-type.patch) chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch (from rev 442306, chromium/trunk/use-oauth2-client-switches-as-default.patch) chromium/repos/extra-x86_64/webcodecs-stop-using-AudioOpusEncoder.patch (from rev 442306, chromium/trunk/webcodecs-stop-using-AudioOpusEncoder.patch) chromium/repos/extra-x86_64/webrtc-check-existence-of-cursor-metadata.patch (from rev 442306, chromium/trunk/webrtc-check-existence-of-cursor-metadata.patch) Deleted: chromium/repos/extra-x86_64/PKGBUILD chromium/repos/extra-x86_64/enable-GlobalMediaControlsCastStartStop.patch chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch chromium/repos/extra-x86_64/webcodecs-stop-using-AudioOpusEncoder.patch chromium/repos/extra-x86_64/webrtc-check-existence-of-cursor-metadata.patch ---------------------------------------------------+ PKGBUILD | 534 ++++++++++---------- enable-GlobalMediaControlsCastStartStop.patch | 64 +- sql-make-VirtualCursor-standard-layout-type.patch | 476 ++++++++--------- use-oauth2-client-switches-as-default.patch | 34 - webcodecs-stop-using-AudioOpusEncoder.patch | 98 +-- webrtc-check-existence-of-cursor-metadata.patch | 62 +- 6 files changed, 634 insertions(+), 634 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2022-04-12 03:45:36 UTC (rev 442306) +++ PKGBUILD 2022-04-12 03:45:45 UTC (rev 442307) @@ -1,267 +0,0 @@ -# Maintainer: Evangelos Foutras <evange...@foutrelis.com> -# Contributor: Pierre Schmitz <pie...@archlinux.de> -# Contributor: Jan "heftig" Steffens <jan.steff...@gmail.com> -# Contributor: Daniel J Griffiths <ghost1...@archlinux.us> - -pkgname=chromium -pkgver=100.0.4896.75 -pkgrel=2 -_launcher_ver=8 -_gcc_patchset=4 -pkgdesc="A web browser built for speed, simplicity, and security" -arch=('x86_64') -url="https://www.chromium.org/Home" -license=('BSD') -depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt' - 'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva' - 'desktop-file-utils' 'hicolor-icon-theme') -makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire' - 'java-runtime-headless') -optdepends=('pipewire: WebRTC desktop sharing under Wayland' - 'kdialog: support for native dialogs in Plasma' - 'org.freedesktop.secrets: password storage backend on GNOME / Xfce' - 'kwallet: support for storing passwords in KWallet on Plasma') -options=('debug' '!lto') # Chromium adds its own flags for ThinLTO -source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz - https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz - https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz - webcodecs-stop-using-AudioOpusEncoder.patch - webrtc-check-existence-of-cursor-metadata.patch - enable-GlobalMediaControlsCastStartStop.patch - sql-make-VirtualCursor-standard-layout-type.patch - use-oauth2-client-switches-as-default.patch) -sha256sums=('244ed352dfaa1ab6b1f0877c4884fd17aa7d7133fa52f129a9fb01325ea0c0c0' - '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a' - 'a6120e7d4eb5e131b87b6ab3b922e0c6cd78e15501e54cfb2019875173688d80' - '064daaa2b9d95b96ec04d8ddebf4af441f92263d123365b58fe73966866080af' - '88b2c8d9c6c1917f6632453f18aad7a3fd94d605eecb6c77ae2394ac5856ba95' - '779fb13f2494209d3a7f1f23a823e59b9dded601866d3ab095937a1a04e19ac6' - 'b94b2e88f63cfb7087486508b8139599c89f96d7a4181c61fec4b4e250ca327a' - 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711') - -# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py -# Keys are the names in the above script; values are the dependencies in Arch -declare -gA _system_libs=( - [ffmpeg]=ffmpeg - [flac]=flac - [fontconfig]=fontconfig - [freetype]=freetype2 - [harfbuzz-ng]=harfbuzz - [icu]=icu - [libdrm]= - [libjpeg]=libjpeg - [libpng]=libpng - #[libvpx]=libvpx - [libwebp]=libwebp - [libxml]=libxml2 - [libxslt]=libxslt - [opus]=opus - [re2]=re2 - [snappy]=snappy - [zlib]=minizip -) -_unwanted_bundled_libs=( - $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/') -) -depends+=(${_system_libs[@]}) - -# Google API keys (see https://www.chromium.org/developers/how-tos/api-keys) -# Note: These are for Arch Linux use ONLY. For your own distribution, please -# get your own set of keys. -# -# Starting with Chromium 89 (2021-03-02) the OAuth2 credentials have been left -# out: https://archlinux.org/news/chromium-losing-sync-support-in-early-march/ -_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM - -prepare() { - cd "$srcdir/$pkgname-$pkgver" - - # Allow building against system libraries in official builds - sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ - tools/generate_shim_headers/generate_shim_headers.py - - # https://crbug.com/893950 - sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \ - third_party/blink/renderer/core/xml/*.cc \ - third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \ - third_party/libxml/chromium/*.cc \ - third_party/maldoca/src/maldoca/ole/oss_utils.h - - # Use the --oauth2-client-id= and --oauth2-client-secret= switches for - # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at - # runtime -- this allows signing into Chromium without baked-in values - patch -Np1 -i ../use-oauth2-client-switches-as-default.patch - - # Upstream fixes - patch -Np1 -i ../webcodecs-stop-using-AudioOpusEncoder.patch - patch -Np1 -d third_party/webrtc <../webrtc-check-existence-of-cursor-metadata.patch - - # Revert kGlobalMediaControlsCastStartStop enabled by default - # https://crbug.com/1314342 - patch -Rp1 -F3 -i ../enable-GlobalMediaControlsCastStartStop.patch - - # https://chromium-review.googlesource.com/c/chromium/src/+/2862724 - patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch - - # Fixes for building with libstdc++ instead of libc++ - #patch -Np1 -i ../patches/ - - # Link to system tools required by the build - mkdir -p third_party/node/linux/node-linux-x64/bin - ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ - ln -s /usr/bin/java third_party/jdk/current/bin/ - - # Remove bundled libraries for which we will use the system copies; this - # *should* do what the remove_bundled_libraries.py script does, with the - # added benefit of not having to list all the remaining libraries - local _lib - for _lib in ${_unwanted_bundled_libs[@]}; do - find "third_party/$_lib" -type f \ - \! -path "third_party/$_lib/chromium/*" \ - \! -path "third_party/$_lib/google/*" \ - \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \ - \! -regex '.*\.\(gn\|gni\|isolate\)' \ - -delete - done - - ./build/linux/unbundle/replace_gn_files.py \ - --system-libraries "${!_system_libs[@]}" -} - -build() { - make -C chromium-launcher-$_launcher_ver - - cd "$srcdir/$pkgname-$pkgver" - - export CC=clang - export CXX=clang++ - export AR=ar - export NM=nm - - local _flags=( - 'custom_toolchain="//build/toolchain/linux/unbundle:default"' - 'host_toolchain="//build/toolchain/linux/unbundle:default"' - 'clang_use_chrome_plugins=false' - 'is_official_build=true' # implies is_cfi=true on x86_64 - 'symbol_level=0' # sufficient for backtraces on x86(_64) - 'treat_warnings_as_errors=false' - 'disable_fieldtrial_testing_config=true' - 'blink_enable_generated_code_formatting=false' - 'ffmpeg_branding="Chrome"' - 'proprietary_codecs=true' - 'rtc_use_pipewire=true' - 'link_pulseaudio=true' - 'use_gnome_keyring=false' - 'use_sysroot=false' - 'use_custom_libcxx=false' - 'enable_hangout_services_extension=true' - 'enable_widevine=true' - 'enable_nacl=false' - "google_api_key=\"$_google_api_key\"" - ) - - if [[ -n ${_system_libs[icu]+set} ]]; then - _flags+=('icu_use_data_file=false') - fi - - # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn) - CFLAGS+=' -Wno-builtin-macro-redefined' - CXXFLAGS+=' -Wno-builtin-macro-redefined' - CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__=' - - # Do not warn about unknown warning options - CFLAGS+=' -Wno-unknown-warning-option' - CXXFLAGS+=' -Wno-unknown-warning-option' - - # Let Chromium set its own symbol level - CFLAGS=${CFLAGS/-g } - CXXFLAGS=${CXXFLAGS/-g } - - # https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues/123 - CFLAGS=${CFLAGS/-fexceptions} - CFLAGS=${CFLAGS/-fcf-protection} - CXXFLAGS=${CXXFLAGS/-fexceptions} - CXXFLAGS=${CXXFLAGS/-fcf-protection} - - # This appears to cause random segfaults when combined with ThinLTO - # https://bugs.archlinux.org/task/73518 - CFLAGS=${CFLAGS/-fstack-clash-protection} - CXXFLAGS=${CXXFLAGS/-fstack-clash-protection} - - # https://crbug.com/957519#c122 - CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS} - - gn gen out/Release --args="${_flags[*]}" - ninja -C out/Release chrome chrome_sandbox chromedriver.unstripped -} - -package() { - cd chromium-launcher-$_launcher_ver - make PREFIX=/usr DESTDIR="$pkgdir" install - install -Dm644 LICENSE \ - "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher" - - cd "$srcdir/$pkgname-$pkgver" - - install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium" - install -D out/Release/chromedriver.unstripped "$pkgdir/usr/bin/chromedriver" - install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox" - - install -Dm644 chrome/installer/linux/common/desktop.template \ - "$pkgdir/usr/share/applications/chromium.desktop" - install -Dm644 chrome/app/resources/manpage.1.in \ - "$pkgdir/usr/share/man/man1/chromium.1" - sed -i \ - -e 's/@@MENUNAME@@/Chromium/g' \ - -e 's/@@PACKAGE@@/chromium/g' \ - -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \ - "$pkgdir/usr/share/applications/chromium.desktop" \ - "$pkgdir/usr/share/man/man1/chromium.1" - - install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \ - "$pkgdir/usr/share/metainfo/chromium.appdata.xml" - sed -ni \ - -e 's/chromium-browser\.desktop/chromium.desktop/' \ - -e '/<update_contact>/d' \ - -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \ - -e '/^<?xml/,$p' \ - "$pkgdir/usr/share/metainfo/chromium.appdata.xml" - - local toplevel_files=( - chrome_100_percent.pak - chrome_200_percent.pak - chrome_crashpad_handler - resources.pak - v8_context_snapshot.bin - - # ANGLE - libEGL.so - libGLESv2.so - - # SwiftShader ICD - libvk_swiftshader.so - vk_swiftshader_icd.json - ) - - if [[ -z ${_system_libs[icu]+set} ]]; then - toplevel_files+=(icudtl.dat) - fi - - cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/" - install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak - install -Dm755 -t "$pkgdir/usr/lib/chromium/swiftshader" out/Release/swiftshader/*.so - - for size in 24 48 64 128 256; do - install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \ - "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png" - done - - for size in 16 32; do - install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \ - "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png" - done - - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE" -} - -# vim:set ts=2 sw=2 et: Copied: chromium/repos/extra-x86_64/PKGBUILD (from rev 442306, chromium/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2022-04-12 03:45:45 UTC (rev 442307) @@ -0,0 +1,267 @@ +# Maintainer: Evangelos Foutras <evange...@foutrelis.com> +# Contributor: Pierre Schmitz <pie...@archlinux.de> +# Contributor: Jan "heftig" Steffens <jan.steff...@gmail.com> +# Contributor: Daniel J Griffiths <ghost1...@archlinux.us> + +pkgname=chromium +pkgver=100.0.4896.88 +pkgrel=1 +_launcher_ver=8 +_gcc_patchset=4 +pkgdesc="A web browser built for speed, simplicity, and security" +arch=('x86_64') +url="https://www.chromium.org/Home" +license=('BSD') +depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt' + 'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva' + 'desktop-file-utils' 'hicolor-icon-theme') +makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire' + 'java-runtime-headless') +optdepends=('pipewire: WebRTC desktop sharing under Wayland' + 'kdialog: support for native dialogs in Plasma' + 'org.freedesktop.secrets: password storage backend on GNOME / Xfce' + 'kwallet: support for storing passwords in KWallet on Plasma') +options=('debug' '!lto') # Chromium adds its own flags for ThinLTO +source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz + https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz + https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz + webcodecs-stop-using-AudioOpusEncoder.patch + webrtc-check-existence-of-cursor-metadata.patch + enable-GlobalMediaControlsCastStartStop.patch + sql-make-VirtualCursor-standard-layout-type.patch + use-oauth2-client-switches-as-default.patch) +sha256sums=('c5a5708678f30679a1181f89401c966cb335799926a5e4dc7f52e7194847c250' + '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a' + 'a6120e7d4eb5e131b87b6ab3b922e0c6cd78e15501e54cfb2019875173688d80' + '064daaa2b9d95b96ec04d8ddebf4af441f92263d123365b58fe73966866080af' + '88b2c8d9c6c1917f6632453f18aad7a3fd94d605eecb6c77ae2394ac5856ba95' + '779fb13f2494209d3a7f1f23a823e59b9dded601866d3ab095937a1a04e19ac6' + 'b94b2e88f63cfb7087486508b8139599c89f96d7a4181c61fec4b4e250ca327a' + 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711') + +# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py +# Keys are the names in the above script; values are the dependencies in Arch +declare -gA _system_libs=( + [ffmpeg]=ffmpeg + [flac]=flac + [fontconfig]=fontconfig + [freetype]=freetype2 + [harfbuzz-ng]=harfbuzz + [icu]=icu + [libdrm]= + [libjpeg]=libjpeg + [libpng]=libpng + #[libvpx]=libvpx + [libwebp]=libwebp + [libxml]=libxml2 + [libxslt]=libxslt + [opus]=opus + [re2]=re2 + [snappy]=snappy + [zlib]=minizip +) +_unwanted_bundled_libs=( + $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/') +) +depends+=(${_system_libs[@]}) + +# Google API keys (see https://www.chromium.org/developers/how-tos/api-keys) +# Note: These are for Arch Linux use ONLY. For your own distribution, please +# get your own set of keys. +# +# Starting with Chromium 89 (2021-03-02) the OAuth2 credentials have been left +# out: https://archlinux.org/news/chromium-losing-sync-support-in-early-march/ +_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + + # Allow building against system libraries in official builds + sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ + tools/generate_shim_headers/generate_shim_headers.py + + # https://crbug.com/893950 + sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \ + third_party/blink/renderer/core/xml/*.cc \ + third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \ + third_party/libxml/chromium/*.cc \ + third_party/maldoca/src/maldoca/ole/oss_utils.h + + # Use the --oauth2-client-id= and --oauth2-client-secret= switches for + # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at + # runtime -- this allows signing into Chromium without baked-in values + patch -Np1 -i ../use-oauth2-client-switches-as-default.patch + + # Upstream fixes + patch -Np1 -i ../webcodecs-stop-using-AudioOpusEncoder.patch + patch -Np1 -d third_party/webrtc <../webrtc-check-existence-of-cursor-metadata.patch + + # Revert kGlobalMediaControlsCastStartStop enabled by default + # https://crbug.com/1314342 + patch -Rp1 -F3 -i ../enable-GlobalMediaControlsCastStartStop.patch + + # https://chromium-review.googlesource.com/c/chromium/src/+/2862724 + patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch + + # Fixes for building with libstdc++ instead of libc++ + #patch -Np1 -i ../patches/ + + # Link to system tools required by the build + mkdir -p third_party/node/linux/node-linux-x64/bin + ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ + ln -s /usr/bin/java third_party/jdk/current/bin/ + + # Remove bundled libraries for which we will use the system copies; this + # *should* do what the remove_bundled_libraries.py script does, with the + # added benefit of not having to list all the remaining libraries + local _lib + for _lib in ${_unwanted_bundled_libs[@]}; do + find "third_party/$_lib" -type f \ + \! -path "third_party/$_lib/chromium/*" \ + \! -path "third_party/$_lib/google/*" \ + \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \ + \! -regex '.*\.\(gn\|gni\|isolate\)' \ + -delete + done + + ./build/linux/unbundle/replace_gn_files.py \ + --system-libraries "${!_system_libs[@]}" +} + +build() { + make -C chromium-launcher-$_launcher_ver + + cd "$srcdir/$pkgname-$pkgver" + + export CC=clang + export CXX=clang++ + export AR=ar + export NM=nm + + local _flags=( + 'custom_toolchain="//build/toolchain/linux/unbundle:default"' + 'host_toolchain="//build/toolchain/linux/unbundle:default"' + 'clang_use_chrome_plugins=false' + 'is_official_build=true' # implies is_cfi=true on x86_64 + 'symbol_level=0' # sufficient for backtraces on x86(_64) + 'treat_warnings_as_errors=false' + 'disable_fieldtrial_testing_config=true' + 'blink_enable_generated_code_formatting=false' + 'ffmpeg_branding="Chrome"' + 'proprietary_codecs=true' + 'rtc_use_pipewire=true' + 'link_pulseaudio=true' + 'use_gnome_keyring=false' + 'use_sysroot=false' + 'use_custom_libcxx=false' + 'enable_hangout_services_extension=true' + 'enable_widevine=true' + 'enable_nacl=false' + "google_api_key=\"$_google_api_key\"" + ) + + if [[ -n ${_system_libs[icu]+set} ]]; then + _flags+=('icu_use_data_file=false') + fi + + # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn) + CFLAGS+=' -Wno-builtin-macro-redefined' + CXXFLAGS+=' -Wno-builtin-macro-redefined' + CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__=' + + # Do not warn about unknown warning options + CFLAGS+=' -Wno-unknown-warning-option' + CXXFLAGS+=' -Wno-unknown-warning-option' + + # Let Chromium set its own symbol level + CFLAGS=${CFLAGS/-g } + CXXFLAGS=${CXXFLAGS/-g } + + # https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues/123 + CFLAGS=${CFLAGS/-fexceptions} + CFLAGS=${CFLAGS/-fcf-protection} + CXXFLAGS=${CXXFLAGS/-fexceptions} + CXXFLAGS=${CXXFLAGS/-fcf-protection} + + # This appears to cause random segfaults when combined with ThinLTO + # https://bugs.archlinux.org/task/73518 + CFLAGS=${CFLAGS/-fstack-clash-protection} + CXXFLAGS=${CXXFLAGS/-fstack-clash-protection} + + # https://crbug.com/957519#c122 + CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS} + + gn gen out/Release --args="${_flags[*]}" + ninja -C out/Release chrome chrome_sandbox chromedriver.unstripped +} + +package() { + cd chromium-launcher-$_launcher_ver + make PREFIX=/usr DESTDIR="$pkgdir" install + install -Dm644 LICENSE \ + "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher" + + cd "$srcdir/$pkgname-$pkgver" + + install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium" + install -D out/Release/chromedriver.unstripped "$pkgdir/usr/bin/chromedriver" + install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox" + + install -Dm644 chrome/installer/linux/common/desktop.template \ + "$pkgdir/usr/share/applications/chromium.desktop" + install -Dm644 chrome/app/resources/manpage.1.in \ + "$pkgdir/usr/share/man/man1/chromium.1" + sed -i \ + -e 's/@@MENUNAME@@/Chromium/g' \ + -e 's/@@PACKAGE@@/chromium/g' \ + -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \ + "$pkgdir/usr/share/applications/chromium.desktop" \ + "$pkgdir/usr/share/man/man1/chromium.1" + + install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \ + "$pkgdir/usr/share/metainfo/chromium.appdata.xml" + sed -ni \ + -e 's/chromium-browser\.desktop/chromium.desktop/' \ + -e '/<update_contact>/d' \ + -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \ + -e '/^<?xml/,$p' \ + "$pkgdir/usr/share/metainfo/chromium.appdata.xml" + + local toplevel_files=( + chrome_100_percent.pak + chrome_200_percent.pak + chrome_crashpad_handler + resources.pak + v8_context_snapshot.bin + + # ANGLE + libEGL.so + libGLESv2.so + + # SwiftShader ICD + libvk_swiftshader.so + vk_swiftshader_icd.json + ) + + if [[ -z ${_system_libs[icu]+set} ]]; then + toplevel_files+=(icudtl.dat) + fi + + cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/" + install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak + install -Dm755 -t "$pkgdir/usr/lib/chromium/swiftshader" out/Release/swiftshader/*.so + + for size in 24 48 64 128 256; do + install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \ + "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png" + done + + for size in 16 32; do + install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \ + "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png" + done + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE" +} + +# vim:set ts=2 sw=2 et: Deleted: enable-GlobalMediaControlsCastStartStop.patch =================================================================== --- enable-GlobalMediaControlsCastStartStop.patch 2022-04-12 03:45:36 UTC (rev 442306) +++ enable-GlobalMediaControlsCastStartStop.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -1,32 +0,0 @@ -From b58f0f2725a8c1a8a131f9984b5fd53b54119dba Mon Sep 17 00:00:00 2001 -From: Muyao Xu <muya...@google.com> -Date: Thu, 20 Jan 2022 23:46:21 +0000 -Subject: [PATCH] [Zenith] Enable GlobalMediaControlsCastStartStop flag by - default - -The feature is rolled out to 100% stable through finch for M96+. -This CL enables it by default and fixes some unit tests failures. - -Bug: 1287242, 1287305 -Change-Id: I7e5c9625b77379fef253c41ef292a0dd6fc366fb -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3388416 -Reviewed-by: Takumi Fujimoto <taku...@chromium.org> -Commit-Queue: Muyao Xu <muya...@google.com> -Cr-Commit-Position: refs/heads/main@{#961658} ---- - chrome/browser/media/router/media_router_feature.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc -index f28f9b0b802..a8d544f7d6d 100644 ---- a/chrome/browser/media/router/media_router_feature.cc -+++ b/chrome/browser/media/router/media_router_feature.cc -@@ -33,7 +33,7 @@ const base::Feature kMediaRouter{"MediaRouter", - const base::Feature kCastAllowAllIPsFeature{"CastAllowAllIPs", - base::FEATURE_DISABLED_BY_DEFAULT}; - const base::Feature kGlobalMediaControlsCastStartStop{ -- "GlobalMediaControlsCastStartStop", base::FEATURE_DISABLED_BY_DEFAULT}; -+ "GlobalMediaControlsCastStartStop", base::FEATURE_ENABLED_BY_DEFAULT}; - const base::Feature kAllowAllSitesToInitiateMirroring{ - "AllowAllSitesToInitiateMirroring", base::FEATURE_DISABLED_BY_DEFAULT}; - const base::Feature kDialMediaRouteProvider{"DialMediaRouteProvider", Copied: chromium/repos/extra-x86_64/enable-GlobalMediaControlsCastStartStop.patch (from rev 442306, chromium/trunk/enable-GlobalMediaControlsCastStartStop.patch) =================================================================== --- enable-GlobalMediaControlsCastStartStop.patch (rev 0) +++ enable-GlobalMediaControlsCastStartStop.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -0,0 +1,32 @@ +From b58f0f2725a8c1a8a131f9984b5fd53b54119dba Mon Sep 17 00:00:00 2001 +From: Muyao Xu <muya...@google.com> +Date: Thu, 20 Jan 2022 23:46:21 +0000 +Subject: [PATCH] [Zenith] Enable GlobalMediaControlsCastStartStop flag by + default + +The feature is rolled out to 100% stable through finch for M96+. +This CL enables it by default and fixes some unit tests failures. + +Bug: 1287242, 1287305 +Change-Id: I7e5c9625b77379fef253c41ef292a0dd6fc366fb +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3388416 +Reviewed-by: Takumi Fujimoto <taku...@chromium.org> +Commit-Queue: Muyao Xu <muya...@google.com> +Cr-Commit-Position: refs/heads/main@{#961658} +--- + chrome/browser/media/router/media_router_feature.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc +index f28f9b0b802..a8d544f7d6d 100644 +--- a/chrome/browser/media/router/media_router_feature.cc ++++ b/chrome/browser/media/router/media_router_feature.cc +@@ -33,7 +33,7 @@ const base::Feature kMediaRouter{"MediaRouter", + const base::Feature kCastAllowAllIPsFeature{"CastAllowAllIPs", + base::FEATURE_DISABLED_BY_DEFAULT}; + const base::Feature kGlobalMediaControlsCastStartStop{ +- "GlobalMediaControlsCastStartStop", base::FEATURE_DISABLED_BY_DEFAULT}; ++ "GlobalMediaControlsCastStartStop", base::FEATURE_ENABLED_BY_DEFAULT}; + const base::Feature kAllowAllSitesToInitiateMirroring{ + "AllowAllSitesToInitiateMirroring", base::FEATURE_DISABLED_BY_DEFAULT}; + const base::Feature kDialMediaRouteProvider{"DialMediaRouteProvider", Deleted: sql-make-VirtualCursor-standard-layout-type.patch =================================================================== --- sql-make-VirtualCursor-standard-layout-type.patch 2022-04-12 03:45:36 UTC (rev 442306) +++ sql-make-VirtualCursor-standard-layout-type.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -1,238 +0,0 @@ -From 144479ad7b4287bee4067f95e4218f614798a865 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann <sth...@googlemail.com> -Date: Sun, 16 Jan 2022 19:15:26 +0000 -Subject: [PATCH] sql: make VirtualCursor standard layout type - -sql::recover::VirtualCursor needs to be a standard layout type, but -has members of type std::unique_ptr. However, std::unique_ptr is not -guaranteed to be standard layout. Compiling with clang combined with -gcc-11 libstdc++ fails because of this. - -Bug: 1189788 -Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c ---- - sql/recover_module/btree.cc | 18 ++++++++++++------ - sql/recover_module/btree.h | 21 +++++++++++++++------ - sql/recover_module/cursor.cc | 24 ++++++++++++------------ - sql/recover_module/cursor.h | 2 +- - sql/recover_module/pager.cc | 5 ++--- - sql/recover_module/pager.h | 6 +++--- - 6 files changed, 45 insertions(+), 31 deletions(-) - -diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc -index cc9420e5c05..f12d8fa32a2 100644 ---- a/sql/recover_module/btree.cc -+++ b/sql/recover_module/btree.cc -@@ -136,16 +136,22 @@ static_assert(std::is_trivially_destructible<LeafPageDecoder>::value, - "Move the destructor to the .cc file if it's non-trival"); - #endif // !DCHECK_IS_ON() - --LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept -- : page_id_(db_reader->page_id()), -- db_reader_(db_reader), -- cell_count_(ComputeCellCount(db_reader)), -- next_read_index_(0), -- last_record_size_(0) { -+LeafPageDecoder::LeafPageDecoder() noexcept = default; -+ -+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) { -+ page_id_ = db_reader->page_id(); -+ db_reader_ = db_reader; -+ cell_count_ = ComputeCellCount(db_reader); -+ next_read_index_ = 0; -+ last_record_size_ = 0; - DCHECK(IsOnValidPage(db_reader)); - DCHECK(DatabasePageReader::IsValidPageId(page_id_)); - } - -+void LeafPageDecoder::Reset() { -+ db_reader_ = nullptr; -+} -+ - bool LeafPageDecoder::TryAdvance() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK(CanAdvance()); -diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h -index eaa087a5c52..df0e0c937c0 100644 ---- a/sql/recover_module/btree.h -+++ b/sql/recover_module/btree.h -@@ -101,9 +101,7 @@ class LeafPageDecoder { - public: - // Creates a decoder for a DatabasePageReader's last read page. - // -- // |db_reader| must have been used to read an inner page of a table B-tree. -- // |db_reader| must outlive this instance. -- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept; -+ LeafPageDecoder() noexcept; - ~LeafPageDecoder() noexcept = default; - - LeafPageDecoder(const LeafPageDecoder&) = delete; -@@ -151,6 +149,17 @@ class LeafPageDecoder { - // read as long as CanAdvance() returns true. - bool TryAdvance(); - -+ // Initialize with DatabasePageReader -+ // |db_reader| must have been used to read an inner page of a table B-tree. -+ // |db_reader| must outlive this instance. -+ void Initialize(DatabasePageReader* db_reader); -+ -+ // Reset internal DatabasePageReader -+ void Reset(); -+ -+ // True if DatabasePageReader is valid -+ bool IsValid() { return (db_reader_ != nullptr); } -+ - // True if the given reader may point to an inner page in a table B-tree. - // - // The last ReadPage() call on |db_reader| must have succeeded. -@@ -164,14 +173,14 @@ class LeafPageDecoder { - static int ComputeCellCount(DatabasePageReader* db_reader); - - // The number of the B-tree page this reader is reading. -- const int64_t page_id_; -+ int64_t page_id_; - // Used to read the tree page. - // - // Raw pointer usage is acceptable because this instance's owner is expected - // to ensure that the DatabasePageReader outlives this. -- DatabasePageReader* const db_reader_; -+ DatabasePageReader* db_reader_; - // Caches the ComputeCellCount() value for this reader's page. -- const int cell_count_ = ComputeCellCount(db_reader_); -+ int cell_count_; - - // The reader's cursor state. - // -diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc -index 4f827edf1b4..240de4999fe 100644 ---- a/sql/recover_module/cursor.cc -+++ b/sql/recover_module/cursor.cc -@@ -28,7 +28,7 @@ VirtualCursor::~VirtualCursor() { - int VirtualCursor::First() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - inner_decoders_.clear(); -- leaf_decoder_ = nullptr; -+ leaf_decoder_.Reset(); - - AppendPageDecoder(table_->root_page_id()); - return Next(); -@@ -38,18 +38,18 @@ int VirtualCursor::Next() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - record_reader_.Reset(); - -- while (!inner_decoders_.empty() || leaf_decoder_.get()) { -- if (leaf_decoder_.get()) { -- if (!leaf_decoder_->CanAdvance()) { -+ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) { -+ if (leaf_decoder_.IsValid()) { -+ if (!leaf_decoder_.CanAdvance()) { - // The leaf has been exhausted. Remove it from the DFS stack. -- leaf_decoder_ = nullptr; -+ leaf_decoder_.Reset(); - continue; - } -- if (!leaf_decoder_->TryAdvance()) -+ if (!leaf_decoder_.TryAdvance()) - continue; - -- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(), -- leaf_decoder_->last_record_offset())) { -+ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(), -+ leaf_decoder_.last_record_offset())) { - continue; - } - if (!record_reader_.Initialize()) -@@ -101,13 +101,13 @@ int VirtualCursor::ReadColumn(int column_index, - int64_t VirtualCursor::RowId() { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK(record_reader_.IsInitialized()); -- DCHECK(leaf_decoder_.get()); -- return leaf_decoder_->last_record_rowid(); -+ DCHECK(leaf_decoder_.IsValid()); -+ return leaf_decoder_.last_record_rowid(); - } - - void VirtualCursor::AppendPageDecoder(int page_id) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -- DCHECK(leaf_decoder_.get() == nullptr) -+ DCHECK(!leaf_decoder_.IsValid()) - << __func__ - << " must only be called when the current path has no leaf decoder"; - -@@ -115,7 +115,7 @@ void VirtualCursor::AppendPageDecoder(int page_id) { - return; - - if (LeafPageDecoder::IsOnValidPage(&db_reader_)) { -- leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_); -+ leaf_decoder_.Initialize(&db_reader_); - return; - } - -diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h -index 845b7852648..cc4e85f83f9 100644 ---- a/sql/recover_module/cursor.h -+++ b/sql/recover_module/cursor.h -@@ -130,7 +130,7 @@ class VirtualCursor { - std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_; - - // Decodes the leaf page containing records. -- std::unique_ptr<LeafPageDecoder> leaf_decoder_; -+ LeafPageDecoder leaf_decoder_; - - SEQUENCE_CHECKER(sequence_checker_); - }; -diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc -index 58e75de2704..69d98cef98d 100644 ---- a/sql/recover_module/pager.cc -+++ b/sql/recover_module/pager.cc -@@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPageId <= std::numeric_limits<int>::max(), - "ints are not appropriate for representing page IDs"); - - DatabasePageReader::DatabasePageReader(VirtualTable* table) -- : page_data_(std::make_unique<uint8_t[]>(table->page_size())), -- table_(table) { -+ : page_data_(table->page_size()), table_(table) { - DCHECK(table != nullptr); - DCHECK(IsValidPageSize(table->page_size())); - } -@@ -58,7 +57,7 @@ int DatabasePageReader::ReadPage(int page_id) { - "The |read_offset| computation above may overflow"); - - int sqlite_status = -- RawRead(sqlite_file, read_size, read_offset, page_data_.get()); -+ RawRead(sqlite_file, read_size, read_offset, page_data_.data()); - - // |page_id_| needs to be set to kInvalidPageId if the read failed. - // Otherwise, future ReadPage() calls with the previous |page_id_| value -diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h -index 07cac3cb989..d08f0932fab 100644 ---- a/sql/recover_module/pager.h -+++ b/sql/recover_module/pager.h -@@ -6,8 +6,8 @@ - #define SQL_RECOVER_MODULE_PAGER_H_ - - #include <cstdint> --#include <memory> - #include <ostream> -+#include <vector> - - #include "base/check_op.h" - #include "base/memory/raw_ptr.h" -@@ -72,7 +72,7 @@ class DatabasePageReader { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK_NE(page_id_, kInvalidPageId) - << "Successful ReadPage() required before accessing pager state"; -- return page_data_.get(); -+ return page_data_.data(); - } - - // The number of bytes in the page read by the last ReadPage() call. -@@ -139,7 +139,7 @@ class DatabasePageReader { - int page_id_ = kInvalidPageId; - // Stores the bytes of the last page successfully read by ReadPage(). - // The content is undefined if the last call to ReadPage() did not succeed. -- const std::unique_ptr<uint8_t[]> page_data_; -+ std::vector<uint8_t> page_data_; - // Raw pointer usage is acceptable because this instance's owner is expected - // to ensure that the VirtualTable outlives this. - const raw_ptr<VirtualTable> table_; Copied: chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch (from rev 442306, chromium/trunk/sql-make-VirtualCursor-standard-layout-type.patch) =================================================================== --- sql-make-VirtualCursor-standard-layout-type.patch (rev 0) +++ sql-make-VirtualCursor-standard-layout-type.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -0,0 +1,238 @@ +From 144479ad7b4287bee4067f95e4218f614798a865 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann <sth...@googlemail.com> +Date: Sun, 16 Jan 2022 19:15:26 +0000 +Subject: [PATCH] sql: make VirtualCursor standard layout type + +sql::recover::VirtualCursor needs to be a standard layout type, but +has members of type std::unique_ptr. However, std::unique_ptr is not +guaranteed to be standard layout. Compiling with clang combined with +gcc-11 libstdc++ fails because of this. + +Bug: 1189788 +Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c +--- + sql/recover_module/btree.cc | 18 ++++++++++++------ + sql/recover_module/btree.h | 21 +++++++++++++++------ + sql/recover_module/cursor.cc | 24 ++++++++++++------------ + sql/recover_module/cursor.h | 2 +- + sql/recover_module/pager.cc | 5 ++--- + sql/recover_module/pager.h | 6 +++--- + 6 files changed, 45 insertions(+), 31 deletions(-) + +diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc +index cc9420e5c05..f12d8fa32a2 100644 +--- a/sql/recover_module/btree.cc ++++ b/sql/recover_module/btree.cc +@@ -136,16 +136,22 @@ static_assert(std::is_trivially_destructible<LeafPageDecoder>::value, + "Move the destructor to the .cc file if it's non-trival"); + #endif // !DCHECK_IS_ON() + +-LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept +- : page_id_(db_reader->page_id()), +- db_reader_(db_reader), +- cell_count_(ComputeCellCount(db_reader)), +- next_read_index_(0), +- last_record_size_(0) { ++LeafPageDecoder::LeafPageDecoder() noexcept = default; ++ ++void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) { ++ page_id_ = db_reader->page_id(); ++ db_reader_ = db_reader; ++ cell_count_ = ComputeCellCount(db_reader); ++ next_read_index_ = 0; ++ last_record_size_ = 0; + DCHECK(IsOnValidPage(db_reader)); + DCHECK(DatabasePageReader::IsValidPageId(page_id_)); + } + ++void LeafPageDecoder::Reset() { ++ db_reader_ = nullptr; ++} ++ + bool LeafPageDecoder::TryAdvance() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(CanAdvance()); +diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h +index eaa087a5c52..df0e0c937c0 100644 +--- a/sql/recover_module/btree.h ++++ b/sql/recover_module/btree.h +@@ -101,9 +101,7 @@ class LeafPageDecoder { + public: + // Creates a decoder for a DatabasePageReader's last read page. + // +- // |db_reader| must have been used to read an inner page of a table B-tree. +- // |db_reader| must outlive this instance. +- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept; ++ LeafPageDecoder() noexcept; + ~LeafPageDecoder() noexcept = default; + + LeafPageDecoder(const LeafPageDecoder&) = delete; +@@ -151,6 +149,17 @@ class LeafPageDecoder { + // read as long as CanAdvance() returns true. + bool TryAdvance(); + ++ // Initialize with DatabasePageReader ++ // |db_reader| must have been used to read an inner page of a table B-tree. ++ // |db_reader| must outlive this instance. ++ void Initialize(DatabasePageReader* db_reader); ++ ++ // Reset internal DatabasePageReader ++ void Reset(); ++ ++ // True if DatabasePageReader is valid ++ bool IsValid() { return (db_reader_ != nullptr); } ++ + // True if the given reader may point to an inner page in a table B-tree. + // + // The last ReadPage() call on |db_reader| must have succeeded. +@@ -164,14 +173,14 @@ class LeafPageDecoder { + static int ComputeCellCount(DatabasePageReader* db_reader); + + // The number of the B-tree page this reader is reading. +- const int64_t page_id_; ++ int64_t page_id_; + // Used to read the tree page. + // + // Raw pointer usage is acceptable because this instance's owner is expected + // to ensure that the DatabasePageReader outlives this. +- DatabasePageReader* const db_reader_; ++ DatabasePageReader* db_reader_; + // Caches the ComputeCellCount() value for this reader's page. +- const int cell_count_ = ComputeCellCount(db_reader_); ++ int cell_count_; + + // The reader's cursor state. + // +diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc +index 4f827edf1b4..240de4999fe 100644 +--- a/sql/recover_module/cursor.cc ++++ b/sql/recover_module/cursor.cc +@@ -28,7 +28,7 @@ VirtualCursor::~VirtualCursor() { + int VirtualCursor::First() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + inner_decoders_.clear(); +- leaf_decoder_ = nullptr; ++ leaf_decoder_.Reset(); + + AppendPageDecoder(table_->root_page_id()); + return Next(); +@@ -38,18 +38,18 @@ int VirtualCursor::Next() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + record_reader_.Reset(); + +- while (!inner_decoders_.empty() || leaf_decoder_.get()) { +- if (leaf_decoder_.get()) { +- if (!leaf_decoder_->CanAdvance()) { ++ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) { ++ if (leaf_decoder_.IsValid()) { ++ if (!leaf_decoder_.CanAdvance()) { + // The leaf has been exhausted. Remove it from the DFS stack. +- leaf_decoder_ = nullptr; ++ leaf_decoder_.Reset(); + continue; + } +- if (!leaf_decoder_->TryAdvance()) ++ if (!leaf_decoder_.TryAdvance()) + continue; + +- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(), +- leaf_decoder_->last_record_offset())) { ++ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(), ++ leaf_decoder_.last_record_offset())) { + continue; + } + if (!record_reader_.Initialize()) +@@ -101,13 +101,13 @@ int VirtualCursor::ReadColumn(int column_index, + int64_t VirtualCursor::RowId() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK(record_reader_.IsInitialized()); +- DCHECK(leaf_decoder_.get()); +- return leaf_decoder_->last_record_rowid(); ++ DCHECK(leaf_decoder_.IsValid()); ++ return leaf_decoder_.last_record_rowid(); + } + + void VirtualCursor::AppendPageDecoder(int page_id) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- DCHECK(leaf_decoder_.get() == nullptr) ++ DCHECK(!leaf_decoder_.IsValid()) + << __func__ + << " must only be called when the current path has no leaf decoder"; + +@@ -115,7 +115,7 @@ void VirtualCursor::AppendPageDecoder(int page_id) { + return; + + if (LeafPageDecoder::IsOnValidPage(&db_reader_)) { +- leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_); ++ leaf_decoder_.Initialize(&db_reader_); + return; + } + +diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h +index 845b7852648..cc4e85f83f9 100644 +--- a/sql/recover_module/cursor.h ++++ b/sql/recover_module/cursor.h +@@ -130,7 +130,7 @@ class VirtualCursor { + std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_; + + // Decodes the leaf page containing records. +- std::unique_ptr<LeafPageDecoder> leaf_decoder_; ++ LeafPageDecoder leaf_decoder_; + + SEQUENCE_CHECKER(sequence_checker_); + }; +diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc +index 58e75de2704..69d98cef98d 100644 +--- a/sql/recover_module/pager.cc ++++ b/sql/recover_module/pager.cc +@@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPageId <= std::numeric_limits<int>::max(), + "ints are not appropriate for representing page IDs"); + + DatabasePageReader::DatabasePageReader(VirtualTable* table) +- : page_data_(std::make_unique<uint8_t[]>(table->page_size())), +- table_(table) { ++ : page_data_(table->page_size()), table_(table) { + DCHECK(table != nullptr); + DCHECK(IsValidPageSize(table->page_size())); + } +@@ -58,7 +57,7 @@ int DatabasePageReader::ReadPage(int page_id) { + "The |read_offset| computation above may overflow"); + + int sqlite_status = +- RawRead(sqlite_file, read_size, read_offset, page_data_.get()); ++ RawRead(sqlite_file, read_size, read_offset, page_data_.data()); + + // |page_id_| needs to be set to kInvalidPageId if the read failed. + // Otherwise, future ReadPage() calls with the previous |page_id_| value +diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h +index 07cac3cb989..d08f0932fab 100644 +--- a/sql/recover_module/pager.h ++++ b/sql/recover_module/pager.h +@@ -6,8 +6,8 @@ + #define SQL_RECOVER_MODULE_PAGER_H_ + + #include <cstdint> +-#include <memory> + #include <ostream> ++#include <vector> + + #include "base/check_op.h" + #include "base/memory/raw_ptr.h" +@@ -72,7 +72,7 @@ class DatabasePageReader { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + DCHECK_NE(page_id_, kInvalidPageId) + << "Successful ReadPage() required before accessing pager state"; +- return page_data_.get(); ++ return page_data_.data(); + } + + // The number of bytes in the page read by the last ReadPage() call. +@@ -139,7 +139,7 @@ class DatabasePageReader { + int page_id_ = kInvalidPageId; + // Stores the bytes of the last page successfully read by ReadPage(). + // The content is undefined if the last call to ReadPage() did not succeed. +- const std::unique_ptr<uint8_t[]> page_data_; ++ std::vector<uint8_t> page_data_; + // Raw pointer usage is acceptable because this instance's owner is expected + // to ensure that the VirtualTable outlives this. + const raw_ptr<VirtualTable> table_; Deleted: use-oauth2-client-switches-as-default.patch =================================================================== --- use-oauth2-client-switches-as-default.patch 2022-04-12 03:45:36 UTC (rev 442306) +++ use-oauth2-client-switches-as-default.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -1,17 +0,0 @@ -diff -upr chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc chromium-89.0.4389.58/google_apis/google_api_keys.cc ---- chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc 2021-02-24 22:37:18.494007649 +0000 -+++ chromium-89.0.4389.58/google_apis/google_api_keys.cc 2021-02-24 22:35:00.865777600 +0000 -@@ -154,11 +154,11 @@ class APIKeyCache { - - std::string default_client_id = CalculateKeyValue( - GOOGLE_DEFAULT_CLIENT_ID, -- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr, -+ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID, - std::string(), environment.get(), command_line, gaia_config); - std::string default_client_secret = CalculateKeyValue( - GOOGLE_DEFAULT_CLIENT_SECRET, -- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr, -+ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret, - std::string(), environment.get(), command_line, gaia_config); - - // We currently only allow overriding the baked-in values for the Copied: chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch (from rev 442306, chromium/trunk/use-oauth2-client-switches-as-default.patch) =================================================================== --- use-oauth2-client-switches-as-default.patch (rev 0) +++ use-oauth2-client-switches-as-default.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -0,0 +1,17 @@ +diff -upr chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc chromium-89.0.4389.58/google_apis/google_api_keys.cc +--- chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc 2021-02-24 22:37:18.494007649 +0000 ++++ chromium-89.0.4389.58/google_apis/google_api_keys.cc 2021-02-24 22:35:00.865777600 +0000 +@@ -154,11 +154,11 @@ class APIKeyCache { + + std::string default_client_id = CalculateKeyValue( + GOOGLE_DEFAULT_CLIENT_ID, +- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr, ++ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID, + std::string(), environment.get(), command_line, gaia_config); + std::string default_client_secret = CalculateKeyValue( + GOOGLE_DEFAULT_CLIENT_SECRET, +- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr, ++ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret, + std::string(), environment.get(), command_line, gaia_config); + + // We currently only allow overriding the baked-in values for the Deleted: webcodecs-stop-using-AudioOpusEncoder.patch =================================================================== --- webcodecs-stop-using-AudioOpusEncoder.patch 2022-04-12 03:45:36 UTC (rev 442306) +++ webcodecs-stop-using-AudioOpusEncoder.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -1,49 +0,0 @@ -From 3bd46cb9a51773f103ef52b39d6407740eb0d60a Mon Sep 17 00:00:00 2001 -From: Eugene Zemtsov <eug...@chromium.org> -Date: Thu, 24 Feb 2022 23:17:20 +0000 -Subject: [PATCH] webcodecs: Stop using AudioOpusEncoder as backed for mojo - audio encoder - -AudioOpusEncoder was only used here for testing. Let's not let it get -comfortable. We'll use MF AAC encoder here when we have it. (Soon...) - -Bug: 1259883 -Change-Id: Ia1819395c8c8fd6d403d4b8558c12f9a1bf7e761 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489449 -Commit-Queue: Eugene Zemtsov <eug...@chromium.org> -Auto-Submit: Eugene Zemtsov <eug...@chromium.org> -Reviewed-by: Dale Curtis <dalecur...@chromium.org> -Commit-Queue: Dale Curtis <dalecur...@chromium.org> -Cr-Commit-Position: refs/heads/main@{#974895} ---- - media/mojo/services/gpu_mojo_media_client.cc | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) - -diff --git a/media/mojo/services/gpu_mojo_media_client.cc b/media/mojo/services/gpu_mojo_media_client.cc -index 8f83a4d6cf6..40cdaff8d3a 100644 ---- a/media/mojo/services/gpu_mojo_media_client.cc -+++ b/media/mojo/services/gpu_mojo_media_client.cc -@@ -13,7 +13,6 @@ - #include "build/chromeos_buildflags.h" - #include "gpu/ipc/service/gpu_channel.h" - #include "media/audio/audio_features.h" --#include "media/audio/audio_opus_encoder.h" - #include "media/base/audio_decoder.h" - #include "media/base/cdm_factory.h" - #include "media/base/media_switches.h" -@@ -119,14 +118,7 @@ std::unique_ptr<AudioEncoder> GpuMojoMediaClient::CreateAudioEncoder( - scoped_refptr<base::SequencedTaskRunner> task_runner) { - if (!base::FeatureList::IsEnabled(features::kPlatformAudioEncoder)) - return nullptr; -- // TODO(crbug.com/1259883) Right now Opus encoder is all we have, later on -- // we'll create a real platform encoder here. -- auto opus_encoder = std::make_unique<AudioOpusEncoder>(); -- auto encoding_runner = base::ThreadPool::CreateSequencedTaskRunner( -- {base::TaskPriority::USER_BLOCKING}); -- return std::make_unique<OffloadingAudioEncoder>(std::move(opus_encoder), -- std::move(encoding_runner), -- std::move(task_runner)); -+ return nullptr; - } - - VideoDecoderType GpuMojoMediaClient::GetDecoderImplementationType() { Copied: chromium/repos/extra-x86_64/webcodecs-stop-using-AudioOpusEncoder.patch (from rev 442306, chromium/trunk/webcodecs-stop-using-AudioOpusEncoder.patch) =================================================================== --- webcodecs-stop-using-AudioOpusEncoder.patch (rev 0) +++ webcodecs-stop-using-AudioOpusEncoder.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -0,0 +1,49 @@ +From 3bd46cb9a51773f103ef52b39d6407740eb0d60a Mon Sep 17 00:00:00 2001 +From: Eugene Zemtsov <eug...@chromium.org> +Date: Thu, 24 Feb 2022 23:17:20 +0000 +Subject: [PATCH] webcodecs: Stop using AudioOpusEncoder as backed for mojo + audio encoder + +AudioOpusEncoder was only used here for testing. Let's not let it get +comfortable. We'll use MF AAC encoder here when we have it. (Soon...) + +Bug: 1259883 +Change-Id: Ia1819395c8c8fd6d403d4b8558c12f9a1bf7e761 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489449 +Commit-Queue: Eugene Zemtsov <eug...@chromium.org> +Auto-Submit: Eugene Zemtsov <eug...@chromium.org> +Reviewed-by: Dale Curtis <dalecur...@chromium.org> +Commit-Queue: Dale Curtis <dalecur...@chromium.org> +Cr-Commit-Position: refs/heads/main@{#974895} +--- + media/mojo/services/gpu_mojo_media_client.cc | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/media/mojo/services/gpu_mojo_media_client.cc b/media/mojo/services/gpu_mojo_media_client.cc +index 8f83a4d6cf6..40cdaff8d3a 100644 +--- a/media/mojo/services/gpu_mojo_media_client.cc ++++ b/media/mojo/services/gpu_mojo_media_client.cc +@@ -13,7 +13,6 @@ + #include "build/chromeos_buildflags.h" + #include "gpu/ipc/service/gpu_channel.h" + #include "media/audio/audio_features.h" +-#include "media/audio/audio_opus_encoder.h" + #include "media/base/audio_decoder.h" + #include "media/base/cdm_factory.h" + #include "media/base/media_switches.h" +@@ -119,14 +118,7 @@ std::unique_ptr<AudioEncoder> GpuMojoMediaClient::CreateAudioEncoder( + scoped_refptr<base::SequencedTaskRunner> task_runner) { + if (!base::FeatureList::IsEnabled(features::kPlatformAudioEncoder)) + return nullptr; +- // TODO(crbug.com/1259883) Right now Opus encoder is all we have, later on +- // we'll create a real platform encoder here. +- auto opus_encoder = std::make_unique<AudioOpusEncoder>(); +- auto encoding_runner = base::ThreadPool::CreateSequencedTaskRunner( +- {base::TaskPriority::USER_BLOCKING}); +- return std::make_unique<OffloadingAudioEncoder>(std::move(opus_encoder), +- std::move(encoding_runner), +- std::move(task_runner)); ++ return nullptr; + } + + VideoDecoderType GpuMojoMediaClient::GetDecoderImplementationType() { Deleted: webrtc-check-existence-of-cursor-metadata.patch =================================================================== --- webrtc-check-existence-of-cursor-metadata.patch 2022-04-12 03:45:36 UTC (rev 442306) +++ webrtc-check-existence-of-cursor-metadata.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -1,31 +0,0 @@ -From c2cd814cdd8cbf8dda6ccec2266327a5321fbde8 Mon Sep 17 00:00:00 2001 -From: Jan Grulich <gru...@gmail.com> -Date: Tue, 15 Mar 2022 14:31:55 +0100 -Subject: [PATCH] PipeWire capturer: check existence of cursor metadata - -Check whether there are any cursor metadata before we try to validate -and use them, otherwise we might crash on this. - -Bug: webrtc:13429 -Change-Id: I365da59a189b6b974cebafc94fec49d5b942efae -Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255601 -Reviewed-by: Alexander Cooper <alcoo...@chromium.org> -Commit-Queue: Alexander Cooper <alcoo...@chromium.org> -Cr-Commit-Position: refs/heads/main@{#36240} ---- - .../desktop_capture/linux/wayland/shared_screencast_stream.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -index a8c86e26..9e81df4c 100644 ---- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -+++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc -@@ -650,7 +650,7 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { - const struct spa_meta_cursor* cursor = - static_cast<struct spa_meta_cursor*>(spa_buffer_find_meta_data( - spa_buffer, SPA_META_Cursor, sizeof(*cursor))); -- if (spa_meta_cursor_is_valid(cursor)) { -+ if (cursor && spa_meta_cursor_is_valid(cursor)) { - struct spa_meta_bitmap* bitmap = nullptr; - - if (cursor->bitmap_offset) Copied: chromium/repos/extra-x86_64/webrtc-check-existence-of-cursor-metadata.patch (from rev 442306, chromium/trunk/webrtc-check-existence-of-cursor-metadata.patch) =================================================================== --- webrtc-check-existence-of-cursor-metadata.patch (rev 0) +++ webrtc-check-existence-of-cursor-metadata.patch 2022-04-12 03:45:45 UTC (rev 442307) @@ -0,0 +1,31 @@ +From c2cd814cdd8cbf8dda6ccec2266327a5321fbde8 Mon Sep 17 00:00:00 2001 +From: Jan Grulich <gru...@gmail.com> +Date: Tue, 15 Mar 2022 14:31:55 +0100 +Subject: [PATCH] PipeWire capturer: check existence of cursor metadata + +Check whether there are any cursor metadata before we try to validate +and use them, otherwise we might crash on this. + +Bug: webrtc:13429 +Change-Id: I365da59a189b6b974cebafc94fec49d5b942efae +Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255601 +Reviewed-by: Alexander Cooper <alcoo...@chromium.org> +Commit-Queue: Alexander Cooper <alcoo...@chromium.org> +Cr-Commit-Position: refs/heads/main@{#36240} +--- + .../desktop_capture/linux/wayland/shared_screencast_stream.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +index a8c86e26..9e81df4c 100644 +--- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -650,7 +650,7 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + const struct spa_meta_cursor* cursor = + static_cast<struct spa_meta_cursor*>(spa_buffer_find_meta_data( + spa_buffer, SPA_META_Cursor, sizeof(*cursor))); +- if (spa_meta_cursor_is_valid(cursor)) { ++ if (cursor && spa_meta_cursor_is_valid(cursor)) { + struct spa_meta_bitmap* bitmap = nullptr; + + if (cursor->bitmap_offset)