mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-19 09:15:30 +03:00
testing/electron: upgrade to 23.1.3
This commit is contained in:
parent
296197ee6c
commit
9c5044cf2f
38 changed files with 847 additions and 394 deletions
|
@ -1,9 +1,9 @@
|
||||||
# Maintainer: psykose <alice@ayaya.dev>
|
# Maintainer: psykose <alice@ayaya.dev>
|
||||||
pkgname=electron
|
pkgname=electron
|
||||||
pkgver=21.4.2
|
pkgver=23.1.3
|
||||||
pkgrel=1
|
pkgrel=0
|
||||||
_chromium=106.0.5249.199
|
_chromium=110.0.5481.179
|
||||||
_depot_tools=d85c5bc6ff0dee8171007d947aabc3dfa6dd433b
|
_depot_tools=8daa8c5a941d93e092d1c2fdf2c2a86f162f9d82
|
||||||
pkgdesc="Electron cross-platform desktop toolkit"
|
pkgdesc="Electron cross-platform desktop toolkit"
|
||||||
url="https://github.com/electron/electron"
|
url="https://github.com/electron/electron"
|
||||||
arch="aarch64 x86_64" # same as chromium
|
arch="aarch64 x86_64" # same as chromium
|
||||||
|
@ -81,6 +81,7 @@ makedepends="
|
||||||
py3-parsing
|
py3-parsing
|
||||||
py3-six
|
py3-six
|
||||||
python3
|
python3
|
||||||
|
qt5-qtbase-dev
|
||||||
re2-dev
|
re2-dev
|
||||||
samurai
|
samurai
|
||||||
snappy-dev
|
snappy-dev
|
||||||
|
@ -90,72 +91,57 @@ makedepends="
|
||||||
xcb-proto
|
xcb-proto
|
||||||
yarn
|
yarn
|
||||||
zlib-dev
|
zlib-dev
|
||||||
|
zstd
|
||||||
"
|
"
|
||||||
subpackages="$pkgname-lang $pkgname-dev"
|
subpackages="$pkgname-lang $pkgname-dev"
|
||||||
# the lower patches are specific to electron, the top ones are from the equivalent chromium version
|
# the lower patches are specific to electron, the top ones are from the equivalent chromium version
|
||||||
source="https://dev.alpinelinux.org/archive/electron/electron-$pkgver.tar.xz
|
source="https://dev.alpinelinux.org/archive/electron/electron-$pkgver.tar.zst
|
||||||
angle-wayland-include.patch
|
chromium-110-CredentialUIEntry-const.patch
|
||||||
canonicalize-file-name.patch
|
chromium-110-DarkModeLABColorSpace-pow.patch
|
||||||
|
chromium-110-NativeThemeBase-fabs.patch
|
||||||
chromium-VirtualCursor-standard-layout.patch
|
chromium-VirtualCursor-standard-layout.patch
|
||||||
chromium-revert-drop-of-system-java.patch
|
chromium-revert-drop-of-system-java.patch
|
||||||
chromium-use-alpine-target.patch
|
chromium-use-alpine-target.patch
|
||||||
credentials-sys-types-header.patch
|
crbug-1407202-mediarouter-crash.patch
|
||||||
default-pthread-stacksize.patch
|
|
||||||
dns-resolver.patch
|
dns-resolver.patch
|
||||||
fix-crashpad.patch
|
fix-crashpad.patch
|
||||||
fix-missing-cstdint-include-musl.patch
|
fix-missing-cstdint-include-musl.patch
|
||||||
fix-narrowing-cast.patch
|
|
||||||
gdbinit.patch
|
gdbinit.patch
|
||||||
jsoncpp.patch
|
libcxx-muslmode.patch
|
||||||
memory-tagging-arm64.patch
|
|
||||||
musl-sandbox.patch
|
musl-sandbox.patch
|
||||||
musl-tid-caching.patch
|
musl-tid-caching.patch
|
||||||
musl-v8-monotonic-pthread-cont_timedwait.patch
|
musl-v8-monotonic-pthread-cont_timedwait.patch
|
||||||
|
narrowing-cast.patch
|
||||||
no-execinfo.patch
|
no-execinfo.patch
|
||||||
no-glibc-version.patch
|
no-glibc-version.patch
|
||||||
no-mallinfo.patch
|
no-mallinfo.patch
|
||||||
no-res-ninit-nclose.patch
|
no-res-ninit-nclose.patch
|
||||||
no-stat-redefine.patch
|
no-stat-redefine.patch
|
||||||
nullptr-t.patch
|
|
||||||
partition-atfork.patch
|
partition-atfork.patch
|
||||||
py3.11.patch
|
|
||||||
quiche-arena-size.patch
|
quiche-arena-size.patch
|
||||||
scoped-file-no-close.patch
|
scoped-file-no-close.patch
|
||||||
|
system-icu.patch
|
||||||
temp-failure-retry.patch
|
temp-failure-retry.patch
|
||||||
wtf-stacksize.patch
|
wtf-stacksize.patch
|
||||||
|
|
||||||
icon.patch
|
icon.patch
|
||||||
python-jinja-3.10.patch
|
python-jinja-3.10.patch
|
||||||
system-node.patch
|
|
||||||
vector-const.patch
|
|
||||||
webpack-hash.patch
|
webpack-hash.patch
|
||||||
|
|
||||||
default.conf
|
default.conf
|
||||||
electron.desktop
|
electron.desktop
|
||||||
electron-launcher.sh
|
electron-launcher.sh
|
||||||
"
|
"
|
||||||
|
# vector-const.patch
|
||||||
|
# chromium sandbox is suid
|
||||||
|
# tests are todo for some base checks
|
||||||
options="!check suid"
|
options="!check suid"
|
||||||
|
|
||||||
# clang uses much less memory (and this doesn't support gcc)
|
|
||||||
export CC=clang
|
|
||||||
export CXX=clang++
|
|
||||||
|
|
||||||
# required to find the tools
|
|
||||||
export AR=llvm-ar
|
|
||||||
export NM=llvm-nm
|
|
||||||
export LD=clang++
|
|
||||||
|
|
||||||
# less log spam, reproducible
|
|
||||||
export CFLAGS="${CFLAGS/-g/} -O2 -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
|
|
||||||
export CXXFLAGS="${CXXFLAGS/-g/} -O2 -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
|
|
||||||
export CPPFLAGS="$CPPFLAGS -D__DATE__= -D__TIME__= -D__TIMESTAMP__="
|
|
||||||
|
|
||||||
_gn_flags() {
|
|
||||||
echo "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
# creates a dist tarball that does not need to git clone everything at build time.
|
# creates a dist tarball that does not need to git clone everything at build time.
|
||||||
snapshot() {
|
snapshot() {
|
||||||
|
deps
|
||||||
|
# vpython3 execs system python3 with this set
|
||||||
|
export VPYTHON_BYPASS="manually managed python not supported by chrome operations"
|
||||||
export CHROMIUM_BUILDTOOLS_PATH="$srcdir/src/buildtools"
|
export CHROMIUM_BUILDTOOLS_PATH="$srcdir/src/buildtools"
|
||||||
mkdir -p "$srcdir"
|
mkdir -p "$srcdir"
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
|
@ -227,15 +213,27 @@ snapshot() {
|
||||||
msg "generating tarball.. (this takes a while)"
|
msg "generating tarball.. (this takes a while)"
|
||||||
tar -cf $pkgname-$pkgver.tar \
|
tar -cf $pkgname-$pkgver.tar \
|
||||||
--exclude="ChangeLog*" \
|
--exclude="ChangeLog*" \
|
||||||
--exclude="testdata/" \
|
--exclude="testdata/*" \
|
||||||
--exclude="test_data/" \
|
--exclude="test_data/*" \
|
||||||
--exclude="android_rust_toolchain/toolchain/" \
|
--exclude="android_rust_toolchain/*" \
|
||||||
--exclude-backups \
|
--exclude-backups \
|
||||||
--exclude-caches-all \
|
--exclude-caches-all \
|
||||||
--exclude-vcs \
|
--exclude-vcs \
|
||||||
$pkgname-$pkgver
|
$pkgname-$pkgver
|
||||||
|
|
||||||
xz --memlimit=60GB -T0 -e -9 -vv -k $pkgname-$pkgver.tar
|
zstd --ultra --long -22 -T0 -vv $pkgname-$pkgver.tar
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack() {
|
||||||
|
mkdir -p "$srcdir"
|
||||||
|
local s
|
||||||
|
for s in $source; do
|
||||||
|
case $s in
|
||||||
|
*.tar.zst)
|
||||||
|
zstd -c -d "$SRCDEST/$(filename_from_uri $s)" | tar -x -C "$srcdir"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
@ -259,14 +257,24 @@ prepare() {
|
||||||
git tag "v$pkgver"
|
git tag "v$pkgver"
|
||||||
# jesus christ what the fuck is wrong with you?
|
# jesus christ what the fuck is wrong with you?
|
||||||
touch .git/packed-refs
|
touch .git/packed-refs
|
||||||
yarn install --frozen-lockfile
|
yarn install --frozen-lockfile --no-scripts
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
cd third_party/node
|
cd third_party/node
|
||||||
npm ci
|
./update_npm_deps
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# these are normally unbundled, but they can't be with custom_libcxx.
|
||||||
|
# we use custom_libcxx as there are a few libstdc++ incompatibilities
|
||||||
|
# that now cause segfaults with the wayland ozone platform since electron 22.
|
||||||
|
# obviously, this is a FIXME.
|
||||||
|
# ---
|
||||||
|
# jsoncpp
|
||||||
|
# re2
|
||||||
|
# woff2
|
||||||
|
# ---
|
||||||
|
# libavif - https://github.com/AOMediaCodec/libavif/commit/4d2776a3
|
||||||
local use_system="
|
local use_system="
|
||||||
brotli
|
brotli
|
||||||
dav1d
|
dav1d
|
||||||
|
@ -276,9 +284,7 @@ prepare() {
|
||||||
freetype
|
freetype
|
||||||
harfbuzz-ng
|
harfbuzz-ng
|
||||||
icu
|
icu
|
||||||
jsoncpp
|
|
||||||
libaom
|
libaom
|
||||||
libavif
|
|
||||||
libdrm
|
libdrm
|
||||||
libevent
|
libevent
|
||||||
libjpeg
|
libjpeg
|
||||||
|
@ -286,9 +292,7 @@ prepare() {
|
||||||
libxml
|
libxml
|
||||||
libxslt
|
libxslt
|
||||||
opus
|
opus
|
||||||
re2
|
|
||||||
snappy
|
snappy
|
||||||
woff2
|
|
||||||
zlib
|
zlib
|
||||||
"
|
"
|
||||||
|
|
||||||
|
@ -312,6 +316,7 @@ prepare() {
|
||||||
sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
|
sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
|
||||||
-i services/device/public/cpp/usb/BUILD.gn
|
-i services/device/public/cpp/usb/BUILD.gn
|
||||||
|
|
||||||
|
msg "Running debundle script"
|
||||||
python3 build/linux/unbundle/replace_gn_files.py --system-libraries \
|
python3 build/linux/unbundle/replace_gn_files.py --system-libraries \
|
||||||
$use_system
|
$use_system
|
||||||
python3 third_party/libaddressinput/chromium/tools/update-strings.py
|
python3 third_party/libaddressinput/chromium/tools/update-strings.py
|
||||||
|
@ -331,8 +336,30 @@ prepare() {
|
||||||
third_party/libxml/chromium/*.cc \
|
third_party/libxml/chromium/*.cc \
|
||||||
third_party/maldoca/src/maldoca/ole/oss_utils.h
|
third_party/maldoca/src/maldoca/ole/oss_utils.h
|
||||||
|
|
||||||
|
_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
_configure() {
|
||||||
|
cd "$builddir"
|
||||||
msg "Configuring build"
|
msg "Configuring build"
|
||||||
|
|
||||||
|
export PATH="$PATH:/usr/lib/qt5/bin"
|
||||||
|
|
||||||
|
# clang uses much less memory (and this doesn't support gcc)
|
||||||
|
export CC=clang
|
||||||
|
export CXX=clang++
|
||||||
|
|
||||||
|
# required to find the tools
|
||||||
|
export AR=llvm-ar
|
||||||
|
export NM=llvm-nm
|
||||||
|
export LD=clang++
|
||||||
|
|
||||||
|
# less log spam, reproducible
|
||||||
|
export CFLAGS="${CFLAGS/-g/} -O2 -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
||||||
|
export CXXFLAGS="${CXXFLAGS/-g/} -O2 -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
||||||
|
export CPPFLAGS="${CPPFLAGS/-g/} -D__DATE__= -D__TIME__= -D__TIMESTAMP__="
|
||||||
|
|
||||||
|
# shellcheck disable=2089
|
||||||
local gn_config="
|
local gn_config="
|
||||||
clang_base_path=\"/usr\"
|
clang_base_path=\"/usr\"
|
||||||
custom_toolchain=\"//build/toolchain/linux/unbundle:default\"
|
custom_toolchain=\"//build/toolchain/linux/unbundle:default\"
|
||||||
|
@ -367,35 +394,37 @@ prepare() {
|
||||||
enable_service_discovery=false
|
enable_service_discovery=false
|
||||||
enable_stripping=false
|
enable_stripping=false
|
||||||
enable_vr=false
|
enable_vr=false
|
||||||
enable_xz_extractor=false
|
|
||||||
ozone_platform_headless=false
|
ozone_platform_headless=false
|
||||||
|
|
||||||
link_pulseaudio=true
|
link_pulseaudio=true
|
||||||
proprietary_codecs=true
|
proprietary_codecs=true
|
||||||
rtc_link_pipewire=true
|
rtc_link_pipewire=true
|
||||||
rtc_use_pipewire=true
|
rtc_use_pipewire=true
|
||||||
use_custom_libcxx=false
|
use_custom_libcxx=true
|
||||||
use_dawn=false
|
use_dawn=false
|
||||||
use_gnome_keyring=false
|
use_gnome_keyring=false
|
||||||
use_pulseaudio=true
|
use_pulseaudio=true
|
||||||
use_sysroot=false
|
use_sysroot=false
|
||||||
|
use_system_cares=true
|
||||||
use_system_freetype=true
|
use_system_freetype=true
|
||||||
use_system_harfbuzz=true
|
use_system_harfbuzz=true
|
||||||
use_system_lcms2=true
|
use_system_lcms2=true
|
||||||
use_system_libdrm=true
|
use_system_libdrm=true
|
||||||
|
use_system_libffi=true
|
||||||
use_system_libjpeg=true
|
use_system_libjpeg=true
|
||||||
use_system_libwayland=true
|
use_system_nghttp2=true
|
||||||
use_system_wayland_scanner=true
|
|
||||||
use_system_zlib=true
|
use_system_zlib=true
|
||||||
use_vaapi=true
|
use_vaapi=true
|
||||||
"
|
"
|
||||||
|
|
||||||
gn gen out/Release \
|
# shellcheck disable=2086,2090,2116
|
||||||
--args="$(echo $gn_config)" \
|
gn gen out/Release --args="$(echo $gn_config)" \
|
||||||
--export-compile-commands
|
--export-compile-commands
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
export PATH="$PATH:/usr/lib/qt5/bin"
|
||||||
|
|
||||||
ninja -C out/Release \
|
ninja -C out/Release \
|
||||||
electron_dist_zip \
|
electron_dist_zip \
|
||||||
node_gypi_headers \
|
node_gypi_headers \
|
||||||
|
@ -441,40 +470,36 @@ lang() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
d2a6de4bc851de81d9f19fdb46b023abd77e27acc33bff8fc7cec7b84d0aeda3008e00289444f4f2423b20efcc72e4c3036f809fb6ce1ad9828983bee4721ff2 electron-21.4.2.tar.xz
|
45e9560ad539adf42194213b0638b77daa4db0414318934b5f62e0d622b7cfd7f1ce210da43c9a5af9188c4df530d5edfa9644d6469b80da63776ab0bf154bf0 electron-23.1.3.tar.zst
|
||||||
f19ba0c0f542115e6f53019659df256471e811a23d2f37569c9d4dfa265c0c1ace3e62c74d7507f82e6b7b4152c704e651810a00616f8f531592b14bb2af01d9 angle-wayland-include.patch
|
6055a1e487b336397a792375fa59dc5dcadca88041e3b1a41be2d57315a39b52ad4296908245a7bbbe36f2ca898df3cb4a5956559bd43a9b58f5bc6663328158 chromium-110-CredentialUIEntry-const.patch
|
||||||
252b37a2ecc5e7a25385943045f426dc2e30991b28d206ceaff1be7fd8ffeeb024310a8fca6b3e69a4b1c57db535d51c570935351053525f393682d5ecd0f9a9 canonicalize-file-name.patch
|
90a965342442d89e715246e1917f7d36f725875ca8bd2c63b9d0a84bfb5e88a4e3989e99a2f85fc43b86a9fd16d2cb1cd807abff088e0ec6610d0d70ec70d4c1 chromium-110-DarkModeLABColorSpace-pow.patch
|
||||||
ac0a80174f95d733f33ddc06fc88cdcf7db0973378c28d8544dc9c19e2dabeac47f91c99b3e7384f650b3405554a9e222543f0860b6acc407c078a8c9180d727 chromium-VirtualCursor-standard-layout.patch
|
831b0c255f4ffe286e6f63d704508841fda5c4ad2250dfc993a7b47126e03ebb98e9f7383b8b5e1220deead4718615d73a52e0ac42126a5cbbe8b4b82a88a731 chromium-110-NativeThemeBase-fabs.patch
|
||||||
c4654d5b23c6f5d9502507e534fe1951d6749c62251e49b6adfe10d1569431e7f7a5a6fa5ff09ec30984415ced27a5e20985df8c91295de34af3c84557fa5b91 chromium-revert-drop-of-system-java.patch
|
f88adc643dacf7e7be1b9bb77ff2c172cd04de2a988d3cdca77313122ba3ea93e6781ee675f3d7daf337a2542c0cbf31ffb08413e9f85c287b3a5e950d7d8a31 chromium-VirtualCursor-standard-layout.patch
|
||||||
d2b5b0396173367fcf1804aaee8e7fbefce9c63ac2a91c3a1ede759cb85e567317a57e4d4f82d3ca021682fb7856e15c074276a03eda946d9b28e1cb706b07ad chromium-use-alpine-target.patch
|
29bb685e03356a77df5fd347cdf55194cc8b3265c421cc76e54d64edefc329dbcb052deb26b22e8f587ce68456876c071de1b7d258dd0fcc6ee66c875ec4a020 chromium-revert-drop-of-system-java.patch
|
||||||
ec04bf43278a19d4bb090eddd636ad7093c7e757cb2ffa1875971e0709761174790e109b9be03a8e299d4077a87fbd8dabd301b8754bb6fe53c055396e8af556 credentials-sys-types-header.patch
|
fa291e941076146d0edd5b96c088240a44a6e0aca3dfc744929655607182d2dc47e6c35ecb419f7c623fcf7f26dc3c4dd924dbf5ed10c3b986283f5ef2f72573 chromium-use-alpine-target.patch
|
||||||
4ab8261bf95547b10df44e4d528c06a64c33602c10a1e09d531190dc8947ba6ef9e69145405b801cd364707570f791fee6d93e3bf5d57831f5a85212ddf01729 default-pthread-stacksize.patch
|
7e484714bcf060e6165677e6f12a57f1c6381ab2ad3c5e4decc1e1b7ed9aa00b1ad19c62359898c874b98809540230567f267f25abebf48e85740b03138e6b01 crbug-1407202-mediarouter-crash.patch
|
||||||
f011f66e5aae5a6f0d440492ee9400878b47b66214c1bc8dc1477fdd07ad0a508cdbb74415e55e27085c4e61e112e7c2ae2edfa217f2fb387e13097b24cb17b1 dns-resolver.patch
|
c13ae17c68f3e144ed635ec3f49558275f30e13e5689e4011d8798bd0cce20cf30b4248c4763162a33055987aa1f519d1cb31b9acf02fc1f0cf8ddbf04889ff0 dns-resolver.patch
|
||||||
9d1edb1e0624ee61825e3af23fbb8c5dbc09d2b92d7769d19f8ca618edae8de8a3e051fedf4ad92c230e1373dc8495922c46971aef93a580c04ad80bc33516c0 fix-crashpad.patch
|
6f93fc8efa37cf5181551f5fe1fce0939381d30734bb9c621dda5edd02835030f3d9b83c1f5ad5b70c219cd947b1026f754ac5708ff1eba7a4a6550c067924a2 fix-crashpad.patch
|
||||||
8bebf4a9d5225c6e47edc5b07c4b97be24a45cc221f49632836915ceeb4ecb69b7f79a31ea7f82171cde3443f45fec541f409892542cf1014e81aa6acd01566d fix-missing-cstdint-include-musl.patch
|
9200f78bad70e95c648a5e8392d50642190600f655c6baa366ff6467ebad52d3b3f305dad58f3610da67136f4b723557653b174ec5c25be8d8737ee04d9ee09f fix-missing-cstdint-include-musl.patch
|
||||||
efe97b9dd2ec5965fa0cdf1b2a3c01253835c2df710da7ea105c4ce008c11f9caaf8b4321736a2b91f06d8d61972c08e225b16509dc05176a2c39337688ad5b9 fix-narrowing-cast.patch
|
33ee60863cc438ef57ffef92ba4cf67a856a5ffc16138bce241bcf87e47b15154aa86918e793c26f7ec4dc62a445257ad5673ed7001daf22c4043cf6cc57da7f gdbinit.patch
|
||||||
cf73cbe5bf19d6a22157fb7aafb43f326885e852fc6292728f4ed1cd145d07ba5af51b6ec808095136cd406478aaa427ee1b9611c855fbd87976e1a91e1609bd gdbinit.patch
|
1bb1b31ee3057fb626a2d5eb44698946484e45017310d55026347f18f774453828802438ba14691d81edaad6c96c5df25c4aca772a30674a04feca3df11fccfb libcxx-muslmode.patch
|
||||||
fa2637f92f851614347e296fbab744af2c5d7edcbb444aeb4a5d3182a8ec2549593d75e717d7e78e9b2a7257e693b48fc88c149c1591052d7ae802f4fda0a775 jsoncpp.patch
|
2e30cfe800e9307d010748dabd43edcb2a4ba5bf7c51ab19c9dade6aeeacc3dc98e8115c27f3e28bf4ce2b596a8d21f4ce76fc6b4e1810ea5a788cd5a784125c musl-sandbox.patch
|
||||||
e0afb7066c2cb41aa461feb9e45e571517229deab9d06186490b527783a7ba826a4d67d3a14a33a164eea64fa561eb5b93a1d4dfd0acc2e7a9eb038e6ee273db memory-tagging-arm64.patch
|
e7163ac5810ac85366cef2447412287c856e3d67c6b77f219a6e5a418b1965b98e449c409424ad0704a5bded9355dd0aec3dc4585918ce5a2ab36c079707afe2 musl-tid-caching.patch
|
||||||
fdf8ba7badbd5b61d415ad9d49c66b6ef0a6a40ec95a47e13af48711fe1bd3a5574e987929a3c486cdd02c239863b8517e7f834cecd30f156479e43a9441a18e musl-sandbox.patch
|
92eb002718026611f5542362ad69b67f0a398ff71b3fca5c05d55cb5c6f9f29334e5e127bb4860cfaa3fba0f0d4c901e2b98808217e7dc02e254a64a5c9521aa musl-v8-monotonic-pthread-cont_timedwait.patch
|
||||||
85c2842a251a3f8aa59c701ca5f2ce2f5d49b5c7e4773d5387dc597447fb47c9d876f5fb308576686c9a8abc7e35cfc172b6cdfb9f5f1dc1509329e3590b38d8 musl-tid-caching.patch
|
d4fac42d939cc5991367ebe5f8578ca5cb3cbe0aea34b33366bba72ff334c5853021d123df80b7f1cf11cd2e45b83bae29e3bdb3ae6b424834ba3117aeb51ecf narrowing-cast.patch
|
||||||
d2825aa9525fcbb53791f0ef2502c0f444a9d668f09db6ae4987b94dc4d0e6f1cf58a6e9e772ab11c896a469ca32242feb3ad9c9dbb20df9316cd74151ab0ec9 musl-v8-monotonic-pthread-cont_timedwait.patch
|
dd8f9874700f4c158d3551149f16293de9c8d0b70d527f3261871828bb78442dc39a51f3e2fa4320f116cda4738d3c6b800e70d7b5e9bae63b4fd2751966e1e8 no-execinfo.patch
|
||||||
ebd5cf28277853dc5e984961c370ab4a6331488ae7cff45083fea0470262f56486664bc9bd7947fdd796c8635e479633c4d08cfd89270c0310f3ec21cc6642d2 no-execinfo.patch
|
76fd81b974c087e9622d026735be46320496b1e25ef60a7388029e1b8eadf3fe3994ac4fdeef13fe97919f58f46ae6bd99a6d43d491cdb743b1bb940e4c0ca47 no-glibc-version.patch
|
||||||
f0bf97a80e663041e33cb0468fd8c47c5f351d6de61059ce1f359a813c40db8e247eaef294c3f562c0a8204e4f1992a918f1d879b1da9891027500e21f482b79 no-glibc-version.patch
|
b5479874d125ee95a311295f227f8881a83023ec34fded7a6160b3ae32ea3ba0f2b833a9fb264c57f3d22746b6d8b00bdc8eb2ff86c43c412d6d3b55ae15b16b no-mallinfo.patch
|
||||||
10ae0f74a4c1db899b571508100af63e5af8d0f7c41a37fc9b7987cbf9f27f4c55894c02d6820957d7522a528929059f562f96c2f05fd6509f60c6c71d9d8256 no-mallinfo.patch
|
e4c4e5bc6f828f9c883dd418c0ba01887949c29c311f76206a1ec29f620b0c0ba0452949dc2778a9c46ea066405857536964a36436a68eecf7da7952736333cf no-res-ninit-nclose.patch
|
||||||
a5aa82c30402773903db1d3876208132fdef175f56ebc0ce1ee4c104a98d498d709c5565c4381736c04c238203b3c8a9cd7a5b5e69876f6afb65d7fc48df23d0 no-res-ninit-nclose.patch
|
61cf1e7e607f846ca21dd431fcd656e6b75cc2786c02916b50ac8cc49e9eeb725ff40c68eee3ada70073022f77b22172ed4150e7c90bd3e7e4c8a4668e02418b no-stat-redefine.patch
|
||||||
2c0d7239728d98c0564ad7b81d6d243e58e56de58a21357fa30c39e333fc29c1aa98529c6e1b6fa7694169b513391ca27fa542f69b483bbde644cc2ed739bbdd no-stat-redefine.patch
|
677d455b817172be351214bff502f554c164b6da011b1a5a41e7ade8166d4a22a728bdf6f5a494c2182a320e9a69ccaa415487359c67e5f140e54ac8aeba70d2 partition-atfork.patch
|
||||||
5e9f6279698195467e3b506cea9be0d97ec2d970672b1b12d3d7880eec4f6f53b8f92942dc3fc6738b02889382534ce0f4310a1f94b33e21f8fbc70b85640b81 nullptr-t.patch
|
2bc334352cdf0e523003c882e1a29623896bf3f3543469b23a532cb5ff32a75e7f23dc94abfaed4a97e24d26bdc51b780728583f1e7e7860f00c49e4d91edfa9 quiche-arena-size.patch
|
||||||
ad563e29ac7d83c203f5af966c4ed3ebdeb5c997835a45fb28ecde08dde5231d0a775fb413f44867af28724504c42316b27d5a6aaa602057642dcbdf7ec20a7a partition-atfork.patch
|
8c33808ede31dd3b8eb951991e034751949756c4e6c2cd0e19823e95fddf5f9d94424bbd73ffe6dd965df2b0887fc5c42ab8a97c64b553d47662e90651b84f13 scoped-file-no-close.patch
|
||||||
65aa0c7c9909a803e59b88ecb6d79c4db491079f3324f7bd02ee485a7bb7a81674b8f0591dab766c97070a401116db7f629fee36af7416a0fefc38f4ae0ad13d py3.11.patch
|
b1736d4cbcef69e83826c7f3c25cf5d18726d9bc9ebcd5ad59f070195461b7d8afd22db622452f6d5ce7f5c7f969ac9347553c4b2e028a633970eed6a5aa30f5 system-icu.patch
|
||||||
083ed731e0a3788f2cb04a3035022fbb3e4db99eba01516ea233ea3229f7d898943d8115463a48655ac83eb3cc7a48aceb8bf17c68930a5a1d83b1af95dfade8 quiche-arena-size.patch
|
e48693e6b7aeebf69a5acbf80d9a35defe4c23835121dfeb58b051ac7c527e758a41004f4d193274fe1b01c0bfb1dbc77b09cb6a404a3fdee507a2918afb0edb temp-failure-retry.patch
|
||||||
3cf36b269e9fcfa74975d267bbf31bef68b533a51672e5ed81ae511a70f28a45206168af370961a3dab5695ddaff41cb8839c8c2fa53f22a9f3c88d207cb2996 scoped-file-no-close.patch
|
335f29481ed337e742fef4004a9c80468d2020f8540200e4e2dc35eeeae1a40fc2e89745f49db89f3dbb5917b4b466472d87b84cc048782cdac12cbf458e1fe0 wtf-stacksize.patch
|
||||||
f2f7673f9e793dfbf4456ff8c2be785ea551c36bd512572245d04bf44da08b0133e98d85a1ffd51158009754c83121cad48d755cbc153735df2d2e73233856c0 temp-failure-retry.patch
|
|
||||||
1d4e8c6e65205e6b72af47b9a2fa6f96aaada9b7d5a74f4e11a345a885df3078b523d02aaf8e9dac3aa30d72bbbd07cd6dc7edcf44fb9ae57a7f81251c398f65 wtf-stacksize.patch
|
|
||||||
905565c10f5e5600e7d4db965c892cc45009a258e9995da958974d838ace469e1db1019195307e8807860d5b55ba6bfeea478b1f39a9b99e82c619b2816a1a22 icon.patch
|
905565c10f5e5600e7d4db965c892cc45009a258e9995da958974d838ace469e1db1019195307e8807860d5b55ba6bfeea478b1f39a9b99e82c619b2816a1a22 icon.patch
|
||||||
e05180199ee1d559e4e577cedd3e589844ecf40d98a86321bf1bea5607b02eeb5feb486deddae40e1005b644550331f6b8500177aa7e79bcb3750d3c1ceb76c3 python-jinja-3.10.patch
|
e05180199ee1d559e4e577cedd3e589844ecf40d98a86321bf1bea5607b02eeb5feb486deddae40e1005b644550331f6b8500177aa7e79bcb3750d3c1ceb76c3 python-jinja-3.10.patch
|
||||||
26a8e4040e69f335a7104f42d012b9d933a40985b33a7be02add27a801c097c5a2be4c6e69faf9175ce8945210ae4c5592ecad2123ccff2beee5473194a765e3 system-node.patch
|
|
||||||
71571b15cf8bd6259b7fd22bea0e46b64890f3db776365de33fe539f26ce9ef99459e05c3dde9434c3657225bc67160abc915acd93033cb487c770c6a2a5975f vector-const.patch
|
|
||||||
2aa340854316f1284217c0ca17cbf44953684ad6c7da90815117df30928612eb9fb9ffb734b948dfc309cd25d1a67cd57f77aac2d052a3dd9aca07a3a58cbb30 webpack-hash.patch
|
2aa340854316f1284217c0ca17cbf44953684ad6c7da90815117df30928612eb9fb9ffb734b948dfc309cd25d1a67cd57f77aac2d052a3dd9aca07a3a58cbb30 webpack-hash.patch
|
||||||
08460b15037511a4e5469ceac6ae5dd4db4c8cb87c129aaaf40ba58b16c60b8a307ffdd85805efead235758abed09ec31db1ef4cf9159f7b9acdcee3031bc96c default.conf
|
08460b15037511a4e5469ceac6ae5dd4db4c8cb87c129aaaf40ba58b16c60b8a307ffdd85805efead235758abed09ec31db1ef4cf9159f7b9acdcee3031bc96c default.conf
|
||||||
191559fc7aa1ea0353c6fb0cc321ee1d5803a0e44848c8be941cfab96277b0de6a59962d373e2a2a1686c8f9be2bcf2d2f33706759a339a959e297d3f7fda463 electron.desktop
|
191559fc7aa1ea0353c6fb0cc321ee1d5803a0e44848c8be941cfab96277b0de6a59962d373e2a2a1686c8f9be2bcf2d2f33706759a339a959e297d3f7fda463 electron.desktop
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
Patch-Source: https://github.com/archlinux/svntogit-packages/blob/a353833a5a731abfaa465b658f61894a516aa49b/trunk/angle-wayland-include-protocol.patch
|
|
||||||
diff -upr third_party/angle.orig/BUILD.gn third_party/angle/BUILD.gn
|
|
||||||
--- a/third_party/angle.orig/BUILD.gn 2022-08-17 19:38:11.000000000 +0000
|
|
||||||
+++ b/third_party/angle/BUILD.gn 2022-08-18 11:04:09.061751111 +0000
|
|
||||||
@@ -489,6 +489,12 @@ config("angle_vulkan_wayland_config") {
|
|
||||||
if (angle_enable_vulkan && angle_use_wayland &&
|
|
||||||
defined(vulkan_wayland_include_dirs)) {
|
|
||||||
include_dirs = vulkan_wayland_include_dirs
|
|
||||||
+ } else if (angle_enable_vulkan && angle_use_wayland) {
|
|
||||||
+ include_dirs = [
|
|
||||||
+ "$wayland_gn_dir/src/src",
|
|
||||||
+ "$wayland_gn_dir/include/src",
|
|
||||||
+ "$wayland_gn_dir/include/protocol",
|
|
||||||
+ ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1073,6 +1079,7 @@ if (angle_use_wayland) {
|
|
||||||
include_dirs = [
|
|
||||||
"$wayland_dir/egl",
|
|
||||||
"$wayland_dir/src",
|
|
||||||
+ "$wayland_gn_dir/include/protocol",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
diff -upr third_party/angle.orig/src/third_party/volk/BUILD.gn third_party/angle/src/third_party/volk/BUILD.gn
|
|
||||||
--- a/third_party/angle.orig/src/third_party/volk/BUILD.gn 2022-08-17 19:38:12.000000000 +0000
|
|
||||||
+++ b/third_party/angle/src/third_party/volk/BUILD.gn 2022-08-18 11:04:36.499828006 +0000
|
|
||||||
@@ -21,6 +21,9 @@ source_set("volk") {
|
|
||||||
configs += [ "$angle_root:angle_no_cfi_icall" ]
|
|
||||||
public_deps = [ "$angle_vulkan_headers_dir:vulkan_headers" ]
|
|
||||||
if (angle_use_wayland) {
|
|
||||||
- include_dirs = [ "$wayland_dir/src" ]
|
|
||||||
+ include_dirs = [
|
|
||||||
+ "$wayland_dir/src",
|
|
||||||
+ "$wayland_gn_dir/include/protocol",
|
|
||||||
+ ]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
no canonicalize_file_name on musl. funnily, the file using this says this is
|
|
||||||
not portable, but avoids the nonportability of realpath(path, NULL);
|
|
||||||
--- a/third_party/nasm/config/config-linux.h
|
|
||||||
+++ b/third_party/nasm/config/config-linux.h
|
|
||||||
@@ -139,7 +139,7 @@
|
|
||||||
#define HAVE_ACCESS 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `canonicalize_file_name' function. */
|
|
||||||
-#define HAVE_CANONICALIZE_FILE_NAME 1
|
|
||||||
+/* #define HAVE_CANONICALIZE_FILE_NAME 1 */
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `cpu_to_le16' intrinsic function. */
|
|
||||||
/* #undef HAVE_CPU_TO_LE16 */
|
|
43
testing/electron/chromium-110-CredentialUIEntry-const.patch
Normal file
43
testing/electron/chromium-110-CredentialUIEntry-const.patch
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
Patch-Source: https://github.com/stha09/chromium-patches/blob/03bfe6d891f06ecd0fdb7ee83f60be2243a5c9e6/chromium-110-CredentialUIEntry-const.patch
|
||||||
|
--
|
||||||
|
From b4e56d22275cae5a910463a966a96345430a83ea Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ivan Murashov <ivan.murashov@lge.com>
|
||||||
|
Date: Sat, 17 Dec 2022 12:06:01 +0000
|
||||||
|
Subject: [PATCH] libstdc++: Don't use const members in std::vector in password_manager::CredentialUIEntry
|
||||||
|
|
||||||
|
Otherwise build fails when building with use_custom_libcxx=false.
|
||||||
|
The error example:
|
||||||
|
std::vector must have a non-const, non-volatile value_type
|
||||||
|
|
||||||
|
Implementation of std::vector in libstdc++ does not allow const.
|
||||||
|
|
||||||
|
Bug: 957519
|
||||||
|
Change-Id: I089de2d52df25138d74dbf01fdf61d6301b4d871
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111037
|
||||||
|
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
|
||||||
|
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1084697}
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/components/password_manager/core/browser/ui/credential_ui_entry.cc b/components/password_manager/core/browser/ui/credential_ui_entry.cc
|
||||||
|
index 1e0766a..a9a34f7 100644
|
||||||
|
--- a/components/password_manager/core/browser/ui/credential_ui_entry.cc
|
||||||
|
+++ b/components/password_manager/core/browser/ui/credential_ui_entry.cc
|
||||||
|
@@ -97,7 +97,7 @@
|
||||||
|
// For cases when the notes differ within grouped passwords (e.g: a
|
||||||
|
// credential exists in both account and profile stores), respective notes
|
||||||
|
// should be concatenated and linebreak used as a delimiter.
|
||||||
|
- std::vector<const std::u16string> notes_with_duplicates;
|
||||||
|
+ std::vector<std::u16string> notes_with_duplicates;
|
||||||
|
for (const auto& form : forms) {
|
||||||
|
// Only notes with an empty `unique_display_name` are supported in the
|
||||||
|
// settings UI.
|
||||||
|
@@ -109,7 +109,7 @@
|
||||||
|
}
|
||||||
|
auto unique_notes =
|
||||||
|
base::MakeFlatSet<std::u16string>(std::move(notes_with_duplicates));
|
||||||
|
- note = base::JoinString(std::vector<const std::u16string>(
|
||||||
|
+ note = base::JoinString(std::vector<std::u16string>(
|
||||||
|
unique_notes.begin(), unique_notes.end()),
|
||||||
|
u"\n");
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
Patch-Source: https://github.com/stha09/chromium-patches/blob/03bfe6d891f06ecd0fdb7ee83f60be2243a5c9e6/chromium-110-DarkModeLABColorSpace-pow.patch
|
||||||
|
--
|
||||||
|
From 795c311aae4b718585bc6194189f061000c823a1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Date: Fri, 23 Dec 2022 14:28:55 +0000
|
||||||
|
Subject: [PATCH] libstdc++: fix narrowing in blink::DarkModeLABColorSpace
|
||||||
|
|
||||||
|
Clang-14 errors out with narrowing from double to float. Use std::pow
|
||||||
|
instead.
|
||||||
|
---
|
||||||
|
.../renderer/platform/graphics/dark_mode_lab_color_space.h | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h b/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
|
||||||
|
index 999c3e5..c18ea7b 100644
|
||||||
|
--- a/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
|
||||||
|
+++ b/third_party/blink/renderer/platform/graphics/dark_mode_lab_color_space.h
|
||||||
|
@@ -125,7 +125,7 @@ class DarkModeLABColorSpace {
|
||||||
|
// https://en.wikipedia.org/wiki/CIELAB_color_space#Reverse_transformation.
|
||||||
|
SkV3 FromXYZ(const SkV3& v) const {
|
||||||
|
auto f = [](float x) {
|
||||||
|
- return x > kSigma3 ? pow(x, 1.0f / 3.0f)
|
||||||
|
+ return x > kSigma3 ? std::pow(x, 1.0f / 3.0f)
|
||||||
|
: x / (3 * kSigma2) + 4.0f / 29.0f;
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -145,7 +145,8 @@ class DarkModeLABColorSpace {
|
||||||
|
// https://en.wikipedia.org/wiki/CIELAB_color_space#Forward_transformation.
|
||||||
|
SkV3 ToXYZ(const SkV3& lab) const {
|
||||||
|
auto invf = [](float x) {
|
||||||
|
- return x > kSigma ? pow(x, 3.0f) : 3.0f * kSigma2 * (x - 4.0f / 29.0f);
|
||||||
|
+ return x > kSigma ? std::pow(x, 3.0f)
|
||||||
|
+ : 3.0f * kSigma2 * (x - 4.0f / 29.0f);
|
||||||
|
};
|
||||||
|
|
||||||
|
SkV3 v = {Clamp(lab.x, 0.0f, 100.0f), Clamp(lab.y, -128.0f, 128.0f),
|
||||||
|
--
|
||||||
|
2.38.2
|
||||||
|
|
31
testing/electron/chromium-110-NativeThemeBase-fabs.patch
Normal file
31
testing/electron/chromium-110-NativeThemeBase-fabs.patch
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
Patch-Source: https://github.com/stha09/chromium-patches/blob/03bfe6d891f06ecd0fdb7ee83f60be2243a5c9e6/chromium-110-NativeThemeBase-fabs.patch
|
||||||
|
--
|
||||||
|
From 07f0a87e4409f27854b3a1d17f270a3497f38947 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Date: Mon, 19 Dec 2022 19:07:37 +0000
|
||||||
|
Subject: [PATCH] GCC: use fabsf in ui::NativeThemeBase::OutlineColor
|
||||||
|
|
||||||
|
Template deduction fails for base::clamp, because return type of
|
||||||
|
fabs is double and all other parameters are float.
|
||||||
|
|
||||||
|
Bug: 819294
|
||||||
|
Change-Id: I34f1c9c99d13f69097d899bfcb0526cbdf4fe1c1
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4110869
|
||||||
|
Reviewed-by: Peter Kasting <pkasting@chromium.org>
|
||||||
|
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1085034}
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
|
||||||
|
index 169c60c..36db49a 100644
|
||||||
|
--- a/ui/native_theme/native_theme_base.cc
|
||||||
|
+++ b/ui/native_theme/native_theme_base.cc
|
||||||
|
@@ -1336,7 +1336,7 @@
|
||||||
|
// The following code has been tested to look OK with all of the
|
||||||
|
// default GTK themes.
|
||||||
|
SkScalar min_diff = base::clamp((hsv1[1] + hsv2[1]) * 1.2f, 0.28f, 0.5f);
|
||||||
|
- SkScalar diff = base::clamp(fabs(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f);
|
||||||
|
+ SkScalar diff = base::clamp(fabsf(hsv1[2] - hsv2[2]) / 2, min_diff, 0.5f);
|
||||||
|
|
||||||
|
if (hsv1[2] + hsv2[2] > 1.0)
|
||||||
|
diff = -diff;
|
|
@ -1,4 +1,6 @@
|
||||||
needed for libstdc++11 + clang only
|
needed for libstdc++11 + clang only
|
||||||
|
crbug: https://bugs.chromium.org/p/chromium/issues/detail?id=1189788
|
||||||
|
--
|
||||||
diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
|
diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
|
||||||
index 9ecaafe..839318a 100644
|
index 9ecaafe..839318a 100644
|
||||||
--- a/sql/recover_module/btree.cc
|
--- a/sql/recover_module/btree.cc
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
This was dropped for some reason in 6951c37cecd05979b232a39e5c10e6346a0f74ef
|
This was dropped for some reason in 6951c37cecd05979b232a39e5c10e6346a0f74ef
|
||||||
|
allows using /usr/bin/java instead of a downloaded one (that doesn't work on musl)
|
||||||
|
--
|
||||||
--- a/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
|
--- a/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
|
||||||
+++ b/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
|
+++ b/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
|
||||||
@@ -13,8 +13,9 @@
|
@@ -13,8 +13,9 @@
|
||||||
|
|
|
@ -1,6 +1,23 @@
|
||||||
|
building for arm targets by default passes --target to clang, because it
|
||||||
|
assumes it's cross compiling (so passes --target as if the host is different,
|
||||||
|
instead of assuming default)
|
||||||
|
|
||||||
|
probably also works: removing this entirely. but to be safe, pass the alpine clang host triple
|
||||||
|
--
|
||||||
--- a/build/config/compiler/BUILD.gn
|
--- a/build/config/compiler/BUILD.gn
|
||||||
+++ b/build/config/compiler/BUILD.gn
|
+++ b/build/config/compiler/BUILD.gn
|
||||||
@@ -917,8 +917,8 @@
|
@@ -915,8 +915,8 @@ config("compiler_cpu_abi") {
|
||||||
|
} else if (current_cpu == "arm") {
|
||||||
|
if (is_clang && !is_android && !is_nacl &&
|
||||||
|
!(is_chromeos_lacros && is_chromeos_device)) {
|
||||||
|
- cflags += [ "--target=arm-linux-gnueabihf" ]
|
||||||
|
- ldflags += [ "--target=arm-linux-gnueabihf" ]
|
||||||
|
+ cflags += [ "--target=armv7-alpine-linux-musleabihf" ]
|
||||||
|
+ ldflags += [ "--target=armv7-alpine-linux-musleabihf" ]
|
||||||
|
}
|
||||||
|
if (!is_nacl) {
|
||||||
|
cflags += [
|
||||||
|
@@ -930,8 +930,8 @@ config("compiler_cpu_abi") {
|
||||||
} else if (current_cpu == "arm64") {
|
} else if (current_cpu == "arm64") {
|
||||||
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
|
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
|
||||||
!(is_chromeos_lacros && is_chromeos_device)) {
|
!(is_chromeos_lacros && is_chromeos_device)) {
|
||||||
|
|
372
testing/electron/crbug-1407202-mediarouter-crash.patch
Normal file
372
testing/electron/crbug-1407202-mediarouter-crash.patch
Normal file
|
@ -0,0 +1,372 @@
|
||||||
|
From d0c1f5ee1f56c165bdf550c9e3be0d7313587b80 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Elly Fong-Jones <ellyjones@chromium.org>
|
||||||
|
Date: Wed, 18 Jan 2023 22:33:11 +0000
|
||||||
|
Subject: [PATCH] media: untangle MediaRouterUI lifetimes
|
||||||
|
|
||||||
|
Currently, MediaRouterUI is owned by MediaItemUIDeviceSelectorView.
|
||||||
|
There is an observer method named "OnControllerInvalidated" which
|
||||||
|
MediaItemUIDeviceSelectorView reacts to by deleting the MediaRouterUI it
|
||||||
|
owns. However, OnControllerInvalidated can actually be called in two
|
||||||
|
different situations:
|
||||||
|
|
||||||
|
* From MediaRouterUI::TakeMediaRouteStarter(), in which case the
|
||||||
|
MediaRouterUI object is *not* being destroyed, but should be, because
|
||||||
|
it can't be safely used after TakeMediaRouteStarter() ends;
|
||||||
|
* From MediaRouterUI::~MediaRouterUI(), in which case the MediaRouterUI
|
||||||
|
object *is* being destroyed already and should not be.
|
||||||
|
|
||||||
|
In the second case, only the fact that libc++ nulls out unique_ptr
|
||||||
|
before destroying the pointed-to object saves us from a use-after-free;
|
||||||
|
under libstdc++, we UaF immediately by re-entering the destructor. Even
|
||||||
|
under libc++ though this is still very dangerous, because any observers
|
||||||
|
that happened to be registered after MediaItemUIDeviceSelectorView will
|
||||||
|
be invoked after the destruction of the object they're observing. Right
|
||||||
|
now there are no such other observers, but the fact remains that this
|
||||||
|
interface is basically a UaF timebomb.
|
||||||
|
|
||||||
|
This change separates "this object is about to be destroyed" (an
|
||||||
|
observable state) from "please destroy this object, it is no longer
|
||||||
|
useful" (a callback that is made to the object's owner) by:
|
||||||
|
|
||||||
|
1. Renaming OnControllerInvalidated to OnControllerDestroying, to make
|
||||||
|
it very clear what is happening to the object, and
|
||||||
|
2. Adding a RegisterDestructor method to CastDialogController, which
|
||||||
|
allows MediaItemUIDeviceSelectorView to pass a callback into
|
||||||
|
MediaRouterUI which MediaRouterUI can use to arrange for its own
|
||||||
|
destruction.
|
||||||
|
|
||||||
|
This is still a bit tangled and ungainly, but it's safe. A fuller
|
||||||
|
writeup is on the linked bug.
|
||||||
|
|
||||||
|
Fixed: 1407202
|
||||||
|
Change-Id: Id9410de1fbf2cb42f13957dde316b7c9259f192f
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4165967
|
||||||
|
Reviewed-by: Peter Kasting <pkasting@chromium.org>
|
||||||
|
Reviewed-by: Takumi Fujimoto <takumif@chromium.org>
|
||||||
|
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1094110}
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/chrome/browser/ui/media_router/cast_dialog_controller.h b/chrome/browser/ui/media_router/cast_dialog_controller.h
|
||||||
|
index 2a8de976..c3c0553 100644
|
||||||
|
--- a/chrome/browser/ui/media_router/cast_dialog_controller.h
|
||||||
|
+++ b/chrome/browser/ui/media_router/cast_dialog_controller.h
|
||||||
|
@@ -24,10 +24,12 @@
|
||||||
|
public:
|
||||||
|
virtual ~Observer() = default;
|
||||||
|
|
||||||
|
- virtual void OnModelUpdated(const CastDialogModel& model) = 0;
|
||||||
|
+ virtual void OnModelUpdated(const CastDialogModel& model) {}
|
||||||
|
|
||||||
|
- // Observer should drop its reference to the controller when this is called.
|
||||||
|
- virtual void OnControllerInvalidated() = 0;
|
||||||
|
+ // Notifies observers that the observed object is being destroyed. Observers
|
||||||
|
+ // MUST NOT try to destroy the observed object in response - to manage the
|
||||||
|
+ // lifetime of a CastDialogController, use RegisterDestructor() below.
|
||||||
|
+ virtual void OnControllerDestroying() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual ~CastDialogController() = default;
|
||||||
|
@@ -55,6 +57,16 @@
|
||||||
|
// intended that this API should only be used to transfer ownership to some
|
||||||
|
// new component that will want to start casting on this dialog box's behalf.
|
||||||
|
virtual std::unique_ptr<MediaRouteStarter> TakeMediaRouteStarter() = 0;
|
||||||
|
+
|
||||||
|
+ // Registers a callback for when the CastDialogController has given up
|
||||||
|
+ // ownership of its MediaRouteStarter and is no longer safe to use. The
|
||||||
|
+ // provided closure must destroy |this| or otherwise ensure it is never used
|
||||||
|
+ // again. This method can only be called once.
|
||||||
|
+ //
|
||||||
|
+ // TODO(https://crbug.com/1408494): It's awkward that CastDialogController has
|
||||||
|
+ // a state where it exists but is unsafe to use, and doubly awkward that we
|
||||||
|
+ // have to paper over that with this callback. Can that be fixed?
|
||||||
|
+ virtual void RegisterDestructor(base::OnceClosure destructor) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace media_router
|
||||||
|
diff --git a/chrome/browser/ui/media_router/media_router_ui.cc b/chrome/browser/ui/media_router/media_router_ui.cc
|
||||||
|
index 1865115f..644d131 100644
|
||||||
|
--- a/chrome/browser/ui/media_router/media_router_ui.cc
|
||||||
|
+++ b/chrome/browser/ui/media_router/media_router_ui.cc
|
||||||
|
@@ -83,6 +83,9 @@
|
||||||
|
MediaRouterUI::~MediaRouterUI() {
|
||||||
|
if (media_route_starter_)
|
||||||
|
DetachFromMediaRouteStarter();
|
||||||
|
+ for (CastDialogController::Observer& observer : observers_) {
|
||||||
|
+ observer.OnControllerDestroying();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
@@ -145,9 +148,6 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
void MediaRouterUI::DetachFromMediaRouteStarter() {
|
||||||
|
- for (CastDialogController::Observer& observer : observers_)
|
||||||
|
- observer.OnControllerInvalidated();
|
||||||
|
-
|
||||||
|
media_route_starter()->RemovePresentationRequestSourceObserver(this);
|
||||||
|
media_route_starter()->RemoveMediaSinkWithCastModesObserver(this);
|
||||||
|
}
|
||||||
|
@@ -181,8 +181,16 @@
|
||||||
|
|
||||||
|
std::unique_ptr<MediaRouteStarter> MediaRouterUI::TakeMediaRouteStarter() {
|
||||||
|
DCHECK(media_route_starter_) << "MediaRouteStarter already taken!";
|
||||||
|
- DetachFromMediaRouteStarter();
|
||||||
|
- return std::move(media_route_starter_);
|
||||||
|
+ auto starter = std::move(media_route_starter_);
|
||||||
|
+ if (destructor_) {
|
||||||
|
+ std::move(destructor_).Run(); // May destroy `this`.
|
||||||
|
+ }
|
||||||
|
+ return starter;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void MediaRouterUI::RegisterDestructor(base::OnceClosure destructor) {
|
||||||
|
+ DCHECK(!destructor_);
|
||||||
|
+ destructor_ = std::move(destructor);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MediaRouterUI::CreateRoute(const MediaSink::Id& sink_id,
|
||||||
|
diff --git a/chrome/browser/ui/media_router/media_router_ui.h b/chrome/browser/ui/media_router/media_router_ui.h
|
||||||
|
index 5c2f14e..7afe775 100644
|
||||||
|
--- a/chrome/browser/ui/media_router/media_router_ui.h
|
||||||
|
+++ b/chrome/browser/ui/media_router/media_router_ui.h
|
||||||
|
@@ -100,8 +100,10 @@
|
||||||
|
void StopCasting(const std::string& route_id) override;
|
||||||
|
void ClearIssue(const Issue::Id& issue_id) override;
|
||||||
|
// Note that |MediaRouterUI| should not be used after |TakeMediaRouteStarter|
|
||||||
|
- // is called.
|
||||||
|
+ // is called. To enforce that, |TakeMediaRouteStarter| calls the destructor
|
||||||
|
+ // callback given to |RegisterDestructor| to destroy itself.
|
||||||
|
std::unique_ptr<MediaRouteStarter> TakeMediaRouteStarter() override;
|
||||||
|
+ void RegisterDestructor(base::OnceClosure destructor) override;
|
||||||
|
|
||||||
|
// Requests a route be created from the source mapped to
|
||||||
|
// |cast_mode|, to the sink given by |sink_id|.
|
||||||
|
@@ -337,6 +339,8 @@
|
||||||
|
raw_ptr<MediaRouter> router_;
|
||||||
|
raw_ptr<LoggerImpl> logger_;
|
||||||
|
|
||||||
|
+ base::OnceClosure destructor_;
|
||||||
|
+
|
||||||
|
// NOTE: Weak pointers must be invalidated before all other member variables.
|
||||||
|
// Therefore |weak_factory_| must be placed at the end.
|
||||||
|
base::WeakPtrFactory<MediaRouterUI> weak_factory_{this};
|
||||||
|
diff --git a/chrome/browser/ui/media_router/media_router_ui_unittest.cc b/chrome/browser/ui/media_router/media_router_ui_unittest.cc
|
||||||
|
index 2cc243d1..c33437b 100644
|
||||||
|
--- a/chrome/browser/ui/media_router/media_router_ui_unittest.cc
|
||||||
|
+++ b/chrome/browser/ui/media_router/media_router_ui_unittest.cc
|
||||||
|
@@ -80,11 +80,11 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
MOCK_METHOD1(OnModelUpdated, void(const CastDialogModel& model));
|
||||||
|
- void OnControllerInvalidated() override {
|
||||||
|
+ void OnControllerDestroying() override {
|
||||||
|
controller_ = nullptr;
|
||||||
|
- OnControllerInvalidatedInternal();
|
||||||
|
+ OnControllerDestroyingInternal();
|
||||||
|
}
|
||||||
|
- MOCK_METHOD0(OnControllerInvalidatedInternal, void());
|
||||||
|
+ MOCK_METHOD0(OnControllerDestroyingInternal, void());
|
||||||
|
|
||||||
|
private:
|
||||||
|
raw_ptr<CastDialogController> controller_ = nullptr;
|
||||||
|
@@ -295,7 +295,7 @@
|
||||||
|
})));
|
||||||
|
NotifyUiOnRoutesUpdated({route});
|
||||||
|
|
||||||
|
- EXPECT_CALL(observer, OnControllerInvalidatedInternal());
|
||||||
|
+ EXPECT_CALL(observer, OnControllerDestroyingInternal());
|
||||||
|
ui_.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view.cc b/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view.cc
|
||||||
|
index 34dad46..d843bba 100644
|
||||||
|
--- a/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view.cc
|
||||||
|
+++ b/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view.cc
|
||||||
|
@@ -222,6 +222,11 @@
|
||||||
|
if (cast_controller) {
|
||||||
|
cast_controller_ = std::move(cast_controller);
|
||||||
|
cast_controller_->AddObserver(this);
|
||||||
|
+ cast_controller_->RegisterDestructor(
|
||||||
|
+ base::BindOnce(&MediaItemUIDeviceSelectorView::DestroyCastController,
|
||||||
|
+ // Unretained is safe: this callback is held by
|
||||||
|
+ // cast_controller_, which is owned by this object.
|
||||||
|
+ base::Unretained(this)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -499,10 +504,6 @@
|
||||||
|
observer.OnMediaItemUIDeviceSelectorUpdated(device_entry_ui_map_);
|
||||||
|
}
|
||||||
|
|
||||||
|
-void MediaItemUIDeviceSelectorView::OnControllerInvalidated() {
|
||||||
|
- cast_controller_.reset();
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
void MediaItemUIDeviceSelectorView::OnDeviceSelected(int tag) {
|
||||||
|
auto it = device_entry_ui_map_.find(tag);
|
||||||
|
DCHECK(it != device_entry_ui_map_.end());
|
||||||
|
@@ -658,5 +659,9 @@
|
||||||
|
weak_ptr_factory_.GetWeakPtr()));
|
||||||
|
}
|
||||||
|
|
||||||
|
+void MediaItemUIDeviceSelectorView::DestroyCastController() {
|
||||||
|
+ cast_controller_.reset();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
BEGIN_METADATA(MediaItemUIDeviceSelectorView, views::View)
|
||||||
|
END_METADATA
|
||||||
|
diff --git a/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view.h b/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view.h
|
||||||
|
index e950565..222fc20 100644
|
||||||
|
--- a/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view.h
|
||||||
|
+++ b/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view.h
|
||||||
|
@@ -81,7 +81,6 @@
|
||||||
|
|
||||||
|
// media_router::CastDialogController::Observer
|
||||||
|
void OnModelUpdated(const media_router::CastDialogModel& model) override;
|
||||||
|
- void OnControllerInvalidated() override;
|
||||||
|
|
||||||
|
// MediaItemUIFooterView::Delegate
|
||||||
|
void OnDeviceSelected(int tag) override;
|
||||||
|
@@ -121,6 +120,7 @@
|
||||||
|
void RecordCastDeviceCount();
|
||||||
|
DeviceEntryUI* GetDeviceEntryUI(views::View* view) const;
|
||||||
|
void RegisterAudioDeviceCallbacks();
|
||||||
|
+ void DestroyCastController();
|
||||||
|
|
||||||
|
bool has_expand_button_been_shown_ = false;
|
||||||
|
bool have_devices_been_shown_ = false;
|
||||||
|
diff --git a/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view_unittest.cc b/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view_unittest.cc
|
||||||
|
index c3bcc6cc..6ae3dde8 100644
|
||||||
|
--- a/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view_unittest.cc
|
||||||
|
+++ b/chrome/browser/ui/views/global_media_controls/media_item_ui_device_selector_view_unittest.cc
|
||||||
|
@@ -156,6 +156,7 @@
|
||||||
|
MOCK_METHOD1(ClearIssue, void(const media_router::Issue::Id& issue_id));
|
||||||
|
MOCK_METHOD0(TakeMediaRouteStarter,
|
||||||
|
std::unique_ptr<media_router::MediaRouteStarter>());
|
||||||
|
+ MOCK_METHOD1(RegisterDestructor, void(base::OnceClosure));
|
||||||
|
};
|
||||||
|
|
||||||
|
} // anonymous namespace
|
||||||
|
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_coordinator_unittest.cc b/chrome/browser/ui/views/media_router/cast_dialog_coordinator_unittest.cc
|
||||||
|
index f6c80d6a..2dedc7e 100644
|
||||||
|
--- a/chrome/browser/ui/views/media_router/cast_dialog_coordinator_unittest.cc
|
||||||
|
+++ b/chrome/browser/ui/views/media_router/cast_dialog_coordinator_unittest.cc
|
||||||
|
@@ -40,6 +40,7 @@
|
||||||
|
MOCK_METHOD(void, StopCasting, (const std::string& route_id));
|
||||||
|
MOCK_METHOD(void, ClearIssue, (const Issue::Id& issue_id));
|
||||||
|
MOCK_METHOD(std::unique_ptr<MediaRouteStarter>, TakeMediaRouteStarter, ());
|
||||||
|
+ MOCK_METHOD(void, RegisterDestructor, (base::OnceClosure));
|
||||||
|
};
|
||||||
|
|
||||||
|
class CastDialogCoordinatorTest : public TestWithBrowserView {
|
||||||
|
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_view.cc b/chrome/browser/ui/views/media_router/cast_dialog_view.cc
|
||||||
|
index e3c7dadb..711d081 100644
|
||||||
|
--- a/chrome/browser/ui/views/media_router/cast_dialog_view.cc
|
||||||
|
+++ b/chrome/browser/ui/views/media_router/cast_dialog_view.cc
|
||||||
|
@@ -125,9 +125,9 @@
|
||||||
|
observer.OnDialogModelUpdated(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
-void CastDialogView::OnControllerInvalidated() {
|
||||||
|
+void CastDialogView::OnControllerDestroying() {
|
||||||
|
controller_ = nullptr;
|
||||||
|
- // We don't destroy the dialog here because if the invalidation was caused by
|
||||||
|
+ // We don't destroy the dialog here because if the destruction was caused by
|
||||||
|
// activating the toolbar icon in order to close the dialog, then it would
|
||||||
|
// cause the dialog to immediately open again.
|
||||||
|
}
|
||||||
|
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_view.h b/chrome/browser/ui/views/media_router/cast_dialog_view.h
|
||||||
|
index d87fdda..d44d4e0 100644
|
||||||
|
--- a/chrome/browser/ui/views/media_router/cast_dialog_view.h
|
||||||
|
+++ b/chrome/browser/ui/views/media_router/cast_dialog_view.h
|
||||||
|
@@ -66,7 +66,7 @@
|
||||||
|
|
||||||
|
// CastDialogController::Observer:
|
||||||
|
void OnModelUpdated(const CastDialogModel& model) override;
|
||||||
|
- void OnControllerInvalidated() override;
|
||||||
|
+ void OnControllerDestroying() override;
|
||||||
|
|
||||||
|
// views::BubbleDialogDelegateView:
|
||||||
|
void OnPaint(gfx::Canvas* canvas) override;
|
||||||
|
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_view_browsertest.cc b/chrome/browser/ui/views/media_router/cast_dialog_view_browsertest.cc
|
||||||
|
index 1c584120..a7af3c8 100644
|
||||||
|
--- a/chrome/browser/ui/views/media_router/cast_dialog_view_browsertest.cc
|
||||||
|
+++ b/chrome/browser/ui/views/media_router/cast_dialog_view_browsertest.cc
|
||||||
|
@@ -70,6 +70,7 @@
|
||||||
|
override {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
+ void RegisterDestructor(base::OnceClosure destructor) override {}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
diff --git a/chrome/browser/ui/views/media_router/cast_dialog_view_unittest.cc b/chrome/browser/ui/views/media_router/cast_dialog_view_unittest.cc
|
||||||
|
index 5326467..988cb07a 100644
|
||||||
|
--- a/chrome/browser/ui/views/media_router/cast_dialog_view_unittest.cc
|
||||||
|
+++ b/chrome/browser/ui/views/media_router/cast_dialog_view_unittest.cc
|
||||||
|
@@ -91,6 +91,7 @@
|
||||||
|
MOCK_METHOD1(StopCasting, void(const std::string& route_id));
|
||||||
|
MOCK_METHOD1(ClearIssue, void(const Issue::Id& issue_id));
|
||||||
|
MOCK_METHOD0(TakeMediaRouteStarter, std::unique_ptr<MediaRouteStarter>());
|
||||||
|
+ MOCK_METHOD1(RegisterDestructor, void(base::OnceClosure));
|
||||||
|
};
|
||||||
|
|
||||||
|
class CastDialogViewTest : public ChromeViewsTestBase {
|
||||||
|
diff --git a/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.cc b/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.cc
|
||||||
|
index ad379b2..244d523 100644
|
||||||
|
--- a/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.cc
|
||||||
|
+++ b/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.cc
|
||||||
|
@@ -51,7 +51,7 @@
|
||||||
|
std::move(context));
|
||||||
|
}
|
||||||
|
|
||||||
|
- ShowGlobalMeidaControlsDialog(std::move(context));
|
||||||
|
+ ShowGlobalMediaControlsDialog(std::move(context));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -155,9 +155,20 @@
|
||||||
|
initiator(), std::move(start_presentation_context_))
|
||||||
|
: MediaRouterUI::CreateWithDefaultMediaSourceAndMirroring(
|
||||||
|
initiator());
|
||||||
|
+ ui_->RegisterDestructor(
|
||||||
|
+ base::BindOnce(&MediaRouterDialogControllerViews::DestroyMediaRouterUI,
|
||||||
|
+ // Safe to use base::Unretained here: the callback being
|
||||||
|
+ // bound is held by the MediaRouterUI we are creating and
|
||||||
|
+ // owning, and ownership of |ui_| is never transferred
|
||||||
|
+ // away from this object.
|
||||||
|
+ base::Unretained(this)));
|
||||||
|
}
|
||||||
|
|
||||||
|
-void MediaRouterDialogControllerViews::ShowGlobalMeidaControlsDialog(
|
||||||
|
+void MediaRouterDialogControllerViews::DestroyMediaRouterUI() {
|
||||||
|
+ ui_.reset();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void MediaRouterDialogControllerViews::ShowGlobalMediaControlsDialog(
|
||||||
|
std::unique_ptr<StartPresentationContext> context) {
|
||||||
|
// Show the WebContents requesting a dialog.
|
||||||
|
initiator()->GetDelegate()->ActivateContents(initiator());
|
||||||
|
diff --git a/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.h b/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.h
|
||||||
|
index 0a5fdb1..7c97211 100644
|
||||||
|
--- a/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.h
|
||||||
|
+++ b/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.h
|
||||||
|
@@ -69,13 +69,14 @@
|
||||||
|
// MediaRouterUIService::Observer:
|
||||||
|
void OnServiceDisabled() override;
|
||||||
|
|
||||||
|
- // Initializes |ui_|.
|
||||||
|
+ // Initializes and destroys |ui_| respectively.
|
||||||
|
void InitializeMediaRouterUI();
|
||||||
|
+ void DestroyMediaRouterUI();
|
||||||
|
|
||||||
|
// If there exists a media button, show the GMC dialog anchored to the media
|
||||||
|
// button. Otherwise, show the dialog anchored to the top center of the web
|
||||||
|
// contents.
|
||||||
|
- void ShowGlobalMeidaControlsDialog(
|
||||||
|
+ void ShowGlobalMediaControlsDialog(
|
||||||
|
std::unique_ptr<StartPresentationContext> context);
|
||||||
|
|
||||||
|
// Returns the media button from the browser that initiates the request to
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/sandbox/linux/services/credentials.h
|
|
||||||
+++ b/sandbox/linux/services/credentials.h
|
|
||||||
@@ -14,6 +14,8 @@
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+
|
|
||||||
#include "sandbox/linux/system_headers/capability.h"
|
|
||||||
#include "sandbox/sandbox_export.h"
|
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
--- a/base/threading/platform_thread_linux.cc
|
|
||||||
+++ b/base/threading/platform_thread_linux.cc
|
|
||||||
@@ -186,7 +186,8 @@
|
|
||||||
|
|
||||||
size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
|
|
||||||
#if !defined(THREAD_SANITIZER)
|
|
||||||
- return 0;
|
|
||||||
+ // use 2mb to avoid running out of space. This is what android uses
|
|
||||||
+ return 2 * (1 << 20);
|
|
||||||
#else
|
|
||||||
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
|
|
||||||
// default stack size isn't enough for some browser tests.
|
|
||||||
--- a/base/threading/platform_thread_unittest.cc
|
|
||||||
+++ b/base/threading/platform_thread_unittest.cc
|
|
||||||
@@ -420,7 +420,7 @@
|
|
||||||
((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
|
|
||||||
!defined(THREAD_SANITIZER)) || \
|
|
||||||
(BUILDFLAG(IS_ANDROID) && !defined(ADDRESS_SANITIZER))
|
|
||||||
- EXPECT_EQ(0u, stack_size);
|
|
||||||
+ EXPECT_EQ(2u << 20, stack_size);
|
|
||||||
#else
|
|
||||||
EXPECT_GT(stack_size, 0u);
|
|
||||||
EXPECT_LT(stack_size, 20u * (1 << 20));
|
|
||||||
--- a/chrome/browser/shutdown_signal_handlers_posix.cc
|
|
||||||
+++ b/chrome/browser/shutdown_signal_handlers_posix.cc
|
|
||||||
@@ -187,11 +187,19 @@
|
|
||||||
g_shutdown_pipe_read_fd = pipefd[0];
|
|
||||||
g_shutdown_pipe_write_fd = pipefd[1];
|
|
||||||
#if !defined(ADDRESS_SANITIZER)
|
|
||||||
+# if defined(__GLIBC__)
|
|
||||||
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
|
|
||||||
+# else
|
|
||||||
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
|
|
||||||
+# endif
|
|
||||||
#else
|
|
||||||
+# if defined(__GLIBC__)
|
|
||||||
// ASan instrumentation bloats the stack frames, so we need to increase the
|
|
||||||
// stack size to avoid hitting the guard page.
|
|
||||||
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
|
|
||||||
+# else
|
|
||||||
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
|
|
||||||
+# endif
|
|
||||||
#endif
|
|
||||||
ShutdownDetector* detector = new ShutdownDetector(
|
|
||||||
g_shutdown_pipe_read_fd, std::move(shutdown_callback), task_runner);
|
|
|
@ -1,15 +1,4 @@
|
||||||
--- a/net/dns/host_resolver_manager.cc
|
the glibc codepath uses res_ninit/res_nclose, which are not implemented in musl
|
||||||
+++ b/net/dns/host_resolver_manager.cc
|
|
||||||
@@ -3014,8 +3014,7 @@
|
|
||||||
NetworkChangeNotifier::AddConnectionTypeObserver(this);
|
|
||||||
if (system_dns_config_notifier_)
|
|
||||||
system_dns_config_notifier_->AddObserver(this);
|
|
||||||
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
|
|
||||||
- !BUILDFLAG(IS_ANDROID)
|
|
||||||
+#if defined(__GLIBC__)
|
|
||||||
EnsureDnsReloaderInit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
--- a/net/dns/dns_reloader.cc
|
--- a/net/dns/dns_reloader.cc
|
||||||
+++ b/net/dns/dns_reloader.cc
|
+++ b/net/dns/dns_reloader.cc
|
||||||
@@ -6,8 +6,7 @@
|
@@ -6,8 +6,7 @@
|
||||||
|
@ -22,9 +11,19 @@
|
||||||
|
|
||||||
#include <resolv.h>
|
#include <resolv.h>
|
||||||
|
|
||||||
--- a/net/dns/host_resolver_proc.cc
|
--- a/net/dns/host_resolver_system_task.cc
|
||||||
+++ b/net/dns/host_resolver_proc.cc
|
+++ b/net/dns/host_resolver_system_task.cc
|
||||||
@@ -176,8 +176,7 @@
|
@@ -310,8 +310,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnsureSystemHostResolverCallReady() {
|
||||||
|
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
|
||||||
|
- !BUILDFLAG(IS_ANDROID)
|
||||||
|
+#if defined(__GLIBC__)
|
||||||
|
EnsureDnsReloaderInit();
|
||||||
|
#elif BUILDFLAG(IS_WIN)
|
||||||
|
EnsureWinsockInit();
|
||||||
|
@@ -396,8 +396,7 @@
|
||||||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||||
base::BlockingType::WILL_BLOCK);
|
base::BlockingType::WILL_BLOCK);
|
||||||
|
|
||||||
|
@ -33,4 +32,4 @@
|
||||||
+#if defined(__GLIBC__)
|
+#if defined(__GLIBC__)
|
||||||
DnsReloaderMaybeReload();
|
DnsReloaderMaybeReload();
|
||||||
#endif
|
#endif
|
||||||
absl::optional<AddressInfo> ai;
|
auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network);
|
||||||
|
|
|
@ -1,23 +1,4 @@
|
||||||
--- a/third_party/crashpad/crashpad/client/BUILD.gn
|
error: use of undeclared identifier 'user_vfp' on armv7
|
||||||
+++ b/third_party/crashpad/crashpad/client/BUILD.gn
|
|
||||||
@@ -81,6 +81,7 @@
|
|
||||||
deps = [
|
|
||||||
":common",
|
|
||||||
"$mini_chromium_source_parent:chromeos_buildflags",
|
|
||||||
+ "../util",
|
|
||||||
]
|
|
||||||
|
|
||||||
if (crashpad_is_win) {
|
|
||||||
--- a/third_party/crashpad/crashpad/util/linux/ptracer.cc
|
|
||||||
+++ b/third_party/crashpad/crashpad/util/linux/ptracer.cc
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
|
|
||||||
#if defined(ARCH_CPU_X86_FAMILY)
|
|
||||||
#include <asm/ldt.h>
|
|
||||||
+#include <asm/ptrace-abi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace crashpad {
|
|
||||||
--- a/third_party/crashpad/crashpad/util/linux/thread_info.h
|
--- a/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||||
+++ b/third_party/crashpad/crashpad/util/linux/thread_info.h
|
+++ b/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||||
@@ -273,7 +273,7 @@ union FloatContext {
|
@@ -273,7 +273,7 @@ union FloatContext {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
Patch-Source: https://github.com/void-linux/void-packages/blob/378db3cf5087877588aebaaa8ca3c9d94dfb54e0/srcpkgs/chromium/patches/fix-missing-cstdint-include-musl.patch
|
Patch-Source: https://github.com/void-linux/void-packages/blob/378db3cf5087877588aebaaa8ca3c9d94dfb54e0/srcpkgs/chromium/patches/fix-missing-cstdint-include-musl.patch
|
||||||
|
fixed in https://github.com/google/quiche/commit/4d4820f0a959be7fa22285d114a5b5b8676f10fe
|
||||||
|
--
|
||||||
--- a/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
|
--- a/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
|
||||||
+++ b/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
|
+++ b/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
|
||||||
@@ -3,6 +3,7 @@
|
@@ -3,6 +3,7 @@
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
--- a/base/files/file_util_linux.cc
|
|
||||||
+++ b/base/files/file_util_linux.cc
|
|
||||||
@@ -30,7 +30,7 @@
|
|
||||||
case EXT2_SUPER_MAGIC: // Also ext3 and ext4
|
|
||||||
case MSDOS_SUPER_MAGIC:
|
|
||||||
case REISERFS_SUPER_MAGIC:
|
|
||||||
- case static_cast<int>(BTRFS_SUPER_MAGIC):
|
|
||||||
+ case BTRFS_SUPER_MAGIC:
|
|
||||||
case 0x5346544E: // NTFS
|
|
||||||
case 0x58465342: // XFS
|
|
||||||
case 0x3153464A: // JFS
|
|
||||||
@@ -40,14 +40,14 @@
|
|
||||||
*type = FILE_SYSTEM_NFS;
|
|
||||||
break;
|
|
||||||
case SMB_SUPER_MAGIC:
|
|
||||||
- case static_cast<int>(0xFF534D42): // CIFS
|
|
||||||
+ case 0xFF534D42: // CIFS
|
|
||||||
*type = FILE_SYSTEM_SMB;
|
|
||||||
break;
|
|
||||||
case CODA_SUPER_MAGIC:
|
|
||||||
*type = FILE_SYSTEM_CODA;
|
|
||||||
break;
|
|
||||||
- case static_cast<int>(HUGETLBFS_MAGIC):
|
|
||||||
- case static_cast<int>(RAMFS_MAGIC):
|
|
||||||
+ case HUGETLBFS_MAGIC:
|
|
||||||
+ case RAMFS_MAGIC:
|
|
||||||
case TMPFS_MAGIC:
|
|
||||||
*type = FILE_SYSTEM_MEMORY;
|
|
||||||
break;
|
|
||||||
--- a/base/system/sys_info_posix.cc
|
|
||||||
+++ b/base/system/sys_info_posix.cc
|
|
||||||
@@ -100,10 +100,10 @@
|
|
||||||
if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
switch (stats.f_type) {
|
|
||||||
case TMPFS_MAGIC:
|
|
||||||
- case static_cast<int>(HUGETLBFS_MAGIC):
|
|
||||||
- case static_cast<int>(RAMFS_MAGIC):
|
|
||||||
+ case HUGETLBFS_MAGIC:
|
|
||||||
+ case RAMFS_MAGIC:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
aports is a git tree so these git commands get the wrong directory
|
||||||
--- a/tools/gdb/gdbinit
|
--- a/tools/gdb/gdbinit
|
||||||
+++ b/tools/gdb/gdbinit
|
+++ b/tools/gdb/gdbinit
|
||||||
@@ -50,17 +50,7 @@
|
@@ -50,17 +50,7 @@
|
||||||
|
|
7
testing/electron/libcxx-muslmode.patch
Normal file
7
testing/electron/libcxx-muslmode.patch
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
--- a/buildtools/third_party/libc++/__config_site
|
||||||
|
+++ b/buildtools/third_party/libc++/__config_site
|
||||||
|
@@ -49,3 +49,4 @@
|
||||||
|
#define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
|
||||||
|
|
||||||
|
+#define _LIBCPP_HAS_MUSL_LIBC
|
||||||
|
#endif // _LIBCPP_CONFIG_SITE
|
|
@ -1,18 +0,0 @@
|
||||||
--- a/base/allocator/partition_allocator/tagging.cc
|
|
||||||
+++ b/base/allocator/partition_allocator/tagging.cc
|
|
||||||
@@ -19,15 +19,6 @@
|
|
||||||
#define PR_GET_TAGGED_ADDR_CTRL 56
|
|
||||||
#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
|
|
||||||
|
|
||||||
-#if BUILDFLAG(IS_LINUX)
|
|
||||||
-#include <linux/version.h>
|
|
||||||
-
|
|
||||||
-// Linux headers already provide these since v5.10.
|
|
||||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
|
||||||
-#define HAS_PR_MTE_MACROS
|
|
||||||
-#endif
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
#ifndef HAS_PR_MTE_MACROS
|
|
||||||
#define PR_MTE_TCF_SHIFT 1
|
|
||||||
#define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
|
|
|
@ -1,7 +1,10 @@
|
||||||
|
musl uses different syscalls from glibc for some functions, so the sandbox has
|
||||||
|
to account for that
|
||||||
|
--
|
||||||
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||||
index ff5a1c0..da56b9b 100644
|
index ff5a1c0..da56b9b 100644
|
||||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||||
@@ -139,21 +139,11 @@ namespace sandbox {
|
@@ -139,21 +139,11 @@ namespace sandbox {
|
||||||
// present (as in newer versions of posix_spawn).
|
// present (as in newer versions of posix_spawn).
|
||||||
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
|
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
|
||||||
|
@ -41,7 +44,7 @@ index ff5a1c0..da56b9b 100644
|
||||||
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||||
index d9d1882..0567557 100644
|
index d9d1882..0567557 100644
|
||||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
+++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||||
@@ -392,6 +392,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
|
@@ -392,6 +392,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
case __NR_waitpid:
|
case __NR_waitpid:
|
||||||
|
@ -87,21 +90,15 @@ index 2b78a0c..b6fedb5 100644
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
#if defined(__x86_64__)
|
||||||
#include "sandbox/linux/system_headers/x86_64_linux_syscalls.h"
|
#include "sandbox/linux/system_headers/x86_64_linux_syscalls.h"
|
||||||
diff --git a/services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc ./services/service_manager/sandbox/linux/bpf_renderer_policy_linux.cc
|
|
||||||
index a85c0ea..715aa1e 100644
|
|
||||||
--- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
--- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||||
+++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
+++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||||
@@ -102,11 +102,11 @@
|
@@ -94,6 +94,9 @@
|
||||||
#if defined(__arm__) || defined(__aarch64__)
|
case __NR_pwrite64:
|
||||||
case __NR_getcpu:
|
case __NR_sched_get_priority_max:
|
||||||
#endif
|
case __NR_sched_get_priority_min:
|
||||||
- return Allow();
|
+ case __NR_sched_getparam:
|
||||||
- case __NR_sched_getaffinity:
|
+ case __NR_sched_getscheduler:
|
||||||
case __NR_sched_getparam:
|
+ case __NR_sched_setscheduler:
|
||||||
case __NR_sched_getscheduler:
|
case __NR_sysinfo:
|
||||||
case __NR_sched_setscheduler:
|
case __NR_times:
|
||||||
+ return Allow();
|
case __NR_uname:
|
||||||
+ case __NR_sched_getaffinity:
|
|
||||||
return RestrictSchedTarget(GetPolicyPid(), sysno);
|
|
||||||
case __NR_prlimit64:
|
|
||||||
// See crbug.com/662450 and setrlimit comment above.
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
the sandbox caching of thread id's only works with glibc
|
||||||
|
see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32356
|
||||||
|
see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579
|
||||||
|
--
|
||||||
--- a/sandbox/linux/services/namespace_sandbox.cc
|
--- a/sandbox/linux/services/namespace_sandbox.cc
|
||||||
+++ b/sandbox/linux/services/namespace_sandbox.cc
|
+++ b/sandbox/linux/services/namespace_sandbox.cc
|
||||||
@@ -209,6 +209,70 @@
|
@@ -209,6 +209,70 @@
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Use monotonic clock for pthread_cond_timedwait with musl too.
|
use monotonic clock for pthread_cond_timedwait with musl too, since it supports
|
||||||
|
it
|
||||||
|
--
|
||||||
--- a/v8/src/base/platform/condition-variable.cc
|
--- a/v8/src/base/platform/condition-variable.cc
|
||||||
+++ b/v8/src/base/platform/condition-variable.cc
|
+++ b/v8/src/base/platform/condition-variable.cc
|
||||||
@@ -16,7 +16,7 @@
|
@@ -16,7 +16,7 @@
|
||||||
|
|
26
testing/electron/narrowing-cast.patch
Normal file
26
testing/electron/narrowing-cast.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
cl: https://chromium-review.googlesource.com/c/chromium/src/+/4159728
|
||||||
|
diff --git a/base/system/sys_info_posix.cc b/base/system/sys_info_posix.cc
|
||||||
|
index 92e70aa..80c750ba 100644
|
||||||
|
--- a/base/system/sys_info_posix.cc
|
||||||
|
+++ b/base/system/sys_info_posix.cc
|
||||||
|
|
||||||
|
@@ -67,10 +67,16 @@
|
||||||
|
if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
- switch (stats.f_type) {
|
||||||
|
+ // This static_cast is here because various libcs disagree about the size
|
||||||
|
+ // and signedness of statfs::f_type. In particular, glibc has it as either a
|
||||||
|
+ // signed long or a signed int depending on platform, and other libcs
|
||||||
|
+ // (following the statfs(2) man page) use unsigned int instead. To avoid
|
||||||
|
+ // either an unsigned -> signed cast, or a narrowing cast, we always upcast
|
||||||
|
+ // statfs::f_type to unsigned long. :(
|
||||||
|
+ switch (static_cast<unsigned long>(stats.f_type)) {
|
||||||
|
case TMPFS_MAGIC:
|
||||||
|
- case static_cast<int>(HUGETLBFS_MAGIC):
|
||||||
|
- case static_cast<int>(RAMFS_MAGIC):
|
||||||
|
+ case HUGETLBFS_MAGIC:
|
||||||
|
+ case RAMFS_MAGIC:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
|
@ -1,3 +1,8 @@
|
||||||
|
musl does not have execinfo.h, and hence no implementation of
|
||||||
|
. backtrace()
|
||||||
|
. backtrace_symbols()
|
||||||
|
for discussion about this, see https://www.openwall.com/lists/musl/2021/07/16/1
|
||||||
|
--
|
||||||
--- a/base/debug/stack_trace_posix.cc
|
--- a/base/debug/stack_trace_posix.cc
|
||||||
+++ b/base/debug/stack_trace_posix.cc
|
+++ b/base/debug/stack_trace_posix.cc
|
||||||
@@ -27,7 +27,7 @@
|
@@ -27,7 +27,7 @@
|
||||||
|
@ -105,3 +110,23 @@
|
||||||
OutputToStreamWithPrefix(&stream, prefix_string);
|
OutputToStreamWithPrefix(&stream, prefix_string);
|
||||||
#endif
|
#endif
|
||||||
return stream.str();
|
return stream.str();
|
||||||
|
--- a/base/debug/stack_trace_unittest.cc
|
||||||
|
+++ b/base/debug/stack_trace_unittest.cc
|
||||||
|
@@ -33,7 +33,7 @@
|
||||||
|
typedef testing::Test StackTraceTest;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||||
|
+#if !defined(__UCLIBC__) && !defined(_AIX) && defined(__GLIBC__)
|
||||||
|
// StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
|
||||||
|
// See https://crbug.com/706728
|
||||||
|
|
||||||
|
@@ -156,7 +156,7 @@
|
||||||
|
|
||||||
|
#endif // !defined(__UCLIBC__) && !defined(_AIX)
|
||||||
|
|
||||||
|
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID)
|
||||||
|
+#if (BUILDFLAG(IS_POSIX) && defined(__GLIBC__)) && !BUILDFLAG(IS_ANDROID)
|
||||||
|
#if !BUILDFLAG(IS_IOS)
|
||||||
|
static char* newArray() {
|
||||||
|
// Clang warns about the mismatched new[]/delete if they occur in the same
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
musl doesn't have gnu/libc-version.h and the corresponding
|
||||||
|
gnu_get_libc_verrsion() function. the guards should probably account for this.
|
||||||
|
--
|
||||||
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
||||||
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
||||||
@@ -61,7 +61,6 @@
|
@@ -61,7 +61,6 @@
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
musl does not implement mallinfo()/mallinfo2()
|
||||||
|
(or rather, malloc-ng, musl's allocator, doesn't)
|
||||||
|
--
|
||||||
--- a/base/trace_event/malloc_dump_provider.cc
|
--- a/base/trace_event/malloc_dump_provider.cc
|
||||||
+++ b/base/trace_event/malloc_dump_provider.cc
|
+++ b/base/trace_event/malloc_dump_provider.cc
|
||||||
@@ -185,7 +185,6 @@
|
@@ -185,7 +185,6 @@
|
||||||
|
@ -57,8 +60,8 @@
|
||||||
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
|
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
--- a/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
|
--- ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc.orig
|
||||||
+++ b/third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
|
+++ ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
|
||||||
@@ -35,7 +35,7 @@
|
@@ -35,7 +35,7 @@
|
||||||
|
|
||||||
MemoryUsage GetMemoryUsage() {
|
MemoryUsage GetMemoryUsage() {
|
||||||
|
@ -68,8 +71,8 @@
|
||||||
rusage res;
|
rusage res;
|
||||||
if (getrusage(RUSAGE_SELF, &res) == 0) {
|
if (getrusage(RUSAGE_SELF, &res) == 0) {
|
||||||
result.max_rss_kb = res.ru_maxrss;
|
result.max_rss_kb = res.ru_maxrss;
|
||||||
--- a/third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc
|
--- ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc
|
||||||
+++ b/third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc
|
+++ ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc.orig
|
||||||
@@ -86,11 +86,11 @@
|
@@ -86,11 +86,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,8 +88,8 @@
|
||||||
mi = ::mallinfo();
|
mi = ::mallinfo();
|
||||||
return mi.uordblks;
|
return mi.uordblks;
|
||||||
|
|
||||||
--- a/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
|
--- ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h.orig 2019-09-30 13:03:42.556880537 -0400
|
||||||
+++ b/third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h
|
+++ ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h 2019-09-30 13:07:27.989821227 -0400
|
||||||
@@ -122,7 +122,9 @@
|
@@ -122,7 +122,9 @@
|
||||||
/* #undef HAVE_MALLCTL */
|
/* #undef HAVE_MALLCTL */
|
||||||
|
|
||||||
|
@ -97,8 +100,8 @@
|
||||||
|
|
||||||
/* Define to 1 if you have the <malloc.h> header file. */
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
#define HAVE_MALLOC_H 1
|
#define HAVE_MALLOC_H 1
|
||||||
--- a/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc
|
--- a/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
|
||||||
+++ b/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc
|
+++ b/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
|
||||||
@@ -717,7 +717,7 @@
|
@@ -717,7 +717,7 @@
|
||||||
|
|
||||||
#endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID)
|
#endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID)
|
||||||
|
@ -108,3 +111,14 @@
|
||||||
SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW {
|
SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW {
|
||||||
base::SimplePartitionStatsDumper allocator_dumper;
|
base::SimplePartitionStatsDumper allocator_dumper;
|
||||||
Allocator()->DumpStats("malloc", true, &allocator_dumper);
|
Allocator()->DumpStats("malloc", true, &allocator_dumper);
|
||||||
|
--- a/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
|
||||||
|
+++ b/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||||
|
|
||||||
|
// Platforms on which we override weak libc symbols.
|
||||||
|
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||||
|
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS)
|
||||||
|
|
||||||
|
NOINLINE void FreeForTest(void* data) {
|
||||||
|
free(data);
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
similar to dns-resolver.patch, musl doesn't have res_ninit and so on
|
||||||
|
--
|
||||||
--- a/net/dns/public/scoped_res_state.cc
|
--- a/net/dns/public/scoped_res_state.cc
|
||||||
+++ b/net/dns/public/scoped_res_state.cc
|
+++ b/net/dns/public/scoped_res_state.cc
|
||||||
@@ -13,7 +13,7 @@
|
@@ -13,7 +13,7 @@
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
works around things like
|
||||||
|
|
||||||
|
third_party/zlib/google/zip_reader.cc:99:24: error: variable has incomplete type 'base::stat_wrapper_t' (aka 'stat64')
|
||||||
|
base::stat_wrapper_t sb;
|
||||||
|
^
|
||||||
|
base/files/file.h:28:8: note: forward declaration of 'stat64'
|
||||||
|
struct stat64;
|
||||||
|
|
||||||
|
should be resolved by https://chromium-review.googlesource.com/c/chromium/src/+/4134763
|
||||||
|
|
||||||
--- a/base/files/file.h
|
--- a/base/files/file.h
|
||||||
+++ b/base/files/file.h
|
+++ b/base/files/file.h
|
||||||
@@ -19,7 +19,8 @@
|
@@ -19,7 +19,8 @@
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.h
|
|
||||||
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.h
|
|
||||||
@@ -178,7 +178,7 @@
|
|
||||||
class AutofillPopupViewPtr {
|
|
||||||
public:
|
|
||||||
AutofillPopupViewPtr() = default;
|
|
||||||
- AutofillPopupViewPtr(nullptr_t) : ptr_(nullptr) {}
|
|
||||||
+ AutofillPopupViewPtr(std::nullptr_t) : ptr_(nullptr) {}
|
|
||||||
AutofillPopupViewPtr(AutofillPopupView* ptr) : ptr_(ptr) {}
|
|
||||||
|
|
||||||
explicit operator bool() const { return ptr_; }
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
this is in the malloc initialisation path- but pthread_atfork calls malloc() in
|
||||||
|
musl (doesn't in glibc), so it causes an infinite spin on the spinlock taken in
|
||||||
|
this path.
|
||||||
|
|
||||||
|
there's no real good way to work around this, but musl 1.2.4 contains a
|
||||||
|
commit to use internal __libc_malloc for pthread_atfork instead of calling
|
||||||
|
the externally defined malloc and causing a loop here, so this won't be needed
|
||||||
|
then.
|
||||||
|
|
||||||
|
(also surprising how this doesn't break anything)
|
||||||
|
--
|
||||||
--- a/base/allocator/partition_allocator/partition_root.cc
|
--- a/base/allocator/partition_allocator/partition_root.cc
|
||||||
+++ b/base/allocator/partition_allocator/partition_root.cc
|
+++ b/base/allocator/partition_allocator/partition_root.cc
|
||||||
@@ -248,9 +248,9 @@
|
@@ -248,9 +248,9 @@
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/tools/grit/grit/util.py
|
|
||||||
+++ b/tools/grit/grit/util.py
|
|
||||||
@@ -209,7 +209,7 @@
|
|
||||||
mode = 'rb'
|
|
||||||
encoding = None
|
|
||||||
else:
|
|
||||||
- mode = 'rU'
|
|
||||||
+ mode = 'r'
|
|
||||||
|
|
||||||
with io.open(filename, mode, encoding=encoding) as f:
|
|
||||||
return f.read()
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
back in the day when net_unittests were ran, the block arena size was not big
|
||||||
|
enough for some reason. should look at this again
|
||||||
|
--
|
||||||
--- a/net/third_party/quiche/src/quiche/quic/core/quic_one_block_arena.h
|
--- a/net/third_party/quiche/src/quiche/quic/core/quic_one_block_arena.h
|
||||||
+++ b/net/third_party/quiche/src/quiche/quic/core/quic_one_block_arena.h
|
+++ b/net/third_party/quiche/src/quiche/quic/core/quic_one_block_arena.h
|
||||||
@@ -69,7 +69,7 @@
|
@@ -69,7 +69,7 @@
|
||||||
|
|
10
testing/electron/remove-broken-patch.patch
Normal file
10
testing/electron/remove-broken-patch.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/third_party/node/update_npm_deps
|
||||||
|
+++ b/third_party/node/update_npm_deps
|
||||||
|
@@ -20,7 +20,6 @@
|
||||||
|
|
||||||
|
patch -d node_modules/@types/d3/ -p1 < chromium_d3_types_index.patch
|
||||||
|
patch -d node_modules/html-minifier/ -p1 < html_minifier.patch
|
||||||
|
-patch -p1 < typescript.patch
|
||||||
|
|
||||||
|
rsync -c --delete -r -q --include-from="npm_include.txt" --exclude-from="npm_exclude.txt" \
|
||||||
|
--prune-empty-dirs "node_modules/" "node_modules_filtered/"
|
|
@ -1,7 +1,10 @@
|
||||||
for some reason this breaks and the fd returned after close() after a few
|
for some reason this breaks and the fd returned after close() after a few
|
||||||
cycles is still in the lock array
|
cycles is still in the lock array.
|
||||||
|
|
||||||
so, just don't enforce or wrap anything.
|
so, just don't enforce or wrap anything.
|
||||||
|
|
||||||
|
note when testing this again: __close does not exist as a symbol in musl, so a
|
||||||
|
manual dlsym workaround has to be performed to use this codepath.
|
||||||
--- a/base/files/scoped_file_linux.cc
|
--- a/base/files/scoped_file_linux.cc
|
||||||
+++ b/base/files/scoped_file_linux.cc
|
+++ b/base/files/scoped_file_linux.cc
|
||||||
@@ -77,15 +77,3 @@
|
@@ -77,15 +77,3 @@
|
||||||
|
|
63
testing/electron/system-icu.patch
Normal file
63
testing/electron/system-icu.patch
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
Patch-Source: https://github.com/archlinux/svntogit-packages/blob/a0b214b3bdfbc7ee3d9004a70494a2b9e3da2c80/trunk/fix-the-way-to-handle-codecs-in-the-system-icu.patch
|
||||||
|
https://crbug.com/1382032
|
||||||
|
--
|
||||||
|
From 4885090741554be61cb2ed10194cefb29bf8be64 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
|
||||||
|
Date: Wed, 11 Jan 2023 23:51:39 +0000
|
||||||
|
Subject: [PATCH] Fix the way to handle codecs in the system icu.
|
||||||
|
|
||||||
|
The previous code does not register codecs whose standard name is
|
||||||
|
different from the bundled ICU. As a result, looking up such codecs
|
||||||
|
seems to fail unexpectedly.
|
||||||
|
|
||||||
|
Bug: 1382032
|
||||||
|
Change-Id: I8a61f77d0f70104415d24dd954b3b7061ffca556
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4154277
|
||||||
|
Reviewed-by: Kent Tamura <tkent@chromium.org>
|
||||||
|
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1091571}
|
||||||
|
---
|
||||||
|
.../renderer/platform/wtf/text/text_codec_icu.cc | 14 ++++++++++----
|
||||||
|
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc b/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
|
||||||
|
index a70b359984f..33ce43f3563 100644
|
||||||
|
--- a/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
|
||||||
|
+++ b/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
|
||||||
|
@@ -116,6 +116,10 @@ void TextCodecICU::RegisterEncodingNames(EncodingNameRegistrar registrar) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
+ // Avoid codecs supported by `TextCodecCJK`.
|
||||||
|
+ if (is_text_codec_cjk_enabled && TextCodecCJK::IsSupported(standard_name)) {
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
// A number of these aliases are handled in Chrome's copy of ICU, but
|
||||||
|
// Chromium can be compiled with the system ICU.
|
||||||
|
@@ -144,12 +148,13 @@ void TextCodecICU::RegisterEncodingNames(EncodingNameRegistrar registrar) {
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- if (is_text_codec_cjk_enabled && TextCodecCJK::IsSupported(standard_name)) {
|
||||||
|
- continue;
|
||||||
|
+ // Avoid registering codecs registered by
|
||||||
|
+ // `TextCodecCJK::RegisterEncodingNames`.
|
||||||
|
+ if (!is_text_codec_cjk_enabled ||
|
||||||
|
+ !TextCodecCJK::IsSupported(standard_name)) {
|
||||||
|
+ registrar(standard_name, standard_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
- registrar(standard_name, standard_name);
|
||||||
|
-
|
||||||
|
uint16_t num_aliases = ucnv_countAliases(name, &error);
|
||||||
|
DCHECK(U_SUCCESS(error));
|
||||||
|
if (U_SUCCESS(error))
|
||||||
|
@@ -289,6 +294,7 @@ void TextCodecICU::RegisterCodecs(TextCodecRegistrar registrar) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
+ // Avoid codecs supported by `TextCodecCJK`.
|
||||||
|
if (is_text_codec_cjk_enabled && TextCodecCJK::IsSupported(standard_name)) {
|
||||||
|
continue;
|
||||||
|
}
|
|
@ -1,53 +0,0 @@
|
||||||
--- a/third_party/electron_node/BUILD.gn
|
|
||||||
+++ b/third_party/electron_node/BUILD.gn
|
|
||||||
@@ -42,6 +42,18 @@
|
|
||||||
node_module_version = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
+if (is_linux) {
|
|
||||||
+ import("//build/config/linux/pkg_config.gni")
|
|
||||||
+
|
|
||||||
+ pkg_config("cares") {
|
|
||||||
+ packages = [ "libcares" ]
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ pkg_config("nghttp2") {
|
|
||||||
+ packages = [ "libnghttp2" ]
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
assert(!node_use_dtrace, "node_use_dtrace not supported in GN")
|
|
||||||
assert(!node_use_etw, "node_use_etw not supported in GN")
|
|
||||||
|
|
||||||
@@ -182,11 +194,9 @@
|
|
||||||
component("node_lib") {
|
|
||||||
deps = [
|
|
||||||
":node_js2c",
|
|
||||||
- "deps/cares",
|
|
||||||
"deps/histogram",
|
|
||||||
"deps/googletest:gtest",
|
|
||||||
"deps/llhttp",
|
|
||||||
- "deps/nghttp2",
|
|
||||||
"deps/uvwasi",
|
|
||||||
"//third_party/zlib",
|
|
||||||
"//third_party/brotli:dec",
|
|
||||||
@@ -202,6 +212,19 @@
|
|
||||||
public_configs = [ ":node_lib_config" ]
|
|
||||||
include_dirs = [ "src" ]
|
|
||||||
libs = []
|
|
||||||
+ if (is_linux) {
|
|
||||||
+ configs += [
|
|
||||||
+ ":cares",
|
|
||||||
+ ":nghttp2",
|
|
||||||
+ ]
|
|
||||||
+ libs += [ "http_parser" ]
|
|
||||||
+ } else {
|
|
||||||
+ deps += [
|
|
||||||
+ "deps/cares",
|
|
||||||
+ "deps/http_parser",
|
|
||||||
+ "deps/nghttp2",
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
frameworks = []
|
|
||||||
cflags_cc = [
|
|
||||||
"-Wno-deprecated-declarations",
|
|
|
@ -1,4 +1,5 @@
|
||||||
random glibc macro
|
random glibc macro, not provided by musl.
|
||||||
|
https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html
|
||||||
--- a/sandbox/linux/suid/process_util.h
|
--- a/sandbox/linux/suid/process_util.h
|
||||||
+++ b/sandbox/linux/suid/process_util.h
|
+++ b/sandbox/linux/suid/process_util.h
|
||||||
@@ -11,6 +11,14 @@
|
@@ -11,6 +11,14 @@
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
the pthread_attr* calls in this codepath are supported by musl, so update the
|
||||||
|
guards to IS_LINUX instead of just glibc to make use of them. otherwise this
|
||||||
|
hits the #error path
|
||||||
|
--
|
||||||
--- a/third_party/blink/renderer/platform/wtf/stack_util.cc
|
--- a/third_party/blink/renderer/platform/wtf/stack_util.cc
|
||||||
+++ b/third_party/blink/renderer/platform/wtf/stack_util.cc
|
+++ b/third_party/blink/renderer/platform/wtf/stack_util.cc
|
||||||
@@ -29,7 +29,7 @@
|
@@ -29,7 +29,7 @@
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue