mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
extra/chromium to 91.0.4472.77-1
This commit is contained in:
parent
55bfe862e0
commit
6128f188ea
10 changed files with 366 additions and 211 deletions
|
@ -1,25 +0,0 @@
|
|||
From df38c5f97c31af595c1262333be167cdacb1ea3e Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Wed, 30 Jan 2019 14:18:00 -0700
|
||||
Subject: [PATCH 1/4] crashpad: include limits
|
||||
|
||||
Fixes ARM FTBFS
|
||||
---
|
||||
.../crashpad/crashpad/snapshot/linux/cpu_context_linux.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
|
||||
index 8464a5a27b2d..c184eccf327b 100644
|
||||
--- a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
|
||||
+++ b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
+#include <limits>
|
||||
|
||||
#include <limits>
|
||||
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
From 6a4553d9abc99733c45caff639151159b2ccef07 Mon Sep 17 00:00:00 2001
|
||||
From 904e99fe2dea9b24d745b434858008dd78ca2933 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Thu, 18 Feb 2021 19:35:58 -0700
|
||||
Subject: [PATCH 4/4] widevine support for arm
|
||||
Subject: [PATCH] widevine support for arm
|
||||
|
||||
---
|
||||
third_party/widevine/cdm/widevine.gni | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/third_party/widevine/cdm/widevine.gni b/third_party/widevine/cdm/widevine.gni
|
||||
index 5b7734b8aa3d..74187f526810 100644
|
||||
index a81a67e8f726..3d0e27fed6ee 100644
|
||||
--- a/third_party/widevine/cdm/widevine.gni
|
||||
+++ b/third_party/widevine/cdm/widevine.gni
|
||||
@@ -26,7 +26,7 @@ if (is_chromeos_ash && !is_chromeos_device) {
|
|
@ -1,106 +0,0 @@
|
|||
From 9776f3f02a40570e72a7fe650a94ef156b4fb872 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Tue, 2 Feb 2021 13:58:21 -0700
|
||||
Subject: [PATCH 2/4] Fix sandbox 'Aw snap' for sycalls 403 and 407
|
||||
|
||||
---
|
||||
sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc | 9 ++++++++-
|
||||
.../syscall_parameters_restrictions_unittests.cc | 6 ++++++
|
||||
sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc | 6 ++++++
|
||||
sandbox/linux/system_headers/arm_linux_syscalls.h | 8 ++++++++
|
||||
sandbox/linux/system_headers/mips_linux_syscalls.h | 8 ++++++++
|
||||
5 files changed, 36 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
index 5242bde81fbf..bef4cf1d24e0 100644
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
@@ -159,7 +159,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
|
||||
return Allow();
|
||||
#endif
|
||||
|
||||
- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
|
||||
+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep
|
||||
+#if defined(__NR_clock_gettime64)
|
||||
+ || sysno == __NR_clock_gettime64
|
||||
+#endif
|
||||
+#if defined(__NR_clock_nanosleep_time64)
|
||||
+ || sysno == __NR_clock_nanosleep_time64
|
||||
+#endif
|
||||
+ ) {
|
||||
return RestrictClockID();
|
||||
}
|
||||
|
||||
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
|
||||
index 4bbfc7e53b6f..540149b67d95 100644
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
|
||||
@@ -61,6 +61,12 @@ class RestrictClockIdPolicy : public bpf_dsl::Policy {
|
||||
case __NR_clock_gettime:
|
||||
case __NR_clock_getres:
|
||||
case __NR_clock_nanosleep:
|
||||
+#if defined(__NR_clock_nanosleep_time64)
|
||||
+ case __NR_clock_nanosleep_time64:
|
||||
+#endif
|
||||
+#if defined(__NR_clock_gettime64)
|
||||
+ case __NR_clock_gettime64:
|
||||
+#endif
|
||||
return RestrictClockID();
|
||||
default:
|
||||
return Allow();
|
||||
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
index f40d436edfbd..c712b00f6179 100644
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int sysno) {
|
||||
// filtered by RestrictClokID().
|
||||
case __NR_clock_gettime: // Parameters filtered by RestrictClockID().
|
||||
case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID().
|
||||
+#if defined(__NR_clock_gettime64)
|
||||
+ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID().
|
||||
+#endif
|
||||
+#if defined(__NR_clock_nanosleep_time64)
|
||||
+ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
|
||||
+#endif
|
||||
case __NR_clock_settime: // Privileged.
|
||||
#if defined(__i386__) || \
|
||||
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
diff --git a/sandbox/linux/system_headers/arm_linux_syscalls.h b/sandbox/linux/system_headers/arm_linux_syscalls.h
|
||||
index 85e2110b4c29..c39c22b5114d 100644
|
||||
--- a/sandbox/linux/system_headers/arm_linux_syscalls.h
|
||||
+++ b/sandbox/linux/system_headers/arm_linux_syscalls.h
|
||||
@@ -1441,6 +1441,14 @@
|
||||
#define __NR_io_pgetevents (__NR_SYSCALL_BASE+399)
|
||||
#endif
|
||||
|
||||
+#if !defined(__NR_clock_gettime64)
|
||||
+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403)
|
||||
+#endif
|
||||
+
|
||||
+#if !defined(__NR_clock_nanosleep_time64)
|
||||
+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407)
|
||||
+#endif
|
||||
+
|
||||
// ARM private syscalls.
|
||||
#if !defined(__ARM_NR_BASE)
|
||||
#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
|
||||
diff --git a/sandbox/linux/system_headers/mips_linux_syscalls.h b/sandbox/linux/system_headers/mips_linux_syscalls.h
|
||||
index ddbf97f3d8b5..fa01b3bbc668 100644
|
||||
--- a/sandbox/linux/system_headers/mips_linux_syscalls.h
|
||||
+++ b/sandbox/linux/system_headers/mips_linux_syscalls.h
|
||||
@@ -1433,4 +1433,12 @@
|
||||
#define __NR_memfd_create (__NR_Linux + 354)
|
||||
#endif
|
||||
|
||||
+#if !defined(__NR_clock_gettime64)
|
||||
+#define __NR_clock_gettime64 (__NR_Linux + 403)
|
||||
+#endif
|
||||
+
|
||||
+#if !defined(__NR_clock_nanosleep_time64)
|
||||
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
|
||||
+#endif
|
||||
+
|
||||
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From c2c53f8f86eaf1fa5803b0c67e6fab3cc7722775 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Tue, 2 Feb 2021 13:58:59 -0700
|
||||
Subject: [PATCH 3/4] Run blink bindings generation single threaded
|
||||
|
||||
When not single threaded this process will eat all the RAM.
|
||||
---
|
||||
third_party/blink/renderer/bindings/BUILD.gn | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/third_party/blink/renderer/bindings/BUILD.gn b/third_party/blink/renderer/bindings/BUILD.gn
|
||||
index 61c9e7f59da7..a33c9e4144df 100644
|
||||
--- a/third_party/blink/renderer/bindings/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/bindings/BUILD.gn
|
||||
@@ -178,6 +178,7 @@ template("generate_bindings") {
|
||||
outputs = invoker.outputs
|
||||
|
||||
args = [
|
||||
+ "--single_process",
|
||||
"--web_idl_database",
|
||||
rebase_path(web_idl_database, root_build_dir),
|
||||
"--root_src_dir",
|
||||
--
|
||||
2.30.1
|
||||
|
|
@ -15,10 +15,10 @@ buildarch=12
|
|||
highmem=1
|
||||
|
||||
pkgname=chromium
|
||||
pkgver=90.0.4430.212
|
||||
pkgver=91.0.4472.77
|
||||
pkgrel=1
|
||||
_launcher_ver=7
|
||||
_gcc_patchset=6
|
||||
_gcc_patchset=5
|
||||
pkgdesc="A web browser built for speed, simplicity, and security"
|
||||
arch=('x86_64')
|
||||
url="https://www.chromium.org/Home"
|
||||
|
@ -29,29 +29,31 @@ depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
|
|||
makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
|
||||
'java-runtime-headless' 'python2' 'python2-setuptools')
|
||||
optdepends=('pipewire: WebRTC desktop sharing under Wayland'
|
||||
'kdialog: needed for file dialogs in KDE'
|
||||
'kdialog: support for native dialogs in Plasma'
|
||||
'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
|
||||
'kwallet: for storing passwords in KWallet on KDE desktops')
|
||||
'kwallet: support for storing passwords in KWallet on Plasma')
|
||||
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
|
||||
fix-crash-in-ThemeService.patch
|
||||
unbundle-use-char16_t-as-UCHAR_TYPE.patch
|
||||
add-clang-nomerge-attribute-to-CheckError.patch
|
||||
sql-make-VirtualCursor-standard-layout-type.patch
|
||||
chromium-glibc-2.33.patch
|
||||
unexpire-accelerated-video-decode-flag.patch
|
||||
use-oauth2-client-switches-as-default.patch
|
||||
0001-crashpad-include-limits.patch
|
||||
0002-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch
|
||||
0003-Run-blink-bindings-generation-single-threaded.patch
|
||||
0004-widevine-support-for-arm.patch)
|
||||
sha256sums=('abe11d0cb1ff21278aad2eec1a1e279d59176b15331804d7df1807446786d59e'
|
||||
0001-widevine-support-for-arm.patch)
|
||||
sha256sums=('45d5a43ef798d20313c78fa8a075be0c22055e39c8481eb53eabda81df901b31'
|
||||
'86859c11cfc8ba106a3826479c0bc759324a62150b271dd35d1a0f96e890f52f'
|
||||
'3eb9580ea35a96789e02815270498226fa33726f4210a5ee36f3868af2ffae1f'
|
||||
'5e22afcb91b5402bc09e80630c5323d61013c3fccb0bbd9b23d1e79a400b00d0'
|
||||
'171525009003a9ed1182cfcb6f407d7169d9a731a474304e263029376719f55a'
|
||||
'3cfe46e181cb9d337c454b5b5adbf5297052f29cd617cdee4380eeb1943825d8'
|
||||
'59a59a60a08b335fe8647fdf0f9d2288d236ebf2cc9626396d0c4d032fd2b25d'
|
||||
'50133dd196d288ad538bb536aa51dccd6cb4aacfd9a60160f77e8fb16034b460'
|
||||
'dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150'
|
||||
'2fccecdcd4509d4c36af873988ca9dbcba7fdb95122894a9fdf502c33a1d7a4b'
|
||||
'82a85105fc33b92a84dabb7ed6725ccbb56f1075c11f9f3f43bb8ff724f88847'
|
||||
'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711'
|
||||
'2a83f4ffbd8d9c491d5c8017ecdf26d565e320c33051004b181b3aeac0f0273f'
|
||||
'027e12f4386905f9beeca6f43c254bb8a2f576de6cde301e98cdcc09816b01e4'
|
||||
'd6c8f2a3ba83b77f377b0dcfbe7318051eb3f59f4edb22d0a61e5555fc97e87a'
|
||||
'8a01ca5cadf58b21b3dfdf0266ed2ef4e7d53ad6ca6ad6f755a6075c3625613f')
|
||||
'6a0a2a7406d4014a526c93da902b3d5bd4f0d7174dac9b7e411bb196b9b57384')
|
||||
|
||||
# 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
|
||||
|
@ -96,10 +98,7 @@ prepare() {
|
|||
tools/generate_shim_headers/generate_shim_headers.py
|
||||
|
||||
# Arch Linux ARM fixes
|
||||
patch -p1 -i ../0001-crashpad-include-limits.patch
|
||||
patch -p1 -i ../0002-Fix-sandbox-Aw-snap-for-sycalls-403-and-407.patch
|
||||
#patch -p1 -i ../0003-Run-blink-bindings-generation-single-threaded.patch
|
||||
patch -p1 -i ../0004-widevine-support-for-arm.patch
|
||||
patch -p1 -i ../0001-widevine-support-for-arm.patch
|
||||
|
||||
# Build ARMv7 with NEON
|
||||
[[ $CARCH == "armv7h" ]] && MAKEFLAGS="-j4" && CFLAGS=`echo $CFLAGS | sed -e 's/vfpv3-d16/neon/'` && CXXFLAGS="$CFLAGS"
|
||||
|
@ -118,21 +117,32 @@ prepare() {
|
|||
# runtime -- this allows signing into Chromium without baked-in values
|
||||
patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
|
||||
|
||||
# https://crbug.com/1207478
|
||||
patch -Np0 -i ../unexpire-accelerated-video-decode-flag.patch
|
||||
|
||||
# https://crbug.com/1164975
|
||||
patch -Np1 -i ../chromium-glibc-2.33.patch
|
||||
|
||||
# Upstream fixes
|
||||
patch -Np1 -i ../fix-crash-in-ThemeService.patch
|
||||
patch -Np1 -i ../unbundle-use-char16_t-as-UCHAR_TYPE.patch
|
||||
|
||||
# Revert addition of [[clang::nomerge]] attribute; not supported by clang 11
|
||||
patch -Rp1 -d base <../add-clang-nomerge-attribute-to-CheckError.patch
|
||||
patch -Rp1 -i ../add-clang-nomerge-attribute-to-CheckError.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/chromium-90-quantization_utils-include.patch
|
||||
patch -Np1 -i ../patches/chromium-90-TokenizedOutput-include.patch
|
||||
patch -Np1 -i ../patches/chromium-90-ruy-include.patch
|
||||
|
||||
# Force script incompatible with Python 3 to use /usr/bin/python2
|
||||
sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py
|
||||
|
||||
# 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
|
||||
|
@ -156,11 +166,6 @@ build() {
|
|||
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
if check_buildoption ccache y; then
|
||||
# Avoid falling back to preprocessor mode when sources contain time macros
|
||||
export CCACHE_SLOPPINESS=time_macros
|
||||
fi
|
||||
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export AR=ar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 209bf5cdfc095516ba9e391dd52ce16a74114ae6 Mon Sep 17 00:00:00 2001
|
||||
From 9909f146b28d56c9c0411329a056ed959b33f76a Mon Sep 17 00:00:00 2001
|
||||
From: Zequan Wu <zequanwu@google.com>
|
||||
Date: Wed, 10 Feb 2021 03:26:00 +0000
|
||||
Subject: [PATCH] Reland "Add [[clang::nomerge]] attribute to ~CheckError()."
|
||||
|
@ -25,16 +25,14 @@ Reviewed-by: Nico Weber <thakis@chromium.org>
|
|||
Commit-Queue: Nico Weber <thakis@chromium.org>
|
||||
Commit-Queue: Zequan Wu <zequanwu@google.com>
|
||||
Cr-Commit-Position: refs/heads/master@{#852453}
|
||||
GitOrigin-RevId: 9909f146b28d56c9c0411329a056ed959b33f76a
|
||||
---
|
||||
check.h | 2 +-
|
||||
compiler_specific.h | 7 +++++++
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
base/check.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/check.h b/check.h
|
||||
index c94ab68db..17048e455 100644
|
||||
--- a/check.h
|
||||
+++ b/check.h
|
||||
diff --git a/base/check.h b/base/check.h
|
||||
index c94ab68db90..17048e45539 100644
|
||||
--- a/base/check.h
|
||||
+++ b/base/check.h
|
||||
@@ -85,7 +85,7 @@ class BASE_EXPORT CheckError {
|
||||
// Stream for adding optional details to the error message.
|
||||
std::ostream& stream();
|
||||
|
@ -44,19 +42,3 @@ index c94ab68db..17048e455 100644
|
|||
|
||||
CheckError(const CheckError& other) = delete;
|
||||
CheckError& operator=(const CheckError& other) = delete;
|
||||
diff --git a/compiler_specific.h b/compiler_specific.h
|
||||
index fa961b0ce..14a5d6870 100644
|
||||
--- a/compiler_specific.h
|
||||
+++ b/compiler_specific.h
|
||||
@@ -332,4 +332,11 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) {
|
||||
|
||||
#endif // defined(__clang_analyzer__)
|
||||
|
||||
+// Use nomerge attribute to disable optimization of merging multiple same calls.
|
||||
+#if defined(__clang__) && __has_attribute(nomerge) && !defined(OS_CHROMEOS)
|
||||
+#define NOMERGE [[clang::nomerge]]
|
||||
+#else
|
||||
+#define NOMERGE
|
||||
+#endif
|
||||
+
|
||||
#endif // BASE_COMPILER_SPECIFIC_H_
|
||||
|
|
45
extra/chromium/fix-crash-in-ThemeService.patch
Normal file
45
extra/chromium/fix-crash-in-ThemeService.patch
Normal file
|
@ -0,0 +1,45 @@
|
|||
From c2d0133f47afb59b4ce64e42215d1d053f15250a Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Hartmann <stha09@googlemail.com>
|
||||
Date: Tue, 13 Apr 2021 23:21:42 +0000
|
||||
Subject: [PATCH] fix crash in ThemeService
|
||||
|
||||
ThemeSyncableService and ThemeService are owned by each other. On
|
||||
destruction of ThemeService, ThemeSyncableService gets destructed as
|
||||
well, but calls RemoveObserver of partly destructed ThemeService object.
|
||||
To avoid already destructed |observers_| list, move it before
|
||||
|theme_syncable_service_| definition.
|
||||
|
||||
Bug: 1190561
|
||||
Change-Id: I4dc2c990d589071d97b7fa737afef54463c84751
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2821311
|
||||
Commit-Queue: Peter Kasting <pkasting@chromium.org>
|
||||
Reviewed-by: Peter Kasting <pkasting@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#872164}
|
||||
---
|
||||
chrome/browser/themes/theme_service.h | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
|
||||
index 592d40ae9de0f..337dfac9a040f 100644
|
||||
--- a/chrome/browser/themes/theme_service.h
|
||||
+++ b/chrome/browser/themes/theme_service.h
|
||||
@@ -299,6 +299,10 @@ class ThemeService : public KeyedService,
|
||||
// The number of infobars currently displayed.
|
||||
int number_of_reinstallers_ = 0;
|
||||
|
||||
+ // Declared before |theme_syncable_service_|, because ThemeSyncableService
|
||||
+ // removes itself from the |observers_| list on destruction.
|
||||
+ base::ObserverList<ThemeServiceObserver> observers_;
|
||||
+
|
||||
std::unique_ptr<ThemeSyncableService> theme_syncable_service_;
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@@ -320,8 +324,6 @@ class ThemeService : public KeyedService,
|
||||
ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver>
|
||||
native_theme_observer_{this};
|
||||
|
||||
- base::ObserverList<ThemeServiceObserver> observers_;
|
||||
-
|
||||
base::WeakPtrFactory<ThemeService> weak_ptr_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ThemeService);
|
238
extra/chromium/sql-make-VirtualCursor-standard-layout-type.patch
Normal file
238
extra/chromium/sql-make-VirtualCursor-standard-layout-type.patch
Normal file
|
@ -0,0 +1,238 @@
|
|||
From 80368f8ba7a8bab13440463a254888311efe3986 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Hartmann <stha09@googlemail.com>
|
||||
Date: Tue, 4 May 2021 15:00:19 +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. Replace std::unique_ptr with
|
||||
raw pointers.
|
||||
|
||||
Bug: 1189788
|
||||
Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
|
||||
---
|
||||
sql/recover_module/btree.cc | 21 +++++++++++++++------
|
||||
sql/recover_module/btree.h | 17 +++++++++++++----
|
||||
sql/recover_module/cursor.cc | 24 ++++++++++++------------
|
||||
sql/recover_module/cursor.h | 2 +-
|
||||
sql/recover_module/pager.cc | 7 +++----
|
||||
sql/recover_module/pager.h | 5 +++--
|
||||
6 files changed, 47 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
|
||||
index 9ecaafe8a3..839318abf9 100644
|
||||
--- a/sql/recover_module/btree.cc
|
||||
+++ b/sql/recover_module/btree.cc
|
||||
@@ -135,16 +135,25 @@ 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) {
|
||||
+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
|
||||
+ DCHECK(db_reader);
|
||||
DCHECK(IsOnValidPage(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(DatabasePageReader::IsValidPageId(page_id_));
|
||||
}
|
||||
|
||||
+void LeafPageDecoder::Reset() {
|
||||
+ db_reader_ = nullptr;
|
||||
+ page_id_ = 0;
|
||||
+ cell_count_ = 0;
|
||||
+ next_read_index_ = 0;
|
||||
+ last_record_size_ = 0;
|
||||
+}
|
||||
+
|
||||
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 d76d076bf6..33114b01fa 100644
|
||||
--- a/sql/recover_module/btree.h
|
||||
+++ b/sql/recover_module/btree.h
|
||||
@@ -102,7 +102,7 @@ class LeafPageDecoder {
|
||||
//
|
||||
// |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;
|
||||
+ explicit LeafPageDecoder() noexcept = default;
|
||||
~LeafPageDecoder() noexcept = default;
|
||||
|
||||
LeafPageDecoder(const LeafPageDecoder&) = delete;
|
||||
@@ -150,6 +150,15 @@ class LeafPageDecoder {
|
||||
// read as long as CanAdvance() returns true.
|
||||
bool TryAdvance();
|
||||
|
||||
+ // Initialize with DatabasePageReader
|
||||
+ 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.
|
||||
@@ -163,14 +172,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 0029ff9295..42548bc4b5 100644
|
||||
--- a/sql/recover_module/cursor.cc
|
||||
+++ b/sql/recover_module/cursor.cc
|
||||
@@ -26,7 +26,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();
|
||||
@@ -36,18 +36,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())
|
||||
@@ -99,13 +99,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";
|
||||
|
||||
@@ -113,7 +113,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 afcd6900e1..b15c31d425 100644
|
||||
--- a/sql/recover_module/cursor.h
|
||||
+++ b/sql/recover_module/cursor.h
|
||||
@@ -129,7 +129,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 58e75de270..5fe96204e5 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_(table) {
|
||||
DCHECK(table != nullptr);
|
||||
DCHECK(IsValidPageSize(table->page_size()));
|
||||
}
|
||||
@@ -57,8 +56,8 @@ int DatabasePageReader::ReadPage(int page_id) {
|
||||
std::numeric_limits<int64_t>::max(),
|
||||
"The |read_offset| computation above may overflow");
|
||||
|
||||
- int sqlite_status =
|
||||
- RawRead(sqlite_file, read_size, read_offset, page_data_.get());
|
||||
+ int sqlite_status = RawRead(sqlite_file, read_size, read_offset,
|
||||
+ const_cast<uint8_t*>(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 0e388ddc3b..99314e30ff 100644
|
||||
--- a/sql/recover_module/pager.h
|
||||
+++ b/sql/recover_module/pager.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef SQL_RECOVER_MODULE_PAGER_H_
|
||||
#define SQL_RECOVER_MODULE_PAGER_H_
|
||||
|
||||
+#include <array>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
@@ -70,7 +71,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.
|
||||
@@ -137,7 +138,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_;
|
||||
+ const std::array<uint8_t, kMaxPageSize> page_data_;
|
||||
// Raw pointer usage is acceptable because this instance's owner is expected
|
||||
// to ensure that the VirtualTable outlives this.
|
||||
VirtualTable* const table_;
|
30
extra/chromium/unbundle-use-char16_t-as-UCHAR_TYPE.patch
Normal file
30
extra/chromium/unbundle-use-char16_t-as-UCHAR_TYPE.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
From 79819c94f27524005889def53740c97a32cd7747 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Hartmann <stha09@googlemail.com>
|
||||
Date: Fri, 16 Apr 2021 20:57:15 +0000
|
||||
Subject: [PATCH] [unbundle] Use char16_t as UCHAR_TYPE
|
||||
|
||||
Overriding UCHAR_TYPE was dropped with:
|
||||
https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2732628
|
||||
|
||||
Bug: 911896
|
||||
Change-Id: I4c1172aab445c82ba247b1162b8484ed0db9c381
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2830820
|
||||
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#873470}
|
||||
---
|
||||
build/linux/unbundle/icu.gn | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/build/linux/unbundle/icu.gn b/build/linux/unbundle/icu.gn
|
||||
index 0f52fc11e79e6..6f3f8438bd854 100644
|
||||
--- a/build/linux/unbundle/icu.gn
|
||||
+++ b/build/linux/unbundle/icu.gn
|
||||
@@ -16,7 +16,6 @@ config("icu_config") {
|
||||
defines = [
|
||||
"USING_SYSTEM_ICU=1",
|
||||
"ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC",
|
||||
- "UCHAR_TYPE=uint16_t",
|
||||
|
||||
# U_EXPORT (defined in unicode/platform.h) is used to set public visibility
|
||||
# on classes through the U_COMMON_API and U_I18N_API macros (among others).
|
11
extra/chromium/unexpire-accelerated-video-decode-flag.patch
Normal file
11
extra/chromium/unexpire-accelerated-video-decode-flag.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- chrome/browser/flag-metadata.json.orig 2021-05-20 15:34:12.194906381 +0000
|
||||
+++ chrome/browser/flag-metadata.json 2021-05-20 15:17:31.632112834 +0000
|
||||
@@ -1253,7 +1253,7 @@
|
||||
{
|
||||
"name": "enable-accelerated-video-decode",
|
||||
"owners": [ "media-dev@chromium.org" ],
|
||||
- "expiry_milestone": 90
|
||||
+ "expiry_milestone": 91
|
||||
},
|
||||
{
|
||||
"name": "enable-accessibility-live-caption",
|
Loading…
Reference in a new issue