Compare commits
46 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c22080c2c | ||
|
|
aead26bc11 | ||
|
|
2ac76cfcdd | ||
|
|
adbed19072 | ||
|
|
64b5118788 | ||
|
|
da74ea57a1 | ||
|
|
a874d5d06e | ||
|
|
39899be377 | ||
|
|
d38f312f66 | ||
|
|
57d7e96689 | ||
|
|
c0d390eb86 | ||
|
|
26e10247f7 | ||
|
|
6795e13b09 | ||
|
|
36b9366346 | ||
|
|
405222a89c | ||
|
|
858523b4c5 | ||
|
|
f1727508d8 | ||
|
|
3c7480c46f | ||
|
|
830f92ed37 | ||
|
|
0ae81c629a | ||
|
|
bc5c6943bb | ||
|
|
8d54225cb1 | ||
|
|
80fb16833b | ||
|
|
c4de736922 | ||
|
|
1b1747dd15 | ||
|
|
55a5e49dad | ||
|
|
a30dbe2a38 | ||
|
|
05d077ef71 | ||
|
|
0f07c80cb5 | ||
|
|
02a0808515 | ||
|
|
6cdbc0939b | ||
|
|
1ce03cd3c2 | ||
|
|
ecc1b385f2 | ||
|
|
8fe6629c47 | ||
|
|
4858a99dab | ||
|
|
01f3b58d29 | ||
|
|
06ef286bc0 | ||
|
|
d3e51387af | ||
|
|
7dec584b7c | ||
|
|
3f093394a9 | ||
|
|
d7f43f4859 | ||
|
|
bb97faa935 | ||
|
|
0580336322 | ||
|
|
f3519d998a | ||
|
|
2740944d3b | ||
|
|
4d3325098c |
171 changed files with 19432 additions and 129322 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -35,11 +35,3 @@
|
|||
/node-v20.6.1-linux-x64.tar.xz
|
||||
/linux-arm64-0.19.2.tgz
|
||||
/linux-x64-0.19.2.tgz
|
||||
/v0.69.4.tar.gz
|
||||
/bindgen-cli-aarch64.tar.xz
|
||||
/bindgen-cli-x86_64.tar.xz
|
||||
/linux-ppc64-0.19.2.tgz
|
||||
/node-v22.14.0-linux-arm64.tar.xz
|
||||
/node-v22.14.0-linux-ppc64le.tar.xz
|
||||
/node-v22.14.0-linux-x64.tar.xz
|
||||
/node-v22.14.0-stripped.tar.gz
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -8,11 +8,11 @@ Subject: [PATCH] Add ppc64 target to libaom
|
|||
third_party/libaom/cmake_update.sh | 3 +++
|
||||
2 files changed, 15 insertions(+)
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/libaom/BUILD.gn
|
||||
Index: chromium-120.0.6099.71/third_party/libaom/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libaom/BUILD.gn
|
||||
+++ chromium-144.0.7559.59/third_party/libaom/BUILD.gn
|
||||
@@ -299,6 +299,18 @@ if (current_cpu == "arm64" || current_cp
|
||||
--- chromium-120.0.6099.71.orig/third_party/libaom/BUILD.gn
|
||||
+++ chromium-120.0.6099.71/third_party/libaom/BUILD.gn
|
||||
@@ -248,6 +248,18 @@ if (current_cpu == "arm64") {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ Index: chromium-144.0.7559.59/third_party/libaom/BUILD.gn
|
|||
static_library("libaom") {
|
||||
check_includes = false
|
||||
if (!is_debug && is_win) {
|
||||
@@ -368,6 +380,9 @@ static_library("libaom") {
|
||||
@@ -312,6 +324,9 @@ static_library("libaom") {
|
||||
# This is needed by all arm boards due to aom_arm_cpu_caps()
|
||||
sources += [ "source/libaom/aom_ports/aarch32_cpudetect.c" ]
|
||||
}
|
||||
|
|
@ -41,17 +41,17 @@ Index: chromium-144.0.7559.59/third_party/libaom/BUILD.gn
|
|||
if (is_android) {
|
||||
deps += [ "//third_party/cpu_features:ndk_compat" ]
|
||||
}
|
||||
Index: chromium-144.0.7559.59/third_party/libaom/cmake_update.sh
|
||||
Index: chromium-120.0.6099.71/third_party/libaom/cmake_update.sh
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libaom/cmake_update.sh
|
||||
+++ chromium-144.0.7559.59/third_party/libaom/cmake_update.sh
|
||||
@@ -167,6 +167,9 @@ egrep \
|
||||
"#define [A-Z0-9_]+[[:space:]]+[01]" "${CFG}/win/ia32/config/aom_config.h" \
|
||||
| awk '{print "%define " $2 " " $3}' > "${CFG}/win/ia32/config/aom_config.asm"
|
||||
--- chromium-120.0.6099.71.orig/third_party/libaom/cmake_update.sh
|
||||
+++ chromium-120.0.6099.71/third_party/libaom/cmake_update.sh
|
||||
@@ -187,6 +187,9 @@ gen_config_files linux/arm64-cpu-detect
|
||||
"${toolchain}/arm64-linux-gcc.cmake -DCONFIG_RUNTIME_CPU_DETECT=1 \
|
||||
${all_platforms}"
|
||||
|
||||
+reset_dirs linux/ppc64
|
||||
+gen_config_files linux/ppc64 "${toolchain}/ppc-linux-gcc.cmake ${all_platforms}"
|
||||
+
|
||||
# Copy linux configurations and modify for Windows.
|
||||
reset_dirs win/x64
|
||||
cp "${CFG}/linux/x64/config"/* "${CFG}/win/x64/config/"
|
||||
reset_dirs win/arm64-cpu-detect
|
||||
cp "${CFG}/linux/arm64-cpu-detect/config"/* \
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,13 +0,0 @@
|
|||
Index: chromium-144.0.7559.59/v8/gni/v8.gni
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/v8/gni/v8.gni
|
||||
+++ chromium-144.0.7559.59/v8/gni/v8.gni
|
||||
@@ -317,7 +317,7 @@ assert(
|
||||
if (v8_enable_pointer_compression == "") {
|
||||
v8_enable_pointer_compression =
|
||||
v8_current_cpu == "arm64" || v8_current_cpu == "x64" ||
|
||||
- v8_current_cpu == "loong64"
|
||||
+ v8_current_cpu == "loong64" || v8_current_cpu == "ppc64"
|
||||
}
|
||||
|
||||
# The Wasm interpreter is currently supported only on arm64 and x64, on
|
||||
|
|
@ -8,23 +8,20 @@ Subject: [PATCH] Force baseline POWER8 / AltiVec / VSX CPU features when on a
|
|||
BUILD.gn | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
Index: chromium-144.0.7559.59/v8/BUILD.gn
|
||||
Index: chromium-120.0.6099.71/v8/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/v8/BUILD.gn
|
||||
+++ chromium-144.0.7559.59/v8/BUILD.gn
|
||||
@@ -1596,7 +1596,14 @@ config("toolchain") {
|
||||
if (v8_current_cpu == "ppc64") {
|
||||
defines += [ "V8_TARGET_ARCH_PPC64" ]
|
||||
cflags += [ "-ffp-contract=off" ]
|
||||
- if (current_os == "aix") {
|
||||
+ if (current_os == "linux") {
|
||||
--- chromium-120.0.6099.71.orig/v8/BUILD.gn
|
||||
+++ chromium-120.0.6099.71/v8/BUILD.gn
|
||||
@@ -1340,6 +1340,12 @@ config("toolchain") {
|
||||
}
|
||||
if (host_byteorder == "little") {
|
||||
defines += [ "V8_TARGET_ARCH_PPC_LE" ]
|
||||
+ cflags += [
|
||||
+ # Enable usage of AltiVec, VSX, and other POWER8 and higher features
|
||||
+ "-mcpu=power8",
|
||||
+ "-maltivec",
|
||||
+ "-mvsx",
|
||||
+ ]
|
||||
+ } else if (current_os == "aix") {
|
||||
cflags += [
|
||||
# Work around AIX ceil, trunc and round oddities.
|
||||
"-mcpu=power5+",
|
||||
} else if (host_byteorder == "big") {
|
||||
defines += [ "V8_TARGET_ARCH_PPC_BE" ]
|
||||
if (current_os == "aix") {
|
||||
|
|
|
|||
|
|
@ -40,21 +40,21 @@ This patch implements support for the PPC64 architecture on Linux hosts.
|
|||
util/misc/capture_context_test_util_linux.cc | 6 +
|
||||
36 files changed, 932 insertions(+), 12 deletions(-)
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/CONTRIBUTORS
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/CONTRIBUTORS
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/CONTRIBUTORS
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/CONTRIBUTORS
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/CONTRIBUTORS
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/CONTRIBUTORS
|
||||
@@ -13,3 +13,5 @@ Mark Mentovai <mark@chromium.org>
|
||||
Robert Sesek <rsesek@chromium.org>
|
||||
Scott Graham <scottmg@chromium.org>
|
||||
Joshua Peraza <jperaza@chromium.org>
|
||||
+Shawn Anastasio <sanastasio@raptorengineering.com>
|
||||
+Timothy Pearson <tpearson@raptorengineering.com>
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context.h
|
||||
@@ -686,6 +686,70 @@ struct MinidumpContextRISCV64 {
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context.h
|
||||
@@ -687,6 +687,70 @@ struct MinidumpContextRISCV64 {
|
||||
uint32_t fcsr;
|
||||
};
|
||||
|
||||
|
|
@ -125,10 +125,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_co
|
|||
} // namespace crashpad
|
||||
|
||||
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
||||
@@ -110,6 +110,13 @@ MinidumpContextWriter::CreateFromSnapsho
|
||||
break;
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_co
|
|||
default: {
|
||||
LOG(ERROR) << "unknown context architecture "
|
||||
<< context_snapshot->architecture;
|
||||
@@ -605,5 +612,48 @@ size_t MinidumpContextRISCV64Writer::Con
|
||||
@@ -601,5 +608,48 @@ size_t MinidumpContextRISCV64Writer::Con
|
||||
DCHECK_GE(state(), kStateFrozen);
|
||||
return sizeof(context_);
|
||||
}
|
||||
|
|
@ -192,10 +192,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_co
|
|||
+}
|
||||
|
||||
} // namespace crashpad
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
||||
@@ -413,6 +413,49 @@ class MinidumpContextRISCV64Writer final
|
||||
MinidumpContextRISCV64 context_;
|
||||
};
|
||||
|
|
@ -246,11 +246,11 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_co
|
|||
} // namespace crashpad
|
||||
|
||||
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
|
||||
@@ -322,6 +322,21 @@ TYPED_TEST(MinidumpContextWriter, RISCV6
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
|
||||
@@ -328,6 +328,21 @@ TYPED_TEST(MinidumpContextWriter, RISCV6
|
||||
TypeParam>(context, ExpectMinidumpContextRISCV64, kSeed);
|
||||
}
|
||||
|
||||
|
|
@ -272,10 +272,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_co
|
|||
} // namespace
|
||||
} // namespace test
|
||||
} // namespace crashpad
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
||||
@@ -177,6 +177,8 @@ std::string MinidumpMiscInfoDebugBuildSt
|
||||
static constexpr char kCPU[] = "mips64";
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
|
|
@ -285,10 +285,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_mi
|
|||
#else
|
||||
#error define kCPU for this CPU
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
|
||||
@@ -297,6 +297,40 @@ void InitializeMinidumpContextRISCV64(Mi
|
||||
context->fcsr = value++;
|
||||
}
|
||||
|
|
@ -369,10 +369,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidu
|
|||
+
|
||||
} // namespace test
|
||||
} // namespace crashpad
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
|
||||
@@ -90,6 +90,9 @@ void ExpectMinidumpContextMIPS64(uint32_
|
||||
void ExpectMinidumpContextRISCV64(uint32_t expect_seed,
|
||||
const MinidumpContextRISCV64* observed,
|
||||
|
|
@ -383,11 +383,11 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidu
|
|||
//! \}
|
||||
|
||||
} // namespace test
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
||||
@@ -123,6 +123,11 @@ void CaptureMemory::PointedToByContext(c
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
||||
@@ -122,6 +122,11 @@ void CaptureMemory::PointedToByContext(c
|
||||
for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) {
|
||||
MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
|
||||
}
|
||||
|
|
@ -399,10 +399,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/capture_mem
|
|||
#else
|
||||
#error Port.
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
|
||||
@@ -47,6 +47,9 @@ enum CPUArchitecture {
|
||||
|
||||
//! \brief 64-bit RISC-V.
|
||||
|
|
@ -413,10 +413,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_archite
|
|||
};
|
||||
|
||||
} // namespace crashpad
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
||||
@@ -173,6 +173,8 @@ uint64_t CPUContext::InstructionPointer(
|
||||
return arm64->pc;
|
||||
case kCPUArchitectureRISCV64:
|
||||
|
|
@ -425,8 +425,8 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context
|
|||
+ return ppc64->nip;
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -190,6 +192,8 @@ uint64_t CPUContext::StackPointer() cons
|
||||
return ~0ull;
|
||||
@@ -191,6 +193,8 @@ uint64_t CPUContext::StackPointer() cons
|
||||
return arm64->sp;
|
||||
case kCPUArchitectureRISCV64:
|
||||
return riscv64->regs[1];
|
||||
|
|
@ -434,8 +434,8 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context
|
|||
+ return ppc64->regs[1];
|
||||
default:
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -226,6 +230,7 @@ bool CPUContext::Is64Bit() const {
|
||||
return ~0ull;
|
||||
@@ -231,6 +235,7 @@ bool CPUContext::Is64Bit() const {
|
||||
case kCPUArchitectureX86_64:
|
||||
case kCPUArchitectureARM64:
|
||||
case kCPUArchitectureMIPS64EL:
|
||||
|
|
@ -443,10 +443,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context
|
|||
case kCPUArchitectureRISCV64:
|
||||
return true;
|
||||
case kCPUArchitectureX86:
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
||||
@@ -371,6 +371,24 @@ struct CPUContextRISCV64 {
|
||||
uint32_t fcsr;
|
||||
};
|
||||
|
|
@ -480,10 +480,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context
|
|||
};
|
||||
};
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef CRASHPAD_SNAPSHOT_LINUX_CPU_CONTEXT_LINUX_H_
|
||||
#define CRASHPAD_SNAPSHOT_LINUX_CPU_CONTEXT_LINUX_H_
|
||||
|
|
@ -571,11 +571,11 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/cpu_c
|
|||
} // namespace internal
|
||||
} // namespace crashpad
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
|
||||
@@ -194,12 +194,15 @@ void TestAgainstTarget(PtraceConnection*
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
|
||||
@@ -195,12 +195,15 @@ void TestAgainstTarget(PtraceConnection*
|
||||
device == 0 && inode == 0 && mapping_name == "[vdso]";
|
||||
#if defined(ARCH_CPU_X86)
|
||||
static constexpr char kPrefix[] = "linux-gate.so.";
|
||||
|
|
@ -592,10 +592,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/debug
|
|||
},
|
||||
module_mapping->name,
|
||||
module_mapping->device,
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
|
||||
@@ -367,6 +367,69 @@ bool ExceptionSnapshotLinux::ReadContext
|
||||
return internal::ReadContext(reader, context_address, context_.riscv64);
|
||||
}
|
||||
|
|
@ -666,11 +666,11 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/excep
|
|||
#endif // ARCH_CPU_X86_FAMILY
|
||||
|
||||
bool ExceptionSnapshotLinux::Initialize(
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
|
||||
@@ -94,6 +94,8 @@ class ExceptionSnapshotLinux final : pub
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
|
||||
@@ -91,6 +91,8 @@ class ExceptionSnapshotLinux final : pub
|
||||
CPUContextMIPS64 mips64;
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
CPUContextRISCV64 riscv64;
|
||||
|
|
@ -679,10 +679,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/excep
|
|||
#endif
|
||||
} context_union_;
|
||||
CPUContext context_;
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
|
||||
@@ -325,7 +325,28 @@ void ExpectContext(const CPUContext& act
|
||||
sizeof(actual.riscv64->fpregs)),
|
||||
0);
|
||||
|
|
@ -712,10 +712,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/excep
|
|||
#else
|
||||
#error Port.
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
|
||||
@@ -129,6 +129,8 @@ void ProcessReaderLinux::Thread::Initial
|
||||
: thread_info.thread_context.t32.regs[29];
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
|
|
@ -725,10 +725,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/proce
|
|||
#else
|
||||
#error Port.
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
@@ -456,6 +456,89 @@ static_assert(offsetof(UContext<ContextT
|
||||
offsetof(ucontext_t, uc_mcontext.__fpregs),
|
||||
"context offset mismatch");
|
||||
|
|
@ -819,11 +819,11 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/signa
|
|||
#else
|
||||
#error Port.
|
||||
#endif // ARCH_CPU_X86_FAMILY
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
|
||||
@@ -229,6 +229,8 @@ CPUArchitecture SystemSnapshotLinux::Get
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
|
||||
@@ -208,6 +208,8 @@ CPUArchitecture SystemSnapshotLinux::Get
|
||||
: kCPUArchitectureMIPSEL;
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
return kCPUArchitectureRISCV64;
|
||||
|
|
@ -832,7 +832,7 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/syste
|
|||
#else
|
||||
#error port to your architecture
|
||||
#endif
|
||||
@@ -247,6 +249,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
|
||||
@@ -226,6 +228,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
// Not implemented
|
||||
return 0;
|
||||
|
|
@ -842,7 +842,7 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/syste
|
|||
#else
|
||||
#error port to your architecture
|
||||
#endif
|
||||
@@ -270,6 +275,9 @@ std::string SystemSnapshotLinux::CPUVend
|
||||
@@ -249,6 +254,9 @@ std::string SystemSnapshotLinux::CPUVend
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
// Not implemented
|
||||
return std::string();
|
||||
|
|
@ -852,7 +852,7 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/syste
|
|||
#else
|
||||
#error port to your architecture
|
||||
#endif
|
||||
@@ -401,6 +409,9 @@ bool SystemSnapshotLinux::NXEnabled() co
|
||||
@@ -385,6 +393,9 @@ bool SystemSnapshotLinux::NXEnabled() co
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
// Not implemented
|
||||
return false;
|
||||
|
|
@ -862,10 +862,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/syste
|
|||
#else
|
||||
#error Port.
|
||||
#endif // ARCH_CPU_X86_FAMILY
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
|
||||
@@ -196,6 +196,14 @@ bool ThreadSnapshotLinux::Initialize(
|
||||
InitializeCPUContextRISCV64(thread.thread_info.thread_context.t64,
|
||||
thread.thread_info.float_context.f64,
|
||||
|
|
@ -881,11 +881,11 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/threa
|
|||
#else
|
||||
#error Port.
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
|
||||
@@ -79,6 +79,8 @@ class ThreadSnapshotLinux final : public
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
|
||||
@@ -76,6 +76,8 @@ class ThreadSnapshotLinux final : public
|
||||
CPUContextMIPS64 mips64;
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
CPUContextRISCV64 riscv64;
|
||||
|
|
@ -894,10 +894,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/threa
|
|||
#else
|
||||
#error Port.
|
||||
#endif // ARCH_CPU_X86_FAMILY
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
|
||||
@@ -317,5 +317,38 @@ void InitializeCPUContextRISCV64(CPUCont
|
||||
riscv64->fcsr = value++;
|
||||
}
|
||||
|
|
@ -937,10 +937,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_c
|
|||
+
|
||||
} // namespace test
|
||||
} // namespace crashpad
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
|
||||
@@ -64,6 +64,7 @@ void InitializeCPUContextARM64(CPUContex
|
||||
void InitializeCPUContextMIPS(CPUContext* context, uint32_t seed);
|
||||
void InitializeCPUContextMIPS64(CPUContext* context, uint32_t seed);
|
||||
|
|
@ -949,10 +949,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_c
|
|||
//! \}
|
||||
|
||||
} // namespace test
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/test/linux/get_tls.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/test/linux/get_tls.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/test/linux/get_tls.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/test/linux/get_tls.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/test/linux/get_tls.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/test/linux/get_tls.cc
|
||||
@@ -51,6 +51,8 @@ LinuxVMAddress GetTLS() {
|
||||
: "$3");
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
|
|
@ -962,10 +962,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/test/linux/get_tls.c
|
|||
#else
|
||||
#error Port.
|
||||
#endif // ARCH_CPU_ARMEL
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/test/multiprocess_posix.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/test/multiprocess_posix.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/test/multiprocess_posix.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/test/multiprocess_posix.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/test/multiprocess_posix.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/test/multiprocess_posix.cc
|
||||
@@ -162,7 +162,8 @@ void Multiprocess::SetExpectedChildTermi
|
||||
}
|
||||
|
||||
|
|
@ -976,10 +976,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/test/multiprocess_po
|
|||
SetExpectedChildTermination(kTerminationSignal, SIGTRAP);
|
||||
#else
|
||||
SetExpectedChildTermination(kTerminationSignal, SIGILL);
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
|
||||
@@ -56,6 +56,11 @@ bool AuxiliaryVector::Read(PtraceConnect
|
||||
if (type == AT_IGNORE) {
|
||||
continue;
|
||||
|
|
@ -992,10 +992,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/auxiliary
|
|||
if (!MapInsertOrReplace(&values_, type, value, nullptr)) {
|
||||
LOG(ERROR) << "duplicate auxv entry";
|
||||
return false;
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/ptracer.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/ptracer.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/ptracer.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/ptracer.cc
|
||||
@@ -430,6 +430,64 @@ bool GetThreadArea64(pid_t tid,
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1071,10 +1071,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/ptracer.c
|
|||
GetThreadArea64(tid,
|
||||
info->thread_context,
|
||||
&info->thread_specific_data_address,
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
@@ -34,6 +34,10 @@
|
||||
#include <asm/ptrace.h>
|
||||
#endif
|
||||
|
|
@ -1193,10 +1193,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/thread_in
|
|||
//! \brief The thread-local storage address for the thread.
|
||||
LinuxVMAddress thread_specific_data_address;
|
||||
};
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context.h
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context.h
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/misc/capture_context.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context.h
|
||||
@@ -70,6 +70,7 @@ using NativeCPUContext = ucontext_t;
|
||||
//! Linux | ARM/ARM64 | `r0`/`x0`
|
||||
//! Linux | MIPS/MIPS64 | `$a0`
|
||||
|
|
@ -1205,10 +1205,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_co
|
|||
//!
|
||||
//! Additionally, the value `LR` on ARM/ARM64 will be the return address of
|
||||
//! this function.
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
|
||||
@@ -30,7 +30,7 @@
|
||||
.globl CAPTURECONTEXT_SYMBOL2
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
|
|
@ -1435,10 +1435,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_co
|
|||
#elif defined(__riscv)
|
||||
|
||||
#define MCONTEXT_GREGS_OFFSET 176
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
|
||||
@@ -48,7 +48,7 @@ void TestCaptureContext() {
|
||||
uintptr_t pc = ProgramCounterFromContext(context_1);
|
||||
|
||||
|
|
@ -1448,10 +1448,10 @@ Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_co
|
|||
// Sanitizers can cause enough code bloat that the “nearby” check would
|
||||
// likely fail.
|
||||
const uintptr_t kReferencePC =
|
||||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
|
||||
@@ -38,6 +38,8 @@ void SanityCheckContext(const NativeCPUC
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
EXPECT_EQ(context.uc_mcontext.__gregs[10],
|
||||
|
|
|
|||
|
|
@ -54,10 +54,8 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
|
|||
src/tools/linux/md2core/minidump-2-core.cc | 45 +++++++++++++++
|
||||
25 files changed, 281 insertions(+), 35 deletions(-)
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
@@ -51,6 +51,8 @@ typedef MDRawContextRISCV64 RawContextCP
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
|
|
@ -67,10 +65,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dum
|
|||
#else
|
||||
#error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
@@ -336,7 +336,42 @@ void ThreadInfo::FillCPUContext(RawConte
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
|
|
@ -153,10 +149,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dum
|
|||
+#endif
|
||||
+
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
@@ -67,6 +67,10 @@ struct ThreadInfo {
|
||||
// Use the structures defined in <sys/user.h>
|
||||
struct user_regs_struct regs;
|
||||
|
|
@ -180,10 +174,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dum
|
|||
};
|
||||
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
@@ -324,6 +324,48 @@ void UContextReader::FillCPUContext(RawC
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
|
|
@ -233,10 +225,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dum
|
|||
#endif
|
||||
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
@@ -54,6 +54,9 @@ struct UContextReader {
|
||||
#elif defined(__aarch64__)
|
||||
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
|
||||
|
|
@ -247,11 +237,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dum
|
|||
#else
|
||||
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc);
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
@@ -466,6 +466,13 @@ bool ExceptionHandler::HandleSignal(int
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
@@ -464,6 +464,13 @@ bool ExceptionHandler::HandleSignal(int
|
||||
memcpy(&g_crash_context_.float_state, fp_ptr,
|
||||
sizeof(g_crash_context_.float_state));
|
||||
}
|
||||
|
|
@ -265,7 +253,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/han
|
|||
#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
ucontext_t* uc_ptr = (ucontext_t*)uc;
|
||||
if (uc_ptr->uc_mcontext.fpregs) {
|
||||
@@ -704,10 +711,18 @@ bool ExceptionHandler::WriteMinidump() {
|
||||
@@ -701,10 +708,18 @@ bool ExceptionHandler::WriteMinidump() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -285,7 +273,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/han
|
|||
context.tid = sys_gettid();
|
||||
|
||||
// Add an exception stream to the minidump for better reporting.
|
||||
@@ -728,6 +743,9 @@ bool ExceptionHandler::WriteMinidump() {
|
||||
@@ -725,6 +740,9 @@ bool ExceptionHandler::WriteMinidump() {
|
||||
#elif defined(__mips__)
|
||||
context.siginfo.si_addr =
|
||||
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
|
||||
|
|
@ -295,11 +283,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/han
|
|||
#elif defined(__riscv)
|
||||
context.siginfo.si_addr =
|
||||
reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
@@ -197,7 +197,11 @@ class ExceptionHandler {
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
@@ -200,7 +200,11 @@ class ExceptionHandler {
|
||||
siginfo_t siginfo;
|
||||
pid_t tid; // the crashing thread.
|
||||
ucontext_t context;
|
||||
|
|
@ -312,11 +298,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/han
|
|||
fpstate_t float_state;
|
||||
#endif
|
||||
};
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
@@ -325,7 +325,7 @@ TEST(ExceptionHandlerTest, ParallelChild
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
@@ -321,7 +321,7 @@ TEST(ExceptionHandlerTest, ParallelChild
|
||||
ASSERT_EQ(SIGSEGV, WTERMSIG(status));
|
||||
return;
|
||||
} else {
|
||||
|
|
@ -325,7 +309,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/han
|
|||
}
|
||||
}
|
||||
|
||||
@@ -581,6 +581,8 @@ const unsigned char kIllegalInstruction[
|
||||
@@ -576,6 +576,8 @@ const unsigned char kIllegalInstruction[
|
||||
#if defined(__mips__)
|
||||
// mfc2 zero,Impl - usually illegal in userspace.
|
||||
0x48, 0x00, 0x00, 0x48
|
||||
|
|
@ -334,7 +318,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/han
|
|||
#else
|
||||
// This crashes with SIGILL on x86/x86-64/arm.
|
||||
0xff, 0xff, 0xff, 0xff
|
||||
@@ -776,10 +778,10 @@ TEST(ExceptionHandlerTest, InstructionPo
|
||||
@@ -771,10 +773,10 @@ TEST(ExceptionHandlerTest, InstructionPo
|
||||
|
||||
// These are defined here so the parent can use them to check the
|
||||
// data from the minidump afterwards.
|
||||
|
|
@ -347,22 +331,20 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/han
|
|||
const int kOffset = kMemorySize - sizeof(kIllegalInstruction);
|
||||
|
||||
const pid_t child = fork();
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
@@ -143,7 +143,9 @@ class MicrodumpWriter {
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
@@ -141,7 +141,9 @@ class MicrodumpWriter {
|
||||
const MicrodumpExtraInfo& microdump_extra_info,
|
||||
LinuxDumper* dumper)
|
||||
: ucontext_(context ? &context->context : nullptr),
|
||||
: ucontext_(context ? &context->context : NULL),
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ vector_state_(context ? &context->vector_state : nullptr),
|
||||
+ vector_state_(context ? &context->vector_state : NULL),
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : nullptr),
|
||||
float_state_(context ? &context->float_state : NULL),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
@@ -350,6 +352,8 @@ class MicrodumpWriter {
|
||||
@@ -348,6 +350,8 @@ class MicrodumpWriter {
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
|
|
@ -371,7 +353,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/mic
|
|||
#else
|
||||
# error "This code has not been ported to your platform yet"
|
||||
#endif
|
||||
@@ -422,7 +426,9 @@ class MicrodumpWriter {
|
||||
@@ -420,7 +424,9 @@ class MicrodumpWriter {
|
||||
void DumpCPUState() {
|
||||
RawContextCPU cpu;
|
||||
my_memset(&cpu, 0, sizeof(RawContextCPU));
|
||||
|
|
@ -382,7 +364,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/mic
|
|||
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_);
|
||||
@@ -618,7 +624,9 @@ class MicrodumpWriter {
|
||||
@@ -616,7 +622,9 @@ class MicrodumpWriter {
|
||||
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
|
||||
|
||||
const ucontext_t* const ucontext_;
|
||||
|
|
@ -393,11 +375,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/mic
|
|||
const google_breakpad::fpstate_t* const float_state_;
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
@@ -281,10 +281,19 @@ TEST(MicrodumpWriterTest, BasicWithMappi
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
@@ -282,10 +282,19 @@ TEST(MicrodumpWriterTest, BasicWithMappi
|
||||
CrashAndGetMicrodump(mappings, MicrodumpExtraInfo(), &buf);
|
||||
ASSERT_TRUE(ContainsMicrodump(buf));
|
||||
|
||||
|
|
@ -420,10 +400,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/mic
|
|||
#else
|
||||
ASSERT_NE(std::string::npos,
|
||||
buf.find("M 00001000 0000002A 00001000 "
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
@@ -118,6 +118,9 @@ bool LinuxCoreDumper::GetThreadInfoByInd
|
||||
#elif defined(__riscv)
|
||||
stack_pointer = reinterpret_cast<uint8_t*>(
|
||||
|
|
@ -446,11 +424,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
# if defined(__ANDROID__)
|
||||
for (int i = EF_R0; i <= EF_R31; i++)
|
||||
info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
@@ -789,7 +789,9 @@ bool LinuxDumper::GetStackInfo(const voi
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
@@ -770,7 +770,9 @@ bool LinuxDumper::GetStackInfo(const voi
|
||||
reinterpret_cast<uint8_t*>(int_stack_pointer & ~(page_size - 1));
|
||||
|
||||
// The number of bytes of stack which we try to capture.
|
||||
|
|
@ -461,10 +437,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
|
||||
const MappingInfo* mapping = FindMapping(stack_pointer);
|
||||
if (!mapping)
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
@@ -64,7 +64,8 @@ namespace google_breakpad {
|
||||
typedef Elf32_auxv_t elf_aux_entry;
|
||||
#elif defined(__x86_64) || defined(__aarch64__) || \
|
||||
|
|
@ -475,11 +449,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
typedef Elf64_auxv_t elf_aux_entry;
|
||||
#endif
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
@@ -57,6 +57,8 @@
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
@@ -56,6 +56,8 @@
|
||||
#define TID_PTR_REGISTER "$1"
|
||||
#elif defined(__riscv)
|
||||
#define TID_PTR_REGISTER "x4"
|
||||
|
|
@ -488,11 +460,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
@@ -208,12 +208,12 @@ bool LinuxPtraceDumper::ReadRegisterSet(
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
@@ -189,12 +189,12 @@ bool LinuxPtraceDumper::ReadRegisterSet(
|
||||
#ifdef PTRACE_GETREGSET
|
||||
struct iovec io;
|
||||
info->GetGeneralPurposeRegisters(&io.iov_base, &io.iov_len);
|
||||
|
|
@ -507,7 +477,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
// We are going to check if we can read VFP registers on ARM32.
|
||||
// Currently breakpad does not support VFP registers to be a part of minidump,
|
||||
// so this is only to confirm that we can actually read FP registers.
|
||||
@@ -233,6 +233,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(
|
||||
@@ -214,6 +214,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(
|
||||
}
|
||||
#endif // defined(__arm__)
|
||||
}
|
||||
|
|
@ -523,7 +493,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
return true;
|
||||
#else
|
||||
return false;
|
||||
@@ -397,6 +406,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
|
||||
@@ -378,6 +387,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
|
||||
#elif defined(__riscv)
|
||||
stack_pointer = reinterpret_cast<uint8_t*>(
|
||||
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
|
||||
|
|
@ -533,11 +503,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
#else
|
||||
# error "This code hasn't been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
@@ -469,6 +469,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackR
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
@@ -470,6 +470,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackR
|
||||
#elif defined(__riscv)
|
||||
pid_t* process_tid_location =
|
||||
reinterpret_cast<pid_t*>(one_thread.mcontext.__gregs[4]);
|
||||
|
|
@ -547,7 +515,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
@@ -568,6 +571,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeSt
|
||||
@@ -569,6 +572,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeSt
|
||||
uintptr_t heap_addr = thread_info.mcontext.gregs[1];
|
||||
#elif defined(__riscv)
|
||||
uintptr_t heap_addr = thread_info.mcontext.__gregs[4];
|
||||
|
|
@ -556,22 +524,20 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
@@ -145,7 +145,9 @@ class MinidumpWriter {
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
@@ -144,7 +144,9 @@ class MinidumpWriter {
|
||||
: fd_(minidump_fd),
|
||||
path_(minidump_path),
|
||||
ucontext_(context ? &context->context : nullptr),
|
||||
ucontext_(context ? &context->context : NULL),
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ vector_state_(context ? &context->vector_state : nullptr),
|
||||
+ vector_state_(context ? &context->vector_state : NULL),
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : nullptr),
|
||||
float_state_(context ? &context->float_state : NULL),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
@@ -477,7 +479,9 @@ class MinidumpWriter {
|
||||
@@ -476,7 +478,9 @@ class MinidumpWriter {
|
||||
if (!cpu.Allocate())
|
||||
return false;
|
||||
my_memset(cpu.get(), 0, sizeof(RawContextCPU));
|
||||
|
|
@ -582,7 +548,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(cpu.get(), ucontext_);
|
||||
@@ -954,7 +958,7 @@ class MinidumpWriter {
|
||||
@@ -953,7 +957,7 @@ class MinidumpWriter {
|
||||
dirent->location.rva = 0;
|
||||
}
|
||||
|
||||
|
|
@ -591,7 +557,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
bool WriteCPUInformation(MDRawSystemInfo* sys_info) {
|
||||
char vendor_id[sizeof(sys_info->cpu.x86_cpu_info.vendor_id) + 1] = {0};
|
||||
static const char vendor_id_name[] = "vendor_id";
|
||||
@@ -974,7 +978,9 @@ class MinidumpWriter {
|
||||
@@ -973,7 +977,9 @@ class MinidumpWriter {
|
||||
|
||||
// processor_architecture should always be set, do this first
|
||||
sys_info->processor_architecture =
|
||||
|
|
@ -602,7 +568,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
# if _MIPS_SIM == _ABIO32
|
||||
MD_CPU_ARCHITECTURE_MIPS;
|
||||
# elif _MIPS_SIM == _ABI64
|
||||
@@ -1441,7 +1447,9 @@ class MinidumpWriter {
|
||||
@@ -1440,7 +1446,9 @@ class MinidumpWriter {
|
||||
const char* path_; // Path to the file where the minidum should be written.
|
||||
|
||||
const ucontext_t* const ucontext_; // also from the signal handler
|
||||
|
|
@ -613,10 +579,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
const google_breakpad::fpstate_t* const float_state_; // ditto
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
@@ -47,6 +47,8 @@ class ExceptionHandler;
|
||||
|
||||
#if defined(__aarch64__)
|
||||
|
|
@ -626,10 +590,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
#elif !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
@@ -723,6 +723,9 @@ TEST(MinidumpWriterTest, InvalidStackPoi
|
||||
#elif defined(__riscv)
|
||||
context.context.uc_mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP] =
|
||||
|
|
@ -640,10 +602,8 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/min
|
|||
#else
|
||||
# error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
--- a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
@@ -72,8 +72,7 @@ bool MemoryMappedFile::Map(const char* p
|
||||
|
||||
#if defined(__x86_64__) || defined(__aarch64__) || \
|
||||
|
|
@ -654,11 +614,9 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/mem
|
|||
struct kernel_stat st;
|
||||
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
|
||||
#else
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
@@ -178,9 +178,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterM
|
||||
--- a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
@@ -179,9 +179,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterM
|
||||
TEST_F(MemoryMappedFileTest, MapWithOffset) {
|
||||
// Put more data in the test file this time. Offsets can only be
|
||||
// done on page boundaries, so we need a two page file to test this.
|
||||
|
|
@ -672,25 +630,21 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/mem
|
|||
for (size_t i = 0; i < data1_size; ++i) {
|
||||
data1[i] = i & 0x7f;
|
||||
}
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
@@ -64,8 +64,9 @@ TEST(PageAllocatorTest, LargeObject) {
|
||||
--- a/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
@@ -60,8 +60,9 @@ TEST(PageAllocatorTest, LargeObject) {
|
||||
|
||||
EXPECT_EQ(0U, allocator.pages_allocated());
|
||||
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(10000));
|
||||
+ uint64_t expected_pages = 1 + ((10000 - 1) / getpagesize());
|
||||
ASSERT_FALSE(p == nullptr);
|
||||
ASSERT_FALSE(p == NULL);
|
||||
- EXPECT_EQ(3U, allocator.pages_allocated());
|
||||
+ EXPECT_EQ(expected_pages, allocator.pages_allocated());
|
||||
for (unsigned i = 1; i < 10; ++i) {
|
||||
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(i));
|
||||
ASSERT_FALSE(p == nullptr);
|
||||
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
ASSERT_FALSE(p == NULL);
|
||||
--- a/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
+++ b/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
@@ -82,6 +82,8 @@
|
||||
#define ELF_ARCH EM_AARCH64
|
||||
#elif defined(__riscv)
|
||||
|
|
@ -709,7 +663,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2c
|
|||
#endif
|
||||
|
||||
using google_breakpad::MDTypeHelper;
|
||||
@@ -325,6 +329,9 @@ struct CrashedProcess {
|
||||
@@ -324,6 +328,9 @@ struct CrashedProcess {
|
||||
#if defined(__aarch64__)
|
||||
user_fpsimd_struct fpregs;
|
||||
#endif
|
||||
|
|
@ -719,7 +673,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2c
|
|||
uintptr_t stack_addr;
|
||||
const uint8_t* stack;
|
||||
size_t stack_length;
|
||||
@@ -628,6 +635,38 @@ ParseThreadRegisters(CrashedProcess::Thr
|
||||
@@ -599,6 +606,38 @@ ParseThreadRegisters(CrashedProcess::Thr
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
}
|
||||
|
|
@ -758,7 +712,7 @@ Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2c
|
|||
#else
|
||||
#error "This code has not been ported to your platform yet"
|
||||
#endif
|
||||
@@ -733,6 +772,12 @@ ParseSystemInfo(const Options& options,
|
||||
@@ -704,6 +743,12 @@ ParseSystemInfo(const Options& options,
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
From e93d9b5fdcd8e5744de629461c03a07de2252f8f Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Gallagher <sgallagh@redhat.com>
|
||||
Date: Fri, 17 Apr 2020 12:59:44 +0200
|
||||
Subject: [PATCH] Remove unused OpenSSL config
|
||||
|
||||
The build process will try to create these config files, even when
|
||||
using the system OpenSSL and will thus fail since we strip this path
|
||||
from the tarball.
|
||||
|
||||
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
|
||||
Signed-off-by: rpm-build <rpm-build>
|
||||
---
|
||||
node.gyp | 17 -----------------
|
||||
1 file changed, 17 deletions(-)
|
||||
|
||||
diff --git a/node.gyp b/node.gyp
|
||||
index 1147495..da6ea50 100644
|
||||
--- a/node.gyp
|
||||
+++ b/node.gyp
|
||||
@@ -822,23 +822,6 @@
|
||||
],
|
||||
},
|
||||
],
|
||||
- }, {
|
||||
- 'variables': {
|
||||
- 'opensslconfig_internal': '<(obj_dir)/deps/openssl/openssl.cnf',
|
||||
- 'opensslconfig': './deps/openssl/nodejs-openssl.cnf',
|
||||
- },
|
||||
- 'actions': [
|
||||
- {
|
||||
- 'action_name': 'reset_openssl_cnf',
|
||||
- 'inputs': [ '<(opensslconfig)', ],
|
||||
- 'outputs': [ '<(opensslconfig_internal)', ],
|
||||
- 'action': [
|
||||
- '<(python)', 'tools/copyfile.py',
|
||||
- '<(opensslconfig)',
|
||||
- '<(opensslconfig_internal)',
|
||||
- ],
|
||||
- },
|
||||
- ],
|
||||
}],
|
||||
],
|
||||
}, # node_core_target_name
|
||||
--
|
||||
2.47.0
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
Index: chromium-144.0.7559.59/third_party/xnnpack/generate_build_gn.py
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/xnnpack/generate_build_gn.py
|
||||
+++ chromium-144.0.7559.59/third_party/xnnpack/generate_build_gn.py
|
||||
@@ -239,7 +239,10 @@ _PLATFORMS = [
|
||||
bazel_platform='//:linux_aarch64'),
|
||||
_Platform(gn_cpu='riscv64',
|
||||
bazel_cpu='riscv64',
|
||||
- bazel_platform='//:linux_riscv64')
|
||||
+ bazel_platform='//:linux_riscv64'),
|
||||
+ _Platform(gn_cpu='ppc64',
|
||||
+ bazel_cpu='ppc64le',
|
||||
+ bazel_platform='//:linux_ppc64le')
|
||||
]
|
||||
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/xnnpack/bazelroot/BUILD
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/xnnpack/bazelroot/BUILD
|
||||
+++ chromium-144.0.7559.59/third_party/xnnpack/bazelroot/BUILD
|
||||
@@ -29,6 +29,14 @@ platform(
|
||||
],
|
||||
)
|
||||
|
||||
+platform(
|
||||
+ name = "linux_ppc64le",
|
||||
+ constraint_values = [
|
||||
+ "@platforms//os:linux",
|
||||
+ "@platforms//cpu:ppc64le",
|
||||
+ ],
|
||||
+)
|
||||
+
|
||||
# A dummy clang toolchain for building them for any arch.
|
||||
|
||||
filegroup(name = "empty")
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From b3a14db7637232d30c878cc1f1ad6d8037e81379 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawn@anastas.io>
|
||||
Date: Tue, 15 Jan 2019 22:42:21 -0600
|
||||
Subject: [PATCH] linux/seccomp-bpf: ppc64+glibc workaround in SIGSYS handler
|
||||
|
||||
Workaround for an apparent issue with glibc negating syscall
|
||||
parameters. Observed on a ppc64le machine with glibc.
|
||||
More investigation required.
|
||||
---
|
||||
sandbox/linux/seccomp-bpf/trap.cc | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf/trap.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf/trap.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf/trap.cc
|
||||
@@ -232,6 +232,20 @@ void Trap::SigSys(int nr, LinuxSigInfo*
|
||||
SetIsInSigHandler();
|
||||
}
|
||||
|
||||
+#if defined(__powerpc64__)
|
||||
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
|
||||
+ // parameter which causes checks against it to fail. For now, manually
|
||||
+ // negate them back.
|
||||
+ // TODO(shawn@anastas.io): investigate this issue further
|
||||
+ auto nr = SECCOMP_SYSCALL(ctx);
|
||||
+ if (nr == __NR_openat || nr == __NR_mkdirat || nr == __NR_faccessat || nr == __NR_readlinkat ||
|
||||
+ nr == __NR_renameat || nr == __NR_renameat2 || nr == __NR_newfstatat || nr == __NR_unlinkat) {
|
||||
+ if (static_cast<int>(SECCOMP_PARM1(ctx)) > 0) {
|
||||
+ SECCOMP_PARM1(ctx) = -SECCOMP_PARM1(ctx);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// Copy the seccomp-specific data into a arch_seccomp_data structure. This
|
||||
// is what we are showing to TrapFnc callbacks that the system call
|
||||
// evaluator registered with the sandbox.
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,80 @@
|
|||
From 036d209a3f1a771de9aed31dfbe804aaf91d1c27 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 23:35:21 -0500
|
||||
Subject: [PATCH] sandbox/linux: Implement partial support for ppc64 syscalls
|
||||
and ucontext
|
||||
|
||||
Unlike other architectures, the ppc64 files currently rely on applicable
|
||||
headers being provided by the system. It is sufficient for standard
|
||||
GNU/Linux environments, but may require expansion elsewhere.
|
||||
---
|
||||
sandbox/linux/BUILD.gn | 2 ++
|
||||
sandbox/linux/system_headers/linux_syscalls.h | 4 ++++
|
||||
sandbox/linux/system_headers/linux_ucontext.h | 2 ++
|
||||
sandbox/linux/system_headers/ppc64_linux_syscalls.h | 12 ++++++++++++
|
||||
sandbox/linux/system_headers/ppc64_linux_ucontext.h | 12 ++++++++++++
|
||||
5 files changed, 32 insertions(+)
|
||||
create mode 100644 sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
create mode 100644 sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/BUILD.gn
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/BUILD.gn
|
||||
@@ -383,6 +383,8 @@ component("sandbox_services") {
|
||||
|
||||
source_set("sandbox_services_headers") {
|
||||
sources = [
|
||||
+ "system_headers/ppc64_linux_syscalls.h",
|
||||
+ "system_headers/ppc64_linux_ucontext.h",
|
||||
"system_headers/arm64_linux_syscalls.h",
|
||||
"system_headers/arm_linux_syscalls.h",
|
||||
"system_headers/arm_linux_ucontext.h",
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/linux_syscalls.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/system_headers/linux_syscalls.h
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/linux_syscalls.h
|
||||
@@ -35,5 +35,9 @@
|
||||
#include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
|
||||
#endif
|
||||
|
||||
+#if defined(__powerpc64__)
|
||||
+#include "sandbox/linux/system_headers/ppc64_linux_syscalls.h"
|
||||
+#endif
|
||||
+
|
||||
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
+
|
||||
+#include <asm/unistd.h>
|
||||
+
|
||||
+//TODO: is it necessary to redefine syscall numbers for PPC64?
|
||||
+
|
||||
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
||||
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
||||
+
|
||||
+#include <sys/ucontext.h>
|
||||
+
|
||||
+//TODO: is it necessary to redefine ucontext on PPC64?
|
||||
+
|
||||
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
From c41cd6ac927f592b161abc04468d3c7a4be91995 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Tue, 23 Oct 2018 15:49:31 -0500
|
||||
Subject: [PATCH] sandbox/linux: Update IsSyscallAllowed in broker_process.cc
|
||||
|
||||
---
|
||||
sandbox/linux/syscall_broker/broker_process.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/syscall_broker/broker_process.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/syscall_broker/broker_process.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/syscall_broker/broker_process.cc
|
||||
@@ -169,7 +169,7 @@ bool BrokerProcess::IsSyscallBrokerable(
|
||||
#if defined(__NR_fstatat64)
|
||||
case __NR_fstatat64:
|
||||
#endif
|
||||
-#if defined(__x86_64__) || defined(__aarch64__)
|
||||
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_newfstatat:
|
||||
#endif
|
||||
return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
|
||||
638
0001-sandbox-linux-Update-syscall-helpers-lists-for-ppc64.patch
Normal file
638
0001-sandbox-linux-Update-syscall-helpers-lists-for-ppc64.patch
Normal file
|
|
@ -0,0 +1,638 @@
|
|||
From da52663deec77f705d7d58b18484c3e28e563f10 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Tue, 18 Sep 2018 18:39:28 -0500
|
||||
Subject: [PATCH] sandbox/linux: Update syscall helpers/lists for ppc64
|
||||
|
||||
---
|
||||
.../seccomp-bpf-helpers/baseline_policy.cc | 8 +-
|
||||
.../syscall_parameters_restrictions.cc | 2 +-
|
||||
.../syscall_parameters_restrictions.h | 2 +-
|
||||
.../linux/seccomp-bpf-helpers/syscall_sets.cc | 108 ++++++++++--------
|
||||
.../linux/seccomp-bpf-helpers/syscall_sets.h | 6 +-
|
||||
sandbox/linux/services/syscall_wrappers.cc | 2 +-
|
||||
6 files changed, 73 insertions(+), 55 deletions(-)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
@@ -90,7 +90,8 @@ bool IsBaselinePolicyWatched(int sysno)
|
||||
SyscallSets::IsPrctl(sysno) ||
|
||||
SyscallSets::IsProcessGroupOrSession(sysno) ||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
SyscallSets::IsSocketCall(sysno) ||
|
||||
#endif
|
||||
#if defined(__arm__)
|
||||
@@ -255,7 +256,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
}
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
if (sysno == __NR_mmap)
|
||||
return RestrictMmapFlags();
|
||||
#endif
|
||||
@@ -276,7 +277,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
return RestrictPrctl();
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
if (sysno == __NR_socketpair) {
|
||||
// Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
|
||||
static_assert(AF_UNIX == PF_UNIX,
|
||||
@@ -340,7 +341,8 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
}
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
if (SyscallSets::IsSocketCall(sysno))
|
||||
return RestrictSocketcallCommand();
|
||||
#endif
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "sandbox/linux/system_headers/linux_time.h"
|
||||
|
||||
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
|
||||
- !defined(__arm__) && !defined(__aarch64__) && \
|
||||
+ !defined(__arm__) && !defined(__aarch64__) && !defined(__powerpc64__) && \
|
||||
!defined(PTRACE_GET_THREAD_AREA)
|
||||
// Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
|
||||
// the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
|
||||
@@ -45,6 +45,11 @@
|
||||
#include <asm/ptrace-abi.h>
|
||||
#endif
|
||||
|
||||
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
|
||||
+#ifdef __powerpc64__
|
||||
+#include <termios.h>
|
||||
+#endif
|
||||
+
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if !defined(F_DUPFD_CLOEXEC)
|
||||
@@ -102,6 +107,15 @@ inline bool IsArchitectureMips() {
|
||||
#endif
|
||||
}
|
||||
|
||||
+inline bool IsArchitecturePPC64() {
|
||||
+#if defined(__powerpc64__)
|
||||
+ return true;
|
||||
+#else
|
||||
+ return false;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+
|
||||
// Ubuntu's version of glibc has a race condition in sem_post that can cause
|
||||
// it to call futex(2) with bogus op arguments. To workaround this, we need
|
||||
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
|
||||
@@ -269,9 +283,11 @@ ResultExpr RestrictFcntlCommands() {
|
||||
// operator.
|
||||
// Glibc overrides the kernel's O_LARGEFILE value. Account for this.
|
||||
uint64_t kOLargeFileFlag = O_LARGEFILE;
|
||||
- if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
|
||||
+ if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips() \
|
||||
+ || IsArchitecturePPC64())
|
||||
kOLargeFileFlag = 0100000;
|
||||
|
||||
+
|
||||
const Arg<int> cmd(1);
|
||||
const Arg<long> long_arg(2);
|
||||
|
||||
@@ -294,8 +310,17 @@ ResultExpr RestrictFcntlCommands() {
|
||||
F_SETLKW,
|
||||
F_GETLK,
|
||||
F_DUPFD,
|
||||
- F_DUPFD_CLOEXEC},
|
||||
- Allow())
|
||||
+ F_DUPFD_CLOEXEC
|
||||
+#if defined(__powerpc64__)
|
||||
+// On PPC64, F_SETLK, F_GETLK, F_SETLKW are defined as the 64-bit variants
|
||||
+// but glibc will sometimes still use the 32-bit versions. Allow both.
|
||||
+ ,
|
||||
+ 5, /* F_GETLK (32) */
|
||||
+ 6, /* F_SETLK (32) */
|
||||
+ 7 /* F_SETLKW (32) */
|
||||
+#endif
|
||||
+ },
|
||||
+ Allow())
|
||||
.Case(F_SETFL,
|
||||
If((long_arg & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS()))
|
||||
.Case(F_ADD_SEALS,
|
||||
@@ -304,7 +329,7 @@ ResultExpr RestrictFcntlCommands() {
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
-#if defined(__i386__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
|
||||
ResultExpr RestrictSocketcallCommand() {
|
||||
// Unfortunately, we are unable to restrict the first parameter to
|
||||
// socketpair(2). Whilst initially sounding bad, it's noteworthy that very
|
||||
@@ -459,7 +484,7 @@ ResultExpr RestrictPtrace() {
|
||||
#endif
|
||||
return Switch(request)
|
||||
.Cases({
|
||||
-#if !defined(__aarch64__)
|
||||
+#if !defined(__aarch64__) && !defined(__powerpc64__)
|
||||
PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
|
||||
PTRACE_GETREGSET,
|
||||
#endif
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
||||
@@ -52,7 +52,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Restr
|
||||
// O_NONBLOCK | O_SYNC | O_LARGEFILE | O_CLOEXEC | O_NOATIME.
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictFcntlCommands();
|
||||
|
||||
-#if defined(__i386__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
|
||||
// Restrict socketcall(2) to only allow socketpair(2), send(2), recv(2),
|
||||
// sendto(2), recvfrom(2), shutdown(2), sendmsg(2) and recvmsg(2).
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSocketcallCommand();
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -29,7 +29,8 @@ bool SyscallSets::IsAllowedGettime(int s
|
||||
switch (sysno) {
|
||||
case __NR_gettimeofday:
|
||||
#if defined(__i386__) || defined(__x86_64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_time:
|
||||
#endif
|
||||
return true;
|
||||
@@ -52,12 +53,14 @@ bool SyscallSets::IsAllowedGettime(int s
|
||||
case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_ftime: // Obsolete.
|
||||
#endif
|
||||
case __NR_settimeofday: // Privileged.
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_stime:
|
||||
#endif
|
||||
default:
|
||||
@@ -136,7 +139,7 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_faccessat2:
|
||||
case __NR_fchmodat:
|
||||
case __NR_fchownat: // Should be called chownat ?
|
||||
-#if defined(__x86_64__) || defined(__aarch64__)
|
||||
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_newfstatat: // fstatat(). EPERM not a valid errno.
|
||||
#elif defined(__i386__) || defined(__arm__) || \
|
||||
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
@@ -155,7 +158,7 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_memfd_create:
|
||||
case __NR_mkdirat:
|
||||
case __NR_mknodat:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_oldlstat:
|
||||
case __NR_oldstat:
|
||||
#endif
|
||||
@@ -169,7 +172,8 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
#endif
|
||||
case __NR_statfs: // EPERM not a valid errno.
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_statfs64:
|
||||
#endif
|
||||
case __NR_statx: // EPERM not a valid errno.
|
||||
@@ -180,7 +184,8 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_truncate64:
|
||||
#endif
|
||||
case __NR_unlinkat:
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_utime:
|
||||
#endif
|
||||
case __NR_utimensat: // New.
|
||||
@@ -220,7 +225,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
#endif
|
||||
return true;
|
||||
// TODO(jln): these should be denied gracefully as well (moved below).
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_fadvise64: // EPERM not a valid errno.
|
||||
#endif
|
||||
#if defined(__i386__)
|
||||
@@ -233,11 +239,12 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
case __NR_flock: // EPERM not a valid errno.
|
||||
case __NR_fstatfs: // Give information about the whole filesystem.
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_fstatfs64:
|
||||
#endif
|
||||
case __NR_fsync: // EPERM not a valid errno.
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_oldfstat:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
@@ -245,6 +252,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
case __NR_sync_file_range: // EPERM not a valid errno.
|
||||
#elif defined(__arm__)
|
||||
case __NR_arm_sync_file_range: // EPERM not a valid errno.
|
||||
+#elif defined(__powerpc64__)
|
||||
+ case __NR_sync_file_range2: // EPERM not a valid errno.
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
@@ -265,7 +274,8 @@ bool SyscallSets::IsDeniedFileSystemAcce
|
||||
#endif
|
||||
case __NR_getdents64: // EPERM not a valid errno.
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_readdir:
|
||||
#endif
|
||||
return true;
|
||||
@@ -306,7 +316,7 @@ bool SyscallSets::IsGetSimpleId(int sysn
|
||||
bool SyscallSets::IsProcessPrivilegeChange(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_capset:
|
||||
-#if defined(__i386__) || defined(__x86_64__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_ioperm: // Intel privilege.
|
||||
case __NR_iopl: // Intel privilege.
|
||||
#endif
|
||||
@@ -362,7 +372,8 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
// overflow.
|
||||
case __NR_sigaltstack:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_rt_sigtimedwait_time64:
|
||||
case __NR_sigaction:
|
||||
case __NR_sigprocmask:
|
||||
@@ -378,7 +389,8 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
#endif
|
||||
case __NR_signalfd4:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_sigpending:
|
||||
case __NR_sigsuspend:
|
||||
#endif
|
||||
@@ -402,7 +414,7 @@ bool SyscallSets::IsAllowedOperationOnFd
|
||||
#endif
|
||||
case __NR_dup3:
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_shutdown:
|
||||
#endif
|
||||
return true;
|
||||
@@ -435,7 +447,7 @@ bool SyscallSets::IsAllowedProcessStartO
|
||||
case __NR_exit_group:
|
||||
case __NR_wait4:
|
||||
case __NR_waitid:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_waitpid:
|
||||
#endif
|
||||
return true;
|
||||
@@ -452,7 +464,7 @@ bool SyscallSets::IsAllowedProcessStartO
|
||||
#endif
|
||||
case __NR_set_tid_address:
|
||||
case __NR_unshare:
|
||||
-#if !defined(__mips__) && !defined(__aarch64__)
|
||||
+#if !defined(__mips__) && !defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_vfork:
|
||||
#endif
|
||||
default:
|
||||
@@ -499,7 +511,7 @@ bool SyscallSets::IsAllowedEpoll(int sys
|
||||
bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
|
||||
switch (sysno) {
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_accept:
|
||||
case __NR_accept4:
|
||||
case __NR_bind:
|
||||
@@ -514,7 +526,8 @@ bool SyscallSets::IsDeniedGetOrModifySoc
|
||||
}
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big multiplexing system call for sockets.
|
||||
bool SyscallSets::IsSocketCall(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -528,7 +541,8 @@ bool SyscallSets::IsSocketCall(int sysno
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(__x86_64__) || defined(__arm__) || defined(__mips__)
|
||||
+#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
bool SyscallSets::IsNetworkSocketInformation(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_getpeername:
|
||||
@@ -553,7 +567,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
|
||||
case __NR_mincore:
|
||||
case __NR_mlockall:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_mmap:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
@@ -583,7 +597,8 @@ bool SyscallSets::IsAllowedGeneralIo(int
|
||||
switch (sysno) {
|
||||
case __NR_lseek:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR__llseek:
|
||||
#endif
|
||||
#if !defined(__aarch64__)
|
||||
@@ -603,26 +618,28 @@ bool SyscallSets::IsAllowedGeneralIo(int
|
||||
case __NR_readv:
|
||||
case __NR_pread64:
|
||||
#if defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_recv:
|
||||
#endif
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_recvfrom: // Could specify source.
|
||||
case __NR_recvmsg: // Could specify source.
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_select:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__arm__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__powerpc64__)
|
||||
case __NR__newselect:
|
||||
#endif
|
||||
#if defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_send:
|
||||
#endif
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_sendmsg: // Could specify destination.
|
||||
case __NR_sendto: // Could specify destination.
|
||||
#endif
|
||||
@@ -678,7 +695,8 @@ bool SyscallSets::IsAllowedBasicSchedule
|
||||
return true;
|
||||
case __NR_getpriority:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_nice:
|
||||
#endif
|
||||
case __NR_setpriority:
|
||||
@@ -690,7 +708,8 @@ bool SyscallSets::IsAllowedBasicSchedule
|
||||
bool SyscallSets::IsAdminOperation(int sysno) {
|
||||
switch (sysno) {
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_bdflush:
|
||||
#endif
|
||||
case __NR_kexec_load:
|
||||
@@ -706,7 +725,8 @@ bool SyscallSets::IsAdminOperation(int s
|
||||
|
||||
bool SyscallSets::IsKernelModule(int sysno) {
|
||||
switch (sysno) {
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_create_module:
|
||||
case __NR_get_kernel_syms: // Should ENOSYS.
|
||||
case __NR_query_module:
|
||||
@@ -739,7 +759,8 @@ bool SyscallSets::IsFsControl(int sysno)
|
||||
case __NR_swapoff:
|
||||
case __NR_swapon:
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_umount:
|
||||
#endif
|
||||
case __NR_umount2:
|
||||
@@ -755,7 +776,7 @@ bool SyscallSets::IsNuma(int sysno) {
|
||||
case __NR_getcpu:
|
||||
case __NR_mbind:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_migrate_pages:
|
||||
#endif
|
||||
case __NR_move_pages:
|
||||
@@ -790,14 +811,15 @@ bool SyscallSets::IsGlobalProcessEnviron
|
||||
switch (sysno) {
|
||||
case __NR_acct: // Privileged.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__arm__)
|
||||
+#if defined(__i386__) || defined(__arm__) || defined(__powerpc64__)
|
||||
case __NR_ugetrlimit:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_ulimit:
|
||||
#endif
|
||||
case __NR_getrusage:
|
||||
@@ -831,7 +853,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
|
||||
#endif
|
||||
case __NR_sysinfo:
|
||||
case __NR_uname:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_olduname:
|
||||
case __NR_oldolduname:
|
||||
#endif
|
||||
@@ -915,7 +937,8 @@ bool SyscallSets::IsSystemVSemaphores(in
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
defined(__aarch64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// These give a lot of ambient authority and bypass the setuid sandbox.
|
||||
bool SyscallSets::IsSystemVSharedMemory(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -946,7 +969,8 @@ bool SyscallSets::IsSystemVMessageQueue(
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big system V multiplexing system call.
|
||||
bool SyscallSets::IsSystemVIpc(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -966,7 +990,8 @@ bool SyscallSets::IsAnySystemV(int sysno
|
||||
return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
|
||||
IsSystemVSharedMemory(sysno);
|
||||
#elif defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
return IsSystemVIpc(sysno);
|
||||
#endif
|
||||
}
|
||||
@@ -1023,7 +1048,8 @@ bool SyscallSets::IsFaNotify(int sysno)
|
||||
bool SyscallSets::IsTimer(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_getitimer:
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_alarm:
|
||||
#endif
|
||||
case __NR_setitimer:
|
||||
@@ -1105,18 +1131,22 @@ bool SyscallSets::IsMisc(int sysno) {
|
||||
case __NR_syncfs:
|
||||
case __NR_vhangup:
|
||||
// The system calls below are not implemented.
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_afs_syscall:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_break:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_getpmsg:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_gtty:
|
||||
case __NR_idle:
|
||||
case __NR_lock:
|
||||
@@ -1124,20 +1154,22 @@ bool SyscallSets::IsMisc(int sysno) {
|
||||
case __NR_prof:
|
||||
case __NR_profil:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_putpmsg:
|
||||
#endif
|
||||
#if defined(__x86_64__)
|
||||
case __NR_security:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_stty:
|
||||
#endif
|
||||
-#if defined(__x86_64__)
|
||||
+#if defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_tuxcall:
|
||||
#endif
|
||||
-#if !defined(__aarch64__)
|
||||
+#if !defined(__aarch64__) && !defined(__powerpc64__)
|
||||
case __NR_vserver:
|
||||
#endif
|
||||
return true;
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
|
||||
@@ -46,13 +46,14 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
static bool IsDeniedGetOrModifySocket(int sysno);
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big multiplexing system call for sockets.
|
||||
static bool IsSocketCall(int sysno);
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
static bool IsNetworkSocketInformation(int sysno);
|
||||
#endif
|
||||
|
||||
@@ -84,7 +85,8 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
defined(__aarch64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// These give a lot of ambient authority and bypass the setuid sandbox.
|
||||
static bool IsSystemVSharedMemory(int sysno);
|
||||
#endif
|
||||
@@ -95,7 +97,8 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big system V multiplexing system call.
|
||||
static bool IsSystemVIpc(int sysno);
|
||||
#endif
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/services/syscall_wrappers.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/services/syscall_wrappers.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/services/syscall_wrappers.cc
|
||||
@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags,
|
||||
#if defined(ARCH_CPU_X86_64)
|
||||
return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
|
||||
#elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
- defined(ARCH_CPU_MIPS_FAMILY)
|
||||
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY)
|
||||
// CONFIG_CLONE_BACKWARDS defined.
|
||||
return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
|
||||
#endif
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
From c9043a422fb4a5a6c72aaa1b907cea5f6a3061dd Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:10:24 -0500
|
||||
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Update syscall ranges for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/bpf_dsl/linux_syscall_ranges.h | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
@@ -56,6 +56,13 @@
|
||||
#define MAX_PUBLIC_SYSCALL __NR_syscalls
|
||||
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
|
||||
|
||||
+#elif defined(__powerpc64__)
|
||||
+
|
||||
+#include <asm/unistd.h>
|
||||
+#define MIN_SYSCALL 0u
|
||||
+#define MAX_PUBLIC_SYSCALL 386u
|
||||
+#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
|
||||
+
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 7468b266532bd607eb1f5292d758256d800b2eee Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Fri, 10 Aug 2018 00:23:50 -0500
|
||||
Subject: [PATCH] services/service_manager/sandbox/linux: Fix TCGETS
|
||||
declaration on PPC64
|
||||
|
||||
---
|
||||
.../sandbox/linux/bpf_renderer_policy_linux.cc | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
@@ -15,6 +15,11 @@
|
||||
#include "sandbox/linux/system_headers/linux_syscalls.h"
|
||||
#include "sandbox/policy/linux/sandbox_linux.h"
|
||||
|
||||
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
|
||||
+#ifdef __powerpc64__
|
||||
+#include <termios.h>
|
||||
+#endif
|
||||
+
|
||||
// TODO(vignatti): replace the local definitions below with #include
|
||||
// <linux/dma-buf.h> once kernel version 4.6 becomes widely used.
|
||||
#include <linux/types.h>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
Description: fix swiftshader build issue on ppc64el
|
||||
Origin: vendor, https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/blob/chromium-131/patches/ppc64le/third_party/0001-swiftshader-fix-build.patch
|
||||
Bug: https://buildd.debian.org/status/fetch.php?pkg=chromium&arch=ppc64el&ver=131.0.6778.204-1&stamp=1734633529&raw=0
|
||||
Last-Update: 2024-12-20
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
Index: chromium-144.0.7559.59/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
|
||||
+++ chromium-144.0.7559.59/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
|
||||
@@ -1599,6 +1599,9 @@ swiftshader_llvm_source_set("swiftshader
|
||||
"llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp",
|
||||
"llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp",
|
||||
"llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp",
|
||||
+ "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp",
|
||||
+ "llvm/lib/MC/MCAsmInfoXCOFF.cpp",
|
||||
+ "llvm/lib/MC/MCInstrInfo.cpp",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Index: chromium-144.0.7559.59/third_party/angle/src/libANGLE/Constants.h
|
||||
Index: chromium-120.0.6099.71/third_party/angle/src/libANGLE/Constants.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/angle/src/libANGLE/Constants.h
|
||||
+++ chromium-144.0.7559.59/third_party/angle/src/libANGLE/Constants.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/angle/src/libANGLE/Constants.h
|
||||
+++ chromium-120.0.6099.71/third_party/angle/src/libANGLE/Constants.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#ifndef LIBANGLE_CONSTANTS_H_
|
||||
#define LIBANGLE_CONSTANTS_H_
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ Subject: [PATCH] third_party/libvpx: Properly generate gni on ppc64
|
|||
third_party/libvpx/generate_gni.sh | 10 ++++++++++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
|
||||
Index: chromium-120.0.6099.71/third_party/libvpx/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libvpx/BUILD.gn
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
|
||||
@@ -297,6 +297,8 @@ if (current_cpu == "x86" || (current_cpu
|
||||
--- chromium-120.0.6099.71.orig/third_party/libvpx/BUILD.gn
|
||||
+++ chromium-120.0.6099.71/third_party/libvpx/BUILD.gn
|
||||
@@ -248,6 +248,8 @@ if (current_cpu == "x86" || (current_cpu
|
||||
} else if (current_cpu == "x64") {
|
||||
deps = [ ":libvpx_x86_64_headers" ]
|
||||
sources = libvpx_srcs_x86_64_avx512
|
||||
|
|
|
|||
22
0001-third_party-lss-Don-t-look-for-mmap2-on-ppc64.patch
Normal file
22
0001-third_party-lss-Don-t-look-for-mmap2-on-ppc64.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/third_party/lss/linux_syscall_support.h
|
||||
+++ chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
|
||||
@@ -4638,7 +4638,7 @@ struct kernel_statx {
|
||||
LSS_REG(2, buf);
|
||||
LSS_BODY(void*, mmap2, "0"(__r2));
|
||||
}
|
||||
-#else
|
||||
+#elif !defined(__powerpc64__) /* ppc64 doesn't have mmap2 */
|
||||
#define __NR__mmap2 __NR_mmap2
|
||||
LSS_INLINE _syscall6(void*, _mmap2, void*, s,
|
||||
size_t, l, int, p,
|
||||
@@ -4749,7 +4749,7 @@ struct kernel_statx {
|
||||
#if defined(__i386__) || \
|
||||
defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
|
||||
(defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \
|
||||
- defined(__PPC__) || \
|
||||
+ (defined(__PPC__) && !defined(__powerpc64__)) || \
|
||||
(defined(__s390__) && !defined(__s390x__))
|
||||
/* On these architectures, implement mmap() with mmap2(). */
|
||||
LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d,
|
||||
|
|
@ -8,10 +8,10 @@ Subject: [PATCH] third_party/pffft: Include altivec.h on ppc64 with SIMD
|
|||
third_party/pffft/src/pffft.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: chromium-144.0.7559.59/third_party/pffft/src/pffft.c
|
||||
Index: chromium-120.0.6099.71/third_party/pffft/src/pffft.c
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/pffft/src/pffft.c
|
||||
+++ chromium-144.0.7559.59/third_party/pffft/src/pffft.c
|
||||
--- chromium-120.0.6099.71.orig/third_party/pffft/src/pffft.c
|
||||
+++ chromium-120.0.6099.71/third_party/pffft/src/pffft.c
|
||||
@@ -100,6 +100,7 @@
|
||||
Altivec support macros
|
||||
*/
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,6 @@
|
|||
Index: chromium-144.0.7559.59/v8/src/base/immediate-crash.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/v8/src/base/immediate-crash.h
|
||||
+++ chromium-144.0.7559.59/v8/src/base/immediate-crash.h
|
||||
@@ -98,6 +98,13 @@
|
||||
--- a/v8/src/base/immediate-crash.h
|
||||
+++ b/v8/src/base/immediate-crash.h
|
||||
@@ -93,6 +93,13 @@
|
||||
#define TRAP_SEQUENCE1_() asm volatile(".2byte 0x0001");
|
||||
#define TRAP_SEQUENCE2_() asm volatile("")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
# crypto: fix missing OPENSSL_NO_ENGINE guard
|
||||
# PR-URL: https://github.com/nodejs/node/pull/57012
|
||||
# Reviewed-By: Richard Lau <rlau@redhat.com>
|
||||
# Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
|
||||
# Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
||||
# Reviewed-By: James M Snell <jasnell@gmail.com>
|
||||
|
||||
diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc
|
||||
index abcdef1..2345678 100644
|
||||
--- a/src/crypto/crypto_context.cc
|
||||
+++ b/src/crypto/crypto_context.cc
|
||||
@@ -34,7 +34,9 @@ using ncrypto::BIOPointer;
|
||||
using ncrypto::ClearErrorOnReturn;
|
||||
using ncrypto::CryptoErrorList;
|
||||
using ncrypto::DHPointer;
|
||||
+#ifndef OPENSSL_NO_ENGINE
|
||||
using ncrypto::EnginePointer;
|
||||
+#endif // !OPENSSL_NO_ENGINE
|
||||
using ncrypto::EVPKeyPointer;
|
||||
using ncrypto::MarkPopErrorOnReturn;
|
||||
using ncrypto::SSLPointer;
|
||||
|
||||
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
|
||||
index 1234567..abcdef0 100644
|
||||
--- a/src/crypto/crypto_util.cc
|
||||
+++ b/src/crypto/crypto_util.cc
|
||||
@@ -30,7 +30,9 @@
|
||||
using ncrypto::BIOPointer;
|
||||
using ncrypto::CryptoErrorList;
|
||||
+#ifndef OPENSSL_NO_ENGINE
|
||||
using ncrypto::EnginePointer;
|
||||
+#endif // !OPENSSL_NO_ENGINE
|
||||
using ncrypto::EVPKeyCtxPointer;
|
||||
using v8::ArrayBuffer;
|
||||
using v8::BackingStore;
|
||||
using v8::BigInt;
|
||||
21
0002-Include-cstddef-to-fix-build.patch
Normal file
21
0002-Include-cstddef-to-fix-build.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
From 82922bf486e9926a171152f61030dfcd53f017b8 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Pearson <tpearson@raptorengineering.com>
|
||||
Date: Thu, 30 Aug 2018 17:32:05 -0500
|
||||
Subject: [PATCH] Include cstddef to fix build
|
||||
|
||||
size_t is not defined unless cstddef is included.
|
||||
---
|
||||
third_party/crashpad/crashpad/compat/linux/sys/user.h | 1 +
|
||||
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef CRASHPAD_COMPAT_LINUX_SYS_USER_H_
|
||||
#define CRASHPAD_COMPAT_LINUX_SYS_USER_H_
|
||||
|
||||
+#include <cstddef>
|
||||
#include_next <sys/user.h>
|
||||
|
||||
#include <features.h>
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,76 @@
|
|||
From 3c4705bfdda45feb860a1f121631773e5fe8e53f Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:11:26 -0500
|
||||
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Modify seccomp_macros to add
|
||||
support for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/bpf_dsl/seccomp_macros.h | 43 ++++++++++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
@@ -14,6 +14,9 @@
|
||||
#if defined(__mips__)
|
||||
// sys/user.h in eglibc misses size_t definition
|
||||
#include <stddef.h>
|
||||
+#elif defined(__powerpc64__)
|
||||
+// Manually define greg_t on ppc64
|
||||
+typedef unsigned long long greg_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -343,6 +346,51 @@ struct regs_struct {
|
||||
#define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
|
||||
#define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
|
||||
#define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
|
||||
+
|
||||
+#elif defined(__powerpc64__)
|
||||
+#include <asm/ptrace.h>
|
||||
+
|
||||
+typedef struct pt_regs regs_struct;
|
||||
+
|
||||
+#ifdef ARCH_CPU_LITTLE_ENDIAN
|
||||
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64LE
|
||||
+#else
|
||||
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64
|
||||
+#endif
|
||||
+
|
||||
+#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.regs->gpr[_reg])
|
||||
+
|
||||
+#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 3)
|
||||
+#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 0)
|
||||
+#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.regs->nip
|
||||
+#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 3)
|
||||
+#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4)
|
||||
+#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5)
|
||||
+#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, 6)
|
||||
+#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, 7)
|
||||
+#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, 8)
|
||||
+
|
||||
+#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
|
||||
+#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
|
||||
+#define SECCOMP_IP_MSB_IDX \
|
||||
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
|
||||
+#define SECCOMP_IP_LSB_IDX \
|
||||
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
|
||||
+#define SECCOMP_ARG_MSB_IDX(nr) \
|
||||
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
|
||||
+#define SECCOMP_ARG_LSB_IDX(nr) \
|
||||
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
|
||||
+
|
||||
+#define SECCOMP_PT_RESULT(_regs) (_regs).gpr[3]
|
||||
+#define SECCOMP_PT_SYSCALL(_regs) (_regs).gpr[0]
|
||||
+#define SECCOMP_PT_IP(_regs) (_regs).nip
|
||||
+#define SECCOMP_PT_PARM1(_regs) (_regs).gpr[3]
|
||||
+#define SECCOMP_PT_PARM2(_regs) (_regs).gpr[4]
|
||||
+#define SECCOMP_PT_PARM3(_regs) (_regs).gpr[5]
|
||||
+#define SECCOMP_PT_PARM4(_regs) (_regs).gpr[6]
|
||||
+#define SECCOMP_PT_PARM5(_regs) (_regs).gpr[7]
|
||||
+#define SECCOMP_PT_PARM6(_regs) (_regs).gpr[8]
|
||||
+
|
||||
#else
|
||||
#error Unsupported target platform
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,8 @@
|
|||
Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
||||
Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/lss/linux_syscall_support.h
|
||||
+++ chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
||||
@@ -86,7 +86,7 @@
|
||||
--- chromium-120.0.6099.71.orig/third_party/lss/linux_syscall_support.h
|
||||
+++ chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
|
||||
@@ -87,7 +87,7 @@
|
||||
* Porting to other related platforms should not be difficult.
|
||||
*/
|
||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \
|
||||
|
|
@ -11,7 +11,7 @@ Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
|||
defined(__aarch64__) || defined(__s390__) || defined(__e2k__) || \
|
||||
(defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch_lp64)) \
|
||||
&& (defined(__linux) || defined(__ANDROID__))
|
||||
@@ -400,7 +400,7 @@ struct kernel_stat64 {
|
||||
@@ -399,7 +399,7 @@ struct kernel_stat64 {
|
||||
unsigned __pad2;
|
||||
unsigned long long st_blocks;
|
||||
};
|
||||
|
|
@ -20,7 +20,7 @@ Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
|||
struct kernel_stat64 {
|
||||
unsigned long long st_dev;
|
||||
unsigned long long st_ino;
|
||||
@@ -422,6 +422,28 @@ struct kernel_stat64 {
|
||||
@@ -421,6 +421,28 @@ struct kernel_stat64 {
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
};
|
||||
|
|
@ -49,7 +49,7 @@ Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
|||
#elif defined(__e2k__)
|
||||
struct kernel_stat64 {
|
||||
unsigned long long st_dev;
|
||||
@@ -538,7 +560,7 @@ struct kernel_stat {
|
||||
@@ -537,7 +559,7 @@ struct kernel_stat {
|
||||
uint64_t st_ctime_nsec_;
|
||||
int64_t __unused4[3];
|
||||
};
|
||||
|
|
@ -58,7 +58,7 @@ Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
|||
typedef unsigned long kernel_blkcnt_t;
|
||||
typedef unsigned long kernel_blksize_t;
|
||||
typedef unsigned kernel_dev_t;
|
||||
@@ -569,6 +591,37 @@ struct kernel_stat {
|
||||
@@ -568,6 +590,37 @@ struct kernel_stat {
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
};
|
||||
|
|
@ -96,7 +96,7 @@ Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
|||
#elif (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64)
|
||||
typedef int kernel_blkcnt_t;
|
||||
typedef int kernel_blksize_t;
|
||||
@@ -1825,6 +1878,28 @@ struct kernel_statx {
|
||||
@@ -1824,6 +1877,28 @@ struct kernel_statx {
|
||||
#ifndef __NR_getcpu
|
||||
#define __NR_getcpu 302
|
||||
#endif
|
||||
|
|
@ -122,10 +122,30 @@ Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
|||
+#define __NR_recvmsg 342
|
||||
+#endif
|
||||
+
|
||||
/* End of powerpc definitions */
|
||||
/* End of powerpc defininitions */
|
||||
#elif defined(__s390__)
|
||||
#ifndef __NR_quotactl
|
||||
@@ -4826,7 +4901,7 @@ struct kernel_statx {
|
||||
@@ -3363,6 +3438,11 @@ struct kernel_statx {
|
||||
/* TODO(csilvers): consider wrapping some args up in a struct, like we
|
||||
* do for i386's _syscall6, so we can compile successfully on gcc 2.95
|
||||
*/
|
||||
+ #ifdef __powerpc64__
|
||||
+ /* TODO: implement clone() for ppc64.
|
||||
+ * until then, use system libc */
|
||||
+ #define sys_clone clone
|
||||
+ #else
|
||||
LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack,
|
||||
int flags, void *arg, int *parent_tidptr,
|
||||
void *newtls, int *child_tidptr) {
|
||||
@@ -3433,6 +3513,7 @@ struct kernel_statx {
|
||||
}
|
||||
LSS_RETURN(int, __ret, __err);
|
||||
}
|
||||
+ #endif
|
||||
#elif defined(__s390__)
|
||||
#undef LSS_REG
|
||||
#define LSS_REG(r, a) register unsigned long __r##r __asm__("r"#r) = (unsigned long) a
|
||||
@@ -4783,7 +4864,7 @@ struct kernel_statx {
|
||||
LSS_INLINE _syscall6(void*, mmap, void*, addr, size_t, length, int, prot,
|
||||
int, flags, int, fd, int64_t, offset)
|
||||
#endif
|
||||
|
|
@ -134,7 +154,7 @@ Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
|
|||
#undef LSS_SC_LOADARGS_0
|
||||
#define LSS_SC_LOADARGS_0(dummy...)
|
||||
#undef LSS_SC_LOADARGS_1
|
||||
@@ -5216,7 +5291,11 @@ struct kernel_statx {
|
||||
@@ -5173,7 +5254,11 @@ struct kernel_statx {
|
||||
#endif
|
||||
|
||||
#if !defined(__NR_pipe)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
From cca78240860abb63bbcfe94d1e5f04a1f23c527d Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:11:56 -0500
|
||||
Subject: [PATCH 3/4] sandbox/linux/system_headers: Update linux seccomp header
|
||||
for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/system_headers/linux_seccomp.h | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/linux_seccomp.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/system_headers/linux_seccomp.h
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/linux_seccomp.h
|
||||
@@ -38,6 +38,9 @@
|
||||
#ifndef EM_AARCH64
|
||||
#define EM_AARCH64 183
|
||||
#endif
|
||||
+#ifndef EM_PPC64
|
||||
+#define EM_PPC64 21
|
||||
+#endif
|
||||
|
||||
#ifndef __AUDIT_ARCH_64BIT
|
||||
#define __AUDIT_ARCH_64BIT 0x80000000
|
||||
@@ -70,6 +73,12 @@
|
||||
#ifndef AUDIT_ARCH_AARCH64
|
||||
#define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
|
||||
#endif
|
||||
+#ifndef AUDIT_ARCH_PPC64
|
||||
+#define AUDIT_ARCH_PPC64 (EM_PPC64 | __AUDIT_ARCH_64BIT)
|
||||
+#endif
|
||||
+#ifndef AUDIT_ARCH_PPC64LE
|
||||
+#define AUDIT_ARCH_PPC64LE (EM_PPC64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
|
||||
+#endif
|
||||
|
||||
// For prctl.h
|
||||
#ifndef PR_SET_SECCOMP
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
|
||||
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
|
||||
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
|
||||
@@ -0,0 +1,316 @@
|
||||
+// This file is generated. Do not edit.
|
||||
+#ifndef VP8_RTCD_H_
|
||||
|
|
@ -319,10 +319,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp8_r
|
|||
+#endif
|
||||
+
|
||||
+#endif
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
|
||||
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
|
||||
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
|
||||
@@ -0,0 +1,267 @@
|
||||
+// This file is generated. Do not edit.
|
||||
+#ifndef VP9_RTCD_H_
|
||||
|
|
@ -591,10 +591,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp9_r
|
|||
+#endif
|
||||
+
|
||||
+#endif
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
|
||||
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
|
||||
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
|
||||
@@ -0,0 +1,107 @@
|
||||
+@ This file was created from a .asm file
|
||||
+@ using the ads2gas.pl script.
|
||||
|
|
@ -703,10 +703,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_c
|
|||
+.equ DECODE_WIDTH_LIMIT , 16384
|
||||
+.equ DECODE_HEIGHT_LIMIT , 16384
|
||||
+ .section .note.GNU-stack,"",%progbits
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
|
||||
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
|
||||
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
|
||||
@@ -0,0 +1,10 @@
|
||||
+/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
|
||||
+/* */
|
||||
|
|
@ -718,10 +718,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_c
|
|||
+#include "vpx/vpx_codec.h"
|
||||
+static const char* const cfg = "--target=generic-gnu --enable-vp9-highbitdepth --enable-external-build --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-libyuv";
|
||||
+const char *vpx_codec_build_config(void) {return cfg;}
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
|
||||
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
|
||||
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
|
||||
@@ -0,0 +1,116 @@
|
||||
+/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
|
||||
+/* */
|
||||
|
|
@ -839,10 +839,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_c
|
|||
+#define DECODE_WIDTH_LIMIT 16384
|
||||
+#define DECODE_HEIGHT_LIMIT 16384
|
||||
+#endif /* VPX_CONFIG_H */
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
|
||||
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
|
||||
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
|
||||
@@ -0,0 +1,4128 @@
|
||||
+// This file is generated. Do not edit.
|
||||
+#ifndef VPX_DSP_RTCD_H_
|
||||
|
|
@ -4972,10 +4972,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_d
|
|||
+#endif
|
||||
+
|
||||
+#endif
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
|
||||
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
|
||||
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
|
||||
@@ -0,0 +1,96 @@
|
||||
+// This file is generated. Do not edit.
|
||||
+#ifndef VPX_SCALE_RTCD_H_
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
From 298df3dc44f7121cd8cb9a06b29fa3b16c959b8d Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:13:25 -0500
|
||||
Subject: [PATCH 4/4] sandbox/linux/system_headers: Update linux signal header
|
||||
for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/system_headers/linux_signal.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/linux_signal.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/system_headers/linux_signal.h
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/linux_signal.h
|
||||
@@ -13,7 +13,7 @@
|
||||
// (not undefined, but defined different values and in different memory
|
||||
// layouts). So, fill the gap here.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
|
||||
#define LINUX_SIGHUP 1
|
||||
#define LINUX_SIGINT 2
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
@@ -239,6 +239,12 @@ std::string UserAgent() {
|
||||
#endif
|
||||
#elif defined (ARCH_CPU_RISCV64)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
--- chromium-120.0.6099.71.orig/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
+++ chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
@@ -38,6 +38,28 @@ static INLINE int16x8_t vec_max_across(i
|
||||
return vec_max(a, vec_perm(a, a, vec_perm16));
|
||||
}
|
||||
|
|
@ -137,10 +137,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vp9/encoder/ppc/v
|
|||
|
||||
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
|
||||
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
--- chromium-120.0.6099.71.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
+++ chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
@@ -15,6 +15,28 @@
|
||||
#include "vpx_dsp/ppc/txfm_common_vsx.h"
|
||||
#include "vpx_dsp/ppc/types_vsx.h"
|
||||
|
|
@ -255,10 +255,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct3
|
|||
}
|
||||
|
||||
// Returns 1 if negative 0 if positive
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
--- chromium-120.0.6099.71.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
+++ chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
@@ -13,6 +13,28 @@
|
||||
#include "./vpx_dsp_rtcd.h"
|
||||
#include "vpx_dsp/ppc/types_vsx.h"
|
||||
|
|
|
|||
107
0005-sandbox-linux-seccomp-bpf-Add-ppc64-syscall-stub.patch
Normal file
107
0005-sandbox-linux-seccomp-bpf-Add-ppc64-syscall-stub.patch
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
From 1d44643a7c7cf650efd1093d22cd5bf859fdcb51 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 20:52:13 -0500
|
||||
Subject: [PATCH] sandbox/linux/seccomp-bpf: Add ppc64 syscall stub
|
||||
|
||||
---
|
||||
sandbox/linux/seccomp-bpf/syscall.cc | 53 ++++++++++++++++++++++++++--
|
||||
1 file changed, 51 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
@@ -18,7 +18,7 @@ namespace sandbox {
|
||||
namespace {
|
||||
|
||||
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
- defined(ARCH_CPU_MIPS_FAMILY)
|
||||
+ defined(ARCH_CPU_MIPS_FAMILY) || defined (ARCH_CPU_PPC64_FAMILY)
|
||||
// Number that's not currently used by any Linux kernel ABIs.
|
||||
const int kInvalidSyscallNumber = 0x351d3;
|
||||
#else
|
||||
@@ -308,10 +308,54 @@ asm(// We need to be able to tell the ke
|
||||
"2:ret\n"
|
||||
".cfi_endproc\n"
|
||||
".size SyscallAsm, .-SyscallAsm\n"
|
||||
+#elif defined(__powerpc64__)
|
||||
+ ".text\n"
|
||||
+ ".align 4\n"
|
||||
+ ".type SyscallAsm @function\n"
|
||||
+ "SyscallAsm:\n"
|
||||
+ ".cfi_startproc\n"
|
||||
+
|
||||
+ // Check if r3 is negative
|
||||
+ "cmpdi 3, 0\n"
|
||||
+ "bgt 2f\n"
|
||||
+
|
||||
+ // Load address of 3f into r3 and return
|
||||
+ "mflr 10\n"
|
||||
+ "bl 1f\n"
|
||||
+ "1: mflr 3\n"
|
||||
+ "mtlr 10\n"
|
||||
+ "addi 3, 3, 4*13\n"
|
||||
+ "blr\n"
|
||||
+
|
||||
+ // Load arguments from array into r3-8
|
||||
+ // save param 3 in r10
|
||||
+ "2:\n"
|
||||
+ "mr 0, 3\n"
|
||||
+ "ld 3, 0(4)\n"
|
||||
+ "ld 5, 16(4)\n"
|
||||
+ "ld 6, 24(4)\n"
|
||||
+ "ld 7, 32(4)\n"
|
||||
+ "ld 8, 40(4)\n"
|
||||
+ "ld 4, 8(4)\n"
|
||||
+ "li 9, 0\n"
|
||||
+
|
||||
+ // Enter kernel
|
||||
+ "sc\n"
|
||||
+
|
||||
+ // Magic return address
|
||||
+ "3:\n"
|
||||
+ // Like MIPS, ppc64 return values are always positive.
|
||||
+ // Check for error in cr0.SO and negate upon error
|
||||
+ "bc 4, 3, 4f\n"
|
||||
+ "neg 3, 3\n"
|
||||
+ "4: blr\n"
|
||||
+
|
||||
+ ".cfi_endproc\n"
|
||||
+ ".size SyscallAsm, .-SyscallAsm\n"
|
||||
#endif
|
||||
); // asm
|
||||
|
||||
-#if defined(__x86_64__)
|
||||
+#if defined(__x86_64__) || defined(__powerpc64__)
|
||||
extern "C" {
|
||||
intptr_t SyscallAsm(intptr_t nr, const intptr_t args[6]);
|
||||
}
|
||||
@@ -425,6 +469,8 @@ intptr_t Syscall::Call(int nr,
|
||||
ret = inout;
|
||||
}
|
||||
|
||||
+#elif defined(__powerpc64__)
|
||||
+ intptr_t ret = SyscallAsm(nr, args);
|
||||
#else
|
||||
#error "Unimplemented architecture"
|
||||
#endif
|
||||
@@ -441,8 +487,18 @@ void Syscall::PutValueInUcontext(intptr_
|
||||
// needs to be changed back.
|
||||
ret_val = -ret_val;
|
||||
SECCOMP_PARM4(ctx) = 1;
|
||||
- } else
|
||||
+ } else {
|
||||
SECCOMP_PARM4(ctx) = 0;
|
||||
+ }
|
||||
+#endif
|
||||
+#if defined(__powerpc64__)
|
||||
+ // Same as MIPS, need to invert ret and set error register (cr0.SO)
|
||||
+ if (ret_val <= -1 && ret_val >= -4095) {
|
||||
+ ret_val = -ret_val;
|
||||
+ ctx->uc_mcontext.regs->ccr |= (1 << 28);
|
||||
+ } else {
|
||||
+ ctx->uc_mcontext.regs->ccr &= ~(1 << 28);
|
||||
+ }
|
||||
#endif
|
||||
SECCOMP_RESULT(ctx) = static_cast<greg_t>(ret_val);
|
||||
}
|
||||
24
0005-sandbox-linux-update-unit-test-for-ppc64.patch
Normal file
24
0005-sandbox-linux-update-unit-test-for-ppc64.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
From 6a852c4135864ba87b3cbdd0880d7cfecf7cd654 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 13 Sep 2018 15:12:22 -0500
|
||||
Subject: [PATCH 5/6] sandbox/linux: update unit test for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
@@ -331,8 +331,10 @@ TEST_BASELINE_SIGSYS(__NR_timer_create)
|
||||
|
||||
#if !defined(__aarch64__)
|
||||
TEST_BASELINE_SIGSYS(__NR_inotify_init)
|
||||
+#if !defined(__powerpc64__)
|
||||
TEST_BASELINE_SIGSYS(__NR_vserver)
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(LIBC_GLIBC) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
BPF_TEST_C(BaselinePolicy, FutexEINVAL, BaselinePolicy) {
|
||||
14
0006-sandbox-linux-disable-timedwait-time64-ppc64.patch
Normal file
14
0006-sandbox-linux-disable-timedwait-time64-ppc64.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -374,7 +374,9 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
defined(__powerpc64__)
|
||||
+#if !defined(__powerpc64__)
|
||||
case __NR_rt_sigtimedwait_time64:
|
||||
+#endif
|
||||
case __NR_sigaction:
|
||||
case __NR_sigprocmask:
|
||||
case __NR_sigreturn:
|
||||
33
0007-sandbox-linux-add-ppc64-stat.patch
Normal file
33
0007-sandbox-linux-add-ppc64-stat.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/linux_stat.h
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/system_headers/linux_stat.h
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/linux_stat.h
|
||||
@@ -173,6 +173,28 @@ struct kernel_stat {
|
||||
unsigned int __unused4;
|
||||
unsigned int __unused5;
|
||||
};
|
||||
+#elif defined(__powerpc64__)
|
||||
+struct kernel_stat {
|
||||
+ unsigned long st_dev;
|
||||
+ ino_t st_ino;
|
||||
+ unsigned long st_nlink;
|
||||
+ mode_t st_mode;
|
||||
+ uid_t st_uid;
|
||||
+ gid_t st_gid;
|
||||
+ unsigned long st_rdev;
|
||||
+ long st_size;
|
||||
+ unsigned long st_blksize;
|
||||
+ unsigned long st_blocks;
|
||||
+ // unsigned long st_atime;
|
||||
+ unsigned long st_atime_nsec;
|
||||
+ //unsigned long st_mtime;
|
||||
+ unsigned long st_mtime_nsec;
|
||||
+ //unsigned long st_ctime;
|
||||
+ unsigned long st_ctime_nsec;
|
||||
+ unsigned long __unused4;
|
||||
+ unsigned long __unused5;
|
||||
+ unsigned long __unused6;
|
||||
+};
|
||||
#endif
|
||||
|
||||
#if !defined(AT_EMPTY_PATH)
|
||||
90
0008-sandbox-fix-ppc64le-glibc234.patch
Normal file
90
0008-sandbox-fix-ppc64le-glibc234.patch
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
Index: chromium-126.0.6478.57/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.57.orig/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
+++ chromium-126.0.6478.57/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
@@ -34,7 +34,7 @@ ResultExpr UtilityProcessPolicy::Evaluat
|
||||
case __NR_fdatasync:
|
||||
case __NR_fsync:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__arm__)
|
||||
Index: chromium-126.0.6478.57/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.57.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
+++ chromium-126.0.6478.57/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
@@ -87,7 +87,7 @@ ResultExpr RendererProcessPolicy::Evalua
|
||||
case __NR_ftruncate64:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
case __NR_setrlimit:
|
||||
// We allow setrlimit to dynamically adjust the address space limit as
|
||||
Index: chromium-126.0.6478.57/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.57.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
+++ chromium-126.0.6478.57/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
@@ -58,9 +58,9 @@
|
||||
|
||||
#elif defined(__powerpc64__)
|
||||
|
||||
-#include <asm/unistd.h>
|
||||
+#include <asm-generic/unistd.h>
|
||||
#define MIN_SYSCALL 0u
|
||||
-#define MAX_PUBLIC_SYSCALL 386u
|
||||
+#define MAX_PUBLIC_SYSCALL __NR_syscalls
|
||||
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
|
||||
|
||||
#else
|
||||
Index: chromium-126.0.6478.57/sandbox/linux/services/credentials.cc
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.57.orig/sandbox/linux/services/credentials.cc
|
||||
+++ chromium-126.0.6478.57/sandbox/linux/services/credentials.cc
|
||||
@@ -89,7 +89,8 @@ bool ChrootToSafeEmptyDir() {
|
||||
|
||||
int clone_flags = CLONE_FS | LINUX_SIGCHLD;
|
||||
void* tls = nullptr;
|
||||
-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
|
||||
+#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
+ defined(ARCH_CPU_PPC64_FAMILY)) && \
|
||||
!defined(MEMORY_SANITIZER)
|
||||
// Use CLONE_VM | CLONE_VFORK as an optimization to avoid copying page tables.
|
||||
// Since clone writes to the new child's TLS before returning, we must set a
|
||||
@@ -97,6 +98,11 @@ bool ChrootToSafeEmptyDir() {
|
||||
// glibc performs syscalls by calling a function pointer in TLS, so we do not
|
||||
// attempt this optimization.
|
||||
// TODO(crbug.com/40196869) Broken in MSan builds after LLVM f1bb30a4956f.
|
||||
+ //
|
||||
+ // NOTE: Without CLONE_VM, fontconfig will attempt to reload configuration
|
||||
+ // in every thread. Since the rendered threads are sandboxed without
|
||||
+ // filesystem access (e.g. to /etc/fonts/fonts.conf) this will cause font
|
||||
+ // configuration loading failures and no fonts will be displayed!
|
||||
clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
|
||||
|
||||
// PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to
|
||||
Index: chromium-126.0.6478.57/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
===================================================================
|
||||
--- chromium-126.0.6478.57.orig/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
+++ chromium-126.0.6478.57/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
@@ -357,7 +357,16 @@ intptr_t SIGSYSFstatatHandler(const stru
|
||||
if (args.nr == __NR_fstatat_default) {
|
||||
if (*reinterpret_cast<const char*>(args.args[1]) == '\0' &&
|
||||
args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
|
||||
- return syscall(__NR_fstat_default, static_cast<int>(args.args[0]),
|
||||
+ int fd = static_cast<int>(args.args[0]);
|
||||
+#if defined(__powerpc64__)
|
||||
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
|
||||
+ // parameter which causes checks against it to fail. For now, manually
|
||||
+ // negate them back.
|
||||
+ // TODO: Investigate the root cause and fix in glibc
|
||||
+ if (fd < 0)
|
||||
+ fd = -fd;
|
||||
+#endif
|
||||
+ return syscall(__NR_fstat_default, fd,
|
||||
reinterpret_cast<default_stat_struct*>(args.args[2]));
|
||||
}
|
||||
return -reinterpret_cast<intptr_t>(fs_denied_errno);
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Index: chromium-144.0.7559.59/base/compiler_specific.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/base/compiler_specific.h
|
||||
+++ chromium-144.0.7559.59/base/compiler_specific.h
|
||||
@@ -198,7 +198,7 @@
|
||||
// MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
|
||||
// }
|
||||
// ```
|
||||
-#if __has_cpp_attribute(clang::musttail)
|
||||
+#if __has_cpp_attribute(clang::musttail) && !defined(__powerpc64__)
|
||||
#define MUSTTAIL [[clang::musttail]]
|
||||
#else
|
||||
#define MUSTTAIL
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Index: chromium-144.0.7559.59/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
|
||||
+++ chromium-144.0.7559.59/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
|
||||
@@ -139,7 +139,7 @@
|
||||
// PA_MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
|
||||
// }
|
||||
// ```
|
||||
-#if PA_HAS_CPP_ATTRIBUTE(clang::musttail)
|
||||
+#if PA_HAS_CPP_ATTRIBUTE(clang::musttail) && !defined(__powerpc64__)
|
||||
#define PA_MUSTTAIL [[clang::musttail]]
|
||||
#else
|
||||
#define PA_MUSTTAIL
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
Index: chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
|
||||
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkRasterPipeline.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/skia/src/core/SkRasterPipeline.h
|
||||
+++ chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
|
||||
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkRasterPipeline.h
|
||||
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkRasterPipeline.h
|
||||
@@ -27,7 +27,7 @@ struct SkImageInfo;
|
||||
struct skcms_TransferFunction;
|
||||
|
||||
#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
|
||||
- !defined(SK_CPU_LOONGARCH) && !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK))
|
||||
+ !defined(SK_CPU_LOONGARCH) && !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)) && !defined(__powerpc64__)
|
||||
// [[clang::musttail]] is disabled for the Android version of Skia running on Windows as it
|
||||
// causes crashes (This is probably related to http://crbug.com/1505442).
|
||||
- !defined(SK_CPU_LOONGARCH)
|
||||
+ !defined(SK_CPU_LOONGARCH) && !defined(__powerpc64__)
|
||||
#define SK_HAS_MUSTTAIL 1
|
||||
#else
|
||||
#define SK_HAS_MUSTTAIL 0
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
Index: chromium-144.0.7559.59/third_party/libvpx/generate_gni.sh
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libvpx/generate_gni.sh
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/generate_gni.sh
|
||||
@@ -429,7 +429,7 @@ gen_config_files linux/mipsel "--target=
|
||||
--- a/third_party/libvpx/generate_gni.sh
|
||||
+++ b/third_party/libvpx/generate_gni.sh
|
||||
@@ -423,7 +423,7 @@ gen_config_files linux/mipsel "--target=
|
||||
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
|
||||
gen_config_files linux/loongarch \
|
||||
"--target=loongarch64-linux-gcc ${all_platforms}"
|
||||
|
|
@ -11,12 +9,10 @@ Index: chromium-144.0.7559.59/third_party/libvpx/generate_gni.sh
|
|||
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
|
||||
gen_config_files win/arm64-highbd \
|
||||
"--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD} ${disable_sve}"
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
@@ -527,8 +527,9 @@ if ($opts{arch} eq 'x86') {
|
||||
}
|
||||
--- a/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
+++ b/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
@@ -492,8 +492,9 @@ if ($opts{arch} eq 'x86') {
|
||||
&require(@REQUIRES);
|
||||
arm;
|
||||
} elsif ($opts{arch} =~ /^ppc/ ) {
|
||||
- @ALL_ARCHS = filter(qw/vsx/);
|
||||
|
|
@ -27,11 +23,9 @@ Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/build/make/rtcd.p
|
|||
} elsif ($opts{arch} =~ /loongarch/ ) {
|
||||
@ALL_ARCHS = filter(qw/lsx lasx/);
|
||||
loongarch;
|
||||
Index: chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/libvpx/BUILD.gn
|
||||
+++ chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
|
||||
@@ -98,6 +98,14 @@ config("libvpx_config") {
|
||||
--- a/third_party/libvpx/BUILD.gn
|
||||
+++ b/third_party/libvpx/BUILD.gn
|
||||
@@ -94,6 +94,14 @@ config("libvpx_config") {
|
||||
"-Wno-sign-compare",
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Index: chromium-144.0.7559.59/third_party/webrtc/rtc_base/system/arch.h
|
||||
Index: chromium-120.0.6099.71/third_party/webrtc/rtc_base/system/arch.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/third_party/webrtc/rtc_base/system/arch.h
|
||||
+++ chromium-144.0.7559.59/third_party/webrtc/rtc_base/system/arch.h
|
||||
--- chromium-120.0.6099.71.orig/third_party/webrtc/rtc_base/system/arch.h
|
||||
+++ chromium-120.0.6099.71/third_party/webrtc/rtc_base/system/arch.h
|
||||
@@ -46,6 +46,18 @@
|
||||
#endif
|
||||
#if defined(__MIPSEL__)
|
||||
|
|
|
|||
13
Sandbox-linux-services-credentials.cc-PPC.patch
Normal file
13
Sandbox-linux-services-credentials.cc-PPC.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Index: chromium-120.0.6099.71/sandbox/linux/services/credentials.cc
|
||||
===================================================================
|
||||
--- chromium-120.0.6099.71.orig/sandbox/linux/services/credentials.cc
|
||||
+++ chromium-120.0.6099.71/sandbox/linux/services/credentials.cc
|
||||
@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() {
|
||||
pid_t pid = -1;
|
||||
alignas(16) char stack_buf[PTHREAD_STACK_MIN];
|
||||
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
- defined(ARCH_CPU_MIPS_FAMILY)
|
||||
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY)
|
||||
// The stack grows downward.
|
||||
void* stack = stack_buf + sizeof(stack_buf);
|
||||
#else
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
Index: chromium-144.0.7559.59/base/system/sys_info.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/base/system/sys_info.cc
|
||||
+++ chromium-144.0.7559.59/base/system/sys_info.cc
|
||||
@@ -263,6 +263,8 @@ std::string SysInfo::ProcessCPUArchitect
|
||||
return "ARM";
|
||||
#elif defined(ARCH_CPU_ARM64)
|
||||
return "ARM_64";
|
||||
+#elif defined(ARCH_CPU_PPC64)
|
||||
+ return "PPC_64";
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
return "RISCV_64";
|
||||
#else
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
Index: chromium-144.0.7559.59/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
|
||||
+++ chromium-144.0.7559.59/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
|
||||
@@ -383,6 +383,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatfo
|
||||
info->arch = extensions::api::runtime::PlatformArch::kMips64;
|
||||
} else if (arch == "riscv64") {
|
||||
info->arch = extensions::api::runtime::PlatformArch::kRiscv64;
|
||||
+ } else if (arch == "ppc64") {
|
||||
+ info->arch = extensions::api::runtime::PlatformArch::kPpc64;
|
||||
} else {
|
||||
NOTREACHED();
|
||||
}
|
||||
Index: chromium-144.0.7559.59/extensions/common/api/runtime.json
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/extensions/common/api/runtime.json
|
||||
+++ chromium-144.0.7559.59/extensions/common/api/runtime.json
|
||||
@@ -98,7 +98,8 @@
|
||||
{"name": "x86-64", "description": "Specifies the processer architecture as x86-64."},
|
||||
{"name": "mips", "description": "Specifies the processer architecture as mips."},
|
||||
{"name": "mips64", "description": "Specifies the processer architecture as mips64."},
|
||||
- {"name": "riscv64", "description": "Specifies the processer architecture as riscv64."}
|
||||
+ {"name": "riscv64", "description": "Specifies the processer architecture as riscv64."},
|
||||
+ {"name": "ppc64", "description": "Specifies the processer architecture as ppc64."}
|
||||
],
|
||||
"description": "The machine's processor architecture."
|
||||
},
|
||||
@@ -111,7 +112,8 @@
|
||||
{"name": "x86-32", "description": "Specifies the native client architecture as x86-32."},
|
||||
{"name": "x86-64", "description": "Specifies the native client architecture as x86-64."},
|
||||
{"name": "mips", "description": "Specifies the native client architecture as mips."},
|
||||
- {"name": "mips64", "description": "Specifies the native client architecture as mips64."}
|
||||
+ {"name": "mips64", "description": "Specifies the native client architecture as mips64."},
|
||||
+ {"name": "ppc64", "description": "Specifies the native client architecture as ppc64."}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
Index: chromium-144.0.7559.59/base/process/launch.h
|
||||
===================================================================
|
||||
--- chromium-144.0.7559.59.orig/base/process/launch.h
|
||||
+++ chromium-144.0.7559.59/base/process/launch.h
|
||||
@@ -58,6 +58,9 @@ enum TerminationStatus : int;
|
||||
#if defined(ARCH_CPU_ARM64) || defined(ARCH_CPU_LOONGARCH64)
|
||||
#define PTHREAD_STACK_MIN_CONST \
|
||||
(__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 131072)
|
||||
+#elif defined(ARCH_CPU_PPC64)
|
||||
+#define PTHREAD_STACK_MIN_CONST \
|
||||
+ (__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 131072)
|
||||
#else
|
||||
#define PTHREAD_STACK_MIN_CONST \
|
||||
(__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 16384)
|
||||
14
chrome-remote-desktop@.service
Normal file
14
chrome-remote-desktop@.service
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description="Chrome Remote Desktop host daemon"
|
||||
|
||||
[Service]
|
||||
User=%i
|
||||
Environment=HOME=%h
|
||||
ExecStart=@@CRD_PATH@@/chrome-remote-desktop --start --foreground
|
||||
ExecStop=@@CRD_PATH@@/chrome-remote-desktop --stop
|
||||
ExecReload=@@CRD_PATH@@/chrome-remote-desktop --reload
|
||||
Restart=always
|
||||
TimeoutStopSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
1700
chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch
Normal file
1700
chromium-103.0.5060.53-update-rjsmin-to-1.2.0.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,16 +1,14 @@
|
|||
Fix FTBFS on EL9 due to old ffmpeg-5.x
|
||||
|
||||
diff -up chromium-142.0.7444.59/media/filters/legacy_audio_file_reader.cc.me chromium-142.0.7444.59/media/filters/legacy_audio_file_reader.cc
|
||||
--- chromium-142.0.7444.59/media/filters/legacy_audio_file_reader.cc.me 2025-11-02 08:20:16.949092776 +0100
|
||||
+++ chromium-142.0.7444.59/media/filters/legacy_audio_file_reader.cc 2025-11-02 08:22:01.331132435 +0100
|
||||
@@ -273,10 +273,10 @@ bool LegacyAudioFileReader::OnNewFrame(
|
||||
diff -up chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me chromium-107.0.5304.121/media/filters/audio_file_reader.cc
|
||||
--- chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me 2022-12-17 08:27:12.204753071 +0100
|
||||
+++ chromium-107.0.5304.121/media/filters/audio_file_reader.cc 2022-12-17 08:28:40.908211808 +0100
|
||||
@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame(
|
||||
// silence from being output. In the case where we are also discarding some
|
||||
// portion of the packet (as indicated by a negative pts), we further want to
|
||||
// adjust the duration downward by however much exists before zero.
|
||||
- if (audio_codec_ == AudioCodec::kAAC && frame->duration) {
|
||||
+ if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) {
|
||||
const base::TimeDelta pkt_duration = ConvertFromTimeBase(
|
||||
UNSAFE_TODO(glue_->format_context()->streams[stream_index_])->time_base,
|
||||
glue_->format_context()->streams[stream_index_]->time_base,
|
||||
- frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
|
||||
+ frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts));
|
||||
const base::TimeDelta frame_duration =
|
||||
11
chromium-108-el7-wayland-strndup-error.patch
Normal file
11
chromium-108-el7-wayland-strndup-error.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -up chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c.me chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c
|
||||
--- chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c.me 2022-12-27 16:14:22.507496575 +0100
|
||||
+++ chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c 2022-12-27 16:35:17.617573610 +0100
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "wayland-version.h"
|
||||
+#include "config.h" // HAVE_STRNDUP
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
141
chromium-110-epel7-old-headers-workarounds.patch
Normal file
141
chromium-110-epel7-old-headers-workarounds.patch
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
diff -up chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc
|
||||
--- chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me 2023-02-08 20:34:02.700010846 +0100
|
||||
+++ chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc 2023-02-08 20:35:30.455580670 +0100
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
#include "sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.h"
|
||||
|
||||
-#include <linux/kcmp.h>
|
||||
+#ifndef KCMP_FILE
|
||||
+#define KCMP_FILE 0
|
||||
+#endif
|
||||
|
||||
#include "media/gpu/buildflags.h"
|
||||
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
|
||||
diff -up chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/mojo/core/channel_linux.cc
|
||||
--- chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds 2022-02-28 19:05:54.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/mojo/core/channel_linux.cc 2022-03-05 14:50:49.876812909 -0500
|
||||
@@ -44,6 +44,25 @@
|
||||
#include "base/android/build_info.h"
|
||||
#endif
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+#ifndef F_GET_SEALS
|
||||
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
|
||||
+#endif
|
||||
+
|
||||
#ifndef EFD_ZERO_ON_WAKE
|
||||
#define EFD_ZERO_ON_WAKE O_NOFOLLOW
|
||||
#endif
|
||||
diff -up chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
--- chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds 2022-03-05 14:50:49.877812915 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2022-03-05 15:15:02.536867009 -0500
|
||||
@@ -53,6 +53,25 @@
|
||||
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+#ifndef F_GET_SEALS
|
||||
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
|
||||
+#endif
|
||||
+
|
||||
#if defined(__arm__) && !defined(MAP_STACK)
|
||||
#define MAP_STACK 0x20000 // Daisy build environment has old headers.
|
||||
#endif
|
||||
diff -up chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
|
||||
--- chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -6,7 +6,24 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
-#include <linux/kcmp.h>
|
||||
+#ifndef KCMP_FILE
|
||||
+#define KCMP_FILE 0
|
||||
+#endif
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
#include <sys/socket.h>
|
||||
|
||||
// Some arch's (arm64 for instance) unistd.h don't pull in symbols used here
|
||||
diff -up chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc
|
||||
--- chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -22,6 +22,22 @@
|
||||
#include "sandbox/policy/linux/sandbox_linux.h"
|
||||
#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+
|
||||
using sandbox::bpf_dsl::AllOf;
|
||||
using sandbox::bpf_dsl::Allow;
|
||||
using sandbox::bpf_dsl::Arg;
|
||||
diff -up chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc
|
||||
--- chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds 2022-02-28 19:06:49.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -23,6 +23,10 @@
|
||||
#include "ui/events/ozone/evdev/numberpad_metrics.h"
|
||||
#endif
|
||||
|
||||
+#ifndef SW_PEN_INSERTED
|
||||
+#define SW_PEN_INSERTED 0x0f /* set = pen inserted */
|
||||
+#endif
|
||||
+
|
||||
namespace ui {
|
||||
|
||||
namespace {
|
||||
22
chromium-114-wireless-el7.patch
Normal file
22
chromium-114-wireless-el7.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff -up chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc.me chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc
|
||||
--- chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc.me 2023-05-13 12:09:44.423727385 +0200
|
||||
+++ chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc 2023-05-13 17:52:19.934347246 +0200
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <linux/net.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/sockios.h>
|
||||
-#include <linux/wireless.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/inotify.h>
|
||||
@@ -48,6 +47,10 @@ using sandbox::syscall_broker::BrokerPro
|
||||
#define F2FS_IOC_GET_FEATURES _IOR(0xf5, 12, uint32_t)
|
||||
#endif
|
||||
|
||||
+#if !defined(SIOCGIWNAME)
|
||||
+#define SIOCGIWNAME 0x8B01
|
||||
+#endif
|
||||
+
|
||||
namespace sandbox::policy {
|
||||
|
||||
namespace {
|
||||
21
chromium-115-buildflag-el7.patch
Normal file
21
chromium-115-buildflag-el7.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -up chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc.buildflag-el7 chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc
|
||||
--- chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc.buildflag-el7 2023-06-07 21:48:29.000000000 +0200
|
||||
+++ chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc 2023-06-17 16:50:46.373867625 +0200
|
||||
@@ -79,7 +79,7 @@
|
||||
#include "ui/gfx/vector_icon_types.h"
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#ifdef GOOGLE_CHROME_BRANDING
|
||||
#include "components/vector_icons/vector_icons.h" // nogncheck
|
||||
#endif
|
||||
|
||||
@@ -631,7 +631,7 @@ bool OmniboxEditModel::ShouldShowCurrent
|
||||
|
||||
ui::ImageModel OmniboxEditModel::GetSuperGIcon(int image_size,
|
||||
bool dark_mode) const {
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#ifdef GOOGLE_CHROME_BRANDING
|
||||
if (dark_mode) {
|
||||
return ui::ImageModel::FromVectorIcon(
|
||||
vector_icons::kGoogleGLogoMonochromeIcon, ui::kColorRefPrimary100,
|
||||
26
chromium-115-el7-compiler-SkColor4f.patch
Normal file
26
chromium-115-el7-compiler-SkColor4f.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
diff -up chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
|
||||
--- chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me 2023-06-24 10:38:11.011511463 +0200
|
||||
+++ chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc 2023-06-24 13:07:35.865375884 +0200
|
||||
@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
|
||||
|
||||
void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
|
||||
float global_alpha) const {
|
||||
+ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha};
|
||||
switch (type_) {
|
||||
case kColor:
|
||||
ApplyColorToFlags(flags, global_alpha);
|
||||
@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
|
||||
case kGradient:
|
||||
GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
|
||||
ImageDrawOptions());
|
||||
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
|
||||
+ flags.setColor(custom_color);
|
||||
break;
|
||||
case kImagePattern:
|
||||
GetCanvasPattern()->GetPattern()->ApplyToFlags(
|
||||
flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
|
||||
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
|
||||
+ flags.setColor(custom_color);
|
||||
break;
|
||||
default:
|
||||
NOTREACHED();
|
||||
21
chromium-117-el7-string-convert.patch
Normal file
21
chromium-117-el7-string-convert.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc
|
||||
diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me chromium-117.0.5938.62/net/dns/host_resolver_cache.h
|
||||
--- chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me 2023-09-14 15:21:24.632965004 +0200
|
||||
+++ chromium-117.0.5938.62/net/dns/host_resolver_cache.h 2023-09-15 09:15:48.511300845 +0200
|
||||
@@ -143,12 +143,14 @@ class NET_EXPORT HostResolverCache final
|
||||
}
|
||||
|
||||
bool operator()(const Key& lhs, const KeyRef& rhs) const {
|
||||
+ const std::string rhs_domain_name{rhs.domain_name};
|
||||
return std::tie(lhs.domain_name, lhs.network_anonymization_key) <
|
||||
- std::tie(rhs.domain_name, *rhs.network_anonymization_key);
|
||||
+ std::tie(rhs_domain_name, *rhs.network_anonymization_key);
|
||||
}
|
||||
|
||||
bool operator()(const KeyRef& lhs, const Key& rhs) const {
|
||||
- return std::tie(lhs.domain_name, *lhs.network_anonymization_key) <
|
||||
+ const std::string lhs_domain_name{lhs.domain_name};
|
||||
+ return std::tie(lhs_domain_name, *lhs.network_anonymization_key) <
|
||||
std::tie(rhs.domain_name, rhs.network_anonymization_key);
|
||||
}
|
||||
};
|
||||
24
chromium-118-el7_v4l2_quantization.patch
Normal file
24
chromium-118-el7_v4l2_quantization.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -up chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.cc.me chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.cc
|
||||
--- chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.cc.me 2023-10-07 12:24:51.194618144 +0200
|
||||
+++ chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.cc 2023-10-07 12:26:30.727448581 +0200
|
||||
@@ -1219,7 +1219,7 @@ void V4L2CaptureDelegate::SetErrorState(
|
||||
client_->OnError(error, from_here, reason);
|
||||
}
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
+#if 0 //BUILDFLAG(IS_LINUX)
|
||||
gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() {
|
||||
v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace;
|
||||
v4l2_quantization v4l2_range =
|
||||
diff -up chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.h.me chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.h
|
||||
--- chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.h.me 2023-10-07 12:29:35.588406023 +0200
|
||||
+++ chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.h 2023-10-07 12:28:42.057036014 +0200
|
||||
@@ -133,7 +133,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
|
||||
const base::Location& from_here,
|
||||
const std::string& reason);
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
+#if 0 //BUILDFLAG(IS_LINUX)
|
||||
// Systems which describe a "color space" usually map that to one or more of
|
||||
// {primary, matrix, transfer, range}. BuildColorSpaceFromv4l2() will use the
|
||||
// matched value as first priority. Otherwise, if there is no best matching
|
||||
65
chromium-119-system-minizip-header-fix.patch
Normal file
65
chromium-119-system-minizip-header-fix.patch
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc
|
||||
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip 2023-11-06 12:42:34.928657960 +0100
|
||||
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc 2023-11-06 12:51:12.547834851 +0100
|
||||
@@ -28,9 +28,8 @@ limitations under the License.
|
||||
#include "tensorflow_lite_support/cc/port/status_macros.h"
|
||||
#include "tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h"
|
||||
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
-#include "third_party/zlib/contrib/minizip/unzip.h"
|
||||
-
|
||||
+#include <minizip/ioapi.h>
|
||||
+#include <minizip/unzip.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc
|
||||
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100
|
||||
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc 2023-11-06 12:42:34.928657960 +0100
|
||||
@@ -26,8 +26,8 @@ limitations under the License.
|
||||
#include "tensorflow_lite_support/cc/port/statusor.h"
|
||||
#include "tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h"
|
||||
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
-#include "third_party/zlib/contrib/minizip/unzip.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
+#include <minizip/zip.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
|
||||
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100
|
||||
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc 2023-11-06 12:42:34.929657982 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdio>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc
|
||||
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100
|
||||
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc 2023-11-06 12:42:34.929657982 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdio>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h
|
||||
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip 2023-11-01 19:11:24.000000000 +0100
|
||||
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h 2023-11-06 12:42:34.929657982 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdlib>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
42
chromium-120-system-libusb.patch
Normal file
42
chromium-120-system-libusb.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
diff -up chromium-120.0.6099.35/build/linux/unbundle/libusb.gn.system-libusb chromium-120.0.6099.35/build/linux/unbundle/libusb.gn
|
||||
--- chromium-120.0.6099.35/build/linux/unbundle/libusb.gn.system-libusb 2023-11-22 20:31:32.000000000 +0100
|
||||
+++ chromium-120.0.6099.35/build/linux/unbundle/libusb.gn 2023-11-26 11:46:14.559263668 +0100
|
||||
@@ -1,3 +1,27 @@
|
||||
+# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
+# Use of this source code is governed by a BSD-style license that can be
|
||||
+# found in the LICENSE file.
|
||||
+
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+
|
||||
+pkg_config("system_libusb") {
|
||||
+ packages = [ "libusb-1.0" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("libusb_shim") {
|
||||
+ root_path = "src/libusb"
|
||||
+ headers = [
|
||||
+ "libusb.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("libusb") {
|
||||
+ deps = [
|
||||
+ ":libusb_shim",
|
||||
+ ]
|
||||
+ public_configs = [ ":system_libusb" ]
|
||||
+}
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
import("//build/shim_headers.gni")
|
||||
|
||||
diff -up chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py.system-libusb chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py
|
||||
--- chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py.system-libusb 2023-11-26 11:46:14.559263668 +0100
|
||||
+++ chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py 2023-11-26 12:05:20.542665877 +0100
|
||||
@@ -56,6 +56,7 @@ REPLACEMENTS = {
|
||||
'libevent': 'third_party/libevent/BUILD.gn',
|
||||
'libjpeg': 'third_party/libjpeg.gni',
|
||||
'libpng': 'third_party/libpng/BUILD.gn',
|
||||
+ 'libusb': 'third_party/libusb/BUILD.gn',
|
||||
'libsecret' : 'third_party/libsecret/BUILD.gn',
|
||||
'libusb': 'third_party/libusb/BUILD.gn',
|
||||
'libvpx': 'third_party/libvpx/BUILD.gn',
|
||||
15
chromium-121-el7-clang-version-warning.patch
Normal file
15
chromium-121-el7-clang-version-warning.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- chromium-121.0.6167.57/third_party/libc++/src/include/__config.orig 2024-01-16 18:38:00.995930774 +0100
|
||||
+++ chromium-121.0.6167.57/third_party/libc++/src/include/__config 2024-01-16 18:43:47.056517289 +0100
|
||||
@@ -32,11 +32,7 @@
|
||||
|
||||
// Warn if a compiler version is used that is not supported anymore
|
||||
// LLVM RELEASE Update the minimum compiler versions
|
||||
-# if defined(_LIBCPP_CLANG_VER)
|
||||
-# if _LIBCPP_CLANG_VER < 1600
|
||||
-# warning "Libc++ only supports Clang 16 and later"
|
||||
-# endif
|
||||
-# elif defined(_LIBCPP_APPLE_CLANG_VER)
|
||||
+# if defined(_LIBCPP_APPLE_CLANG_VER)
|
||||
# if _LIBCPP_APPLE_CLANG_VER < 1500
|
||||
# warning "Libc++ only supports AppleClang 15 and later"
|
||||
# endif
|
||||
34
chromium-121-system-old-ffmpeg.patch
Normal file
34
chromium-121-system-old-ffmpeg.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff -up chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc.me chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc
|
||||
--- chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc.me 2024-01-16 10:54:38.994173911 +0100
|
||||
+++ chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc 2024-01-16 11:06:20.974160612 +0100
|
||||
@@ -710,8 +710,13 @@ bool AVStreamToVideoDecoderConfig(const
|
||||
}
|
||||
|
||||
VideoTransformation video_transformation = VideoTransformation();
|
||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
|
||||
+ for (int i = 0; i < stream->nb_side_data; i++) {
|
||||
+ const auto& side_data = stream->side_data[i];
|
||||
+#else
|
||||
for (int i = 0; i < stream->codecpar->nb_coded_side_data; ++i) {
|
||||
const auto& side_data = stream->codecpar->coded_side_data[i];
|
||||
+#endif
|
||||
switch (side_data.type) {
|
||||
case AV_PKT_DATA_DISPLAYMATRIX: {
|
||||
CHECK_EQ(side_data.size, sizeof(int32_t) * 3 * 3);
|
||||
diff -up chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc.me chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc
|
||||
--- chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc.me 2024-01-16 11:12:27.521534151 +0100
|
||||
+++ chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc 2024-01-16 11:15:08.717337026 +0100
|
||||
@@ -113,8 +113,13 @@ bool AudioVideoMetadataExtractor::Extrac
|
||||
if (!stream)
|
||||
continue;
|
||||
|
||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
|
||||
+ for (int j = 0; j < stream->nb_side_data; j++) {
|
||||
+ const AVPacketSideData& sd = stream->side_data[j];
|
||||
+#else
|
||||
for (int j = 0; j < stream->codecpar->nb_coded_side_data; j++) {
|
||||
const AVPacketSideData& sd = stream->codecpar->coded_side_data[j];
|
||||
+#endif
|
||||
if (sd.type == AV_PKT_DATA_DISPLAYMATRIX) {
|
||||
CHECK_EQ(sd.size, sizeof(int32_t) * 3 * 3);
|
||||
rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(
|
||||
11
chromium-122-el7-extra-operator.patch
Normal file
11
chromium-122-el7-extra-operator.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -up chromium-122.0.6261.69/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.me chromium-122.0.6261.69/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h
|
||||
--- chromium-122.0.6261.69/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.me 2024-02-24 13:02:58.931586003 +0100
|
||||
+++ chromium-122.0.6261.69/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h 2024-02-24 13:03:33.152251546 +0100
|
||||
@@ -82,6 +82,7 @@ struct FxPartitionAllocAllocator {
|
||||
}
|
||||
|
||||
// There's no state, so they are all the same,
|
||||
+ bool operator==(const FxPartitionAllocAllocator&) const { return true; }
|
||||
bool operator==(const FxPartitionAllocAllocator& that) { return true; }
|
||||
bool operator!=(const FxPartitionAllocAllocator& that) { return false; }
|
||||
};
|
||||
62
chromium-122-el7-inline-function.patch
Normal file
62
chromium-122-el7-inline-function.patch
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
ld.lld: error: undefined symbol: unsigned long cc::PaintOpWriter::SerializedSize<unsigned long>()
|
||||
|
||||
diff -up chromium-122.0.6261.69/cc/paint/paint_op_writer.h.me chromium-122.0.6261.69/cc/paint/paint_op_writer.h
|
||||
--- chromium-122.0.6261.69/cc/paint/paint_op_writer.h.me 2024-02-25 12:04:07.008177603 +0100
|
||||
+++ chromium-122.0.6261.69/cc/paint/paint_op_writer.h 2024-02-25 12:14:45.972117522 +0100
|
||||
@@ -112,7 +112,17 @@ class CC_PAINT_EXPORT PaintOpWriter {
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
- static constexpr size_t SerializedSizeSimple();
|
||||
+ static constexpr size_t SerializedSizeSimple() {
|
||||
+ static_assert(!std::is_pointer_v<T>);
|
||||
+ return base::bits::AlignUp(sizeof(T), kDefaultAlignment);
|
||||
+ }
|
||||
+
|
||||
+ // size_t is always serialized as two uint32_ts to make the serialized result
|
||||
+ // portable between 32bit and 64bit processes.
|
||||
+ template <>
|
||||
+ constexpr size_t SerializedSizeSimple<size_t>() {
|
||||
+ return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment);
|
||||
+ }
|
||||
|
||||
public:
|
||||
// SerializedSize() returns the maximum serialized size of the given type or
|
||||
@@ -123,7 +133,10 @@ class CC_PAINT_EXPORT PaintOpWriter {
|
||||
// deserialization, and make it possible to allow dynamic sizing for some
|
||||
// data types (see the specialized/overloaded functions).
|
||||
template <typename T>
|
||||
- static constexpr size_t SerializedSize();
|
||||
+ static constexpr size_t SerializedSize() {
|
||||
+ static_assert(std::is_arithmetic_v<T> || std::is_enum_v<T>);
|
||||
+ return SerializedSizeSimple<T>();
|
||||
+ }
|
||||
template <typename T>
|
||||
static constexpr size_t SerializedSize(const T& data);
|
||||
static size_t SerializedSize(const PaintImage& image);
|
||||
@@ -439,24 +452,6 @@ class CC_PAINT_EXPORT PaintOpWriter {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
-constexpr size_t PaintOpWriter::SerializedSizeSimple() {
|
||||
- static_assert(!std::is_pointer_v<T>);
|
||||
- return base::bits::AlignUp(sizeof(T), kDefaultAlignment);
|
||||
-}
|
||||
-
|
||||
-// size_t is always serialized as two uint32_ts to make the serialized result
|
||||
-// portable between 32bit and 64bit processes.
|
||||
-template <>
|
||||
-constexpr size_t PaintOpWriter::SerializedSizeSimple<size_t>() {
|
||||
- return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment);
|
||||
-}
|
||||
-
|
||||
-template <typename T>
|
||||
-constexpr size_t PaintOpWriter::SerializedSize() {
|
||||
- static_assert(std::is_arithmetic_v<T> || std::is_enum_v<T>);
|
||||
- return SerializedSizeSimple<T>();
|
||||
-}
|
||||
-template <typename T>
|
||||
constexpr size_t PaintOpWriter::SerializedSize(const T& data) {
|
||||
return SerializedSizeSimple<T>();
|
||||
}
|
||||
63
chromium-122-norar.patch
Normal file
63
chromium-122-norar.patch
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
diff -up chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
|
||||
--- chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2024-02-07 19:49:25.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2024-02-11 18:55:29.964450604 +0100
|
||||
@@ -79,8 +79,6 @@ void FileAnalyzer::Start(const base::Fil
|
||||
|
||||
if (inspection_type == DownloadFileType::ZIP) {
|
||||
StartExtractZipFeatures();
|
||||
- } else if (inspection_type == DownloadFileType::RAR) {
|
||||
- StartExtractRarFeatures();
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
} else if (inspection_type == DownloadFileType::DMG) {
|
||||
StartExtractDmgFeatures();
|
||||
diff -up chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn
|
||||
--- chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn.nounrar 2024-02-07 19:49:27.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn 2024-02-11 18:55:29.965450629 +0100
|
||||
@@ -143,7 +143,6 @@ source_set("safe_browsing") {
|
||||
"//components/safe_browsing/content/common:file_type_policies",
|
||||
"//components/safe_browsing/core/common",
|
||||
"//third_party/lzma_sdk/google:seven_zip_reader",
|
||||
- "//third_party/unrar:unrar",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
diff -up chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc
|
||||
--- chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2024-02-07 19:49:27.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc 2024-02-11 23:49:25.061324007 +0100
|
||||
@@ -74,6 +74,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||||
const std::optional<std::string>& password,
|
||||
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
|
||||
AnalyzeRarFileCallback callback) {
|
||||
+#if 0
|
||||
DCHECK(rar_file.IsValid());
|
||||
temp_file_getter_.Bind(std::move(temp_file_getter));
|
||||
callback_ = std::move(callback);
|
||||
@@ -90,6 +91,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||||
/*password=*/password,
|
||||
std::move(analysis_finished_callback),
|
||||
std::move(temp_file_getter_callback), &results_);
|
||||
+#else
|
||||
+ NOTREACHED();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
|
||||
diff -up chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h
|
||||
--- chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2024-02-07 19:49:27.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h 2024-02-11 18:55:29.966450653 +0100
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
|
||||
-#include "chrome/utility/safe_browsing/rar_analyzer.h"
|
||||
#include "chrome/utility/safe_browsing/seven_zip_analyzer.h"
|
||||
#include "chrome/utility/safe_browsing/zip_analyzer.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
@@ -67,7 +66,6 @@ class SafeArchiveAnalyzer : public chrom
|
||||
void Timeout();
|
||||
|
||||
safe_browsing::ZipAnalyzer zip_analyzer_;
|
||||
- safe_browsing::RarAnalyzer rar_analyzer_;
|
||||
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;
|
||||
98
chromium-122-revert-av1enc-el9.patch
Normal file
98
chromium-122-revert-av1enc-el9.patch
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
diff -up chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc
|
||||
--- chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me 2023-05-21 10:05:00.357860329 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2023-05-21 10:18:09.665432735 +0200
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "media/gpu/gpu_video_encode_accelerator_helpers.h"
|
||||
#include "media/gpu/h264_dpb.h"
|
||||
#include "media/gpu/macros.h"
|
||||
-#include "media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h"
|
||||
#include "media/gpu/vaapi/h264_vaapi_video_encoder_delegate.h"
|
||||
#include "media/gpu/vaapi/va_surface.h"
|
||||
#include "media/gpu/vaapi/vaapi_common.h"
|
||||
@@ -200,7 +199,7 @@ bool VaapiVideoEncodeAccelerator::Initia
|
||||
|
||||
const VideoCodec codec = VideoCodecProfileToVideoCodec(config.output_profile);
|
||||
if (codec != VideoCodec::kH264 && codec != VideoCodec::kVP8 &&
|
||||
- codec != VideoCodec::kVP9 && codec != VideoCodec::kAV1) {
|
||||
+ codec != VideoCodec::kVP9) {
|
||||
MEDIA_LOG(ERROR, media_log.get())
|
||||
<< "Unsupported profile: " << GetProfileName(config.output_profile);
|
||||
return false;
|
||||
@@ -293,7 +292,6 @@ void VaapiVideoEncodeAccelerator::Initia
|
||||
break;
|
||||
case VideoCodec::kVP8:
|
||||
case VideoCodec::kVP9:
|
||||
- case VideoCodec::kAV1:
|
||||
mode = VaapiWrapper::kEncodeConstantQuantizationParameter;
|
||||
break;
|
||||
default:
|
||||
@@ -356,12 +354,6 @@ void VaapiVideoEncodeAccelerator::Initia
|
||||
vaapi_wrapper_, error_cb);
|
||||
}
|
||||
break;
|
||||
- case VideoCodec::kAV1:
|
||||
- if (!IsConfiguredForTesting()) {
|
||||
- encoder_ = std::make_unique<AV1VaapiVideoEncoderDelegate>(
|
||||
- vaapi_wrapper_, error_cb);
|
||||
- }
|
||||
- break;
|
||||
default:
|
||||
NOTREACHED() << "Unsupported codec type " << GetCodecName(output_codec_);
|
||||
return;
|
||||
@@ -835,10 +827,6 @@ VaapiVideoEncodeAccelerator::CreateEncod
|
||||
case VideoCodec::kVP9:
|
||||
picture = new VaapiVP9Picture(std::move(reconstructed_surface));
|
||||
break;
|
||||
- case VideoCodec::kAV1:
|
||||
- picture = new VaapiAV1Picture(/*display_va_surface=*/nullptr,
|
||||
- std::move(reconstructed_surface));
|
||||
- break;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
diff -up chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn
|
||||
--- chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn 2023-05-20 13:14:10.756183626 +0200
|
||||
@@ -38,8 +38,6 @@ source_set("vaapi") {
|
||||
sources = [
|
||||
"av1_vaapi_video_decoder_delegate.cc",
|
||||
"av1_vaapi_video_decoder_delegate.h",
|
||||
- "av1_vaapi_video_encoder_delegate.cc",
|
||||
- "av1_vaapi_video_encoder_delegate.h",
|
||||
"h264_vaapi_video_decoder_delegate.cc",
|
||||
"h264_vaapi_video_decoder_delegate.h",
|
||||
"h264_vaapi_video_encoder_delegate.cc",
|
||||
diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc.me chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc
|
||||
--- chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc.me 2023-11-02 15:08:30.921325747 +0100
|
||||
+++ chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc 2023-11-02 15:09:46.123692602 +0100
|
||||
@@ -3124,6 +3124,7 @@ bool VaapiWrapper::GetSupportedPackedHea
|
||||
return true;
|
||||
}
|
||||
|
||||
+#if 0 //disable AV1 due to old libva on epel9
|
||||
bool VaapiWrapper::GetMinAV1SegmentSize(VideoCodecProfile profile,
|
||||
uint32_t& min_seg_size) {
|
||||
CHECK(!enforce_sequence_affinity_ ||
|
||||
@@ -3141,6 +3142,7 @@ bool VaapiWrapper::GetMinAV1SegmentSize(
|
||||
|
||||
return true;
|
||||
}
|
||||
+#endif
|
||||
|
||||
bool VaapiWrapper::BlitSurface(const VASurface& va_surface_src,
|
||||
const VASurface& va_surface_dest,
|
||||
diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h
|
||||
--- chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me 2023-11-02 15:09:58.973928395 +0100
|
||||
+++ chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h 2023-11-02 15:10:45.990791114 +0100
|
||||
@@ -553,9 +553,11 @@ class MEDIA_GPU_EXPORT VaapiWrapper
|
||||
bool& packed_pps,
|
||||
bool& packed_slice);
|
||||
|
||||
+#if 0 //disable AV1 due to old libva on epel9
|
||||
// Gets the minimum segment block size supported for AV1 encoding.
|
||||
[[nodiscard]] bool GetMinAV1SegmentSize(VideoCodecProfile profile,
|
||||
uint32_t& min_seg_size);
|
||||
+#endif
|
||||
|
||||
// Blits a VASurface |va_surface_src| into another VASurface
|
||||
// |va_surface_dest| applying pixel format conversion, cropping
|
||||
228
chromium-123-el7-clang-build-failure.patch
Normal file
228
chromium-123-el7-clang-build-failure.patch
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
commit 57526b8dc45b2e6c67bba7306f1dde73b1f2910c
|
||||
Author: sisidovski <sisidovski@chromium.org>
|
||||
Date: Tue Oct 24 09:32:49 2023 +0000
|
||||
|
||||
Remove unused items from the RaceNetworkRequest hashmap
|
||||
|
||||
When the AutoPreload or the race-network-and-fetch-handler option in the
|
||||
static routing API is enabled, network requests are dispatched and
|
||||
URLLoaderFactories are held in a hashmap in ServiceWorkerGlobalScope.
|
||||
Those are consumed inside the fetch handler when fetch(e.request) is
|
||||
called. But if the fetch handler doesn't call fetch() e.g. fallback,
|
||||
those hashmap items does not have a chance to be removed.
|
||||
|
||||
This CL changes the hashmap items to be removed when the fetch event
|
||||
finishes, and the URLLoaderFactory is still not consumed at that time.
|
||||
This may loose the dedupe capability if fetch() is called later e.g.
|
||||
setTimeout(() => fetch()), but it makes sense to prioritize keeping the
|
||||
hashmap small.
|
||||
|
||||
Change-Id: I51bdc9d5eb5185f2b5b4df6ee785715b1180c848
|
||||
Bug: 1492640
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964840
|
||||
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
|
||||
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
|
||||
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1214064}
|
||||
|
||||
diff -up chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc.me chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
|
||||
--- chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc.me 2024-03-18 10:34:27.604707632 +0100
|
||||
+++ chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc 2024-03-18 11:52:14.309983505 +0100
|
||||
@@ -46,7 +46,6 @@
|
||||
#include "services/network/public/cpp/cross_origin_embedder_policy.h"
|
||||
#include "services/network/public/mojom/cookie_manager.mojom-blink.h"
|
||||
#include "services/network/public/mojom/cross_origin_embedder_policy.mojom.h"
|
||||
-#include "services/network/public/mojom/url_loader_factory.mojom-blink.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/notifications/notification.mojom-blink.h"
|
||||
@@ -1097,10 +1096,6 @@ void ServiceWorkerGlobalScope::DidHandle
|
||||
TRACE_ID_WITH_SCOPE(kServiceWorkerGlobalScopeTraceScope,
|
||||
TRACE_ID_LOCAL(event_id)),
|
||||
TRACE_EVENT_FLAG_FLOW_IN, "status", MojoEnumToString(status));
|
||||
-
|
||||
- // Delete the URLLoaderFactory for the RaceNetworkRequest if it's not used.
|
||||
- RemoveItemFromRaceNetworkRequests(event_id);
|
||||
-
|
||||
if (!RunEventCallback(&fetch_event_callbacks_, event_queue_.get(), event_id,
|
||||
status)) {
|
||||
// The event may have been aborted. Its response callback also needs to be
|
||||
@@ -1500,7 +1495,6 @@ void ServiceWorkerGlobalScope::AbortCall
|
||||
response_callback_iter->value->TakeValue().reset();
|
||||
fetch_response_callbacks_.erase(response_callback_iter);
|
||||
}
|
||||
- RemoveItemFromRaceNetworkRequests(event_id);
|
||||
|
||||
// Run the event callback with the error code.
|
||||
auto event_callback_iter = fetch_event_callbacks_.find(event_id);
|
||||
@@ -1588,11 +1582,52 @@ void ServiceWorkerGlobalScope::StartFetc
|
||||
|
||||
if (params->race_network_request_loader_factory &&
|
||||
params->request->service_worker_race_network_request_token) {
|
||||
- InsertNewItemToRaceNetworkRequests(
|
||||
- event_id,
|
||||
- params->request->service_worker_race_network_request_token.value(),
|
||||
- std::move(params->race_network_request_loader_factory),
|
||||
- params->request->url);
|
||||
+ auto insert_result = race_network_request_loader_factories_.insert(
|
||||
+ String(params->request->service_worker_race_network_request_token
|
||||
+ ->ToString()),
|
||||
+ std::move(params->race_network_request_loader_factory));
|
||||
+
|
||||
+ // DumpWithoutCrashing if the token is empty, or not inserted as a new entry
|
||||
+ // to |race_network_request_loader_factories_|.
|
||||
+ // TODO(crbug.com/1492640) Remove DumpWithoutCrashing once we collect data
|
||||
+ // and identify the cause.
|
||||
+ static bool has_dumped_without_crashing_for_empty_token = false;
|
||||
+ static bool has_dumped_without_crashing_for_not_new_entry = false;
|
||||
+ if (!has_dumped_without_crashing_for_empty_token &&
|
||||
+ params->request->service_worker_race_network_request_token
|
||||
+ ->is_empty()) {
|
||||
+ has_dumped_without_crashing_for_empty_token = true;
|
||||
+ SCOPED_CRASH_KEY_BOOL(
|
||||
+ "SWGlobalScope", "empty_race_token",
|
||||
+ params->request->service_worker_race_network_request_token
|
||||
+ ->is_empty());
|
||||
+ SCOPED_CRASH_KEY_STRING64(
|
||||
+ "SWGlobalScope", "race_token_string",
|
||||
+ params->request->service_worker_race_network_request_token
|
||||
+ ->ToString());
|
||||
+ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
|
||||
+ insert_result.is_new_entry);
|
||||
+ SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
|
||||
+ params->request->url.GetString().Utf8());
|
||||
+ base::debug::DumpWithoutCrashing();
|
||||
+ }
|
||||
+ if (!has_dumped_without_crashing_for_not_new_entry &&
|
||||
+ !insert_result.is_new_entry) {
|
||||
+ has_dumped_without_crashing_for_not_new_entry = true;
|
||||
+ SCOPED_CRASH_KEY_BOOL(
|
||||
+ "SWGlobalScope", "empty_race_token",
|
||||
+ params->request->service_worker_race_network_request_token
|
||||
+ ->is_empty());
|
||||
+ SCOPED_CRASH_KEY_STRING64(
|
||||
+ "SWGlobalScope", "race_token_string",
|
||||
+ params->request->service_worker_race_network_request_token
|
||||
+ ->ToString());
|
||||
+ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
|
||||
+ insert_result.is_new_entry);
|
||||
+ SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
|
||||
+ params->request->url.GetString().Utf8());
|
||||
+ base::debug::DumpWithoutCrashing();
|
||||
+ }
|
||||
}
|
||||
|
||||
Request* request = Request::Create(
|
||||
@@ -2805,71 +2840,12 @@ bool ServiceWorkerGlobalScope::SetAttrib
|
||||
std::optional<mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>
|
||||
ServiceWorkerGlobalScope::FindRaceNetworkRequestURLLoaderFactory(
|
||||
const base::UnguessableToken& token) {
|
||||
- std::unique_ptr<RaceNetworkRequestInfo> result =
|
||||
- race_network_requests_.Take(String(token.ToString()));
|
||||
+ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory> result =
|
||||
+ race_network_request_loader_factories_.Take(String(token.ToString()));
|
||||
if (result) {
|
||||
- race_network_request_fetch_event_ids_.erase(result->fetch_event_id);
|
||||
- return std::optional<
|
||||
- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>(
|
||||
- std::move(result->url_loader_factory));
|
||||
+ return result;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
-void ServiceWorkerGlobalScope::InsertNewItemToRaceNetworkRequests(
|
||||
- int fetch_event_id,
|
||||
- const base::UnguessableToken& token,
|
||||
- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
|
||||
- url_loader_factory,
|
||||
- const KURL& request_url) {
|
||||
- auto race_network_request_token = String(token.ToString());
|
||||
- auto info = std::make_unique<RaceNetworkRequestInfo>(
|
||||
- fetch_event_id, race_network_request_token,
|
||||
- std::move(url_loader_factory));
|
||||
- race_network_request_fetch_event_ids_.insert(fetch_event_id, info.get());
|
||||
- auto insert_result = race_network_requests_.insert(race_network_request_token,
|
||||
- std::move(info));
|
||||
-
|
||||
- // DumpWithoutCrashing if the token is empty, or not inserted as a new entry
|
||||
- // to |race_network_request_loader_factories_|.
|
||||
- // TODO(crbug.com/1492640) Remove DumpWithoutCrashing once we collect data
|
||||
- // and identify the cause.
|
||||
- static bool has_dumped_without_crashing_for_empty_token = false;
|
||||
- static bool has_dumped_without_crashing_for_not_new_entry = false;
|
||||
- if (!has_dumped_without_crashing_for_empty_token && token.is_empty()) {
|
||||
- has_dumped_without_crashing_for_empty_token = true;
|
||||
- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "empty_race_token",
|
||||
- token.is_empty());
|
||||
- SCOPED_CRASH_KEY_STRING64("SWGlobalScope", "race_token_string",
|
||||
- token.ToString());
|
||||
- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
|
||||
- insert_result.is_new_entry);
|
||||
- SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
|
||||
- request_url.GetString().Utf8());
|
||||
- base::debug::DumpWithoutCrashing();
|
||||
- }
|
||||
- if (!has_dumped_without_crashing_for_not_new_entry &&
|
||||
- !insert_result.is_new_entry) {
|
||||
- has_dumped_without_crashing_for_not_new_entry = true;
|
||||
- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "empty_race_token",
|
||||
- token.is_empty());
|
||||
- SCOPED_CRASH_KEY_STRING64("SWGlobalScope", "race_token_string",
|
||||
- token.ToString());
|
||||
- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
|
||||
- insert_result.is_new_entry);
|
||||
- SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
|
||||
- request_url.GetString().Utf8());
|
||||
- base::debug::DumpWithoutCrashing();
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-void ServiceWorkerGlobalScope::RemoveItemFromRaceNetworkRequests(
|
||||
- int fetch_event_id) {
|
||||
- RaceNetworkRequestInfo* info =
|
||||
- race_network_request_fetch_event_ids_.Take(fetch_event_id);
|
||||
- if (info) {
|
||||
- race_network_requests_.erase(info->token);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
} // namespace blink
|
||||
diff -up chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h.me chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h
|
||||
--- chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h.me 2024-03-18 10:26:14.905817501 +0100
|
||||
+++ chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h 2024-03-18 11:47:58.202198028 +0100
|
||||
@@ -623,14 +623,6 @@ class MODULES_EXPORT ServiceWorkerGlobal
|
||||
// ServiceWorker.FetchEvent.QueuingTime histogram.
|
||||
void RecordQueuingTime(base::TimeTicks created_time);
|
||||
|
||||
- void InsertNewItemToRaceNetworkRequests(
|
||||
- int fetch_event_id,
|
||||
- const base::UnguessableToken& token,
|
||||
- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
|
||||
- url_loader_factory,
|
||||
- const KURL& request_url);
|
||||
- void RemoveItemFromRaceNetworkRequests(int fetch_event_id);
|
||||
-
|
||||
Member<ServiceWorkerClients> clients_;
|
||||
Member<ServiceWorkerRegistration> registration_;
|
||||
Member<::blink::ServiceWorker> service_worker_;
|
||||
@@ -776,17 +768,10 @@ class MODULES_EXPORT ServiceWorkerGlobal
|
||||
|
||||
blink::BlinkStorageKey storage_key_;
|
||||
|
||||
- struct RaceNetworkRequestInfo {
|
||||
- int fetch_event_id;
|
||||
- String token;
|
||||
- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
|
||||
- url_loader_factory;
|
||||
- };
|
||||
// TODO(crbug.com/918702) WTF::HashMap cannot use base::UnguessableToken as a
|
||||
// key. As a workaround uses WTF::String as a key instead.
|
||||
- HashMap<String, std::unique_ptr<RaceNetworkRequestInfo>>
|
||||
- race_network_requests_;
|
||||
- HashMap<int, RaceNetworkRequestInfo*> race_network_request_fetch_event_ids_;
|
||||
+ HashMap<String, mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>
|
||||
+ race_network_request_loader_factories_;
|
||||
|
||||
HeapMojoAssociatedRemote<mojom::blink::AssociatedInterfaceProvider>
|
||||
remote_associated_interfaces_{this};
|
||||
133
chromium-123-rust-clap_lex.patch
Normal file
133
chromium-123-rust-clap_lex.patch
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
diff -Nur chromium-123.0.6312.46/third_party/rust/chromium_crates_io/vendor/clap_lex-0.7.0/src/ext.rs.me chromium-123.0.6312.46/third_party/rust/chromium_crates_io/vendor/clap_lex-0.7.0/src/ext.rs
|
||||
--- chromium-123.0.6312.46/third_party/rust/chromium_crates_io/vendor/clap_lex-0.7.0/src/ext.rs.me 2024-03-13 20:36:17.000000000 +0100
|
||||
+++ chromium-123.0.6312.46/third_party/rust/chromium_crates_io/vendor/clap_lex-0.7.0/src/ext.rs 2024-03-13 00:38:18.000000000 +0100
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
pub trait OsStrExt: private::Sealed {
|
||||
/// Converts to a string slice.
|
||||
- ///
|
||||
- /// The Utf8Error is guaranteed to have a valid UTF8 boundary
|
||||
- /// in its `valid_up_to()`
|
||||
fn try_str(&self) -> Result<&str, std::str::Utf8Error>;
|
||||
/// Returns `true` if the given pattern matches a sub-slice of
|
||||
/// this string slice.
|
||||
@@ -183,7 +180,7 @@
|
||||
|
||||
impl OsStrExt for OsStr {
|
||||
fn try_str(&self) -> Result<&str, std::str::Utf8Error> {
|
||||
- let bytes = self.as_encoded_bytes();
|
||||
+ let bytes = to_bytes(self);
|
||||
std::str::from_utf8(bytes)
|
||||
}
|
||||
|
||||
@@ -192,22 +189,22 @@
|
||||
}
|
||||
|
||||
fn find(&self, needle: &str) -> Option<usize> {
|
||||
- let bytes = self.as_encoded_bytes();
|
||||
+ let bytes = to_bytes(self);
|
||||
(0..=self.len().checked_sub(needle.len())?)
|
||||
.find(|&x| bytes[x..].starts_with(needle.as_bytes()))
|
||||
}
|
||||
|
||||
fn strip_prefix(&self, prefix: &str) -> Option<&OsStr> {
|
||||
- let bytes = self.as_encoded_bytes();
|
||||
+ let bytes = to_bytes(self);
|
||||
bytes.strip_prefix(prefix.as_bytes()).map(|s| {
|
||||
// SAFETY:
|
||||
- // - This came from `as_encoded_bytes`
|
||||
- // - Since `prefix` is `&str`, any split will be along UTF-8 boundary
|
||||
- unsafe { OsStr::from_encoded_bytes_unchecked(s) }
|
||||
+ // - This came from `to_bytes`
|
||||
+ // - Since `prefix` is `&str`, any split will be along UTF-8 boundarie
|
||||
+ unsafe { to_os_str_unchecked(s) }
|
||||
})
|
||||
}
|
||||
fn starts_with(&self, prefix: &str) -> bool {
|
||||
- let bytes = self.as_encoded_bytes();
|
||||
+ let bytes = to_bytes(self);
|
||||
bytes.starts_with(prefix.as_bytes())
|
||||
}
|
||||
|
||||
@@ -222,18 +219,13 @@
|
||||
fn split_once(&self, needle: &'_ str) -> Option<(&OsStr, &OsStr)> {
|
||||
let start = self.find(needle)?;
|
||||
let end = start + needle.len();
|
||||
- let haystack = self.as_encoded_bytes();
|
||||
+ let haystack = to_bytes(self);
|
||||
let first = &haystack[0..start];
|
||||
let second = &haystack[end..];
|
||||
// SAFETY:
|
||||
- // - This came from `as_encoded_bytes`
|
||||
- // - Since `needle` is `&str`, any split will be along UTF-8 boundary
|
||||
- unsafe {
|
||||
- Some((
|
||||
- OsStr::from_encoded_bytes_unchecked(first),
|
||||
- OsStr::from_encoded_bytes_unchecked(second),
|
||||
- ))
|
||||
- }
|
||||
+ // - This came from `to_bytes`
|
||||
+ // - Since `needle` is `&str`, any split will be along UTF-8 boundarie
|
||||
+ unsafe { Some((to_os_str_unchecked(first), to_os_str_unchecked(second))) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,6 +235,45 @@
|
||||
impl Sealed for std::ffi::OsStr {}
|
||||
}
|
||||
|
||||
+/// Allow access to raw bytes
|
||||
+///
|
||||
+/// As the non-UTF8 encoding is not defined, the bytes only make sense when compared with
|
||||
+/// 7-bit ASCII or `&str`
|
||||
+///
|
||||
+/// # Compatibility
|
||||
+///
|
||||
+/// There is no guarantee how non-UTF8 bytes will be encoded, even within versions of this crate
|
||||
+/// (since its dependent on rustc)
|
||||
+fn to_bytes(s: &OsStr) -> &[u8] {
|
||||
+ // SAFETY:
|
||||
+ // - Lifetimes are the same
|
||||
+ // - Types are compatible (`OsStr` is effectively a transparent wrapper for `[u8]`)
|
||||
+ // - The primary contract is that the encoding for invalid surrogate code points is not
|
||||
+ // guaranteed which isn't a problem here
|
||||
+ //
|
||||
+ // There is a proposal to support this natively (https://github.com/rust-lang/rust/pull/95290)
|
||||
+ // but its in limbo
|
||||
+ unsafe { std::mem::transmute(s) }
|
||||
+}
|
||||
+
|
||||
+/// Restore raw bytes as `OsStr`
|
||||
+///
|
||||
+/// # Safety
|
||||
+///
|
||||
+/// - `&[u8]` must either by a `&str` or originated with `to_bytes` within the same binary
|
||||
+/// - Any splits of the original `&[u8]` must be done along UTF-8 boundaries
|
||||
+unsafe fn to_os_str_unchecked(s: &[u8]) -> &OsStr {
|
||||
+ // SAFETY:
|
||||
+ // - Lifetimes are the same
|
||||
+ // - Types are compatible (`OsStr` is effectively a transparent wrapper for `[u8]`)
|
||||
+ // - The primary contract is that the encoding for invalid surrogate code points is not
|
||||
+ // guaranteed which isn't a problem here
|
||||
+ //
|
||||
+ // There is a proposal to support this natively (https://github.com/rust-lang/rust/pull/95290)
|
||||
+ // but its in limbo
|
||||
+ std::mem::transmute(s)
|
||||
+}
|
||||
+
|
||||
pub struct Split<'s, 'n> {
|
||||
haystack: Option<&'s OsStr>,
|
||||
needle: &'n str,
|
||||
@@ -275,10 +306,7 @@
|
||||
///
|
||||
/// `index` must be at a valid UTF-8 boundary
|
||||
pub(crate) unsafe fn split_at(os: &OsStr, index: usize) -> (&OsStr, &OsStr) {
|
||||
- let bytes = os.as_encoded_bytes();
|
||||
+ let bytes = to_bytes(os);
|
||||
let (first, second) = bytes.split_at(index);
|
||||
- (
|
||||
- OsStr::from_encoded_bytes_unchecked(first),
|
||||
- OsStr::from_encoded_bytes_unchecked(second),
|
||||
- )
|
||||
+ (to_os_str_unchecked(first), to_os_str_unchecked(second))
|
||||
}
|
||||
16
chromium-124-el7-size_t.patch
Normal file
16
chromium-124-el7-size_t.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff -up chromium-124.0.6367.118/third_party/perfetto/src/tracing/core/id_allocator.h.me chromium-124.0.6367.118/third_party/perfetto/src/tracing/core/id_allocator.h
|
||||
--- chromium-124.0.6367.118/third_party/perfetto/src/tracing/core/id_allocator.h.me 2024-05-06 08:32:09.637210958 +0200
|
||||
+++ chromium-124.0.6367.118/third_party/perfetto/src/tracing/core/id_allocator.h 2024-05-06 08:32:26.485518448 +0200
|
||||
@@ -63,10 +63,10 @@ class IdAllocator : public IdAllocatorGe
|
||||
|
||||
// Tries to allocate `n` IDs. Returns a vector of `n` valid IDs or an empty
|
||||
// vector, if not enough IDs are available.
|
||||
- std::vector<T> AllocateMultiple(size_t n) {
|
||||
+ std::vector<T> AllocateMultiple(std::size_t n) {
|
||||
std::vector<T> res;
|
||||
res.reserve(n);
|
||||
- for (size_t i = 0; i < n; i++) {
|
||||
+ for (std::size_t i = 0; i < n; i++) {
|
||||
T id = Allocate();
|
||||
if (id) {
|
||||
res.push_back(id);
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
diff -up chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc
|
||||
--- chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:37.000000000 +0200
|
||||
+++ chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc 2023-06-17 16:53:20.216628557 +0200
|
||||
@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
|
||||
void CdmPromiseAdapter::Clear(ClearReason reason) {
|
||||
// Reject all outstanding promises.
|
||||
DCHECK(thread_checker_.CalledOnValidThread());
|
||||
- for (auto& [promise_id, promise] : promises_) {
|
||||
+ for (auto& [p_i, p_e] : promises_) {
|
||||
+ auto& promise_id = p_i;
|
||||
+ auto& promise = p_e;
|
||||
TRACE_EVENT_NESTABLE_ASYNC_END1(
|
||||
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
|
||||
"status", "cleared");
|
||||
diff -up chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
--- chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me 2023-06-19 08:04:02.287072722 +0200
|
||||
+++ chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc 2023-06-19 08:18:24.576814950 +0200
|
||||
@@ -1393,7 +1393,8 @@ void ServiceWorkerContextWrapper::MaybeP
|
||||
return;
|
||||
}
|
||||
|
||||
- auto [document_url, key, callback] = std::move(*request);
|
||||
+ auto [d_u, key, callback] = std::move(*request);
|
||||
+ auto document_url = d_u;
|
||||
|
||||
DCHECK(document_url.is_valid());
|
||||
TRACE_EVENT1("ServiceWorker",
|
||||
diff -up chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc.than chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
|
||||
--- chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc.than 2023-12-19 17:57:56.205197246 +0100
|
||||
+++ chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc 2023-12-19 18:10:13.778634531 +0100
|
||||
@@ -3527,8 +3527,8 @@ void GridLayoutAlgorithm::PlaceGridItems
|
||||
DCHECK(out_row_break_between);
|
||||
|
||||
const auto& container_space = GetConstraintSpace();
|
||||
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
|
||||
-
|
||||
+ const auto& [grid_items, l_d, tree_size] = sizing_tree.TreeRootData();
|
||||
+ const auto& layout_data = l_d;
|
||||
const auto* cached_layout_subtree = container_space.GetGridLayoutSubtree();
|
||||
const auto container_writing_direction =
|
||||
container_space.GetWritingDirection();
|
||||
@@ -3691,8 +3691,9 @@ void GridLayoutAlgorithm::PlaceGridItems
|
||||
|
||||
// TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true.
|
||||
const auto& constraint_space = GetConstraintSpace();
|
||||
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
|
||||
-
|
||||
+ const auto& [g_i, l_d, tree_size] = sizing_tree.TreeRootData();
|
||||
+ const auto& grid_items = g_i;
|
||||
+ const auto& layout_data = l_d;
|
||||
const auto* cached_layout_subtree = constraint_space.GetGridLayoutSubtree();
|
||||
const auto container_writing_direction =
|
||||
constraint_space.GetWritingDirection();
|
||||
diff -up chromium-122.0.6261.69/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc.me chromium-122.0.6261.69/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc
|
||||
--- chromium-122.0.6261.69/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc.me 2024-02-25 18:03:51.654579579 +0100
|
||||
+++ chromium-122.0.6261.69/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc 2024-02-25 18:12:45.144287750 +0100
|
||||
@@ -136,7 +136,8 @@ void PrewarmHttpDiskCacheManager::MaybeP
|
||||
std::pair<url::Origin, GURL> origin_and_url;
|
||||
std::swap(origin_and_url, queued_jobs_.front());
|
||||
queued_jobs_.pop();
|
||||
- const auto& [origin, url] = origin_and_url;
|
||||
+ const auto& [origin, u] = origin_and_url;
|
||||
+ const auto& url = u;
|
||||
TRACE_EVENT_WITH_FLOW1(
|
||||
"loading", "PrewarmHttpDiskCacheManager::MaybeProcessNextQueuedJob",
|
||||
TRACE_ID_LOCAL(this),
|
||||
--- chromium-124.0.6367.118/content/common/service_worker/race_network_request_url_loader_client.cc.workaround_clang_bug-structured_binding 2024-05-05 16:22:47.581070868 +0200
|
||||
+++ chromium-124.0.6367.118/content/common/service_worker/race_network_request_url_loader_client.cc 2024-05-05 16:27:18.859972481 +0200
|
||||
@@ -417,7 +417,8 @@
|
||||
}
|
||||
|
||||
SCOPED_CRASH_KEY_STRING256("SWRace", "request_url", request_.url.spec());
|
||||
- auto [read_result, read_buffer] = read_buffer_manager_->ReadData();
|
||||
+ auto [r, read_buffer] = read_buffer_manager_->ReadData();
|
||||
+ auto read_result = r;
|
||||
TRACE_EVENT_WITH_FLOW2("ServiceWorker",
|
||||
"ServiceWorkerRaceNetworkRequestURLLoaderClient::Read",
|
||||
TRACE_ID_LOCAL(this),
|
||||
127
chromium-124-el8-support-64kpage.patch
Normal file
127
chromium-124-el8-support-64kpage.patch
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
diff -up chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h.orig chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h
|
||||
--- chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h.orig 2024-04-12 21:56:54.000000000 +0200
|
||||
+++ chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h 2024-04-14 20:53:16.043867871 +0200
|
||||
@@ -147,7 +147,13 @@ struct PartitionBucket {
|
||||
// Returns a slot number starting from the beginning of the slot span.
|
||||
PA_ALWAYS_INLINE size_t GetSlotNumber(size_t offset_in_slot_span) const {
|
||||
// See the static assertion for `kReciprocalShift` above.
|
||||
- PA_DCHECK(offset_in_slot_span <= kMaxBucketed);
|
||||
+ // TODO(casey.smalley@arm.com): triggers on Aarch64/Linux
|
||||
+ // systems with 64k system pages. Constants need to be
|
||||
+ // adjusted to prevent different parts of the allocator
|
||||
+ // from overlapping. For now this will allow 64k pages
|
||||
+ // to function on Aarch64/Linux systems, albeit not
|
||||
+ // very efficiently.
|
||||
+ PA_DCHECK(internal::SystemPageSize() == (size_t{1} << 16) || offset_in_slot_span <= kMaxBucketed);
|
||||
PA_DCHECK(slot_size <= kMaxBucketed);
|
||||
|
||||
const size_t offset_in_slot =
|
||||
diff -up chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.orig chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
|
||||
--- chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.orig 2024-04-14 20:53:16.043867871 +0200
|
||||
+++ chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h 2024-04-14 21:39:18.147052845 +0200
|
||||
@@ -17,10 +17,8 @@ namespace partition_alloc::internal {
|
||||
// PartitionPageSize() is 4 times the OS page size.
|
||||
static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket;
|
||||
#elif defined(PARTITION_ALLOCATOR_CONSTANTS_POSIX_NONCONST_PAGE_SIZE)
|
||||
-// System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is
|
||||
-// currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code,
|
||||
-// so we use the 16 kiB maximum (64 kiB will crash).
|
||||
-static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket;
|
||||
+// System page size can be 4, 16, or 64 kiB on Linux on AArch64.
|
||||
+static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 16) / kSmallestBucket;
|
||||
#else
|
||||
// A slot span can "span" multiple PartitionPages, but then its slot size is
|
||||
// larger, so it doesn't have as many slots.
|
||||
diff -up chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
|
||||
--- chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-04-14 20:53:16.044867889 +0200
|
||||
+++ chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc 2024-04-14 21:50:57.926716718 +0200
|
||||
@@ -952,12 +952,11 @@ void PartitionRoot::Init(PartitionOption
|
||||
(internal::SystemPageSize() == (size_t{1} << 14)));
|
||||
#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
|
||||
// Check runtime pagesize. Though the code is currently the same, it is
|
||||
- // not merged with the IS_APPLE case above as a 1 << 16 case needs to be
|
||||
- // added here in the future, to allow 64 kiB pagesize. That is only
|
||||
- // supported on Linux on arm64, not on IS_APPLE, but not yet present here
|
||||
- // as the rest of the PartitionAlloc does not currently support it.
|
||||
+ // not merged with the IS_APPLE case above as a 1 << 16 case is only
|
||||
+ // supported on Linux on AArch64.
|
||||
PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) ||
|
||||
- (internal::SystemPageSize() == (size_t{1} << 14)));
|
||||
+ (internal::SystemPageSize() == (size_t{1} << 14)) ||
|
||||
+ (internal::SystemPageSize() == (size_t{1} << 16)));
|
||||
#endif
|
||||
|
||||
::partition_alloc::internal::ScopedGuard guard{lock_};
|
||||
diff -up chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page.h.me chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
|
||||
--- chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page.h.me 2024-04-14 22:08:40.655011536 +0200
|
||||
+++ chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page.h 2024-04-14 22:12:46.665731577 +0200
|
||||
@@ -86,27 +86,25 @@ struct SlotSpanMetadata {
|
||||
|
||||
// CHECK()ed in AllocNewSlotSpan().
|
||||
// The maximum number of bits needed to cover all currently supported OSes.
|
||||
- static constexpr size_t kMaxSlotsPerSlotSpanBits = 13;
|
||||
+ static constexpr size_t kMaxSlotsPerSlotSpanBits = 15;
|
||||
static_assert(kMaxSlotsPerSlotSpan < (1 << kMaxSlotsPerSlotSpanBits), "");
|
||||
|
||||
- // |marked_full| isn't equivalent to being full. Slot span is marked as full
|
||||
- // iff it isn't on the active slot span list (or any other list).
|
||||
- uint32_t marked_full : 1;
|
||||
// |num_allocated_slots| is 0 for empty or decommitted slot spans, which can
|
||||
// be further differentiated by checking existence of the freelist.
|
||||
- uint32_t num_allocated_slots : kMaxSlotsPerSlotSpanBits;
|
||||
- uint32_t num_unprovisioned_slots : kMaxSlotsPerSlotSpanBits;
|
||||
+ uint16_t num_allocated_slots : kMaxSlotsPerSlotSpanBits;
|
||||
+ uint16_t num_unprovisioned_slots : kMaxSlotsPerSlotSpanBits;
|
||||
+
|
||||
+ // |marked_full| isn't equivalent to being full. Slot span is marked as full
|
||||
+ // iff it isn't on the active slot span list (or any other list).
|
||||
+ bool marked_full : 1;
|
||||
|
||||
private:
|
||||
- const uint32_t can_store_raw_size_ : 1;
|
||||
- uint32_t freelist_is_sorted_ : 1;
|
||||
- uint32_t unused1_ : (32 - 1 - 2 * kMaxSlotsPerSlotSpanBits - 1 - 1);
|
||||
+ const uint8_t can_store_raw_size_ : 1;
|
||||
+ uint8_t freelist_is_sorted_ : 1;
|
||||
// If |in_empty_cache_|==1, |empty_cache_index| is undefined and mustn't be
|
||||
// used.
|
||||
- uint16_t in_empty_cache_ : 1;
|
||||
- uint16_t empty_cache_index_
|
||||
- : kMaxEmptyCacheIndexBits; // < kMaxFreeableSpans.
|
||||
- uint16_t unused2_ : (16 - 1 - kMaxEmptyCacheIndexBits);
|
||||
+ bool in_empty_cache_ : 1;
|
||||
+ uint8_t empty_cache_index_ : kMaxEmptyCacheIndexBits; // < kMaxFreeableSpans.
|
||||
// Can use only 48 bits (6B) in this bitfield, as this structure is embedded
|
||||
// in PartitionPage which has 2B worth of fields and must fit in 32B.
|
||||
|
||||
@@ -246,18 +244,13 @@ static_assert(sizeof(SlotSpanMetadata) <
|
||||
"SlotSpanMetadata must fit into a Page Metadata slot.");
|
||||
|
||||
inline constexpr SlotSpanMetadata::SlotSpanMetadata() noexcept
|
||||
- : marked_full(0),
|
||||
- num_allocated_slots(0),
|
||||
+ : num_allocated_slots(0),
|
||||
num_unprovisioned_slots(0),
|
||||
+ marked_full(0),
|
||||
can_store_raw_size_(false),
|
||||
freelist_is_sorted_(true),
|
||||
- unused1_(0),
|
||||
in_empty_cache_(0),
|
||||
- empty_cache_index_(0),
|
||||
- unused2_(0) {
|
||||
- (void)unused1_;
|
||||
- (void)unused2_;
|
||||
-}
|
||||
+ empty_cache_index_(0) {}
|
||||
|
||||
inline SlotSpanMetadata::SlotSpanMetadata(const SlotSpanMetadata&) = default;
|
||||
|
||||
@@ -752,7 +745,7 @@ PA_ALWAYS_INLINE void SlotSpanMetadata::
|
||||
|
||||
size_t num_slots_per_span = bucket->get_slots_per_span();
|
||||
PA_DCHECK(num_slots_per_span <= kMaxSlotsPerSlotSpan);
|
||||
- num_unprovisioned_slots = static_cast<uint32_t>(num_slots_per_span);
|
||||
+ num_unprovisioned_slots = static_cast<uint16_t>(num_slots_per_span);
|
||||
PA_DCHECK(num_unprovisioned_slots);
|
||||
|
||||
ToSuperPageExtent()->IncrementNumberOfNonemptySlotSpans();
|
||||
53
chromium-124-libdav1d-aarch64.patch
Normal file
53
chromium-124-libdav1d-aarch64.patch
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
--- chromium-124.0.6367.60/third_party/dav1d/libdav1d/src/arm/asm.S 2024-04-15 22:34:36.000000000 +0200
|
||||
+++ chromium-122.0.6261.128/third_party/dav1d/libdav1d/src/arm/asm.S 2024-03-13 00:38:27.000000000 +0100
|
||||
@@ -34,50 +34,6 @@
|
||||
#define x18 do_not_use_x18
|
||||
#define w18 do_not_use_w18
|
||||
|
||||
-#if HAVE_AS_ARCH_DIRECTIVE
|
||||
- .arch AS_ARCH_LEVEL
|
||||
-#endif
|
||||
-
|
||||
-#if HAVE_AS_ARCHEXT_DOTPROD_DIRECTIVE
|
||||
-#define ENABLE_DOTPROD .arch_extension dotprod
|
||||
-#define DISABLE_DOTPROD .arch_extension nodotprod
|
||||
-#else
|
||||
-#define ENABLE_DOTPROD
|
||||
-#define DISABLE_DOTPROD
|
||||
-#endif
|
||||
-#if HAVE_AS_ARCHEXT_I8MM_DIRECTIVE
|
||||
-#define ENABLE_I8MM .arch_extension i8mm
|
||||
-#define DISABLE_I8MM .arch_extension noi8mm
|
||||
-#else
|
||||
-#define ENABLE_I8MM
|
||||
-#define DISABLE_I8MM
|
||||
-#endif
|
||||
-#if HAVE_AS_ARCHEXT_SVE_DIRECTIVE
|
||||
-#define ENABLE_SVE .arch_extension sve
|
||||
-#define DISABLE_SVE .arch_extension nosve
|
||||
-#else
|
||||
-#define ENABLE_SVE
|
||||
-#define DISABLE_SVE
|
||||
-#endif
|
||||
-#if HAVE_AS_ARCHEXT_SVE2_DIRECTIVE
|
||||
-#define ENABLE_SVE2 .arch_extension sve2
|
||||
-#define DISABLE_SVE2 .arch_extension nosve2
|
||||
-#else
|
||||
-#define ENABLE_SVE2
|
||||
-#define DISABLE_SVE2
|
||||
-#endif
|
||||
-
|
||||
-/* If we do support the .arch_extension directives, disable support for all
|
||||
- * the extensions that we may use, in case they were implicitly enabled by
|
||||
- * the .arch level. This makes it clear if we try to assemble an instruction
|
||||
- * from an unintended extension set; we only allow assmbling such instructions
|
||||
- * within regions where we explicitly enable those extensions. */
|
||||
-DISABLE_DOTPROD
|
||||
-DISABLE_I8MM
|
||||
-DISABLE_SVE
|
||||
-DISABLE_SVE2
|
||||
-
|
||||
-
|
||||
/* Support macros for
|
||||
* - Armv8.3-A Pointer Authentication and
|
||||
* - Armv8.5-A Branch Target Identification
|
||||
55
chromium-124-rust-clang_lib.patch
Normal file
55
chromium-124-rust-clang_lib.patch
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
diff -up chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib chromium-121.0.6167.57/build/config/clang/BUILD.gn
|
||||
--- chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib 2024-01-10 16:43:01.000000000 +0100
|
||||
+++ chromium-121.0.6167.57/build/config/clang/BUILD.gn 2024-01-20 19:51:38.481992799 +0100
|
||||
@@ -112,6 +112,7 @@ template("clang_lib") {
|
||||
_prefix = "lib"
|
||||
_suffix = ""
|
||||
_ext = "a"
|
||||
+ _libprefix = ""
|
||||
if (is_win) {
|
||||
_dir = "windows"
|
||||
_prefix = ""
|
||||
@@ -127,7 +128,33 @@ template("clang_lib") {
|
||||
}
|
||||
} else if (is_apple) {
|
||||
_dir = "darwin"
|
||||
- } else if (is_linux || is_chromeos) {
|
||||
+ } else if (is_linux) {
|
||||
+ if (current_cpu == "x64") {
|
||||
+ _dir = "x86_64-redhat-linux-gnu"
|
||||
+ _suffix ="-x86_64"
|
||||
+ } else if (current_cpu == "x86") {
|
||||
+ _dir = "i386-redhat-linux-gnu"
|
||||
+ _suffix = "-i386"
|
||||
+ } else if (current_cpu == "arm64") {
|
||||
+ _dir = "aarch64-redhat-linux-gnu"
|
||||
+ _suffix = "-aarch64"
|
||||
+ } else if (current_cpu == "arm") {
|
||||
+ _dir = "armhf-redhat-linux-gnu"
|
||||
+ _suffix = "-armhf"
|
||||
+ } else if (current_cpu == "ppc64") {
|
||||
+ _dir = "ppc64le-redhat-linux-gnu"
|
||||
+ _suffix = "-ppc64le"
|
||||
+ } else {
|
||||
+ assert(false) # Unhandled cpu type
|
||||
+ }
|
||||
+ # different clang lib dir in fedora/epel
|
||||
+ if (clang_version == "17" || clang_version == "18") {
|
||||
+ _suffix = ""
|
||||
+ } else if (clang_version == "14" || clang_version == "15" || clang_version == "16") {
|
||||
+ _libprefix = "64"
|
||||
+ _dir = ""
|
||||
+ }
|
||||
+ } else if (is_chromeos) {
|
||||
if (current_cpu == "x64") {
|
||||
_dir = "x86_64-unknown-linux-gnu"
|
||||
} else if (current_cpu == "x86") {
|
||||
@@ -166,7 +193,7 @@ template("clang_lib") {
|
||||
assert(false) # Unhandled target platform
|
||||
}
|
||||
|
||||
- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
|
||||
+ _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib"
|
||||
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
|
||||
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]
|
||||
}
|
||||
429
chromium-124-typename.patch
Normal file
429
chromium-124-typename.patch
Normal file
|
|
@ -0,0 +1,429 @@
|
|||
diff -up chromium-124.0.6367.118/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.typename chromium-124.0.6367.118/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h
|
||||
--- chromium-124.0.6367.118/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.typename 2024-05-01 01:46:40.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h 2024-05-05 16:32:57.377654043 +0200
|
||||
@@ -26,7 +26,7 @@ PartitionRoot& InternalAllocatorRoot();
|
||||
|
||||
// A class that meets C++ named requirements, Allocator.
|
||||
template <typename T>
|
||||
-InternalAllocator<T>::value_type* InternalAllocator<T>::allocate(
|
||||
+typename InternalAllocator<T>::value_type* InternalAllocator<T>::allocate(
|
||||
std::size_t count) {
|
||||
PA_CHECK(count <=
|
||||
std::numeric_limits<std::size_t>::max() / sizeof(value_type));
|
||||
diff -up chromium-124.0.6367.118/base/containers/heap_array.h.typename chromium-124.0.6367.118/base/containers/heap_array.h
|
||||
--- chromium-124.0.6367.118/base/containers/heap_array.h.typename 2024-05-01 01:46:40.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/base/containers/heap_array.h 2024-05-05 16:32:57.377654043 +0200
|
||||
@@ -32,8 +32,8 @@ class TRIVIAL_ABI GSL_OWNER HeapArray {
|
||||
static_assert(!std::is_reference_v<T>,
|
||||
"HeapArray cannot hold reference types");
|
||||
|
||||
- using iterator = base::span<T>::iterator;
|
||||
- using const_iterator = base::span<const T>::iterator;
|
||||
+ using iterator = typename base::span<T>::iterator;
|
||||
+ using const_iterator = typename base::span<const T>::iterator;
|
||||
|
||||
// Allocates initialized memory capable of holding `size` elements. No memory
|
||||
// is allocated for zero-sized arrays.
|
||||
diff -up chromium-124.0.6367.118/base/containers/map_util.h.typename chromium-124.0.6367.118/base/containers/map_util.h
|
||||
--- chromium-124.0.6367.118/base/containers/map_util.h.typename 2024-05-01 01:46:40.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/base/containers/map_util.h 2024-05-05 16:36:15.062228596 +0200
|
||||
@@ -44,7 +44,7 @@ constexpr internal::MappedType<Map>* Fin
|
||||
template <typename Map,
|
||||
typename Key,
|
||||
typename MappedElementType =
|
||||
- std::pointer_traits<internal::MappedType<Map>>::element_type>
|
||||
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
|
||||
constexpr const MappedElementType* FindPtrOrNull(const Map& map,
|
||||
const Key& key) {
|
||||
auto it = map.find(key);
|
||||
@@ -60,7 +60,7 @@ constexpr const MappedElementType* FindP
|
||||
template <typename Map,
|
||||
typename Key,
|
||||
typename MappedElementType =
|
||||
- std::pointer_traits<internal::MappedType<Map>>::element_type>
|
||||
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
|
||||
constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) {
|
||||
auto it = map.find(key);
|
||||
return it != map.end() ? base::to_address(it->second) : nullptr;
|
||||
diff -up chromium-124.0.6367.118/base/functional/bind_internal.h.typename chromium-124.0.6367.118/base/functional/bind_internal.h
|
||||
--- chromium-124.0.6367.118/base/functional/bind_internal.h.typename 2024-05-01 01:46:40.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/base/functional/bind_internal.h 2024-05-05 16:32:57.375653992 +0200
|
||||
@@ -1505,11 +1505,11 @@ template <int i,
|
||||
typename Param>
|
||||
struct ParamCanBeBound {
|
||||
private:
|
||||
- using UnwrappedParam = BindArgument<i>::template ForwardedAs<
|
||||
+ using UnwrappedParam = typename BindArgument<i>::template ForwardedAs<
|
||||
Unwrapped>::template ToParamWithType<Param>;
|
||||
- using ParamStorage = BindArgument<i>::template ToParamWithType<
|
||||
+ using ParamStorage = typename BindArgument<i>::template ToParamWithType<
|
||||
Param>::template StoredAs<Storage>;
|
||||
- using BoundStorage =
|
||||
+ using BoundStorage = typename
|
||||
BindArgument<i>::template BoundAs<Arg>::template StoredAs<Storage>;
|
||||
|
||||
template <bool v = !UnwrappedParam::kRawPtr ||
|
||||
diff -up chromium-124.0.6367.118/base/functional/function_ref.h.typename chromium-124.0.6367.118/base/functional/function_ref.h
|
||||
--- chromium-124.0.6367.118/base/functional/function_ref.h.typename 2024-05-01 01:46:40.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/base/functional/function_ref.h 2024-05-05 16:32:57.379654093 +0200
|
||||
@@ -64,7 +64,7 @@ class FunctionRef;
|
||||
template <typename R, typename... Args>
|
||||
class FunctionRef<R(Args...)> {
|
||||
template <typename Functor,
|
||||
- typename RunType = internal::FunctorTraits<Functor>::RunType>
|
||||
+ typename RunType = typename internal::FunctorTraits<Functor>::RunType>
|
||||
static constexpr bool kCompatibleFunctor =
|
||||
std::convertible_to<internal::ExtractReturnType<RunType>, R> &&
|
||||
std::same_as<internal::ExtractArgs<RunType>, internal::TypeList<Args...>>;
|
||||
diff -up chromium-124.0.6367.118/base/types/fixed_array.h.typename chromium-124.0.6367.118/base/types/fixed_array.h
|
||||
--- chromium-124.0.6367.118/base/types/fixed_array.h.typename 2024-05-01 01:46:41.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/base/types/fixed_array.h 2024-05-05 16:32:57.378654068 +0200
|
||||
@@ -27,8 +27,8 @@ template <typename T,
|
||||
class FixedArray : public absl::FixedArray<T, N, A> {
|
||||
public:
|
||||
using absl::FixedArray<T, N, A>::FixedArray;
|
||||
- explicit FixedArray(absl::FixedArray<T, N, A>::size_type n,
|
||||
- const absl::FixedArray<T, N, A>::allocator_type& a =
|
||||
+ explicit FixedArray(typename absl::FixedArray<T, N, A>::size_type n,
|
||||
+ const typename absl::FixedArray<T, N, A>::allocator_type& a =
|
||||
typename absl::FixedArray<T, N, A>::allocator_type())
|
||||
: FixedArray(n, T(), a) {}
|
||||
};
|
||||
diff -up chromium-124.0.6367.118/chrome/browser/download/bubble/download_bubble_update_service.cc.typename chromium-124.0.6367.118/chrome/browser/download/bubble/download_bubble_update_service.cc
|
||||
--- chromium-124.0.6367.118/chrome/browser/download/bubble/download_bubble_update_service.cc.typename 2024-05-01 01:46:45.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/chrome/browser/download/bubble/download_bubble_update_service.cc 2024-05-05 16:32:57.375653992 +0200
|
||||
@@ -95,7 +95,7 @@ ItemSortKey GetSortKey(const Item& item)
|
||||
// Helper to get an iterator to the last element in the cache. The cache
|
||||
// must not be empty.
|
||||
template <typename Item>
|
||||
-SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
|
||||
+typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
|
||||
CHECK(!cache.empty());
|
||||
auto it = cache.end();
|
||||
return std::prev(it);
|
||||
@@ -1179,9 +1179,9 @@ bool DownloadBubbleUpdateService::CacheM
|
||||
}
|
||||
|
||||
template <typename Id, typename Item>
|
||||
-SortedItems<Item>::iterator
|
||||
+typename SortedItems<Item>::iterator
|
||||
DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter(
|
||||
- SortedItems<Item>::iterator iter,
|
||||
+ typename SortedItems<Item>::iterator iter,
|
||||
SortedItems<Item>& cache,
|
||||
IterMap<Id, Item>& iter_map) {
|
||||
CHECK(iter != cache.end());
|
||||
diff -up chromium-124.0.6367.118/chrome/browser/web_applications/commands/internal/command_internal.h.typename chromium-124.0.6367.118/chrome/browser/web_applications/commands/internal/command_internal.h
|
||||
--- chromium-124.0.6367.118/chrome/browser/web_applications/commands/internal/command_internal.h.typename 2024-05-01 01:46:48.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/chrome/browser/web_applications/commands/internal/command_internal.h 2024-05-05 16:32:57.378654068 +0200
|
||||
@@ -121,7 +121,7 @@ class CommandBase {
|
||||
template <typename LockType>
|
||||
class CommandWithLock : public CommandBase {
|
||||
public:
|
||||
- using LockDescription = LockType::LockDescription;
|
||||
+ using LockDescription = typename LockType::LockDescription;
|
||||
explicit CommandWithLock(const std::string& name,
|
||||
LockDescription initial_lock_request);
|
||||
|
||||
diff -up chromium-124.0.6367.118/chrome/browser/web_applications/commands/web_app_command.h.typename chromium-124.0.6367.118/chrome/browser/web_applications/commands/web_app_command.h
|
||||
--- chromium-124.0.6367.118/chrome/browser/web_applications/commands/web_app_command.h.typename 2024-05-01 01:46:48.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/chrome/browser/web_applications/commands/web_app_command.h 2024-05-05 16:32:57.378654068 +0200
|
||||
@@ -106,7 +106,7 @@ class WebAppLockManager;
|
||||
template <typename LockType, typename... CallbackArgs>
|
||||
class WebAppCommand : public internal::CommandWithLock<LockType> {
|
||||
public:
|
||||
- using LockDescription = LockType::LockDescription;
|
||||
+ using LockDescription = typename LockType::LockDescription;
|
||||
using CallbackType = base::OnceCallback<void(CallbackArgs...)>;
|
||||
using ShutdownArgumentsTuple = std::tuple<std::decay_t<CallbackArgs>...>;
|
||||
|
||||
diff -up chromium-124.0.6367.118/chrome/browser/web_applications/web_app_command_scheduler.h.typename chromium-124.0.6367.118/chrome/browser/web_applications/web_app_command_scheduler.h
|
||||
--- chromium-124.0.6367.118/chrome/browser/web_applications/web_app_command_scheduler.h.typename 2024-05-01 01:46:48.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/chrome/browser/web_applications/web_app_command_scheduler.h 2024-05-05 16:32:57.379654093 +0200
|
||||
@@ -369,7 +369,7 @@ class WebAppCommandScheduler {
|
||||
// command system.
|
||||
template <typename LockType>
|
||||
void ScheduleCallback(const std::string& operation_name,
|
||||
- LockType::LockDescription lock_description,
|
||||
+ typename LockType::LockDescription lock_description,
|
||||
CallbackCommand<LockType, void> callback,
|
||||
base::OnceClosure on_complete,
|
||||
const base::Location& location = FROM_HERE) {
|
||||
@@ -387,7 +387,7 @@ class WebAppCommandScheduler {
|
||||
typename CallbackReturnValue = std::decay_t<CompletionCallbackArg>>
|
||||
void ScheduleCallbackWithResult(
|
||||
const std::string& operation_name,
|
||||
- LockType::LockDescription lock_description,
|
||||
+ typename LockType::LockDescription lock_description,
|
||||
CallbackCommand<LockType, CallbackReturnValue> callback,
|
||||
base::OnceCallback<void(CompletionCallbackArg)> on_complete,
|
||||
CallbackReturnValue arg_for_shutdown,
|
||||
diff -up chromium-124.0.6367.118/components/optimization_guide/core/model_execution/model_execution_util.h.typename chromium-124.0.6367.118/components/optimization_guide/core/model_execution/model_execution_util.h
|
||||
--- chromium-124.0.6367.118/components/optimization_guide/core/model_execution/model_execution_util.h.typename 2024-05-01 01:46:52.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/components/optimization_guide/core/model_execution/model_execution_util.h 2024-05-05 16:32:57.376654018 +0200
|
||||
@@ -26,7 +26,7 @@ void SetExecutionRequestTemplate(
|
||||
|
||||
// Request is set by the feature and should always be typed.
|
||||
auto typed_request =
|
||||
- static_cast<const FeatureType::Request&>(request_metadata);
|
||||
+ static_cast<const typename FeatureType::Request&>(request_metadata);
|
||||
*(logging_data->mutable_request_data()) = typed_request;
|
||||
}
|
||||
|
||||
diff -up chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_log_entry.h
|
||||
--- chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename 2024-05-01 01:46:52.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_log_entry.h 2024-05-05 16:32:57.376654018 +0200
|
||||
@@ -33,7 +33,7 @@ class ModelQualityLogEntry {
|
||||
}
|
||||
|
||||
template <typename FeatureType>
|
||||
- FeatureType::Quality* quality_data() {
|
||||
+ typename FeatureType::Quality* quality_data() {
|
||||
return FeatureType::GetLoggingData(*log_ai_data_request_)
|
||||
->mutable_quality_data();
|
||||
}
|
||||
diff -up chromium-124.0.6367.118/components/optimization_guide/core/tflite_model_executor.h.typename chromium-124.0.6367.118/components/optimization_guide/core/tflite_model_executor.h
|
||||
--- chromium-124.0.6367.118/components/optimization_guide/core/tflite_model_executor.h.typename 2024-05-01 01:46:52.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/components/optimization_guide/core/tflite_model_executor.h 2024-05-05 16:32:57.379654093 +0200
|
||||
@@ -242,7 +242,7 @@ class TFLiteModelExecutor : public Model
|
||||
void SendForBatchExecution(
|
||||
BatchExecutionCallback callback_on_complete,
|
||||
base::TimeTicks start_time,
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
override {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -264,7 +264,7 @@ class TFLiteModelExecutor : public Model
|
||||
// Starts the synchronous execution of the model. Returns model outputs.
|
||||
// Model needs to be loaded. Synchronous calls do not load or unload model.
|
||||
std::vector<std::optional<OutputType>> SendForBatchExecutionSync(
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
override {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -422,7 +422,7 @@ class TFLiteModelExecutor : public Model
|
||||
// executes it on the model execution thread.
|
||||
void LoadModelFileAndBatchExecute(
|
||||
BatchExecutionCallback callback_on_complete,
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
@@ -439,7 +439,7 @@ class TFLiteModelExecutor : public Model
|
||||
|
||||
// Batch executes the loaded model for inputs.
|
||||
void BatchExecuteLoadedModel(
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
|
||||
std::vector<std::optional<OutputType>>* outputs) {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -499,7 +499,7 @@ class TFLiteModelExecutor : public Model
|
||||
// Unloads the model if needed.
|
||||
void BatchExecuteLoadedModelAndRunCallback(
|
||||
BatchExecutionCallback callback_on_complete,
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
|
||||
ExecutionStatus execution_status) {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
diff -up chromium-124.0.6367.118/components/supervised_user/core/browser/proto_fetcher.h.typename chromium-124.0.6367.118/components/supervised_user/core/browser/proto_fetcher.h
|
||||
--- chromium-124.0.6367.118/components/supervised_user/core/browser/proto_fetcher.h.typename 2024-05-01 01:46:54.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/components/supervised_user/core/browser/proto_fetcher.h 2024-05-05 16:32:57.379654093 +0200
|
||||
@@ -424,7 +424,7 @@ class RetryingFetcherImpl final : public
|
||||
RetryingFetcherImpl(const RetryingFetcherImpl&) = delete;
|
||||
RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete;
|
||||
|
||||
- void Start(ProtoFetcher<Response>::Callback callback) override {
|
||||
+ void Start(typename ProtoFetcher<Response>::Callback callback) override {
|
||||
callback_ = std::move(callback);
|
||||
Retry();
|
||||
}
|
||||
@@ -469,7 +469,7 @@ class RetryingFetcherImpl final : public
|
||||
}
|
||||
|
||||
// Client callback.
|
||||
- TypedProtoFetcher<Response>::Callback callback_;
|
||||
+ typename TypedProtoFetcher<Response>::Callback callback_;
|
||||
|
||||
// Retry controls.
|
||||
base::OneShotTimer timer_;
|
||||
@@ -490,7 +490,7 @@ class ParallelFetchManager {
|
||||
// Deferred fetcher is required because it should be started after it is
|
||||
// stored internally.
|
||||
using Fetcher = ProtoFetcher<Response>;
|
||||
- using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
|
||||
+ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
|
||||
|
||||
public:
|
||||
// Provides fresh instances of a deferred fetcher for each fetch.
|
||||
@@ -506,7 +506,7 @@ class ParallelFetchManager {
|
||||
|
||||
// Starts the fetch. Underlying fetcher is stored internally, and will be
|
||||
// cleaned up after finish or when this manager is destroyed.
|
||||
- void Fetch(const Request& request, Fetcher::Callback callback) {
|
||||
+ void Fetch(const Request& request, typename Fetcher::Callback callback) {
|
||||
CHECK(callback) << "Use base::DoNothing() instead of empty callback.";
|
||||
KeyType key = requests_in_flight_.Add(MakeFetcher(request));
|
||||
requests_in_flight_.Lookup(key)->Start(
|
||||
diff -up chromium-124.0.6367.118/mojo/public/cpp/bindings/array_traits.h.typename chromium-124.0.6367.118/mojo/public/cpp/bindings/array_traits.h
|
||||
--- chromium-124.0.6367.118/mojo/public/cpp/bindings/array_traits.h.typename 2024-05-01 01:46:59.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/mojo/public/cpp/bindings/array_traits.h 2024-05-05 16:32:57.376654018 +0200
|
||||
@@ -90,7 +90,7 @@ template <typename Container>
|
||||
{ c[i] } -> std::same_as<typename Container::reference>;
|
||||
}
|
||||
struct ArrayTraits<Container> {
|
||||
- using Element = Container::value_type;
|
||||
+ using Element = typename Container::value_type;
|
||||
|
||||
// vector-like containers have no built-in null.
|
||||
static bool IsNull(const Container& c) { return false; }
|
||||
diff -up chromium-124.0.6367.118/mojo/public/cpp/bindings/type_converter.h.typename chromium-124.0.6367.118/mojo/public/cpp/bindings/type_converter.h
|
||||
--- chromium-124.0.6367.118/mojo/public/cpp/bindings/type_converter.h.typename 2024-05-01 01:46:59.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/mojo/public/cpp/bindings/type_converter.h 2024-05-05 16:32:57.377654043 +0200
|
||||
@@ -127,7 +127,7 @@ using VecValueType = typename Vec::value
|
||||
|
||||
template <typename Vec>
|
||||
using VecPtrLikeUnderlyingValueType =
|
||||
- std::pointer_traits<VecValueType<Vec>>::element_type;
|
||||
+ typename std::pointer_traits<VecValueType<Vec>>::element_type;
|
||||
|
||||
} // namespace internal
|
||||
|
||||
diff -up chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/async_iterable.h
|
||||
--- chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename 2024-05-05 16:32:57.376654018 +0200
|
||||
+++ chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/async_iterable.h 2024-05-05 16:39:07.015158335 +0200
|
||||
@@ -245,7 +245,7 @@ class PairAsyncIterable {
|
||||
private:
|
||||
virtual IterationSource* CreateIterationSource(
|
||||
ScriptState* script_state,
|
||||
- IterationSource::Kind kind,
|
||||
+ typename IterationSource::Kind kind,
|
||||
InitArgs... args,
|
||||
ExceptionState& exception_state) = 0;
|
||||
};
|
||||
@@ -291,7 +291,7 @@ class ValueAsyncIterable {
|
||||
private:
|
||||
virtual IterationSource* CreateIterationSource(
|
||||
ScriptState* script_state,
|
||||
- IterationSource::Kind kind,
|
||||
+ typename IterationSource::Kind kind,
|
||||
InitArgs... args,
|
||||
ExceptionState& exception_state) = 0;
|
||||
};
|
||||
diff -up chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_property.h.typename chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_property.h
|
||||
--- chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_property.h.typename 2024-05-01 01:47:03.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_property.h 2024-05-05 16:32:57.380654118 +0200
|
||||
@@ -173,7 +173,7 @@ class ScriptPromiseProperty final
|
||||
template <typename T>
|
||||
requires std::derived_from<T, bindings::EnumerationBase>
|
||||
static T DefaultPromiseResultValue() {
|
||||
- return T(static_cast<T::Enum>(0));
|
||||
+ return T(static_cast<typename T::Enum>(0));
|
||||
}
|
||||
|
||||
State state_ = kPending;
|
||||
diff -up chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h.typename chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h
|
||||
--- chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h.typename 2024-05-01 01:47:03.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h 2024-05-05 16:32:57.380654118 +0200
|
||||
@@ -389,7 +389,7 @@ class ScriptPromiseResolverTyped : publi
|
||||
|
||||
private:
|
||||
using TypedResolver =
|
||||
- ScriptPromiseTyped<IDLResolvedType>::InternalResolverTyped;
|
||||
+ typename ScriptPromiseTyped<IDLResolvedType>::InternalResolverTyped;
|
||||
};
|
||||
|
||||
} // namespace blink
|
||||
diff -up chromium-124.0.6367.118/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename chromium-124.0.6367.118/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
|
||||
--- chromium-124.0.6367.118/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename 2024-05-01 01:47:04.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2024-05-05 16:32:57.376654018 +0200
|
||||
@@ -210,7 +210,7 @@ class HTMLFastPathParser {
|
||||
using Span = base::span<const Char>;
|
||||
using USpan = base::span<const UChar>;
|
||||
// 32 matches that used by HTMLToken::Attribute.
|
||||
- typedef std::conditional<std::is_same_v<Char, UChar>,
|
||||
+ typedef typename std::conditional<std::is_same_v<Char, UChar>,
|
||||
UCharLiteralBuffer<32>,
|
||||
LCharLiteralBuffer<32>>::type LiteralBufferType;
|
||||
static_assert(std::is_same_v<Char, UChar> || std::is_same_v<Char, LChar>);
|
||||
diff -up chromium-124.0.6367.118/third_party/blink/renderer/platform/wtf/hash_table.h.typename chromium-124.0.6367.118/third_party/blink/renderer/platform/wtf/hash_table.h
|
||||
--- chromium-124.0.6367.118/third_party/blink/renderer/platform/wtf/hash_table.h.typename 2024-05-01 01:47:05.000000000 +0200
|
||||
+++ chromium-124.0.6367.118/third_party/blink/renderer/platform/wtf/hash_table.h 2024-05-05 16:32:57.378654068 +0200
|
||||
@@ -2006,7 +2006,7 @@ struct HashTableConstIteratorAdapter {
|
||||
static_assert(!IsTraceable<typename Traits::TraitType>::value);
|
||||
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
- using value_type = HashTableType::ValueType;
|
||||
+ using value_type = typename HashTableType::ValueType;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
@@ -2058,7 +2058,7 @@ struct HashTableConstIteratorAdapter<
|
||||
|
||||
public:
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
- using value_type = HashTableType::ValueType;
|
||||
+ using value_type = typename HashTableType::ValueType;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
@@ -2112,7 +2112,7 @@ struct HashTableIteratorAdapter {
|
||||
static_assert(!IsTraceable<typename Traits::TraitType>::value);
|
||||
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
- using value_type = HashTableType::ValueType;
|
||||
+ using value_type = typename HashTableType::ValueType;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
@@ -2160,7 +2160,7 @@ struct HashTableIteratorAdapter<
|
||||
|
||||
public:
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
- using value_type = HashTableType::ValueType;
|
||||
+ using value_type = typename HashTableType::ValueType;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
diff -up chromium-124.0.6367.118/base/containers/to_vector.h.me chromium-124.0.6367.118/base/containers/to_vector.h
|
||||
--- chromium-124.0.6367.118/base/containers/to_vector.h.me 2024-05-06 12:39:58.312899455 +0200
|
||||
+++ chromium-124.0.6367.118/base/containers/to_vector.h 2024-05-06 12:40:22.014635715 +0200
|
||||
@@ -30,7 +30,7 @@ template <typename Range, typename Proj
|
||||
std::indirectly_unary_invocable<Proj, ranges::iterator_t<Range>>
|
||||
auto ToVector(Range&& range, Proj proj = {}) {
|
||||
using ProjectedType =
|
||||
- std::projected<ranges::iterator_t<Range>, Proj>::value_type;
|
||||
+ typename std::projected<ranges::iterator_t<Range>, Proj>::value_type;
|
||||
std::vector<ProjectedType> container;
|
||||
container.reserve(std::size(range));
|
||||
ranges::transform(std::forward<Range>(range), std::back_inserter(container),
|
||||
diff -up chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_util.h.me chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_util.h
|
||||
--- chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_util.h.me 2024-05-06 20:13:29.067800309 +0200
|
||||
+++ chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_util.h 2024-05-06 20:13:44.671084222 +0200
|
||||
@@ -19,7 +19,7 @@ proto::ModelExecutionFeature GetModelExe
|
||||
// Helper method to get the quality_data from `log_ai_data_request` for
|
||||
// different features.
|
||||
template <typename FeatureType>
|
||||
-FeatureType::Quality* GetModelQualityData(
|
||||
+typename FeatureType::Quality* GetModelQualityData(
|
||||
proto::LogAiDataRequest* log_ai_data_request) {
|
||||
return FeatureType::GetLoggingData(*log_ai_data_request)
|
||||
->mutable_quality_data();
|
||||
diff -up chromium-124.0.6367.118/third_party/blink/renderer/core/paint/object_paint_properties.h.me chromium-124.0.6367.118/third_party/blink/renderer/core/paint/object_paint_properties.h
|
||||
--- chromium-124.0.6367.118/third_party/blink/renderer/core/paint/object_paint_properties.h.me 2024-05-07 08:54:42.099316020 +0200
|
||||
+++ chromium-124.0.6367.118/third_party/blink/renderer/core/paint/object_paint_properties.h 2024-05-07 08:57:18.304022672 +0200
|
||||
@@ -445,8 +445,8 @@ class CORE_EXPORT ObjectPaintProperties
|
||||
PaintPropertyChangeType Update(
|
||||
NodeId node_id,
|
||||
const ParentType& parent,
|
||||
- NodeType::State&& state,
|
||||
- const NodeType::AnimationState& animation_state =
|
||||
+ typename NodeType::State&& state,
|
||||
+ const typename NodeType::AnimationState& animation_state =
|
||||
NodeType::AnimationState()) {
|
||||
// First, check if we need to add a new node.
|
||||
if (!nodes_.HasField(node_id)) {
|
||||
12
chromium-125-disable-FFmpegAllowLists.patch
Normal file
12
chromium-125-disable-FFmpegAllowLists.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-125.0.6422.41/media/base/media_switches.cc.disable-FFmpegAllowLists chromium-125.0.6422.41/media/base/media_switches.cc
|
||||
--- chromium-125.0.6422.41/media/base/media_switches.cc.disable-FFmpegAllowLists 2024-05-12 21:28:43.694027396 +0200
|
||||
+++ chromium-125.0.6422.41/media/base/media_switches.cc 2024-05-12 21:32:48.155063623 +0200
|
||||
@@ -1753,7 +1753,7 @@ BASE_FEATURE(kUseWindowBoundsForPip,
|
||||
// Enables FFmpeg allow lists for supported codecs / containers.
|
||||
BASE_FEATURE(kFFmpegAllowLists,
|
||||
"FFmpegAllowLists",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Enables audio offload when supported by endpoints.
|
||||
739
chromium-125-el-NativeValueTraits-p1.patch
Normal file
739
chromium-125-el-NativeValueTraits-p1.patch
Normal file
|
|
@ -0,0 +1,739 @@
|
|||
revert as workaround for compiler error with old clang < 17
|
||||
|
||||
commit 940af9f2c87b436559b97c53763aa9eaaf1254eb
|
||||
Author: Jeremy Roman <jbroman@chromium.org>
|
||||
Date: Wed Nov 15 16:24:54 2023 +0000
|
||||
|
||||
Use C++20 features to simplify blink::NativeValueTraitsBase.
|
||||
|
||||
These allow some of the metaprogramming bits to be simplified a little.
|
||||
|
||||
Change-Id: I052b4397586d21348401616e1792afdb9662f975
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5030335
|
||||
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
|
||||
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1224978}
|
||||
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
||||
@@ -5,7 +5,6 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_
|
||||
|
||||
-#include <concepts>
|
||||
#include <type_traits>
|
||||
|
||||
#include "third_party/blink/renderer/bindings/core/v8/idl_types_base.h"
|
||||
@@ -31,7 +30,7 @@ class ExceptionState;
|
||||
// return toInt32(isolate, value, exceptionState, NormalConversion);
|
||||
// }
|
||||
// }
|
||||
-template <typename T>
|
||||
+template <typename T, typename SFINAEHelper = void>
|
||||
struct NativeValueTraits;
|
||||
|
||||
// This declaration serves only as a blueprint for specializations: the
|
||||
@@ -46,15 +45,22 @@ struct NativeValueTraits;
|
||||
|
||||
namespace bindings {
|
||||
|
||||
+template <typename T, typename = void>
|
||||
+struct NativeValueTraitsHasIsNull : std::false_type {};
|
||||
+
|
||||
template <typename T>
|
||||
-struct ImplTypeFor {
|
||||
- using type = T;
|
||||
-};
|
||||
+struct NativeValueTraitsHasIsNull<
|
||||
+ T,
|
||||
+ std::void_t<decltype(std::declval<T>().IsNull())>> : std::true_type {};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, IDLBase>
|
||||
-struct ImplTypeFor<T> {
|
||||
- using type = typename T::ImplType;
|
||||
+struct NativeValueTraitsHasNullValue {
|
||||
+ // true if |T| supports IDL null value.
|
||||
+ static constexpr bool value =
|
||||
+ // ScriptValue, String, and union types have IsNull member function.
|
||||
+ bindings::NativeValueTraitsHasIsNull<T>::value ||
|
||||
+ // Pointer types have nullptr as IDL null value.
|
||||
+ std::is_pointer<T>::value;
|
||||
};
|
||||
|
||||
} // namespace bindings
|
||||
@@ -72,17 +78,37 @@ struct ImplTypeFor<T> {
|
||||
// If present, |NullValue()| will be used when converting from the nullable type
|
||||
// T?, and should be used if the impl type has an existing "null" state. If not
|
||||
// present, WTF::Optional will be used to wrap the type.
|
||||
-template <typename T>
|
||||
+template <typename T, typename SFINAEHelper = void>
|
||||
struct NativeValueTraitsBase {
|
||||
STATIC_ONLY(NativeValueTraitsBase);
|
||||
|
||||
- using ImplType = bindings::ImplTypeFor<T>::type;
|
||||
+ using ImplType = T;
|
||||
+
|
||||
+ static constexpr bool has_null_value =
|
||||
+ bindings::NativeValueTraitsHasNullValue<ImplType>::value;
|
||||
+
|
||||
+ template <typename... ExtraArgs>
|
||||
+ static decltype(auto) ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state,
|
||||
+ ExtraArgs... extra_args) {
|
||||
+ return NativeValueTraits<std::remove_pointer_t<T>>::NativeValue(
|
||||
+ isolate, value, exception_state,
|
||||
+ std::forward<ExtraArgs>(extra_args)...);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+template <typename T>
|
||||
+struct NativeValueTraitsBase<
|
||||
+ T,
|
||||
+ std::enable_if_t<std::is_base_of<IDLBase, T>::value>> {
|
||||
+ STATIC_ONLY(NativeValueTraitsBase);
|
||||
+
|
||||
+ using ImplType = typename T::ImplType;
|
||||
|
||||
- // Pointer types have nullptr as IDL null value.
|
||||
- // ScriptValue, String, and union types have IsNull member function.
|
||||
static constexpr bool has_null_value =
|
||||
- std::is_pointer_v<ImplType> ||
|
||||
- requires(ImplType value) { value.IsNull(); };
|
||||
+ bindings::NativeValueTraitsHasNullValue<ImplType>::value;
|
||||
|
||||
// This should only be true for certain subclasses of ScriptWrappable
|
||||
// that satisfy the assumptions of CreateIDLSequenceFromV8ArraySlow() with
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "third_party/blink/renderer/core/core_export.h"
|
||||
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
|
||||
#include "third_party/blink/renderer/core/frame/web_feature.h"
|
||||
-#include "third_party/blink/renderer/core/typed_arrays/flexible_array_buffer_view.h"
|
||||
#include "third_party/blink/renderer/core/typed_arrays/typed_flexible_array_buffer_view.h"
|
||||
|
||||
namespace blink {
|
||||
@@ -698,11 +697,12 @@ DOMArrayBufferBase* NativeValueTraits<
|
||||
// ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-NotShared<T> NativeValueTraits<NotShared<T>>::NativeValue(
|
||||
- v8::Isolate* isolate,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+NotShared<T> NativeValueTraits<
|
||||
+ NotShared<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ NativeValue(v8::Isolate* isolate,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return NativeValueImpl<
|
||||
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||
@@ -711,12 +711,13 @@ NotShared<T> NativeValueTraits<NotShared
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-NotShared<T> NativeValueTraits<NotShared<T>>::ArgumentValue(
|
||||
- v8::Isolate* isolate,
|
||||
- int argument_index,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+NotShared<T> NativeValueTraits<
|
||||
+ NotShared<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return ArgumentValueImpl<
|
||||
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||
@@ -727,11 +728,12 @@ NotShared<T> NativeValueTraits<NotShared
|
||||
// [AllowShared] ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-MaybeShared<T> NativeValueTraits<MaybeShared<T>>::NativeValue(
|
||||
- v8::Isolate* isolate,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+MaybeShared<T> NativeValueTraits<
|
||||
+ MaybeShared<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ NativeValue(v8::Isolate* isolate,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return NativeValueImpl<RecipeTrait<MaybeShared<T>>,
|
||||
ToDOMViewType<T, kMaybeShared>,
|
||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||
@@ -740,12 +742,13 @@ MaybeShared<T> NativeValueTraits<MaybeSh
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-MaybeShared<T> NativeValueTraits<MaybeShared<T>>::ArgumentValue(
|
||||
- v8::Isolate* isolate,
|
||||
- int argument_index,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+MaybeShared<T> NativeValueTraits<
|
||||
+ MaybeShared<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return ArgumentValueImpl<RecipeTrait<MaybeShared<T>>,
|
||||
ToDOMViewType<T, kMaybeShared>,
|
||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||
@@ -756,12 +759,12 @@ MaybeShared<T> NativeValueTraits<MaybeSh
|
||||
// [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-MaybeShared<T>
|
||||
-NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>::NativeValue(
|
||||
- v8::Isolate* isolate,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+MaybeShared<T> NativeValueTraits<
|
||||
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ NativeValue(v8::Isolate* isolate,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return NativeValueImpl<
|
||||
RecipeTrait<MaybeShared<T>>, ToDOMViewType<T, kMaybeShared>,
|
||||
Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck,
|
||||
@@ -770,12 +773,13 @@ NativeValueTraits<IDLBufferSourceTypeNoS
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-MaybeShared<T> NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<
|
||||
- MaybeShared<T>>>::ArgumentValue(v8::Isolate* isolate,
|
||||
- int argument_index,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+MaybeShared<T> NativeValueTraits<
|
||||
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return ArgumentValueImpl<
|
||||
RecipeTrait<MaybeShared<T>>, ToDOMViewType<T, kMaybeShared>,
|
||||
Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck,
|
||||
@@ -786,11 +790,12 @@ MaybeShared<T> NativeValueTraits<IDLBuff
|
||||
// Nullable ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-NotShared<T> NativeValueTraits<IDLNullable<NotShared<T>>>::NativeValue(
|
||||
- v8::Isolate* isolate,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+NotShared<T> NativeValueTraits<
|
||||
+ IDLNullable<NotShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ NativeValue(v8::Isolate* isolate,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return NativeValueImpl<
|
||||
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||
@@ -799,12 +804,13 @@ NotShared<T> NativeValueTraits<IDLNullab
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-NotShared<T> NativeValueTraits<IDLNullable<NotShared<T>>>::ArgumentValue(
|
||||
- v8::Isolate* isolate,
|
||||
- int argument_index,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+NotShared<T> NativeValueTraits<
|
||||
+ IDLNullable<NotShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return ArgumentValueImpl<
|
||||
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||
@@ -815,11 +821,12 @@ NotShared<T> NativeValueTraits<IDLNullab
|
||||
// Nullable [AllowShared] ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-MaybeShared<T> NativeValueTraits<IDLNullable<MaybeShared<T>>>::NativeValue(
|
||||
- v8::Isolate* isolate,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+MaybeShared<T> NativeValueTraits<
|
||||
+ IDLNullable<MaybeShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ NativeValue(v8::Isolate* isolate,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return NativeValueImpl<RecipeTrait<MaybeShared<T>>,
|
||||
ToDOMViewType<T, kMaybeShared>,
|
||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||
@@ -828,12 +835,13 @@ MaybeShared<T> NativeValueTraits<IDLNull
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-MaybeShared<T> NativeValueTraits<IDLNullable<MaybeShared<T>>>::ArgumentValue(
|
||||
- v8::Isolate* isolate,
|
||||
- int argument_index,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+MaybeShared<T> NativeValueTraits<
|
||||
+ IDLNullable<MaybeShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
+ ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return ArgumentValueImpl<RecipeTrait<MaybeShared<T>>,
|
||||
ToDOMViewType<T, kMaybeShared>,
|
||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||
@@ -844,9 +852,9 @@ MaybeShared<T> NativeValueTraits<IDLNull
|
||||
// Nullable [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-MaybeShared<T>
|
||||
-NativeValueTraits<IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>::
|
||||
+MaybeShared<T> NativeValueTraits<
|
||||
+ IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||
ArgumentValue(v8::Isolate* isolate,
|
||||
int argument_index,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -861,11 +869,13 @@ NativeValueTraits<IDLNullable<IDLBufferS
|
||||
// [AllowShared, FlexibleArrayBufferView] ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||
-T NativeValueTraits<T>::ArgumentValue(v8::Isolate* isolate,
|
||||
- int argument_index,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+T NativeValueTraits<T,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
||||
+ ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return ArgumentValueImpl<RecipeTrait<T>, ToFlexibleArrayBufferView,
|
||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||
ResizableAllowance::kDisallowResizable,
|
||||
@@ -877,12 +887,13 @@ T NativeValueTraits<T>::ArgumentValue(v8
|
||||
// ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||
-T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>>::ArgumentValue(
|
||||
- v8::Isolate* isolate,
|
||||
- int argument_index,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
||||
+ ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return ArgumentValueImpl<
|
||||
RecipeTrait<T>, ToFlexibleArrayBufferView, Nullablity::kIsNotNullable,
|
||||
BufferSizeCheck::kDoNotCheck, ResizableAllowance::kDisallowResizable,
|
||||
@@ -893,12 +904,13 @@ T NativeValueTraits<IDLBufferSourceTypeN
|
||||
// Nullable [AllowShared, FlexibleArrayBufferView] ArrayBufferView
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||
-T NativeValueTraits<IDLNullable<T>>::ArgumentValue(
|
||||
- v8::Isolate* isolate,
|
||||
- int argument_index,
|
||||
- v8::Local<v8::Value> value,
|
||||
- ExceptionState& exception_state) {
|
||||
+T NativeValueTraits<IDLNullable<T>,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
||||
+ ArgumentValue(v8::Isolate* isolate,
|
||||
+ int argument_index,
|
||||
+ v8::Local<v8::Value> value,
|
||||
+ ExceptionState& exception_state) {
|
||||
return ArgumentValueImpl<RecipeTrait<T>, ToFlexibleArrayBufferView,
|
||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||
ResizableAllowance::kDisallowResizable,
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
||||
@@ -5,9 +5,7 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_
|
||||
|
||||
-#include <concepts>
|
||||
#include <optional>
|
||||
-#include <type_traits>
|
||||
|
||||
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits.h"
|
||||
@@ -718,8 +716,9 @@ struct CORE_EXPORT NativeValueTraits<
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-struct NativeValueTraits<T> {
|
||||
+struct NativeValueTraits<
|
||||
+ T,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>> {
|
||||
// NotShared<T> or MaybeShared<T> should be used instead.
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -731,8 +730,9 @@ struct NativeValueTraits<T> {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-struct NativeValueTraits<IDLNullable<T>> {
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>> {
|
||||
// NotShared<T> or MaybeShared<T> should be used instead.
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -744,8 +744,9 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-struct NativeValueTraits<NotShared<T>>
|
||||
+struct NativeValueTraits<
|
||||
+ NotShared<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||
: public NativeValueTraitsBase<NotShared<T>> {
|
||||
static NotShared<T> NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -758,8 +759,9 @@ struct NativeValueTraits<NotShared<T>>
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-struct NativeValueTraits<IDLNullable<NotShared<T>>>
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<NotShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||
: public NativeValueTraitsBase<NotShared<T>> {
|
||||
static NotShared<T> NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -772,8 +774,9 @@ struct NativeValueTraits<IDLNullable<Not
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-struct NativeValueTraits<MaybeShared<T>>
|
||||
+struct NativeValueTraits<
|
||||
+ MaybeShared<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||
: public NativeValueTraitsBase<MaybeShared<T>> {
|
||||
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -786,8 +789,9 @@ struct NativeValueTraits<MaybeShared<T>>
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-struct NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>
|
||||
+struct NativeValueTraits<
|
||||
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||
: public NativeValueTraitsBase<MaybeShared<T>> {
|
||||
// FlexibleArrayBufferView uses this in its implementation, so we cannot
|
||||
// delete it.
|
||||
@@ -802,8 +806,9 @@ struct NativeValueTraits<IDLBufferSource
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
-struct NativeValueTraits<IDLNullable<MaybeShared<T>>>
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<MaybeShared<T>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||
: public NativeValueTraitsBase<MaybeShared<T>> {
|
||||
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -816,9 +821,9 @@ struct NativeValueTraits<IDLNullable<May
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, DOMArrayBufferView>
|
||||
struct NativeValueTraits<
|
||||
- IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>
|
||||
+ IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>,
|
||||
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||
: public NativeValueTraitsBase<MaybeShared<T>> {
|
||||
// BufferSourceTypeNoSizeLimit must be used only as arguments.
|
||||
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
||||
@@ -832,8 +837,11 @@ struct NativeValueTraits<
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
|
||||
+struct NativeValueTraits<
|
||||
+ T,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T> {
|
||||
// FlexibleArrayBufferView must be used only as arguments.
|
||||
static T NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -846,8 +854,10 @@ struct NativeValueTraits<T> : public Nat
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||
-struct NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>>
|
||||
+struct NativeValueTraits<
|
||||
+ IDLBufferSourceTypeNoSizeLimit<T>,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
||||
: public NativeValueTraitsBase<T> {
|
||||
// BufferSourceTypeNoSizeLimit and FlexibleArrayBufferView must be used only
|
||||
// as arguments.
|
||||
@@ -862,8 +872,11 @@ struct NativeValueTraits<IDLBufferSource
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T> {
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<T>,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T> {
|
||||
// FlexibleArrayBufferView must be used only as arguments.
|
||||
static T NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -1199,8 +1212,9 @@ NativeValueTraits<IDLSequence<T>>::Nativ
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
- requires NativeValueTraits<IDLSequence<T>>::has_null_value
|
||||
-struct NativeValueTraits<IDLNullable<IDLSequence<T>>>
|
||||
+struct NativeValueTraits<IDLNullable<IDLSequence<T>>,
|
||||
+ typename std::enable_if_t<
|
||||
+ NativeValueTraits<IDLSequence<T>>::has_null_value>>
|
||||
: public NativeValueTraitsBase<HeapVector<AddMemberIfNeeded<T>>*> {
|
||||
using ImplType = typename NativeValueTraits<IDLSequence<T>>::ImplType*;
|
||||
|
||||
@@ -1276,8 +1290,9 @@ struct NativeValueTraits<IDLArray<T>>
|
||||
: public NativeValueTraits<IDLSequence<T>> {};
|
||||
|
||||
template <typename T>
|
||||
- requires NativeValueTraits<IDLSequence<T>>::has_null_value
|
||||
-struct NativeValueTraits<IDLNullable<IDLArray<T>>>
|
||||
+struct NativeValueTraits<IDLNullable<IDLArray<T>>,
|
||||
+ typename std::enable_if_t<
|
||||
+ NativeValueTraits<IDLSequence<T>>::has_null_value>>
|
||||
: public NativeValueTraits<IDLNullable<IDLSequence<T>>> {};
|
||||
|
||||
// Record types
|
||||
@@ -1407,8 +1422,10 @@ struct NativeValueTraits<IDLRecord<K, V>
|
||||
|
||||
// Callback function types
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, CallbackFunctionBase>
|
||||
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||
+struct NativeValueTraits<
|
||||
+ T,
|
||||
+ typename std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T*> {
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
ExceptionState& exception_state) {
|
||||
@@ -1431,8 +1448,9 @@ struct NativeValueTraits<T> : public Nat
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, CallbackFunctionBase>
|
||||
-struct NativeValueTraits<IDLNullable<T>>
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
|
||||
: public NativeValueTraitsBase<IDLNullable<T>> {
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -1461,8 +1479,10 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||
|
||||
// Callback interface types
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, CallbackInterfaceBase>
|
||||
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||
+struct NativeValueTraits<
|
||||
+ T,
|
||||
+ typename std::enable_if_t<std::is_base_of<CallbackInterfaceBase, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T*> {
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
ExceptionState& exception_state) {
|
||||
@@ -1486,8 +1506,9 @@ struct NativeValueTraits<T> : public Nat
|
||||
|
||||
// Interface types
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, CallbackInterfaceBase>
|
||||
-struct NativeValueTraits<IDLNullable<T>>
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<CallbackInterfaceBase, T>::value>>
|
||||
: public NativeValueTraitsBase<IDLNullable<T>> {
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -1516,8 +1537,11 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||
|
||||
// Dictionary types
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, bindings::DictionaryBase>
|
||||
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||
+struct NativeValueTraits<
|
||||
+ T,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<bindings::DictionaryBase, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T*> {
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
ExceptionState& exception_state) {
|
||||
@@ -1528,11 +1552,14 @@ struct NativeValueTraits<T> : public Nat
|
||||
// We don't support nullable dictionary types in general since it's quite
|
||||
// confusing and often misused.
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, bindings::DictionaryBase> &&
|
||||
- (std::same_as<T, GPUColorTargetState> ||
|
||||
- std::same_as<T, GPURenderPassColorAttachment> ||
|
||||
- std::same_as<T, GPUVertexBufferLayout>)
|
||||
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T*> {
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<T>,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<bindings::DictionaryBase, T>::value &&
|
||||
+ (std::is_same<T, GPUColorTargetState>::value ||
|
||||
+ std::is_same<T, GPURenderPassColorAttachment>::value ||
|
||||
+ std::is_same<T, GPUVertexBufferLayout>::value)>>
|
||||
+ : public NativeValueTraitsBase<T*> {
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
ExceptionState& exception_state) {
|
||||
@@ -1544,8 +1571,11 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||
|
||||
// Enumeration types
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, bindings::EnumerationBase>
|
||||
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
|
||||
+struct NativeValueTraits<
|
||||
+ T,
|
||||
+ typename std::enable_if_t<
|
||||
+ std::is_base_of<bindings::EnumerationBase, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T> {
|
||||
static T NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
ExceptionState& exception_state) {
|
||||
@@ -1555,8 +1585,10 @@ struct NativeValueTraits<T> : public Nat
|
||||
|
||||
// Interface types
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, ScriptWrappable>
|
||||
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||
+struct NativeValueTraits<
|
||||
+ T,
|
||||
+ typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T*> {
|
||||
// This signifies that CreateIDLSequenceFromV8ArraySlow() may apply
|
||||
// certain optimization based on assumptions about `NativeValue()`
|
||||
// implementation below. For subclasses of ScriptWrappable that have
|
||||
@@ -1593,8 +1625,9 @@ struct NativeValueTraits<T> : public Nat
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, ScriptWrappable>
|
||||
-struct NativeValueTraits<IDLNullable<T>>
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
|
||||
: public NativeValueTraitsBase<IDLNullable<T>> {
|
||||
static inline T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
@@ -1629,8 +1662,10 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, bindings::UnionBase>
|
||||
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||
+struct NativeValueTraits<
|
||||
+ T,
|
||||
+ typename std::enable_if_t<std::is_base_of<bindings::UnionBase, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T*> {
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
ExceptionState& exception_state) {
|
||||
@@ -1646,8 +1681,10 @@ struct NativeValueTraits<T> : public Nat
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::derived_from<T, bindings::UnionBase>
|
||||
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T*> {
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<T>,
|
||||
+ typename std::enable_if_t<std::is_base_of<bindings::UnionBase, T>::value>>
|
||||
+ : public NativeValueTraitsBase<T*> {
|
||||
static T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
ExceptionState& exception_state) {
|
||||
@@ -1668,8 +1705,9 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||
|
||||
// Nullable types
|
||||
template <typename InnerType>
|
||||
- requires(!NativeValueTraits<InnerType>::has_null_value)
|
||||
-struct NativeValueTraits<IDLNullable<InnerType>>
|
||||
+struct NativeValueTraits<
|
||||
+ IDLNullable<InnerType>,
|
||||
+ typename std::enable_if_t<!NativeValueTraits<InnerType>::has_null_value>>
|
||||
: public NativeValueTraitsBase<IDLNullable<InnerType>> {
|
||||
// https://webidl.spec.whatwg.org/#es-nullable-type
|
||||
using ImplType =
|
||||
@@ -1701,8 +1739,9 @@ struct NativeValueTraits<IDLNullable<IDL
|
||||
|
||||
// Optional types
|
||||
template <typename T>
|
||||
- requires std::is_arithmetic_v<typename NativeValueTraits<T>::ImplType>
|
||||
-struct NativeValueTraits<IDLOptional<T>>
|
||||
+struct NativeValueTraits<IDLOptional<T>,
|
||||
+ typename std::enable_if_t<std::is_arithmetic<
|
||||
+ typename NativeValueTraits<T>::ImplType>::value>>
|
||||
: public NativeValueTraitsBase<typename NativeValueTraits<T>::ImplType> {
|
||||
using ImplType = typename NativeValueTraits<T>::ImplType;
|
||||
|
||||
@@ -1724,8 +1763,9 @@ struct NativeValueTraits<IDLOptional<T>>
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
- requires std::is_pointer_v<typename NativeValueTraits<T>::ImplType>
|
||||
-struct NativeValueTraits<IDLOptional<T>>
|
||||
+struct NativeValueTraits<IDLOptional<T>,
|
||||
+ typename std::enable_if_t<std::is_pointer<
|
||||
+ typename NativeValueTraits<T>::ImplType>::value>>
|
||||
: public NativeValueTraitsBase<typename NativeValueTraits<T>::ImplType> {
|
||||
using ImplType = typename NativeValueTraits<T>::ImplType;
|
||||
|
||||
144
chromium-125-el-NativeValueTraits-p2.patch
Normal file
144
chromium-125-el-NativeValueTraits-p2.patch
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
revert as workaround for compiler error with old clang < 17
|
||||
|
||||
commit ce71348a09f6689dd01a68db64b172191d0182d8
|
||||
Author: Andrey Kosyakov <caseq@chromium.org>
|
||||
Date: Thu Dec 21 18:38:38 2023 +0000
|
||||
|
||||
[bindings] Use v8::Array::Iterate for converting script wrappables
|
||||
|
||||
|
||||
This changes CreateIDLSequenceFromV8Array to use the new
|
||||
v8::Array::Iterate() operation.
|
||||
This speeds up the "execBundles" part of the microbenchmark
|
||||
at crbug.com/dawn/1858 by around 3x.
|
||||
This depends on crrev.com/c/4846594 landing (and rolling) first.
|
||||
|
||||
This is a slight re-work of https://crrev.com/c/4847447/3,
|
||||
originally by jkummerow@chromium.org
|
||||
|
||||
Bug: v8:14218, dawn:1858, 1511239
|
||||
Change-Id: Ia266556d05b4d53e6942e12609d1c08882b4ff0f
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5132129
|
||||
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
|
||||
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1240236}
|
||||
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h 2024-05-13 20:23:41.165774029 +0200
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h 2024-05-13 20:27:58.994663485 +0200
|
||||
@@ -110,12 +110,6 @@ struct NativeValueTraitsBase<
|
||||
static constexpr bool has_null_value =
|
||||
bindings::NativeValueTraitsHasNullValue<ImplType>::value;
|
||||
|
||||
- // This should only be true for certain subclasses of ScriptWrappable
|
||||
- // that satisfy the assumptions of CreateIDLSequenceFromV8ArraySlow() with
|
||||
- // regards to how NativeValue() is implemented for the underlying type.
|
||||
- static constexpr bool supports_scriptwrappable_specific_fast_array_iteration =
|
||||
- false;
|
||||
-
|
||||
template <typename... ExtraArgs>
|
||||
static decltype(auto) ArgumentValue(v8::Isolate* isolate,
|
||||
int argument_index,
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h 2024-05-13 20:23:47.295915837 +0200
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h 2024-05-13 20:27:21.649808564 +0200
|
||||
@@ -1050,87 +1050,11 @@ CreateIDLSequenceFromV8ArraySlow(v8::Iso
|
||||
return {};
|
||||
}
|
||||
|
||||
- using ResultType = typename NativeValueTraits<IDLSequence<T>>::ImplType;
|
||||
- ResultType result;
|
||||
+ typename NativeValueTraits<IDLSequence<T>>::ImplType result;
|
||||
result.ReserveInitialCapacity(length);
|
||||
v8::Local<v8::Context> current_context = isolate->GetCurrentContext();
|
||||
v8::TryCatch try_block(isolate);
|
||||
|
||||
- // Fast path -- we're creating a sequence of script wrappables, which can be
|
||||
- // done by directly getting underlying object as long as array types are
|
||||
- // homogeneous. With ScriptWrappables, we don't expect to enter JS during
|
||||
- // iteration, so we can rely on v8::Array::Iterate() which is much faster than
|
||||
- // iterating an array on the client side of the v8. Additionally, for most
|
||||
- // subsptyes of ScriptWrappables, we can speed up type checks (see more on
|
||||
- // that below next to supports_scriptwrappable_specific_fast_array_iteration
|
||||
- // check.
|
||||
- if constexpr (std::is_base_of_v<ScriptWrappable, T>) {
|
||||
- struct CallbackData {
|
||||
- STACK_ALLOCATED();
|
||||
-
|
||||
- public:
|
||||
- v8::Isolate* isolate;
|
||||
- v8::TypecheckWitness witness;
|
||||
- ResultType& result;
|
||||
- ExceptionState& exception_state;
|
||||
- CallbackData(v8::Isolate* isolate,
|
||||
- ResultType& result,
|
||||
- ExceptionState& exception_state)
|
||||
- : isolate(isolate),
|
||||
- witness(isolate),
|
||||
- result(result),
|
||||
- exception_state(exception_state) {}
|
||||
- };
|
||||
-
|
||||
- CallbackData callback_data(isolate, result, exception_state);
|
||||
- v8::Array::IterationCallback callback = [](uint32_t index,
|
||||
- v8::Local<v8::Value> v8_element,
|
||||
- void* data) {
|
||||
- CallbackData* callback_data = reinterpret_cast<CallbackData*>(data);
|
||||
- v8::Isolate* isolate = callback_data->isolate;
|
||||
- // 3.4. Initialize Si to the result of converting nextItem to an IDL value
|
||||
- // of type T.
|
||||
- v8::TypecheckWitness& witness = callback_data->witness;
|
||||
- // We can speed up type check by taking advantage of V8's type witness,
|
||||
- // provided traits' NativeValue implementation doesn't have additional
|
||||
- // logic beyond checking the type and calling ToScriptWrappable().
|
||||
- if constexpr (
|
||||
- NativeValueTraits<
|
||||
- T>::supports_scriptwrappable_specific_fast_array_iteration) {
|
||||
- if (witness.Matches(v8_element)) {
|
||||
- auto&& value = ToScriptWrappable(isolate, v8_element.As<v8::Object>())
|
||||
- ->template ToImpl<T>();
|
||||
- callback_data->result.push_back(std::move(value));
|
||||
- return v8::Array::CallbackResult::kContinue;
|
||||
- }
|
||||
- }
|
||||
- auto&& element = NativeValueTraits<T>::NativeValue(
|
||||
- isolate, v8_element, callback_data->exception_state);
|
||||
- if (callback_data->exception_state.HadException()) {
|
||||
- // It doesn't matter whether we return `kException` or `kBreak` here,
|
||||
- // as that only affects the return value of `v8_array->Iterate()`,
|
||||
- // which we are ignoring.
|
||||
- return v8::Array::CallbackResult::kException;
|
||||
- }
|
||||
- if constexpr (
|
||||
- NativeValueTraits<
|
||||
- T>::supports_scriptwrappable_specific_fast_array_iteration) {
|
||||
- witness.Update(v8_element);
|
||||
- }
|
||||
- callback_data->result.push_back(std::move(element));
|
||||
- return v8::Array::CallbackResult::kContinue;
|
||||
- };
|
||||
- if (!v8_array->Iterate(current_context, callback, &callback_data)
|
||||
- .IsJust()) {
|
||||
- if (try_block.HasCaught()) {
|
||||
- exception_state.RethrowV8Exception(try_block.Exception());
|
||||
- }
|
||||
- DCHECK(exception_state.HadException());
|
||||
- return {};
|
||||
- }
|
||||
- return result;
|
||||
- }
|
||||
-
|
||||
// Array length may change if array is mutated during iteration.
|
||||
for (uint32_t i = 0; i < v8_array->Length(); ++i) {
|
||||
v8::Local<v8::Value> v8_element;
|
||||
@@ -1590,12 +1514,6 @@ struct NativeValueTraits<
|
||||
T,
|
||||
typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
|
||||
: public NativeValueTraitsBase<T*> {
|
||||
- // This signifies that CreateIDLSequenceFromV8ArraySlow() may apply
|
||||
- // certain optimization based on assumptions about `NativeValue()`
|
||||
- // implementation below. For subclasses of ScriptWrappable that have
|
||||
- // different implementation of NativeValue(), this should remain false.
|
||||
- static constexpr bool supports_scriptwrappable_specific_fast_array_iteration =
|
||||
- true;
|
||||
|
||||
static inline T* NativeValue(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> value,
|
||||
24
chromium-125-el7-assert.patch
Normal file
24
chromium-125-el7-assert.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -up chromium-125.0.6422.60/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h.assert chromium-125.0.6422.60/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h
|
||||
--- chromium-125.0.6422.60/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h.assert 2024-05-18 19:33:37.165243577 +0200
|
||||
+++ chromium-125.0.6422.60/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h 2024-05-18 19:45:51.224995489 +0200
|
||||
@@ -185,7 +185,7 @@ class WebUIContentsWrapperT : public Web
|
||||
supports_draggable_regions,
|
||||
T::GetWebUIName()),
|
||||
webui_url_(webui_url) {
|
||||
- static_assert(
|
||||
+ assert(
|
||||
views_metrics::IsValidWebUINameVariant("." + T::GetWebUIName()));
|
||||
if (is_ready_to_show()) {
|
||||
CHECK(GetWebUIController());
|
||||
diff -up chromium-125.0.6422.60/v8/src/base/small-vector.h.assert chromium-125.0.6422.60/v8/src/base/small-vector.h
|
||||
--- chromium-125.0.6422.60/v8/src/base/small-vector.h.assert 2024-05-15 23:48:18.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/v8/src/base/small-vector.h 2024-05-17 12:33:58.745651173 +0200
|
||||
@@ -22,7 +22,7 @@ template <typename T, size_t kSize, type
|
||||
class SmallVector {
|
||||
// Currently only support trivially copyable and trivially destructible data
|
||||
// types, as it uses memcpy to copy elements and never calls destructors.
|
||||
- ASSERT_TRIVIALLY_COPYABLE(T);
|
||||
+ //ASSERT_TRIVIALLY_COPYABLE(T);
|
||||
static_assert(std::is_trivially_destructible<T>::value);
|
||||
|
||||
public:
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
diff -up chromium-125.0.6422.60/components/variations/service/ui_string_overrider.cc.default-constructor-involving-anonymous-union chromium-125.0.6422.60/components/variations/service/ui_string_overrider.cc
|
||||
--- chromium-125.0.6422.60/components/variations/service/ui_string_overrider.cc.default-constructor-involving-anonymous-union 2024-05-15 23:46:17.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/components/variations/service/ui_string_overrider.cc 2024-05-17 12:33:58.684649909 +0200
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace variations {
|
||||
|
||||
-UIStringOverrider::UIStringOverrider() = default;
|
||||
+UIStringOverrider::UIStringOverrider() {}
|
||||
|
||||
UIStringOverrider::UIStringOverrider(base::span<const uint32_t> resource_hashes,
|
||||
base::span<const int> resource_indices)
|
||||
diff -up chromium-125.0.6422.60/content/browser/interest_group/header_direct_from_seller_signals.cc.default-constructor-involving-anonymous-union chromium-125.0.6422.60/content/browser/interest_group/header_direct_from_seller_signals.cc
|
||||
--- chromium-125.0.6422.60/content/browser/interest_group/header_direct_from_seller_signals.cc.default-constructor-involving-anonymous-union 2024-05-15 23:46:17.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/content/browser/interest_group/header_direct_from_seller_signals.cc 2024-05-17 12:33:58.685649929 +0200
|
||||
@@ -46,7 +46,7 @@ size_t GetResultSizeBytes(const HeaderDi
|
||||
|
||||
} // namespace
|
||||
|
||||
-HeaderDirectFromSellerSignals::Result::Result() = default;
|
||||
+HeaderDirectFromSellerSignals::Result::Result() {}
|
||||
|
||||
HeaderDirectFromSellerSignals::Result::Result(
|
||||
std::optional<std::string> seller_signals,
|
||||
diff -up chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/frozen_array.h.default-constructor-involving-anonymous-union chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/frozen_array.h
|
||||
--- chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/frozen_array.h.default-constructor-involving-anonymous-union 2024-05-18 09:52:22.385330304 +0200
|
||||
+++ chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/frozen_array.h 2024-05-18 09:52:51.023891525 +0200
|
||||
@@ -36,7 +36,7 @@ class FrozenArray final : public binding
|
||||
using const_iterator = typename VectorType::const_iterator;
|
||||
using const_reverse_iterator = typename VectorType::const_reverse_iterator;
|
||||
|
||||
- FrozenArray() = default;
|
||||
+ FrozenArray() {}
|
||||
explicit FrozenArray(VectorType array) : array_(std::move(array)) {}
|
||||
~FrozenArray() override = default;
|
||||
|
||||
18
chromium-125-el7-old-libdrm.patch
Normal file
18
chromium-125-el7-old-libdrm.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
diff -up chromium-125.0.6422.60/ui/gfx/linux/drm_util_linux.cc.el7-old-libdrm chromium-125.0.6422.60/ui/gfx/linux/drm_util_linux.cc
|
||||
--- chromium-125.0.6422.60/ui/gfx/linux/drm_util_linux.cc.el7-old-libdrm 2024-05-16 20:43:26.619455300 +0200
|
||||
+++ chromium-125.0.6422.60/ui/gfx/linux/drm_util_linux.cc 2024-05-16 20:45:18.120716278 +0200
|
||||
@@ -9,6 +9,14 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/notreached.h"
|
||||
|
||||
+// the libdrm in EL-7 is too old to have this define
|
||||
+#ifndef DRM_FORMAT_P010
|
||||
+#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0')
|
||||
+#endif
|
||||
+#ifndef DRM_FORMAT_ABGR16161616F
|
||||
+#define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H')
|
||||
+#endif
|
||||
+
|
||||
namespace ui {
|
||||
|
||||
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format) {
|
||||
11
chromium-125-el7-optional-workaround-assert.patch
Normal file
11
chromium-125-el7-optional-workaround-assert.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- chromium-125.0.6422.60/optional.orig 2024-05-20 00:12:50.152306289 +0200
|
||||
+++ chromium-125.0.6422.60/optional 2024-05-20 00:12:28.041823631 +0200
|
||||
@@ -474,7 +474,7 @@
|
||||
constexpr _Tp&
|
||||
_M_get() noexcept
|
||||
{
|
||||
- __glibcxx_assert(this->_M_is_engaged());
|
||||
+ //__glibcxx_assert(this->_M_is_engaged());
|
||||
return static_cast<_Dp*>(this)->_M_payload._M_get();
|
||||
}
|
||||
|
||||
417
chromium-125-el7-typename.patch
Normal file
417
chromium-125-el7-typename.patch
Normal file
|
|
@ -0,0 +1,417 @@
|
|||
diff -up chromium-125.0.6422.60/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.typename chromium-125.0.6422.60/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h
|
||||
--- chromium-125.0.6422.60/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.typename 2024-05-15 23:45:49.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h 2024-05-17 12:33:58.735650966 +0200
|
||||
@@ -26,7 +26,7 @@ PartitionRoot& InternalAllocatorRoot();
|
||||
|
||||
// A class that meets C++ named requirements, Allocator.
|
||||
template <typename T>
|
||||
-InternalAllocator<T>::value_type* InternalAllocator<T>::allocate(
|
||||
+typename InternalAllocator<T>::value_type* InternalAllocator<T>::allocate(
|
||||
std::size_t count) {
|
||||
PA_CHECK(count <=
|
||||
std::numeric_limits<std::size_t>::max() / sizeof(value_type));
|
||||
diff -up chromium-125.0.6422.60/base/containers/heap_array.h.typename chromium-125.0.6422.60/base/containers/heap_array.h
|
||||
--- chromium-125.0.6422.60/base/containers/heap_array.h.typename 2024-05-17 13:51:39.923426461 +0200
|
||||
+++ chromium-125.0.6422.60/base/containers/heap_array.h 2024-05-17 13:54:01.866085730 +0200
|
||||
@@ -32,8 +32,8 @@ class TRIVIAL_ABI GSL_OWNER HeapArray {
|
||||
static_assert(!std::is_reference_v<T>,
|
||||
"HeapArray cannot hold reference types");
|
||||
|
||||
- using iterator = base::span<T>::iterator;
|
||||
- using const_iterator = base::span<const T>::iterator;
|
||||
+ using iterator = typename base::span<T>::iterator;
|
||||
+ using const_iterator = typename base::span<const T>::iterator;
|
||||
// We don't put this default value in the template parameter list to allow the
|
||||
// static_assert on is_reference_v to give a nicer error message.
|
||||
using deleter_type = std::
|
||||
diff -up chromium-125.0.6422.60/base/containers/map_util.h.typename chromium-125.0.6422.60/base/containers/map_util.h
|
||||
--- chromium-125.0.6422.60/base/containers/map_util.h.typename 2024-05-15 23:45:49.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/base/containers/map_util.h 2024-05-17 12:33:58.735650966 +0200
|
||||
@@ -44,7 +44,7 @@ constexpr internal::MappedType<Map>* Fin
|
||||
template <typename Map,
|
||||
typename Key,
|
||||
typename MappedElementType =
|
||||
- std::pointer_traits<internal::MappedType<Map>>::element_type>
|
||||
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
|
||||
constexpr const MappedElementType* FindPtrOrNull(const Map& map,
|
||||
const Key& key) {
|
||||
auto it = map.find(key);
|
||||
@@ -60,7 +60,7 @@ constexpr const MappedElementType* FindP
|
||||
template <typename Map,
|
||||
typename Key,
|
||||
typename MappedElementType =
|
||||
- std::pointer_traits<internal::MappedType<Map>>::element_type>
|
||||
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
|
||||
constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) {
|
||||
auto it = map.find(key);
|
||||
return it != map.end() ? base::to_address(it->second) : nullptr;
|
||||
diff -up chromium-125.0.6422.60/base/containers/to_vector.h.typename chromium-125.0.6422.60/base/containers/to_vector.h
|
||||
--- chromium-125.0.6422.60/base/containers/to_vector.h.typename 2024-05-15 23:45:49.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/base/containers/to_vector.h 2024-05-17 12:33:58.736650987 +0200
|
||||
@@ -30,7 +30,7 @@ template <typename Range, typename Proj
|
||||
std::indirectly_unary_invocable<Proj, ranges::iterator_t<Range>>
|
||||
auto ToVector(Range&& range, Proj proj = {}) {
|
||||
using ProjectedType =
|
||||
- std::projected<ranges::iterator_t<Range>, Proj>::value_type;
|
||||
+ typename std::projected<ranges::iterator_t<Range>, Proj>::value_type;
|
||||
std::vector<ProjectedType> container;
|
||||
container.reserve(std::size(range));
|
||||
ranges::transform(std::forward<Range>(range), std::back_inserter(container),
|
||||
diff -up chromium-125.0.6422.60/base/functional/bind_internal.h.typename chromium-125.0.6422.60/base/functional/bind_internal.h
|
||||
--- chromium-125.0.6422.60/base/functional/bind_internal.h.typename 2024-05-15 23:45:49.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/base/functional/bind_internal.h 2024-05-17 12:33:58.736650987 +0200
|
||||
@@ -1505,11 +1505,11 @@ template <int i,
|
||||
typename Param>
|
||||
struct ParamCanBeBound {
|
||||
private:
|
||||
- using UnwrappedParam = BindArgument<i>::template ForwardedAs<
|
||||
+ using UnwrappedParam = typename BindArgument<i>::template ForwardedAs<
|
||||
Unwrapped>::template ToParamWithType<Param>;
|
||||
- using ParamStorage = BindArgument<i>::template ToParamWithType<
|
||||
+ using ParamStorage = typename BindArgument<i>::template ToParamWithType<
|
||||
Param>::template StoredAs<Storage>;
|
||||
- using BoundStorage =
|
||||
+ using BoundStorage = typename
|
||||
BindArgument<i>::template BoundAs<Arg>::template StoredAs<Storage>;
|
||||
|
||||
template <bool v = !UnwrappedParam::kRawPtr ||
|
||||
diff -up chromium-125.0.6422.60/base/functional/function_ref.h.typename chromium-125.0.6422.60/base/functional/function_ref.h
|
||||
--- chromium-125.0.6422.60/base/functional/function_ref.h.typename 2024-05-15 23:45:49.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/base/functional/function_ref.h 2024-05-17 12:33:58.736650987 +0200
|
||||
@@ -64,7 +64,7 @@ class FunctionRef;
|
||||
template <typename R, typename... Args>
|
||||
class FunctionRef<R(Args...)> {
|
||||
template <typename Functor,
|
||||
- typename RunType = internal::FunctorTraits<Functor>::RunType>
|
||||
+ typename RunType = typename internal::FunctorTraits<Functor>::RunType>
|
||||
static constexpr bool kCompatibleFunctor =
|
||||
std::convertible_to<internal::ExtractReturnType<RunType>, R> &&
|
||||
std::same_as<internal::ExtractArgs<RunType>, internal::TypeList<Args...>>;
|
||||
diff -up chromium-125.0.6422.60/base/types/fixed_array.h.typename chromium-125.0.6422.60/base/types/fixed_array.h
|
||||
--- chromium-125.0.6422.60/base/types/fixed_array.h.typename 2024-05-15 23:45:50.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/base/types/fixed_array.h 2024-05-17 12:33:58.737651008 +0200
|
||||
@@ -27,8 +27,8 @@ template <typename T,
|
||||
class FixedArray : public absl::FixedArray<T, N, A> {
|
||||
public:
|
||||
using absl::FixedArray<T, N, A>::FixedArray;
|
||||
- explicit FixedArray(absl::FixedArray<T, N, A>::size_type n,
|
||||
- const absl::FixedArray<T, N, A>::allocator_type& a =
|
||||
+ explicit FixedArray(typename absl::FixedArray<T, N, A>::size_type n,
|
||||
+ const typename absl::FixedArray<T, N, A>::allocator_type& a =
|
||||
typename absl::FixedArray<T, N, A>::allocator_type())
|
||||
: FixedArray(n, T(), a) {}
|
||||
};
|
||||
diff -up chromium-125.0.6422.60/chrome/browser/download/bubble/download_bubble_update_service.cc.typename chromium-125.0.6422.60/chrome/browser/download/bubble/download_bubble_update_service.cc
|
||||
--- chromium-125.0.6422.60/chrome/browser/download/bubble/download_bubble_update_service.cc.typename 2024-05-15 23:46:00.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/chrome/browser/download/bubble/download_bubble_update_service.cc 2024-05-17 12:33:58.737651008 +0200
|
||||
@@ -94,7 +94,7 @@ ItemSortKey GetSortKey(const Item& item)
|
||||
// Helper to get an iterator to the last element in the cache. The cache
|
||||
// must not be empty.
|
||||
template <typename Item>
|
||||
-SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
|
||||
+typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
|
||||
CHECK(!cache.empty());
|
||||
auto it = cache.end();
|
||||
return std::prev(it);
|
||||
@@ -1173,9 +1173,9 @@ bool DownloadBubbleUpdateService::CacheM
|
||||
}
|
||||
|
||||
template <typename Id, typename Item>
|
||||
-SortedItems<Item>::iterator
|
||||
+typename SortedItems<Item>::iterator
|
||||
DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter(
|
||||
- SortedItems<Item>::iterator iter,
|
||||
+ typename SortedItems<Item>::iterator iter,
|
||||
SortedItems<Item>& cache,
|
||||
IterMap<Id, Item>& iter_map) {
|
||||
CHECK(iter != cache.end());
|
||||
diff -up chromium-125.0.6422.60/chrome/browser/web_applications/commands/internal/command_internal.h.typename chromium-125.0.6422.60/chrome/browser/web_applications/commands/internal/command_internal.h
|
||||
--- chromium-125.0.6422.60/chrome/browser/web_applications/commands/internal/command_internal.h.typename 2024-05-15 23:46:06.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/chrome/browser/web_applications/commands/internal/command_internal.h 2024-05-17 12:33:58.737651008 +0200
|
||||
@@ -121,7 +121,7 @@ class CommandBase {
|
||||
template <typename LockType>
|
||||
class CommandWithLock : public CommandBase {
|
||||
public:
|
||||
- using LockDescription = LockType::LockDescription;
|
||||
+ using LockDescription = typename LockType::LockDescription;
|
||||
explicit CommandWithLock(const std::string& name,
|
||||
LockDescription initial_lock_request);
|
||||
|
||||
diff -up chromium-125.0.6422.60/chrome/browser/web_applications/commands/web_app_command.h.typename chromium-125.0.6422.60/chrome/browser/web_applications/commands/web_app_command.h
|
||||
--- chromium-125.0.6422.60/chrome/browser/web_applications/commands/web_app_command.h.typename 2024-05-15 23:46:06.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/chrome/browser/web_applications/commands/web_app_command.h 2024-05-17 12:33:58.738651028 +0200
|
||||
@@ -106,7 +106,7 @@ class WebAppLockManager;
|
||||
template <typename LockType, typename... CallbackArgs>
|
||||
class WebAppCommand : public internal::CommandWithLock<LockType> {
|
||||
public:
|
||||
- using LockDescription = LockType::LockDescription;
|
||||
+ using LockDescription = typename LockType::LockDescription;
|
||||
using CallbackType = base::OnceCallback<void(CallbackArgs...)>;
|
||||
using ShutdownArgumentsTuple = std::tuple<std::decay_t<CallbackArgs>...>;
|
||||
|
||||
diff -up chromium-125.0.6422.60/chrome/browser/web_applications/web_app_command_scheduler.h.typename chromium-125.0.6422.60/chrome/browser/web_applications/web_app_command_scheduler.h
|
||||
--- chromium-125.0.6422.60/chrome/browser/web_applications/web_app_command_scheduler.h.typename 2024-05-15 23:46:06.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/chrome/browser/web_applications/web_app_command_scheduler.h 2024-05-17 12:33:58.738651028 +0200
|
||||
@@ -373,7 +373,7 @@ class WebAppCommandScheduler {
|
||||
// command system.
|
||||
template <typename LockType>
|
||||
void ScheduleCallback(const std::string& operation_name,
|
||||
- LockType::LockDescription lock_description,
|
||||
+ typename LockType::LockDescription lock_description,
|
||||
CallbackCommand<LockType, void> callback,
|
||||
base::OnceClosure on_complete,
|
||||
const base::Location& location = FROM_HERE) {
|
||||
@@ -391,7 +391,7 @@ class WebAppCommandScheduler {
|
||||
typename CallbackReturnValue = std::decay_t<CompletionCallbackArg>>
|
||||
void ScheduleCallbackWithResult(
|
||||
const std::string& operation_name,
|
||||
- LockType::LockDescription lock_description,
|
||||
+ typename LockType::LockDescription lock_description,
|
||||
CallbackCommand<LockType, CallbackReturnValue> callback,
|
||||
base::OnceCallback<void(CompletionCallbackArg)> on_complete,
|
||||
CallbackReturnValue arg_for_shutdown,
|
||||
diff -up chromium-125.0.6422.60/components/optimization_guide/core/model_execution/model_execution_util.h.typename chromium-125.0.6422.60/components/optimization_guide/core/model_execution/model_execution_util.h
|
||||
--- chromium-125.0.6422.60/components/optimization_guide/core/model_execution/model_execution_util.h.typename 2024-05-15 23:46:13.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/components/optimization_guide/core/model_execution/model_execution_util.h 2024-05-17 12:33:58.738651028 +0200
|
||||
@@ -26,7 +26,7 @@ void SetExecutionRequestTemplate(
|
||||
|
||||
// Request is set by the feature and should always be typed.
|
||||
auto typed_request =
|
||||
- static_cast<const FeatureType::Request&>(request_metadata);
|
||||
+ static_cast<const typename FeatureType::Request&>(request_metadata);
|
||||
*(logging_data->mutable_request_data()) = typed_request;
|
||||
}
|
||||
|
||||
diff -up chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_log_entry.h
|
||||
--- chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename 2024-05-15 23:46:13.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_log_entry.h 2024-05-17 12:33:58.738651028 +0200
|
||||
@@ -33,7 +33,7 @@ class ModelQualityLogEntry {
|
||||
}
|
||||
|
||||
template <typename FeatureType>
|
||||
- FeatureType::Quality* quality_data() {
|
||||
+ typename FeatureType::Quality* quality_data() {
|
||||
return FeatureType::GetLoggingData(*log_ai_data_request_)
|
||||
->mutable_quality_data();
|
||||
}
|
||||
diff -up chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_util.h.typename chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_util.h
|
||||
--- chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_util.h.typename 2024-05-15 23:46:13.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_util.h 2024-05-17 12:33:58.739651049 +0200
|
||||
@@ -20,7 +20,7 @@ std::optional<UserVisibleFeatureKey> Get
|
||||
// Helper method to get the quality_data from `log_ai_data_request` for
|
||||
// different features.
|
||||
template <typename FeatureType>
|
||||
-FeatureType::Quality* GetModelQualityData(
|
||||
+typename FeatureType::Quality* GetModelQualityData(
|
||||
proto::LogAiDataRequest* log_ai_data_request) {
|
||||
return FeatureType::GetLoggingData(*log_ai_data_request)
|
||||
->mutable_quality_data();
|
||||
diff -up chromium-125.0.6422.60/components/optimization_guide/core/tflite_model_executor.h.typename chromium-125.0.6422.60/components/optimization_guide/core/tflite_model_executor.h
|
||||
--- chromium-125.0.6422.60/components/optimization_guide/core/tflite_model_executor.h.typename 2024-05-15 23:46:13.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/components/optimization_guide/core/tflite_model_executor.h 2024-05-17 12:33:58.739651049 +0200
|
||||
@@ -242,7 +242,7 @@ class TFLiteModelExecutor : public Model
|
||||
void SendForBatchExecution(
|
||||
BatchExecutionCallback callback_on_complete,
|
||||
base::TimeTicks start_time,
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
override {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -264,7 +264,7 @@ class TFLiteModelExecutor : public Model
|
||||
// Starts the synchronous execution of the model. Returns model outputs.
|
||||
// Model needs to be loaded. Synchronous calls do not load or unload model.
|
||||
std::vector<std::optional<OutputType>> SendForBatchExecutionSync(
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
|
||||
override {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -422,7 +422,7 @@ class TFLiteModelExecutor : public Model
|
||||
// executes it on the model execution thread.
|
||||
void LoadModelFileAndBatchExecute(
|
||||
BatchExecutionCallback callback_on_complete,
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
@@ -439,7 +439,7 @@ class TFLiteModelExecutor : public Model
|
||||
|
||||
// Batch executes the loaded model for inputs.
|
||||
void BatchExecuteLoadedModel(
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
|
||||
std::vector<std::optional<OutputType>>* outputs) {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -499,7 +499,7 @@ class TFLiteModelExecutor : public Model
|
||||
// Unloads the model if needed.
|
||||
void BatchExecuteLoadedModelAndRunCallback(
|
||||
BatchExecutionCallback callback_on_complete,
|
||||
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
|
||||
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
|
||||
ExecutionStatus execution_status) {
|
||||
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
diff -up chromium-125.0.6422.60/components/supervised_user/core/browser/proto_fetcher.h.typename chromium-125.0.6422.60/components/supervised_user/core/browser/proto_fetcher.h
|
||||
--- chromium-125.0.6422.60/components/supervised_user/core/browser/proto_fetcher.h.typename 2024-05-15 23:46:15.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/components/supervised_user/core/browser/proto_fetcher.h 2024-05-17 12:33:58.739651049 +0200
|
||||
@@ -458,7 +458,7 @@ class RetryingFetcherImpl final : public
|
||||
RetryingFetcherImpl(const RetryingFetcherImpl&) = delete;
|
||||
RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete;
|
||||
|
||||
- void Start(ProtoFetcher<Response>::Callback callback) override {
|
||||
+ void Start(typename ProtoFetcher<Response>::Callback callback) override {
|
||||
callback_ = std::move(callback);
|
||||
Retry();
|
||||
}
|
||||
@@ -504,7 +504,7 @@ class RetryingFetcherImpl final : public
|
||||
}
|
||||
|
||||
// Client callback.
|
||||
- TypedProtoFetcher<Response>::Callback callback_;
|
||||
+ typename TypedProtoFetcher<Response>::Callback callback_;
|
||||
|
||||
// Retry controls.
|
||||
base::OneShotTimer timer_;
|
||||
@@ -525,7 +525,7 @@ class ParallelFetchManager {
|
||||
// Deferred fetcher is required because it should be started after it is
|
||||
// stored internally.
|
||||
using Fetcher = ProtoFetcher<Response>;
|
||||
- using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
|
||||
+ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
|
||||
|
||||
public:
|
||||
// Provides fresh instances of a deferred fetcher for each fetch.
|
||||
@@ -541,7 +541,7 @@ class ParallelFetchManager {
|
||||
|
||||
// Starts the fetch. Underlying fetcher is stored internally, and will be
|
||||
// cleaned up after finish or when this manager is destroyed.
|
||||
- void Fetch(const Request& request, Fetcher::Callback callback) {
|
||||
+ void Fetch(const Request& request, typename Fetcher::Callback callback) {
|
||||
CHECK(callback) << "Use base::DoNothing() instead of empty callback.";
|
||||
KeyType key = requests_in_flight_.Add(MakeFetcher(request));
|
||||
requests_in_flight_.Lookup(key)->Start(
|
||||
diff -up chromium-125.0.6422.60/mojo/public/cpp/bindings/array_traits.h.typename chromium-125.0.6422.60/mojo/public/cpp/bindings/array_traits.h
|
||||
--- chromium-125.0.6422.60/mojo/public/cpp/bindings/array_traits.h.typename 2024-05-15 23:46:29.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/mojo/public/cpp/bindings/array_traits.h 2024-05-17 12:33:58.739651049 +0200
|
||||
@@ -90,7 +90,7 @@ template <typename Container>
|
||||
{ c[i] } -> std::same_as<typename Container::reference>;
|
||||
}
|
||||
struct ArrayTraits<Container> {
|
||||
- using Element = Container::value_type;
|
||||
+ using Element = typename Container::value_type;
|
||||
|
||||
// vector-like containers have no built-in null.
|
||||
static bool IsNull(const Container& c) { return false; }
|
||||
diff -up chromium-125.0.6422.60/mojo/public/cpp/bindings/type_converter.h.typename chromium-125.0.6422.60/mojo/public/cpp/bindings/type_converter.h
|
||||
--- chromium-125.0.6422.60/mojo/public/cpp/bindings/type_converter.h.typename 2024-05-15 23:46:30.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/mojo/public/cpp/bindings/type_converter.h 2024-05-17 12:33:58.740651070 +0200
|
||||
@@ -127,7 +127,7 @@ using VecValueType = typename Vec::value
|
||||
|
||||
template <typename Vec>
|
||||
using VecPtrLikeUnderlyingValueType =
|
||||
- std::pointer_traits<VecValueType<Vec>>::element_type;
|
||||
+ typename std::pointer_traits<VecValueType<Vec>>::element_type;
|
||||
|
||||
} // namespace internal
|
||||
|
||||
diff -up chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/async_iterable.h
|
||||
--- chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename 2024-05-15 23:46:40.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/async_iterable.h 2024-05-17 12:33:58.740651070 +0200
|
||||
@@ -245,7 +245,7 @@ class PairAsyncIterable {
|
||||
private:
|
||||
virtual IterationSource* CreateIterationSource(
|
||||
ScriptState* script_state,
|
||||
- IterationSource::Kind kind,
|
||||
+ typename IterationSource::Kind kind,
|
||||
InitArgs... args,
|
||||
ExceptionState& exception_state) = 0;
|
||||
};
|
||||
@@ -291,7 +291,7 @@ class ValueAsyncIterable {
|
||||
private:
|
||||
virtual IterationSource* CreateIterationSource(
|
||||
ScriptState* script_state,
|
||||
- IterationSource::Kind kind,
|
||||
+ typename IterationSource::Kind kind,
|
||||
InitArgs... args,
|
||||
ExceptionState& exception_state) = 0;
|
||||
};
|
||||
diff -up chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/script_promise_property.h.typename chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/script_promise_property.h
|
||||
--- chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/script_promise_property.h.typename 2024-05-15 23:46:40.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/script_promise_property.h 2024-05-17 12:33:58.740651070 +0200
|
||||
@@ -171,7 +171,7 @@ class ScriptPromiseProperty final
|
||||
template <typename T>
|
||||
requires std::derived_from<T, bindings::EnumerationBase>
|
||||
static T DefaultPromiseResultValue() {
|
||||
- return T(static_cast<T::Enum>(0));
|
||||
+ return T(static_cast<typename T::Enum>(0));
|
||||
}
|
||||
|
||||
State state_ = kPending;
|
||||
diff -up chromium-125.0.6422.60/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename chromium-125.0.6422.60/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
|
||||
--- chromium-125.0.6422.60/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename 2024-05-15 23:46:41.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2024-05-17 12:33:58.741651090 +0200
|
||||
@@ -210,7 +210,7 @@ class HTMLFastPathParser {
|
||||
using Span = base::span<const Char>;
|
||||
using USpan = base::span<const UChar>;
|
||||
// 32 matches that used by HTMLToken::Attribute.
|
||||
- typedef std::conditional<std::is_same_v<Char, UChar>,
|
||||
+ typedef typename std::conditional<std::is_same_v<Char, UChar>,
|
||||
UCharLiteralBuffer<32>,
|
||||
LCharLiteralBuffer<32>>::type LiteralBufferType;
|
||||
static_assert(std::is_same_v<Char, UChar> || std::is_same_v<Char, LChar>);
|
||||
diff -up chromium-125.0.6422.60/third_party/blink/renderer/core/paint/object_paint_properties.h.typename chromium-125.0.6422.60/third_party/blink/renderer/core/paint/object_paint_properties.h
|
||||
--- chromium-125.0.6422.60/third_party/blink/renderer/core/paint/object_paint_properties.h.typename 2024-05-15 23:46:41.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/third_party/blink/renderer/core/paint/object_paint_properties.h 2024-05-17 12:33:58.741651090 +0200
|
||||
@@ -445,8 +445,8 @@ class CORE_EXPORT ObjectPaintProperties
|
||||
PaintPropertyChangeType Update(
|
||||
NodeId node_id,
|
||||
const ParentType& parent,
|
||||
- NodeType::State&& state,
|
||||
- const NodeType::AnimationState& animation_state =
|
||||
+ typename NodeType::State&& state,
|
||||
+ const typename NodeType::AnimationState& animation_state =
|
||||
NodeType::AnimationState()) {
|
||||
// First, check if we need to add a new node.
|
||||
if (!nodes_.HasField(node_id)) {
|
||||
diff -up chromium-125.0.6422.60/third_party/blink/renderer/platform/wtf/hash_table.h.typename chromium-125.0.6422.60/third_party/blink/renderer/platform/wtf/hash_table.h
|
||||
--- chromium-125.0.6422.60/third_party/blink/renderer/platform/wtf/hash_table.h.typename 2024-05-15 23:46:43.000000000 +0200
|
||||
+++ chromium-125.0.6422.60/third_party/blink/renderer/platform/wtf/hash_table.h 2024-05-17 12:33:58.742651111 +0200
|
||||
@@ -2013,7 +2013,7 @@ struct HashTableConstIteratorAdapter {
|
||||
static_assert(!IsTraceable<typename Traits::TraitType>::value);
|
||||
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
- using value_type = HashTableType::ValueType;
|
||||
+ using value_type = typename HashTableType::ValueType;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
@@ -2065,7 +2065,7 @@ struct HashTableConstIteratorAdapter<
|
||||
|
||||
public:
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
- using value_type = HashTableType::ValueType;
|
||||
+ using value_type = typename HashTableType::ValueType;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
@@ -2119,7 +2119,7 @@ struct HashTableIteratorAdapter {
|
||||
static_assert(!IsTraceable<typename Traits::TraitType>::value);
|
||||
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
- using value_type = HashTableType::ValueType;
|
||||
+ using value_type = typename HashTableType::ValueType;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
@@ -2167,7 +2167,7 @@ struct HashTableIteratorAdapter<
|
||||
|
||||
public:
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
- using value_type = HashTableType::ValueType;
|
||||
+ using value_type = typename HashTableType::ValueType;
|
||||
using difference_type = ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
105
chromium-125-ffmpeg-5.x-reordered_opaque.patch
Normal file
105
chromium-125-ffmpeg-5.x-reordered_opaque.patch
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
commit 62274859104bd828373ae406aa9309e610449ac5
|
||||
Author: Ted Meyer <tmathmeyer@chromium.org>
|
||||
Date: Fri Mar 22 19:56:55 2024 +0000
|
||||
|
||||
Replace deprecated use of AVCodecContext::reordered_opaque
|
||||
|
||||
We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context
|
||||
now to trigger timestamp propagation.
|
||||
|
||||
Bug: 330573128
|
||||
Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308
|
||||
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
|
||||
Reviewed-by: Dan Sanders <sandersd@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1277051}
|
||||
|
||||
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
||||
index bd75477feeabb..8a658a58caac5 100644
|
||||
--- a/media/filters/ffmpeg_video_decoder.cc
|
||||
+++ b/media/filters/ffmpeg_video_decoder.cc
|
||||
@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
|
||||
}
|
||||
|
||||
FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
|
||||
- : media_log_(media_log) {
|
||||
+ : media_log_(media_log), timestamp_map_(128) {
|
||||
DVLOG(1) << __func__;
|
||||
DETACH_FROM_SEQUENCE(sequence_checker_);
|
||||
}
|
||||
@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) {
|
||||
DCHECK(packet->data);
|
||||
DCHECK_GT(packet->size, 0);
|
||||
|
||||
- // Let FFmpeg handle presentation timestamp reordering.
|
||||
- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds();
|
||||
+ const int64_t timestamp = buffer.timestamp().InMicroseconds();
|
||||
+ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId();
|
||||
+ timestamp_map_.Put(std::make_pair(timestamp_id, timestamp));
|
||||
+ packet->opaque = reinterpret_cast<void*>(timestamp_id.GetUnsafeValue());
|
||||
}
|
||||
FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket(
|
||||
packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame,
|
||||
@@ -423,7 +425,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
|
||||
}
|
||||
gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect);
|
||||
|
||||
- const auto pts = base::Microseconds(frame->reordered_opaque);
|
||||
+ const auto ts_id = TimestampId(reinterpret_cast<size_t>(frame->opaque));
|
||||
+ const auto ts_lookup = timestamp_map_.Get(ts_id);
|
||||
+ if (ts_lookup == timestamp_map_.end()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ const auto pts = base::Microseconds(std::get<1>(*ts_lookup));
|
||||
auto video_frame = VideoFrame::WrapExternalDataWithLayout(
|
||||
opaque->layout, visible_rect, natural_size, opaque->data, opaque->size,
|
||||
pts);
|
||||
@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
|
||||
codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config);
|
||||
codec_context_->thread_type =
|
||||
FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME);
|
||||
+
|
||||
codec_context_->opaque = this;
|
||||
codec_context_->get_buffer2 = GetVideoBufferImpl;
|
||||
+ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
|
||||
|
||||
if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) {
|
||||
// Note: FFmpeg will try to free this string, so we must duplicate it.
|
||||
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
|
||||
index d02cb89c3ddf7..0a2de1c623fff 100644
|
||||
--- a/media/filters/ffmpeg_video_decoder.h
|
||||
+++ b/media/filters/ffmpeg_video_decoder.h
|
||||
@@ -7,10 +7,12 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
+#include "base/containers/lru_cache.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/sequence_checker.h"
|
||||
+#include "base/types/id_type.h"
|
||||
#include "media/base/frame_buffer_pool.h"
|
||||
#include "media/base/supported_video_decoder_config.h"
|
||||
#include "media/base/video_decoder.h"
|
||||
@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
|
||||
// FFmpeg structures owned by this object.
|
||||
std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
|
||||
|
||||
+ // The gist here is that timestamps need to be 64 bits to store microsecond
|
||||
+ // precision. A 32 bit integer would overflow at ~35 minutes at this level of
|
||||
+ // precision. We can't cast the timestamp to the void ptr object used by the
|
||||
+ // opaque field in ffmpeg then, because it would lose data on a 32 bit build.
|
||||
+ // However, we don't actually have 2^31 timestamped frames in a single
|
||||
+ // playback, so it's fine to use the 32 bit value as a key in a map which
|
||||
+ // contains the actual timestamps. Additionally, we've in the past set 128
|
||||
+ // outstanding frames for re-ordering as a limit for cross-thread decoding
|
||||
+ // tasks, so we'll do that here too with the LRU cache.
|
||||
+ using TimestampId = base::IdType<int64_t, size_t, 0>;
|
||||
+
|
||||
+ TimestampId::Generator timestamp_id_generator_;
|
||||
+ base::LRUCache<TimestampId, int64_t> timestamp_map_;
|
||||
+
|
||||
VideoDecoderConfig config_;
|
||||
|
||||
scoped_refptr<FrameBufferPool> frame_pool_;
|
||||
38
chromium-125-system-brotli.patch
Normal file
38
chromium-125-system-brotli.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
diff -up chromium-125.0.6422.41/net/filter/brotli_source_stream.cc.system-brotli chromium-125.0.6422.41/net/filter/brotli_source_stream.cc
|
||||
--- chromium-125.0.6422.41/net/filter/brotli_source_stream.cc.system-brotli 2024-05-08 22:30:00.000000000 +0200
|
||||
+++ chromium-125.0.6422.41/net/filter/brotli_source_stream.cc 2024-05-12 20:23:30.859178769 +0200
|
||||
@@ -11,8 +11,8 @@
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
-#include "third_party/brotli/include/brotli/shared_dictionary.h"
|
||||
+#include <brotli/decode.h>
|
||||
+#include <brotli/shared_dictionary.h>
|
||||
|
||||
namespace net {
|
||||
|
||||
diff -up chromium-125.0.6422.41/net/ssl/cert_compression.cc.system-brotli chromium-125.0.6422.41/net/ssl/cert_compression.cc
|
||||
--- chromium-125.0.6422.41/net/ssl/cert_compression.cc.system-brotli 2024-05-08 22:30:00.000000000 +0200
|
||||
+++ chromium-125.0.6422.41/net/ssl/cert_compression.cc 2024-05-12 20:23:30.860178793 +0200
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "third_party/boringssl/src/include/openssl/ssl.h"
|
||||
|
||||
#if !defined(NET_DISABLE_BROTLI)
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
#endif
|
||||
|
||||
namespace net {
|
||||
diff -up chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc.system-brotli chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc
|
||||
--- chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc.system-brotli 2024-05-12 20:23:30.861178816 +0200
|
||||
+++ chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc 2024-05-12 21:19:03.775332093 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "net/filter/gzip_header.h"
|
||||
#include "skia/ext/image_operations.h"
|
||||
#include "third_party/abseil-cpp/absl/types/variant.h"
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include "brotli/decode.h"
|
||||
#include "third_party/skia/include/codec/SkPngDecoder.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
22
chromium-126-clang16-buildflags.patch
Normal file
22
chromium-126-clang16-buildflags.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff -up chromium-126.0.6478.26/build/config/compiler/BUILD.gn.clang16-buildflag chromium-126.0.6478.26/build/config/compiler/BUILD.gn
|
||||
--- chromium-126.0.6478.26/build/config/compiler/BUILD.gn.clang16-buildflag 2024-06-02 14:55:55.298242780 +0200
|
||||
+++ chromium-126.0.6478.26/build/config/compiler/BUILD.gn 2024-06-02 15:04:43.839882669 +0200
|
||||
@@ -1889,9 +1889,6 @@ config("default_warnings") {
|
||||
|
||||
# TODO(crbug.com/40286317): Evaluate and possibly enable.
|
||||
"-Wno-vla-extension",
|
||||
-
|
||||
- # TODO(crbug.com/40284799): Fix and re-enable.
|
||||
- "-Wno-thread-safety-reference-return",
|
||||
]
|
||||
|
||||
cflags_cc += [
|
||||
@@ -1902,7 +1899,7 @@ config("default_warnings") {
|
||||
if (!is_nacl) {
|
||||
cflags_cc += [
|
||||
# TODO(crbug.com/41486292): Fix and re-enable.
|
||||
- "-Wno-c++11-narrowing-const-reference",
|
||||
+ "-Wno-c++11-narrowing",
|
||||
]
|
||||
}
|
||||
}
|
||||
12
chromium-126-clang16-disable-auto-upgrade-debug-info.patch
Normal file
12
chromium-126-clang16-disable-auto-upgrade-debug-info.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-126.0.6478.26/build/config/compiler/BUILD.gn.clang16-disable-auto-upgrade-debug-info chromium-126.0.6478.26/build/config/compiler/BUILD.gn
|
||||
--- chromium-126.0.6478.26/build/config/compiler/BUILD.gn.clang16-disable-auto-upgrade-debug-info 2024-06-02 18:00:17.914641767 +0200
|
||||
+++ chromium-126.0.6478.26/build/config/compiler/BUILD.gn 2024-06-02 18:02:32.153544892 +0200
|
||||
@@ -780,7 +780,7 @@ config("compiler") {
|
||||
|
||||
# We only use one version of LLVM within a build so there's no need to
|
||||
# upgrade debug info, which can be expensive since it runs the verifier.
|
||||
- ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
|
||||
+ ldflags += [ "" ]
|
||||
}
|
||||
|
||||
# TODO(crbug.com/335365324): Enable on other platforms.
|
||||
681
chromium-126-el7-colormap.patch
Normal file
681
chromium-126-el7-colormap.patch
Normal file
|
|
@ -0,0 +1,681 @@
|
|||
diff -up chromium-126.0.6478.26/ash/style/ash_color_mixer_unittest.cc.mee chromium-126.0.6478.26/ash/style/ash_color_mixer_unittest.cc
|
||||
--- chromium-126.0.6478.26/ash/style/ash_color_mixer_unittest.cc.mee 2024-05-29 18:00:44.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ash/style/ash_color_mixer_unittest.cc 2024-06-03 16:22:10.549568854 +0200
|
||||
@@ -37,6 +37,9 @@ void InitializeColorProvider(const ui::C
|
||||
// Roughly mimics the ColorMixer configuration for Ash.
|
||||
ash::AddCrosStylesColorMixer(&color_provider, key);
|
||||
ash::AddAshColorMixer(&color_provider, key);
|
||||
+
|
||||
+ // Populates the color map with computed color values.
|
||||
+ color_provider.GenerateColorMap();
|
||||
}
|
||||
|
||||
// Initializes the `color_provider` with `seed_color` and the relevant
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/chrome_content_browser_client_browsertest.cc.mee chromium-126.0.6478.26/chrome/browser/chrome_content_browser_client_browsertest.cc
|
||||
--- chromium-126.0.6478.26/chrome/browser/chrome_content_browser_client_browsertest.cc.mee 2024-05-29 18:00:52.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/chrome_content_browser_client_browsertest.cc 2024-06-03 16:22:10.550568873 +0200
|
||||
@@ -602,6 +602,7 @@ class PrefersColorSchemeTest
|
||||
explicit MockColorProviderSource(bool is_dark) {
|
||||
key_.color_mode = is_dark ? ui::ColorProviderKey::ColorMode::kDark
|
||||
: ui::ColorProviderKey::ColorMode::kLight;
|
||||
+ provider_.GenerateColorMap();
|
||||
}
|
||||
MockColorProviderSource(const MockColorProviderSource&) = delete;
|
||||
MockColorProviderSource& operator=(const MockColorProviderSource&) = delete;
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/themes/browser_theme_pack_unittest.cc.mee chromium-126.0.6478.26/chrome/browser/themes/browser_theme_pack_unittest.cc
|
||||
--- chromium-126.0.6478.26/chrome/browser/themes/browser_theme_pack_unittest.cc.mee 2024-05-29 18:00:57.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/themes/browser_theme_pack_unittest.cc 2024-06-03 16:22:10.550568873 +0200
|
||||
@@ -750,6 +750,7 @@ TEST_F(BrowserThemePackTest, TestCreateC
|
||||
"omnibox_background": [120, 140, 160] })";
|
||||
LoadColorJSON(color_json);
|
||||
theme_pack().AddColorMixers(&provider, ui::ColorProviderKey());
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(SkColorSetRGB(0, 20, 40), provider.GetColor(kColorToolbar));
|
||||
EXPECT_EQ(SkColorSetRGB(60, 80, 100), provider.GetColor(kColorOmniboxText));
|
||||
EXPECT_EQ(SkColorSetRGB(120, 140, 160),
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/color/material_new_tab_page_color_mixer_unittest.cc.mee chromium-126.0.6478.26/chrome/browser/ui/color/material_new_tab_page_color_mixer_unittest.cc
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/color/material_new_tab_page_color_mixer_unittest.cc.mee 2024-05-29 18:00:58.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/color/material_new_tab_page_color_mixer_unittest.cc 2024-06-03 16:22:10.551568891 +0200
|
||||
@@ -26,6 +26,7 @@ class MaterialNewTabPageColorMixerTest :
|
||||
void AddMaterialColorMixers() {
|
||||
AddColorMixers(&color_provider_, color_provider_key_);
|
||||
AddChromeColorMixers(&color_provider_, color_provider_key_);
|
||||
+ color_provider_.GenerateColorMap();
|
||||
}
|
||||
|
||||
private:
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/color/new_tab_page_color_mixer_unittest.cc.mee chromium-126.0.6478.26/chrome/browser/ui/color/new_tab_page_color_mixer_unittest.cc
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/color/new_tab_page_color_mixer_unittest.cc.mee 2024-05-29 18:00:58.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/color/new_tab_page_color_mixer_unittest.cc 2024-06-03 16:22:10.551568891 +0200
|
||||
@@ -33,6 +33,7 @@ TEST(NewTabPageColorMixer, LightAndDarkT
|
||||
if (color_utils::IsDark(toolbar_color))
|
||||
key.color_mode = ui::ColorProviderKey::ColorMode::kDark;
|
||||
AddNewTabPageColorMixer(&provider, key);
|
||||
+ provider.GenerateColorMap();
|
||||
|
||||
EXPECT_EQ(provider.GetColor(kColorToolbar), toolbar_color);
|
||||
EXPECT_EQ(provider.GetColor(kColorNewTabPageBackground), toolbar_color);
|
||||
@@ -51,6 +52,7 @@ TEST(NewTabPageColorMixer, CustomColorCo
|
||||
key.custom_theme =
|
||||
base::WrapRefCounted(new CustomThemeSupplier(ThemeType::kAutogenerated));
|
||||
AddNewTabPageColorMixer(&provider, key);
|
||||
+ provider.GenerateColorMap();
|
||||
|
||||
EXPECT_EQ(provider.GetColor(kColorToolbar), gfx::kGoogleGreen300);
|
||||
EXPECT_EQ(provider.GetColor(kColorNewTabPageBackground),
|
||||
@@ -72,6 +74,7 @@ TEST(NewTabPageColorMixer, DefaultColorC
|
||||
key.custom_theme =
|
||||
base::WrapRefCounted(new CustomThemeSupplier(ThemeType::kAutogenerated));
|
||||
AddNewTabPageColorMixer(&provider, key);
|
||||
+ provider.GenerateColorMap();
|
||||
|
||||
EXPECT_EQ(provider.GetColor(kColorToolbar), kSampleToolbarColor);
|
||||
EXPECT_EQ(provider.GetColor(kColorNewTabPageBackground), kSampleToolbarColor);
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/color/tools/dump_colors.cc.mee chromium-126.0.6478.26/chrome/browser/ui/color/tools/dump_colors.cc
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/color/tools/dump_colors.cc.mee 2024-05-29 18:00:58.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/color/tools/dump_colors.cc 2024-06-03 16:22:10.551568891 +0200
|
||||
@@ -56,6 +56,7 @@ int main(int argc, const char* argv[]) {
|
||||
ui::AddColorMixers(provider, key);
|
||||
color::AddComponentsColorMixers(provider, key);
|
||||
AddChromeColorMixers(provider, key);
|
||||
+ provider->GenerateColorMap();
|
||||
};
|
||||
ui::ColorProvider light_provider, dark_provider, light_high_contrast_provider,
|
||||
dark_high_contrast_provider;
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc.mee chromium-126.0.6478.26/chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc.mee 2024-05-29 18:00:59.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc 2024-06-03 16:22:10.552568911 +0200
|
||||
@@ -117,7 +117,7 @@ class MockLogoService : public search_pr
|
||||
|
||||
class MockColorProviderSource : public ui::ColorProviderSource {
|
||||
public:
|
||||
- MockColorProviderSource() = default;
|
||||
+ MockColorProviderSource() { color_provider_.GenerateColorMap(); }
|
||||
MockColorProviderSource(const MockColorProviderSource&) = delete;
|
||||
MockColorProviderSource& operator=(const MockColorProviderSource&) = delete;
|
||||
~MockColorProviderSource() override = default;
|
||||
diff -up chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_browsertest.cc.mee chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_browsertest.cc
|
||||
--- chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_browsertest.cc.mee 2024-05-29 18:01:13.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_browsertest.cc 2024-06-03 16:22:10.553568929 +0200
|
||||
@@ -6300,7 +6300,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplSt
|
||||
|
||||
class MockColorProviderSource : public ui::ColorProviderSource {
|
||||
public:
|
||||
- MockColorProviderSource() = default;
|
||||
+ MockColorProviderSource() { provider_.GenerateColorMap(); }
|
||||
MockColorProviderSource(const MockColorProviderSource&) = delete;
|
||||
MockColorProviderSource& operator=(const MockColorProviderSource&) = delete;
|
||||
~MockColorProviderSource() override = default;
|
||||
diff -up chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_unittest.cc.mee chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_unittest.cc
|
||||
--- chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_unittest.cc.mee 2024-05-29 18:01:13.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_unittest.cc 2024-06-03 16:22:10.554568949 +0200
|
||||
@@ -337,7 +337,7 @@ class MockPageBroadcast : public TestPag
|
||||
|
||||
class TestColorProviderSource : public ui::ColorProviderSource {
|
||||
public:
|
||||
- TestColorProviderSource() = default;
|
||||
+ TestColorProviderSource() { provider_.GenerateColorMap(); }
|
||||
|
||||
const ui::ColorProvider* GetColorProvider() const override {
|
||||
return &provider_;
|
||||
diff -up chromium-126.0.6478.26/content/public/test/render_view_test.cc.mee chromium-126.0.6478.26/content/public/test/render_view_test.cc
|
||||
--- chromium-126.0.6478.26/content/public/test/render_view_test.cc.mee 2024-05-29 18:01:14.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/content/public/test/render_view_test.cc 2024-06-03 16:22:10.554568949 +0200
|
||||
@@ -150,7 +150,7 @@ class FailingURLLoaderFactory : public n
|
||||
|
||||
class MockColorProviderSource : public ui::ColorProviderSource {
|
||||
public:
|
||||
- explicit MockColorProviderSource() = default;
|
||||
+ explicit MockColorProviderSource() { provider_.GenerateColorMap(); }
|
||||
MockColorProviderSource(const MockColorProviderSource&) = delete;
|
||||
MockColorProviderSource& operator=(const MockColorProviderSource&) = delete;
|
||||
~MockColorProviderSource() override = default;
|
||||
diff -up chromium-126.0.6478.26/extensions/browser/extension_host.cc.mee chromium-126.0.6478.26/extensions/browser/extension_host.cc
|
||||
--- chromium-126.0.6478.26/extensions/browser/extension_host.cc.mee 2024-05-29 18:01:22.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/extensions/browser/extension_host.cc 2024-06-03 16:22:10.555568967 +0200
|
||||
@@ -58,7 +58,7 @@ namespace {
|
||||
// the UI-less extension background page.
|
||||
class NoOpColorProviderSource : public ui::ColorProviderSource {
|
||||
public:
|
||||
- NoOpColorProviderSource() = default;
|
||||
+ NoOpColorProviderSource() { color_provider_.GenerateColorMap(); }
|
||||
NoOpColorProviderSource(const NoOpColorProviderSource&) = delete;
|
||||
NoOpColorProviderSource& operator=(const NoOpColorProviderSource&) = delete;
|
||||
~NoOpColorProviderSource() override = default;
|
||||
diff -up chromium-126.0.6478.26/third_party/blink/renderer/core/layout/layout_theme.cc.mee chromium-126.0.6478.26/third_party/blink/renderer/core/layout/layout_theme.cc
|
||||
--- chromium-126.0.6478.26/third_party/blink/renderer/core/layout/layout_theme.cc.mee 2024-05-29 18:01:39.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/third_party/blink/renderer/core/layout/layout_theme.cc 2024-06-03 16:22:10.555568967 +0200
|
||||
@@ -677,7 +677,7 @@ Color LayoutTheme::SystemColorFromColorP
|
||||
CSSValueID css_value_id,
|
||||
mojom::blink::ColorScheme color_scheme,
|
||||
const ui::ColorProvider* color_provider) const {
|
||||
- CHECK(color_provider->HasMixers());
|
||||
+ CHECK(!color_provider->IsColorMapEmpty());
|
||||
SkColor system_theme_color;
|
||||
switch (css_value_id) {
|
||||
case CSSValueID::kActivetext:
|
||||
diff -up chromium-126.0.6478.26/ui/base/models/image_model_unittest.cc.mee chromium-126.0.6478.26/ui/base/models/image_model_unittest.cc
|
||||
--- chromium-126.0.6478.26/ui/base/models/image_model_unittest.cc.mee 2024-05-29 18:02:31.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/base/models/image_model_unittest.cc 2024-06-03 16:22:10.555568967 +0200
|
||||
@@ -224,6 +224,7 @@ TEST(ImageModelTest, ShouldRasterizeEmpt
|
||||
|
||||
TEST(ImageModelTest, ShouldRasterizeVectorIcon) {
|
||||
ui::ColorProvider color_provider;
|
||||
+ color_provider.GenerateColorMap();
|
||||
gfx::ImageSkia image_skia =
|
||||
ui::ImageModel::FromVectorIcon(vector_icons::kSyncIcon)
|
||||
.Rasterize(&color_provider);
|
||||
diff -up chromium-126.0.6478.26/ui/color/color_provider.cc.mee chromium-126.0.6478.26/ui/color/color_provider.cc
|
||||
--- chromium-126.0.6478.26/ui/color/color_provider.cc.mee 2024-06-03 16:03:15.596432761 +0200
|
||||
+++ chromium-126.0.6478.26/ui/color/color_provider.cc 2024-06-03 16:22:10.555568967 +0200
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "ui/color/color_provider.h"
|
||||
|
||||
-#include <forward_list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
@@ -18,106 +17,6 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
-////////////////////////////////////////////////////////////////////////////////
|
||||
-// ColorProvider::ColorProviderInternal:
|
||||
-
|
||||
-class ColorProvider::ColorProviderInternal {
|
||||
- public:
|
||||
- using Mixers = std::forward_list<ColorMixer>;
|
||||
-
|
||||
- ColorProviderInternal() = default;
|
||||
- ColorProviderInternal(const ColorProviderInternal&) = delete;
|
||||
- ColorProviderInternal& operator=(const ColorProviderInternal&) = delete;
|
||||
- ~ColorProviderInternal() = default;
|
||||
-
|
||||
- ColorMixer& AddMixer() {
|
||||
- color_map_.clear();
|
||||
- mixers_.emplace_after(
|
||||
- first_postprocessing_mixer_,
|
||||
- base::BindRepeating([](const ColorMixer* mixer) { return mixer; },
|
||||
- GetLastNonPostprocessingMixer()),
|
||||
- base::BindRepeating(&ColorProvider::ColorProviderInternal::
|
||||
- GetLastNonPostprocessingMixer,
|
||||
- base::Unretained(this)));
|
||||
-
|
||||
- return *std::next(first_postprocessing_mixer_, 1);
|
||||
- }
|
||||
-
|
||||
- ColorMixer& AddPostprocessingMixer() {
|
||||
- color_map_.clear();
|
||||
- if (first_postprocessing_mixer_ == mixers_.before_begin()) {
|
||||
- // The first postprocessing mixer points to the last regular mixer.
|
||||
- auto previous_mixer_getter = base::BindRepeating(
|
||||
- &ColorProvider::ColorProviderInternal::GetLastNonPostprocessingMixer,
|
||||
- base::Unretained(this));
|
||||
- mixers_.emplace_front(previous_mixer_getter, previous_mixer_getter);
|
||||
- first_postprocessing_mixer_ = mixers_.begin();
|
||||
- } else {
|
||||
- // Other postprocessing mixers point to the next postprocessing mixer.
|
||||
- auto previous_mixer_getter =
|
||||
- base::BindRepeating([](const ColorMixer* mixer) { return mixer; },
|
||||
- base::Unretained(&mixers_.front()));
|
||||
- mixers_.emplace_front(previous_mixer_getter, previous_mixer_getter);
|
||||
- }
|
||||
- return mixers_.front();
|
||||
- }
|
||||
-
|
||||
- SkColor GetColor(ColorId id) const {
|
||||
- auto i = color_map_.find(id);
|
||||
- if (i == color_map_.end()) {
|
||||
- if (mixers_.empty()) {
|
||||
- DVLOG(2) << "ColorProvider::GetColor: No mixers defined!";
|
||||
- return gfx::kPlaceholderColor;
|
||||
- }
|
||||
- DVLOG(2) << "ColorProvider::GetColor: Computing color for ColorId: "
|
||||
- << ColorIdName(id);
|
||||
- const SkColor color = mixers_.front().GetResultColor(id);
|
||||
- if (color == gfx::kPlaceholderColor) {
|
||||
- return gfx::kPlaceholderColor;
|
||||
- }
|
||||
- i = color_map_.insert({id, color}).first;
|
||||
- }
|
||||
-
|
||||
- DVLOG(2) << "ColorProvider::GetColor: ColorId: " << ColorIdName(id)
|
||||
- << " Value: " << SkColorName(i->second);
|
||||
- return i->second;
|
||||
- }
|
||||
-
|
||||
- const ColorMixer* GetLastNonPostprocessingMixer() const {
|
||||
- const auto it = std::next(first_postprocessing_mixer_, 1);
|
||||
- return (it == mixers_.cend()) ? nullptr : &(*it);
|
||||
- }
|
||||
-
|
||||
- bool HasMixers() const { return !mixers_.empty(); }
|
||||
-
|
||||
- void SetColorForTesting(ColorId id, SkColor color) { color_map_[id] = color; }
|
||||
-
|
||||
- void GenerateColorMapForTesting() {
|
||||
- for (const auto& mixer : mixers_) {
|
||||
- const auto mixer_color_ids = mixer.GetDefinedColorIds();
|
||||
- for (const auto color_id : mixer_color_ids) {
|
||||
- GetColor(color_id);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- const ColorProvider::ColorMap& color_map_for_testing() { return color_map_; }
|
||||
-
|
||||
- private:
|
||||
- // The entire color pipeline, in reverse order (that is, the "last" mixer is
|
||||
- // at the front).
|
||||
- Mixers mixers_;
|
||||
-
|
||||
- // The first mixer in the chain that is a "postprocessing" mixer.
|
||||
- Mixers::iterator first_postprocessing_mixer_ = mixers_.before_begin();
|
||||
-
|
||||
- // A cached map of ColorId => SkColor mappings for this provider.
|
||||
- mutable ColorMap color_map_;
|
||||
-};
|
||||
-
|
||||
-////////////////////////////////////////////////////////////////////////////////
|
||||
-// ColorProvider:
|
||||
-
|
||||
ColorProvider::ColorProvider() = default;
|
||||
|
||||
ColorProvider::ColorProvider(ColorProvider&&) = default;
|
||||
@@ -127,31 +26,96 @@ ColorProvider& ColorProvider::operator=(
|
||||
ColorProvider::~ColorProvider() = default;
|
||||
|
||||
ColorMixer& ColorProvider::AddMixer() {
|
||||
- return internal_->AddMixer();
|
||||
+ DCHECK(!color_map_);
|
||||
+
|
||||
+ mixers_.emplace_after(
|
||||
+ first_postprocessing_mixer_,
|
||||
+ base::BindRepeating([](const ColorMixer* mixer) { return mixer; },
|
||||
+ GetLastNonPostprocessingMixer()),
|
||||
+ base::BindRepeating(&ColorProvider::GetLastNonPostprocessingMixer,
|
||||
+ base::Unretained(this)));
|
||||
+
|
||||
+ return *std::next(first_postprocessing_mixer_, 1);
|
||||
}
|
||||
|
||||
ColorMixer& ColorProvider::AddPostprocessingMixer() {
|
||||
- return internal_->AddPostprocessingMixer();
|
||||
+ DCHECK(!color_map_);
|
||||
+
|
||||
+ if (first_postprocessing_mixer_ == mixers_.before_begin()) {
|
||||
+ // The first postprocessing mixer points to the last regular mixer.
|
||||
+ auto previous_mixer_getter = base::BindRepeating(
|
||||
+ &ColorProvider::GetLastNonPostprocessingMixer, base::Unretained(this));
|
||||
+ mixers_.emplace_front(previous_mixer_getter, previous_mixer_getter);
|
||||
+ first_postprocessing_mixer_ = mixers_.begin();
|
||||
+ } else {
|
||||
+ // Other postprocessing mixers point to the next postprocessing mixer.
|
||||
+ auto previous_mixer_getter =
|
||||
+ base::BindRepeating([](const ColorMixer* mixer) { return mixer; },
|
||||
+ base::Unretained(&mixers_.front()));
|
||||
+ mixers_.emplace_front(previous_mixer_getter, previous_mixer_getter);
|
||||
+ }
|
||||
+ return mixers_.front();
|
||||
}
|
||||
|
||||
SkColor ColorProvider::GetColor(ColorId id) const {
|
||||
- return internal_->GetColor(id);
|
||||
-}
|
||||
+ CHECK(color_map_);
|
||||
+ auto i = color_map_->find(id);
|
||||
+ return i == color_map_->end() ? gfx::kPlaceholderColor : i->second;
|
||||
+}
|
||||
+
|
||||
+void ColorProvider::GenerateColorMap() {
|
||||
+ // This should only be called to generate the `color_map_` once.
|
||||
+ DCHECK(!color_map_);
|
||||
+
|
||||
+ if (mixers_.empty())
|
||||
+ DVLOG(2) << "ColorProvider::GenerateColorMap: No mixers defined!";
|
||||
+
|
||||
+ // Iterate over associated mixers and extract the ColorIds defined for this
|
||||
+ // provider.
|
||||
+ std::set<ColorId> color_ids;
|
||||
+ for (const auto& mixer : mixers_) {
|
||||
+ const auto mixer_color_ids = mixer.GetDefinedColorIds();
|
||||
+ color_ids.insert(mixer_color_ids.begin(), mixer_color_ids.end());
|
||||
+ }
|
||||
+
|
||||
+ // Iterate through all defined ColorIds and seed the `color_map` with the
|
||||
+ // computed values. Use a std::map rather than a base::flat_map since it has
|
||||
+ // frequent inserts and could grow very large.
|
||||
+ std::map<ColorId, SkColor> color_map;
|
||||
+ for (const auto& color_id : color_ids) {
|
||||
+ SkColor resulting_color = mixers_.front().GetResultColor(color_id);
|
||||
+ DVLOG(2) << "GenerateColorMap:"
|
||||
+ << " Color Id: " << ColorIdName(color_id)
|
||||
+ << " Resulting Color: " << SkColorName(resulting_color);
|
||||
+ color_map.insert({color_id, resulting_color});
|
||||
+ }
|
||||
+
|
||||
+ // Construct the color_map_.
|
||||
+ color_map_ = ColorMap(color_map.begin(), color_map.end());
|
||||
|
||||
-bool ColorProvider::HasMixers() const {
|
||||
- return internal_->HasMixers();
|
||||
+ // Clear away all associated mixers as these are no longer needed.
|
||||
+ mixers_.clear();
|
||||
+ first_postprocessing_mixer_ = mixers_.before_begin();
|
||||
}
|
||||
|
||||
-void ColorProvider::SetColorForTesting(ColorId id, SkColor color) {
|
||||
- internal_->SetColorForTesting(id, color); // IN-TEST
|
||||
+bool ColorProvider::IsColorMapEmpty() const {
|
||||
+ DCHECK(color_map_);
|
||||
+ return color_map_->empty();
|
||||
}
|
||||
|
||||
-void ColorProvider::GenerateColorMapForTesting() {
|
||||
- internal_->GenerateColorMapForTesting(); // IN-TEST
|
||||
+void ColorProvider::SetColorForTesting(ColorId id, SkColor color) {
|
||||
+ if (color_map_) {
|
||||
+ (*color_map_)[id] = color;
|
||||
+ } else {
|
||||
+ if (mixers_.empty())
|
||||
+ AddMixer();
|
||||
+ (*std::next(first_postprocessing_mixer_, 1))[id] = {color};
|
||||
+ }
|
||||
}
|
||||
|
||||
-const ColorProvider::ColorMap& ColorProvider::color_map_for_testing() {
|
||||
- return internal_->color_map_for_testing(); // IN-TEST
|
||||
+const ColorMixer* ColorProvider::GetLastNonPostprocessingMixer() const {
|
||||
+ const auto it = std::next(first_postprocessing_mixer_, 1);
|
||||
+ return (it == mixers_.cend()) ? nullptr : &(*it);
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
diff -up chromium-126.0.6478.26/ui/color/color_provider.h.mee chromium-126.0.6478.26/ui/color/color_provider.h
|
||||
--- chromium-126.0.6478.26/ui/color/color_provider.h.mee 2024-06-03 16:13:48.739166275 +0200
|
||||
+++ chromium-126.0.6478.26/ui/color/color_provider.h 2024-06-03 16:22:10.555568967 +0200
|
||||
@@ -5,11 +5,12 @@
|
||||
#ifndef UI_COLOR_COLOR_PROVIDER_H_
|
||||
#define UI_COLOR_COLOR_PROVIDER_H_
|
||||
|
||||
-#include <map>
|
||||
+#include <forward_list>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
#include "base/component_export.h"
|
||||
+#include "base/containers/flat_map.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "ui/color/color_id.h"
|
||||
#include "ui/color/color_mixer.h"
|
||||
@@ -24,7 +25,7 @@ namespace ui {
|
||||
// TODO(pkasting): Figure out ownership model and lifetime.
|
||||
class COMPONENT_EXPORT(COLOR) ColorProvider {
|
||||
public:
|
||||
- using ColorMap = std::map<ColorId, SkColor>;
|
||||
+ using ColorMap = base::flat_map<ColorId, SkColor>;
|
||||
|
||||
ColorProvider();
|
||||
ColorProvider(const ColorProvider&) = delete;
|
||||
@@ -48,25 +49,39 @@ class COMPONENT_EXPORT(COLOR) ColorProvi
|
||||
// |id|.
|
||||
SkColor GetColor(ColorId id) const;
|
||||
|
||||
- // Returns true if mixers is not empty. It's the case for some browser
|
||||
+ // Generates the `color_map_` used by this provider for all ColorIds defined
|
||||
+ // by attached mixers. After the map is generated attached mixers and their
|
||||
+ // associated objects are discarded. Mixers should not be added to the
|
||||
+ // provider after this has been called.
|
||||
+ void GenerateColorMap();
|
||||
+
|
||||
+ // Returns true if the color_map_ is empty. It's the case for some browser
|
||||
// tests that run in single process mode but access colors that are
|
||||
// initialized on renderer process launch, for example, controls in
|
||||
// NaiveThemeBase and its children classes. Please see more details:
|
||||
// https://crbug.com/1376775.
|
||||
- bool HasMixers() const;
|
||||
+ bool IsColorMapEmpty() const;
|
||||
|
||||
void SetColorForTesting(ColorId id, SkColor color);
|
||||
- void GenerateColorMapForTesting();
|
||||
- const ColorMap& color_map_for_testing();
|
||||
+ const ColorMap& color_map_for_testing() { return *color_map_; }
|
||||
|
||||
private:
|
||||
- // ColorProviderInternal provides the actual implementation of ColorProvider.
|
||||
- // It's non-movable and non-copyable so that ColorMixer's callbacks can safely
|
||||
- // bind to it.
|
||||
- class ColorProviderInternal;
|
||||
+ using Mixers = std::forward_list<ColorMixer>;
|
||||
|
||||
- std::unique_ptr<ColorProviderInternal> internal_ =
|
||||
- std::make_unique<ColorProviderInternal>();
|
||||
+ // Returns the last mixer in the chain that is not a "postprocessing" mixer,
|
||||
+ // or nullptr.
|
||||
+ const ColorMixer* GetLastNonPostprocessingMixer() const;
|
||||
+
|
||||
+ // The entire color pipeline, in reverse order (that is, the "last" mixer is
|
||||
+ // at the front).
|
||||
+ Mixers mixers_;
|
||||
+
|
||||
+ // The first mixer in the chain that is a "postprocessing" mixer.
|
||||
+ Mixers::iterator first_postprocessing_mixer_ = mixers_.before_begin();
|
||||
+
|
||||
+ // A cached map of ColorId => SkColor mappings for this provider. This will be
|
||||
+ // generated in the call to `GenerateColorMap()`.
|
||||
+ std::optional<ColorMap> color_map_;
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
diff -up chromium-126.0.6478.26/ui/color/color_provider_manager.cc.mee chromium-126.0.6478.26/ui/color/color_provider_manager.cc
|
||||
--- chromium-126.0.6478.26/ui/color/color_provider_manager.cc.mee 2024-05-29 18:02:31.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/color/color_provider_manager.cc 2024-06-03 16:22:10.556568986 +0200
|
||||
@@ -109,6 +109,7 @@ ColorProvider* ColorProviderManager::Get
|
||||
if (!initializer_list_->empty())
|
||||
initializer_list_->Notify(provider.get(), key);
|
||||
|
||||
+ provider->GenerateColorMap();
|
||||
RecordTimeSpentInitializingColorProvider(timer.Elapsed());
|
||||
++num_providers_initialized_;
|
||||
|
||||
diff -up chromium-126.0.6478.26/ui/color/color_provider_unittest.cc.mee chromium-126.0.6478.26/ui/color/color_provider_unittest.cc
|
||||
--- chromium-126.0.6478.26/ui/color/color_provider_unittest.cc.mee 2024-05-29 18:02:31.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/color/color_provider_unittest.cc 2024-06-03 16:22:10.556568986 +0200
|
||||
@@ -17,6 +17,7 @@ namespace {
|
||||
// Tests that when there are no mixers, GetColor() returns a placeholder value.
|
||||
TEST(ColorProviderTest, GetColorNoMixers) {
|
||||
ColorProvider provider;
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(gfx::kPlaceholderColor, provider.GetColor(kColorTest0));
|
||||
}
|
||||
|
||||
@@ -25,6 +26,7 @@ TEST(ColorProviderTest, GetColorNoMixers
|
||||
TEST(ColorProviderTest, SingleMixer) {
|
||||
ColorProvider provider;
|
||||
provider.AddMixer()[kColorTest0] = {SK_ColorGREEN};
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(SK_ColorGREEN, provider.GetColor(kColorTest0));
|
||||
EXPECT_EQ(gfx::kPlaceholderColor, provider.GetColor(kColorTest1));
|
||||
}
|
||||
@@ -35,6 +37,7 @@ TEST(ColorProviderTest, NonOverlappingMi
|
||||
ColorProvider provider;
|
||||
provider.AddMixer()[kColorTest0] = {SK_ColorGREEN};
|
||||
provider.AddMixer()[kColorTest1] = {SK_ColorRED};
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(SK_ColorGREEN, provider.GetColor(kColorTest0));
|
||||
EXPECT_EQ(SK_ColorRED, provider.GetColor(kColorTest1));
|
||||
}
|
||||
@@ -45,6 +48,7 @@ TEST(ColorProviderTest, OverlappingMixer
|
||||
ColorProvider provider;
|
||||
provider.AddMixer()[kColorTest0] = {SK_ColorGREEN};
|
||||
provider.AddMixer()[kColorTest0] = {SK_ColorRED};
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(SK_ColorRED, provider.GetColor(kColorTest0));
|
||||
}
|
||||
|
||||
@@ -55,6 +59,7 @@ TEST(ColorProviderTest, WithProcessing)
|
||||
provider.AddMixer()[kColorTest0] = {SK_ColorBLACK};
|
||||
provider.AddPostprocessingMixer()[kColorTest0] =
|
||||
GetColorWithMaxContrast(FromTransformInput());
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(SK_ColorWHITE, provider.GetColor(kColorTest0));
|
||||
}
|
||||
|
||||
@@ -65,6 +70,7 @@ TEST(ColorProviderTest, WithProcessingAd
|
||||
provider.AddPostprocessingMixer()[kColorTest0] =
|
||||
GetColorWithMaxContrast(FromTransformInput());
|
||||
provider.AddMixer()[kColorTest0] = {SK_ColorBLACK};
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(SK_ColorWHITE, provider.GetColor(kColorTest0));
|
||||
}
|
||||
|
||||
@@ -76,6 +82,7 @@ TEST(ColorProviderTest, Redefinition) {
|
||||
mixer0[kColorTest0] = {SK_ColorBLACK};
|
||||
mixer0[kColorTest1] = AlphaBlend(SK_ColorRED, kColorTest0, 0x01);
|
||||
provider.AddMixer()[kColorTest0] = {SK_ColorWHITE};
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(SK_ColorWHITE, provider.GetColor(kColorTest0));
|
||||
EXPECT_FALSE(color_utils::IsDark(provider.GetColor(kColorTest1)));
|
||||
}
|
||||
@@ -90,6 +97,7 @@ TEST(ColorProviderTest, RedefinitionWith
|
||||
provider.AddMixer()[kColorTest0] = {SK_ColorWHITE};
|
||||
provider.AddPostprocessingMixer()[kColorTest0] =
|
||||
GetColorWithMaxContrast(FromTransformInput());
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_NE(SK_ColorWHITE, provider.GetColor(kColorTest0));
|
||||
EXPECT_FALSE(color_utils::IsDark(provider.GetColor(kColorTest1)));
|
||||
}
|
||||
@@ -97,6 +105,7 @@ TEST(ColorProviderTest, RedefinitionWith
|
||||
TEST(ColorProviderTest, SetColorForTesting) {
|
||||
ColorProvider provider;
|
||||
provider.SetColorForTesting(kColorTest0, SK_ColorGREEN);
|
||||
+ provider.GenerateColorMap();
|
||||
EXPECT_EQ(SK_ColorGREEN, provider.GetColor(kColorTest0));
|
||||
EXPECT_EQ(gfx::kPlaceholderColor, provider.GetColor(kColorTest1));
|
||||
provider.SetColorForTesting(kColorTest1, SK_ColorBLUE);
|
||||
diff -up chromium-126.0.6478.26/ui/color/color_provider_utils.cc.mee chromium-126.0.6478.26/ui/color/color_provider_utils.cc
|
||||
--- chromium-126.0.6478.26/ui/color/color_provider_utils.cc.mee 2024-05-29 18:02:31.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/color/color_provider_utils.cc 2024-06-03 16:22:10.556568986 +0200
|
||||
@@ -367,6 +367,7 @@ ColorProvider CreateColorProviderFromRen
|
||||
|
||||
for (const auto& table : kRendererColorIdMap)
|
||||
mixer[table.color_id] = {renderer_color_map.at(table.renderer_color_id)};
|
||||
+ color_provider.GenerateColorMap();
|
||||
|
||||
return color_provider;
|
||||
}
|
||||
@@ -425,6 +426,7 @@ ColorProvider CreateEmulatedForcedColors
|
||||
mixer[kColorSeparator] = {kColorMidground};
|
||||
CompleteDefaultNonWebNativeRendererColorIdsDefinition(mixer);
|
||||
|
||||
+ color_provider.GenerateColorMap();
|
||||
return color_provider;
|
||||
}
|
||||
|
||||
@@ -479,6 +481,7 @@ ColorProvider CreateEmulatedForcedColors
|
||||
mixer[kColorWebNativeControlSliderHovered] = {SK_ColorCYAN};
|
||||
mixer[kColorWebNativeControlSliderPressed] = {SK_ColorCYAN};
|
||||
|
||||
+ color_provider.GenerateColorMap();
|
||||
return color_provider;
|
||||
}
|
||||
|
||||
@@ -652,6 +655,7 @@ ColorProvider COMPONENT_EXPORT(COLOR)
|
||||
SkColorSetRGB(0x37, 0x93, 0xFF)};
|
||||
}
|
||||
|
||||
+ color_provider.GenerateColorMap();
|
||||
return color_provider;
|
||||
}
|
||||
|
||||
diff -up chromium-126.0.6478.26/ui/color/color_provider_utils_unittest.cc.mee chromium-126.0.6478.26/ui/color/color_provider_utils_unittest.cc
|
||||
--- chromium-126.0.6478.26/ui/color/color_provider_utils_unittest.cc.mee 2024-05-29 18:02:31.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/color/color_provider_utils_unittest.cc 2024-06-03 16:22:10.556568986 +0200
|
||||
@@ -49,6 +49,7 @@ TEST_F(ColorProviderUtilsTest, RendererC
|
||||
ui::ColorMixer& mixer = color_provider.AddMixer();
|
||||
for (int i = ui::kUiColorsStart + 1; i < ui::kUiColorsEnd; ++i)
|
||||
mixer[i] = {static_cast<SkColor>(i)};
|
||||
+ color_provider.GenerateColorMap();
|
||||
|
||||
// The size of the RendererColorMap should match number of defined
|
||||
// RendererColorIds.
|
||||
@@ -60,7 +61,6 @@ TEST_F(ColorProviderUtilsTest, RendererC
|
||||
// also match the number of defined RendererColorIds.
|
||||
auto new_color_provider =
|
||||
ui::CreateColorProviderFromRendererColorMap(renderer_color_map);
|
||||
- new_color_provider.GenerateColorMapForTesting();
|
||||
EXPECT_EQ(kTotaltRendererColorIds,
|
||||
new_color_provider.color_map_for_testing().size());
|
||||
}
|
||||
@@ -73,6 +73,7 @@ TEST_F(ColorProviderUtilsTest, ColorProv
|
||||
for (int i = ui::kUiColorsStart + 1; i < ui::kUiColorsEnd; ++i) {
|
||||
mixer[i] = {static_cast<SkColor>(i)};
|
||||
}
|
||||
+ color_provider.GenerateColorMap();
|
||||
|
||||
// A renderer color map generated from its source provider should have
|
||||
// equivalent mappings.
|
||||
@@ -84,6 +85,7 @@ TEST_F(ColorProviderUtilsTest, ColorProv
|
||||
// Providers with different renderer color mappings should not be flagged as
|
||||
// equivalent.
|
||||
ui::ColorProvider new_color_provider;
|
||||
+ new_color_provider.GenerateColorMap();
|
||||
EXPECT_FALSE(IsRendererColorMappingEquivalent(&new_color_provider,
|
||||
renderer_color_map));
|
||||
}
|
||||
@@ -119,6 +121,7 @@ TEST_F(ColorProviderUtilsTest, DefaultBl
|
||||
ui::ColorProvider random_color_provider;
|
||||
ui::ColorMixer& mixer = random_color_provider.AddMixer();
|
||||
mixer[ui::kColorPrimaryBackground] = {SK_ColorWHITE};
|
||||
+ random_color_provider.GenerateColorMap();
|
||||
ui::RendererColorMap random_color_map =
|
||||
ui::CreateRendererColorMap(random_color_provider);
|
||||
|
||||
diff -up chromium-126.0.6478.26/ui/color/sys_color_mixer_unittest.cc.mee chromium-126.0.6478.26/ui/color/sys_color_mixer_unittest.cc
|
||||
--- chromium-126.0.6478.26/ui/color/sys_color_mixer_unittest.cc.mee 2024-05-29 18:02:31.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/color/sys_color_mixer_unittest.cc 2024-06-03 16:22:10.556568986 +0200
|
||||
@@ -36,6 +36,7 @@ class SysColorMixerTest
|
||||
|
||||
AddRefColorMixer(&color_provider_, key);
|
||||
AddSysColorMixer(&color_provider_, key);
|
||||
+ color_provider_.GenerateColorMap();
|
||||
}
|
||||
|
||||
protected:
|
||||
diff -up chromium-126.0.6478.26/ui/native_theme/native_theme_base.cc.mee chromium-126.0.6478.26/ui/native_theme/native_theme_base.cc
|
||||
--- chromium-126.0.6478.26/ui/native_theme/native_theme_base.cc.mee 2024-05-29 18:02:32.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/native_theme/native_theme_base.cc 2024-06-03 16:22:10.556568986 +0200
|
||||
@@ -1763,9 +1763,8 @@ bool NativeThemeBase::IsColorPipelineSup
|
||||
ControlColorId color_id) const {
|
||||
// Color providers are not yet supported on Android so we need to check that
|
||||
// the color_provider is not null here.
|
||||
- if (!color_provider || !color_provider->HasMixers()) {
|
||||
+ if (!color_provider || color_provider->IsColorMapEmpty())
|
||||
return false;
|
||||
- }
|
||||
|
||||
static constexpr auto kControlColorIdsSet =
|
||||
base::MakeFixedFlatSet<ControlColorId>({kBorder,
|
||||
diff -up chromium-126.0.6478.26/ui/native_theme/native_theme_fluent_unittest.cc.mee chromium-126.0.6478.26/ui/native_theme/native_theme_fluent_unittest.cc
|
||||
--- chromium-126.0.6478.26/ui/native_theme/native_theme_fluent_unittest.cc.mee 2024-05-29 18:02:32.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/native_theme/native_theme_fluent_unittest.cc 2024-06-03 16:22:10.556568986 +0200
|
||||
@@ -134,6 +134,7 @@ TEST_P(NativeThemeFluentTest, VerifyArro
|
||||
TEST_F(NativeThemeFluentTest, PaintThumbRoundedCorners) {
|
||||
cc::RecordPaintCanvas canvas;
|
||||
ColorProvider color_provider;
|
||||
+ color_provider.GenerateColorMap();
|
||||
constexpr gfx::Rect kRect(15, 100);
|
||||
// `is_web_test` is `false` by default.
|
||||
const NativeTheme::ScrollbarThumbExtraParams extra_params;
|
||||
diff -up chromium-126.0.6478.26/ui/wm/core/shadow_controller_unittest.cc.mee chromium-126.0.6478.26/ui/wm/core/shadow_controller_unittest.cc
|
||||
--- chromium-126.0.6478.26/ui/wm/core/shadow_controller_unittest.cc.mee 2024-05-29 18:02:32.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/ui/wm/core/shadow_controller_unittest.cc 2024-06-03 16:22:10.556568986 +0200
|
||||
@@ -285,6 +285,7 @@ TEST_F(ShadowControllerTest, SetColorsMa
|
||||
mixer[ui::kColorShadowValueAmbientShadowElevationTwelve] = {SK_ColorRED};
|
||||
mixer[ui::kColorShadowValueKeyShadowElevationTwentyFour] = {SK_ColorGREEN};
|
||||
mixer[ui::kColorShadowValueAmbientShadowElevationTwentyFour] = {SK_ColorBLUE};
|
||||
+ color_provider.GenerateColorMap();
|
||||
|
||||
shadow->SetElevationToColorsMap(
|
||||
ShadowController::GenerateShadowColorsMap(&color_provider));
|
||||
248
chromium-126-el7-constexpr.patch
Normal file
248
chromium-126-el7-constexpr.patch
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
diff -up chromium-126.0.6478.26/chrome/browser/ui/lens/lens_untrusted_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/lens/lens_untrusted_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/lens/lens_untrusted_ui.h.constexpr 2024-05-29 18:00:58.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/lens/lens_untrusted_ui.h 2024-06-02 23:51:25.539916606 +0200
|
||||
@@ -47,7 +47,7 @@ class LensUntrustedUI : public Untrusted
|
||||
mojo::PendingReceiver<color_change_listener::mojom::PageHandler>
|
||||
receiver);
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "LensUntrusted"; }
|
||||
+ static const std::string GetWebUIName() { return "LensUntrusted"; }
|
||||
|
||||
private:
|
||||
// lens::mojom::LensPageHandlerFactory:
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/lens/search_bubble_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/lens/search_bubble_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/lens/search_bubble_ui.h.constexpr 2024-05-29 18:00:58.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/lens/search_bubble_ui.h 2024-06-02 23:51:25.539916606 +0200
|
||||
@@ -25,7 +25,7 @@ class SearchBubbleUI : public TopChromeW
|
||||
mojo::PendingReceiver<lens::mojom::SearchBubblePageHandlerFactory>
|
||||
receiver);
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "LensSearchBubble"; }
|
||||
+ static const std::string GetWebUIName() { return "LensSearchBubble"; }
|
||||
|
||||
private:
|
||||
// lens::mojom::SearchBubblePageHandlerFactory
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h 2024-06-02 23:51:25.539916606 +0200
|
||||
@@ -55,7 +55,7 @@ class ShoppingInsightsSidePanelUI
|
||||
mojo::PendingReceiver<
|
||||
shopping_service::mojom::ShoppingServiceHandlerFactory> receiver);
|
||||
|
||||
- static constexpr std::string GetWebUIName() {
|
||||
+ static const std::string GetWebUIName() {
|
||||
return "ShoppingInsightsSidePanel";
|
||||
}
|
||||
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/compose/compose_untrusted_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/compose/compose_untrusted_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/compose/compose_untrusted_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/compose/compose_untrusted_ui.h 2024-06-02 23:51:25.540916630 +0200
|
||||
@@ -58,7 +58,7 @@ class ComposeUntrustedUI
|
||||
triggering_web_contents_ = web_contents->GetWeakPtr();
|
||||
}
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "Compose"; }
|
||||
+ static const std::string GetWebUIName() { return "Compose"; }
|
||||
|
||||
private:
|
||||
void CreateComposeSessionUntrustedPageHandler(
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h 2024-06-02 23:51:25.540916630 +0200
|
||||
@@ -75,7 +75,7 @@ class BookmarksSidePanelUI
|
||||
commerce::ShoppingListContextMenuController*
|
||||
GetShoppingListContextMenuController();
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "BookmarksSidePanel"; }
|
||||
+ static const std::string GetWebUIName() { return "BookmarksSidePanel"; }
|
||||
|
||||
private:
|
||||
// side_panel::mojom::BookmarksPageHandlerFactory:
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/companion/companion_side_panel_untrusted_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/companion/companion_side_panel_untrusted_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/companion/companion_side_panel_untrusted_ui.h.constexpr 2024-06-03 18:20:28.504604071 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/companion/companion_side_panel_untrusted_ui.h 2024-06-03 18:20:44.559016497 +0200
|
||||
@@ -34,7 +34,7 @@ class CompanionSidePanelUntrustedUI
|
||||
// Gets a weak pointer to this object.
|
||||
base::WeakPtr<CompanionSidePanelUntrustedUI> GetWeakPtr();
|
||||
|
||||
- static constexpr std::string GetWebUIName() {
|
||||
+ static const std::string GetWebUIName() {
|
||||
return "CompanionSidePanelUntrusted";
|
||||
}
|
||||
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h.constexpr 2024-06-03 18:13:52.741282949 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h 2024-06-03 18:14:34.718442888 +0200
|
||||
@@ -111,7 +111,7 @@ class CustomizeChromeUI
|
||||
side_panel::customize_chrome::mojom::CustomizeToolbarHandlerFactory>
|
||||
receiver);
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "CustomizeChrome"; }
|
||||
+ static const std::string GetWebUIName() { return "CustomizeChrome"; }
|
||||
|
||||
private:
|
||||
// side_panel::mojom::CustomizeChromePageHandlerFactory
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h 2024-06-02 23:51:25.540916630 +0200
|
||||
@@ -70,7 +70,7 @@ class HistoryClustersSidePanelUI : publi
|
||||
void DidFinishNavigation(
|
||||
content::NavigationHandle* navigation_handle) override;
|
||||
|
||||
- static constexpr std::string GetWebUIName() {
|
||||
+ static const std::string GetWebUIName() {
|
||||
return "HistoryClustersSidePanel";
|
||||
}
|
||||
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h 2024-06-02 23:51:25.540916630 +0200
|
||||
@@ -41,7 +41,7 @@ class PerformanceSidePanelUI
|
||||
mojo::PendingReceiver<color_change_listener::mojom::PageHandler>
|
||||
pending_receiver);
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "PerformanceSidePanel"; }
|
||||
+ static const std::string GetWebUIName() { return "PerformanceSidePanel"; }
|
||||
|
||||
private:
|
||||
// side_panel::mojom::PerformancePageHandlerFactory:
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h.constexpr 2024-05-29 18:01:00.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h 2024-06-02 23:51:25.541916654 +0200
|
||||
@@ -55,7 +55,7 @@ class ReadAnythingUntrustedUI
|
||||
mojo::PendingReceiver<read_anything::mojom::UntrustedPageHandlerFactory>
|
||||
receiver);
|
||||
|
||||
- static constexpr std::string GetWebUIName() {
|
||||
+ static const std::string GetWebUIName() {
|
||||
return "ReadAnythingUntrusted";
|
||||
}
|
||||
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h.constexpr 2024-05-29 18:01:00.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h 2024-06-02 23:51:25.541916654 +0200
|
||||
@@ -58,7 +58,7 @@ class ReadingListUI : public TopChromeWe
|
||||
|
||||
void SetActiveTabURL(const GURL& url);
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "ReadingList"; }
|
||||
+ static const std::string GetWebUIName() { return "ReadingList"; }
|
||||
|
||||
private:
|
||||
// reading_list::mojom::PageHandlerFactory:
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h.constexpr 2024-05-29 18:01:00.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h 2024-06-02 23:51:25.541916654 +0200
|
||||
@@ -35,7 +35,7 @@ class UserNotesSidePanelUI
|
||||
|
||||
void set_browser(Browser* browser) { browser_ = browser; }
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "UserNotesSidePanel"; }
|
||||
+ static const std::string GetWebUIName() { return "UserNotesSidePanel"; }
|
||||
|
||||
private:
|
||||
// user_notes::mojom::UserNotesPageHandlerFactory
|
||||
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/tab_search/tab_search_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/tab_search/tab_search_ui.h
|
||||
--- chromium-126.0.6478.26/chrome/browser/ui/webui/tab_search/tab_search_ui.h.constexpr 2024-05-29 18:01:00.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/tab_search/tab_search_ui.h 2024-06-02 23:51:25.542916677 +0200
|
||||
@@ -58,7 +58,7 @@ class TabSearchUI : public TopChromeWebU
|
||||
return page_handler_.get();
|
||||
}
|
||||
|
||||
- static constexpr std::string GetWebUIName() { return "TabSearch"; }
|
||||
+ static const std::string GetWebUIName() { return "TabSearch"; }
|
||||
|
||||
private:
|
||||
// tab_search::mojom::PageHandlerFactory
|
||||
diff -up chromium-126.0.6478.26/components/autofill/core/browser/data_model/autofill_i18n_api.h.constexpr chromium-126.0.6478.26/components/autofill/core/browser/data_model/autofill_i18n_api.h
|
||||
--- chromium-126.0.6478.26/components/autofill/core/browser/data_model/autofill_i18n_api.h.constexpr 2024-05-29 18:01:05.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/components/autofill/core/browser/data_model/autofill_i18n_api.h 2024-06-02 23:51:25.542916677 +0200
|
||||
@@ -16,8 +16,8 @@ namespace autofill::i18n_model_definitio
|
||||
// Country code that represents autofill's legacy address hierarchy model as
|
||||
// stored `kAutofillModelRules`. As a workaround for GCC we declare the
|
||||
// std::string constexpr first.
|
||||
-constexpr inline std::string kLegacyHierarchyCountryCodeString{"XX"};
|
||||
-constexpr AddressCountryCode kLegacyHierarchyCountryCode =
|
||||
+const inline std::string kLegacyHierarchyCountryCodeString{"XX"};
|
||||
+const AddressCountryCode kLegacyHierarchyCountryCode =
|
||||
AddressCountryCode(kLegacyHierarchyCountryCodeString);
|
||||
|
||||
// Creates an instance of the address hierarchy model corresponding to the
|
||||
diff -up chromium-126.0.6478.26/components/autofill/core/browser/form_parsing/transpile_regex_patterns.py.constexpr chromium-126.0.6478.26/components/autofill/core/browser/form_parsing/transpile_regex_patterns.py
|
||||
--- chromium-126.0.6478.26/components/autofill/core/browser/form_parsing/transpile_regex_patterns.py.constexpr 2024-05-29 18:01:05.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/components/autofill/core/browser/form_parsing/transpile_regex_patterns.py 2024-06-02 23:51:36.322172739 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/opt/rh/rh-python38/root/usr/bin/python
|
||||
|
||||
# Copyright 2020 The Chromium Authors
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
@@ -54,7 +54,7 @@ def generate_matching_pattern_equals(nam
|
||||
yield '// Checks if all the matching patterns for the given PatternSources'
|
||||
yield '// and language are the same - meaning that computing predictions for'
|
||||
yield '// both is unnecessary, since it will yield the same result.'
|
||||
- yield 'constexpr bool AreMatchingPatternsEqualImpl(PatternSource a,'
|
||||
+ yield 'const bool AreMatchingPatternsEqualImpl(PatternSource a,'
|
||||
yield ' PatternSource b,'
|
||||
yield ' LanguageCode lang_code) {'
|
||||
yield ' if (a == b) {'
|
||||
diff -up chromium-126.0.6478.26/components/autofill/core/browser/metrics/log_event.h.constexpr chromium-126.0.6478.26/components/autofill/core/browser/metrics/log_event.h
|
||||
--- chromium-126.0.6478.26/components/autofill/core/browser/metrics/log_event.h.constexpr 2024-05-29 18:01:05.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/components/autofill/core/browser/metrics/log_event.h 2024-06-02 23:51:25.542916677 +0200
|
||||
@@ -57,7 +57,7 @@ struct IsRequired {
|
||||
// This function is not defined and consteval. Therefore, any evaluation will
|
||||
// fail and fail at compile time.
|
||||
template <typename T>
|
||||
- consteval operator T(); // NOLINT
|
||||
+ operator T(); // NOLINT
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
diff -up chromium-126.0.6478.26/components/history/core/browser/history_types.h.constexpr chromium-126.0.6478.26/components/history/core/browser/history_types.h
|
||||
--- chromium-126.0.6478.26/components/history/core/browser/history_types.h.constexpr 2024-05-29 18:01:06.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/components/history/core/browser/history_types.h 2024-06-02 23:51:25.542916677 +0200
|
||||
@@ -70,7 +70,7 @@ constexpr VisitedLinkID kInvalidVisitedL
|
||||
typedef std::map<VisitID, VisitSource> VisitSourceMap;
|
||||
|
||||
// Constant used to represent that no app_id is used for matching.
|
||||
-inline constexpr std::optional<std::string> kNoAppIdFilter = std::nullopt;
|
||||
+inline const std::optional<std::string> kNoAppIdFilter = std::nullopt;
|
||||
|
||||
// VisitRow -------------------------------------------------------------------
|
||||
|
||||
diff -up chromium-126.0.6478.26/components/omnibox/browser/on_device_tail_model_service.cc.constexpr chromium-126.0.6478.26/components/omnibox/browser/on_device_tail_model_service.cc
|
||||
--- chromium-126.0.6478.26/components/omnibox/browser/on_device_tail_model_service.cc.constexpr 2024-05-29 18:01:07.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/components/omnibox/browser/on_device_tail_model_service.cc 2024-06-02 23:51:25.543916702 +0200
|
||||
@@ -30,7 +30,7 @@ namespace {
|
||||
// The maximum idle time before the model executor is unloaded from memory.
|
||||
constexpr base::TimeDelta kMaxExecutorIdleSeconds = base::Seconds(60);
|
||||
// Constants for TFlite model validation.
|
||||
-constexpr std::string kTestPrefix = "face";
|
||||
+const std::string kTestPrefix = "face";
|
||||
constexpr std::string_view kModelValidationSwitchName =
|
||||
"omnibox-on-device-tail-model-validation";
|
||||
|
||||
diff -up chromium-126.0.6478.26/services/network/shared_dictionary/simple_url_pattern_matcher.cc.constexpr chromium-126.0.6478.26/services/network/shared_dictionary/simple_url_pattern_matcher.cc
|
||||
--- chromium-126.0.6478.26/services/network/shared_dictionary/simple_url_pattern_matcher.cc.constexpr 2024-05-29 18:01:36.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/services/network/shared_dictionary/simple_url_pattern_matcher.cc 2024-06-02 23:51:25.543916702 +0200
|
||||
@@ -28,17 +28,17 @@ namespace network {
|
||||
namespace {
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#default-options
|
||||
-constexpr liburlpattern::Options kDefaultOptions = {.delimiter_list = "",
|
||||
+const liburlpattern::Options kDefaultOptions = {.delimiter_list = "",
|
||||
.prefix_list = "",
|
||||
.sensitive = true,
|
||||
.strict = true};
|
||||
// https://urlpattern.spec.whatwg.org/#hostname-options
|
||||
-constexpr liburlpattern::Options kHostnameOptions = {.delimiter_list = ".",
|
||||
+const liburlpattern::Options kHostnameOptions = {.delimiter_list = ".",
|
||||
.prefix_list = "",
|
||||
.sensitive = true,
|
||||
.strict = true};
|
||||
// https://urlpattern.spec.whatwg.org/#pathname-options
|
||||
-constexpr liburlpattern::Options kPathnameOptions = {.delimiter_list = "/",
|
||||
+const liburlpattern::Options kPathnameOptions = {.delimiter_list = "/",
|
||||
.prefix_list = "/",
|
||||
.sensitive = true,
|
||||
.strict = true};
|
||||
47
chromium-126-el7-include-fcntl-memfd.patch
Normal file
47
chromium-126-el7-include-fcntl-memfd.patch
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
diff -up chromium-126.0.6478.26/third_party/wayland/src/cursor/os-compatibility.c.el7-memfd-fcntl-include chromium-126.0.6478.26/third_party/wayland/src/cursor/os-compatibility.c
|
||||
--- chromium-126.0.6478.26/third_party/wayland/src/cursor/os-compatibility.c.el7-memfd-fcntl-include 2024-05-29 18:03:08.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/third_party/wayland/src/cursor/os-compatibility.c 2024-06-02 15:13:21.636638066 +0200
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
-#include <fcntl.h>
|
||||
+#include <linux/fcntl.h> // for F_SEAL_SHRINK, F_ADD_SEALS, F_SEAL_SEAL
|
||||
+#include <linux/memfd.h> // for MFD_CLOEXEC
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
diff -up chromium-126.0.6478.26/third_party/wayland/src/src/wayland-shm.c.el7-memfd-fcntl-include chromium-126.0.6478.26/third_party/wayland/src/src/wayland-shm.c
|
||||
--- chromium-126.0.6478.26/third_party/wayland/src/src/wayland-shm.c.el7-memfd-fcntl-include 2024-05-29 18:03:08.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/third_party/wayland/src/src/wayland-shm.c 2024-06-02 15:13:21.635638045 +0200
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
-#include <fcntl.h>
|
||||
+#include <linux/fcntl.h>
|
||||
|
||||
#include "wayland-os.h"
|
||||
#include "wayland-util.h"
|
||||
diff -up chromium-126.0.6478.26/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc.el7-memfd-fcntl-include chromium-126.0.6478.26/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc
|
||||
--- chromium-126.0.6478.26/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc.el7-memfd-fcntl-include 2024-06-02 15:13:21.636638066 +0200
|
||||
+++ chromium-126.0.6478.26/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc 2024-06-02 15:16:18.202679909 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
+#include <linux/memfd.h>
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
diff -up chromium-126.0.6478.26/v8/src/base/platform/platform-posix.cc.el7-memfd-fcntl-include chromium-126.0.6478.26/v8/src/base/platform/platform-posix.cc
|
||||
--- chromium-126.0.6478.26/v8/src/base/platform/platform-posix.cc.el7-memfd-fcntl-include 2024-05-29 18:03:35.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/v8/src/base/platform/platform-posix.cc 2024-06-02 15:13:21.635638045 +0200
|
||||
@@ -60,6 +60,7 @@
|
||||
|
||||
#if V8_OS_LINUX
|
||||
#include <sys/prctl.h> // for prctl
|
||||
+#include <linux/memfd.h> // for MFD_CLOEXEC
|
||||
#endif
|
||||
|
||||
#if defined(V8_OS_FUCHSIA)
|
||||
12
chromium-126-el7-interator.patch
Normal file
12
chromium-126-el7-interator.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h.me chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h
|
||||
--- chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h.me 2024-06-03 15:01:54.724207324 +0200
|
||||
+++ chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h 2024-06-03 14:58:16.244189794 +0200
|
||||
@@ -144,7 +144,7 @@ class QUICHE_NO_EXPORT QuicIntervalDeque
|
||||
// for efficient std::lower_bound() calls.
|
||||
class QUICHE_NO_EXPORT Iterator {
|
||||
public:
|
||||
- using iterator_category = std::random_access_iterator_tag;
|
||||
+ using iterator_category = std::forward_iterator_tag;
|
||||
using value_type = T;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = T*;
|
||||
1961
chromium-126-el7-no_matching_constructor.patch
Normal file
1961
chromium-126-el7-no_matching_constructor.patch
Normal file
File diff suppressed because it is too large
Load diff
137
chromium-126-el7-old-cups.patch
Normal file
137
chromium-126-el7-old-cups.patch
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
diff -up chromium-126.0.6478.26/printing/backend/cups_helper.cc.el7cups chromium-126.0.6478.26/printing/backend/cups_helper.cc
|
||||
--- chromium-126.0.6478.26/printing/backend/cups_helper.cc.el7cups 2024-06-03 17:16:32.197509643 +0200
|
||||
+++ chromium-126.0.6478.26/printing/backend/cups_helper.cc 2024-06-03 17:32:23.028376333 +0200
|
||||
@@ -41,18 +41,6 @@ namespace printing {
|
||||
// This section contains helper code for PPD parsing for semantic capabilities.
|
||||
namespace {
|
||||
|
||||
-// Function availability can be tested by checking whether its address is not
|
||||
-// nullptr. Weak symbols remove the need for platform specific build flags and
|
||||
-// allow for appropriate CUPS usage on platforms with non-uniform version
|
||||
-// support, namely Linux.
|
||||
-#define WEAK_CUPS_FN(x) extern "C" __attribute__((weak)) decltype(x) x
|
||||
-
|
||||
-WEAK_CUPS_FN(httpConnect2);
|
||||
-
|
||||
-// Timeout for establishing a CUPS connection. It is expected that cupsd is
|
||||
-// able to start and respond on all systems within this duration.
|
||||
-constexpr base::TimeDelta kCupsTimeout = base::Seconds(5);
|
||||
-
|
||||
// CUPS default max copies value (parsed from kCupsMaxCopies PPD attribute).
|
||||
constexpr int32_t kDefaultMaxCopies = 9999;
|
||||
constexpr char kCupsMaxCopies[] = "cupsMaxCopies";
|
||||
@@ -761,8 +749,7 @@ const int kDefaultIPPServerPort = 631;
|
||||
// Helper wrapper around http_t structure, with connection and cleanup
|
||||
// functionality.
|
||||
HttpConnectionCUPS::HttpConnectionCUPS(const GURL& print_server_url,
|
||||
- http_encryption_t encryption,
|
||||
- bool blocking) {
|
||||
+ http_encryption_t encryption) {
|
||||
// If we have an empty url, use default print server.
|
||||
if (print_server_url.is_empty())
|
||||
return;
|
||||
@@ -771,31 +758,22 @@ HttpConnectionCUPS::HttpConnectionCUPS(c
|
||||
if (port == url::PORT_UNSPECIFIED)
|
||||
port = kDefaultIPPServerPort;
|
||||
|
||||
- if (httpConnect2) {
|
||||
- http_.reset(httpConnect2(print_server_url.host().c_str(), port,
|
||||
- /*addrlist=*/nullptr, AF_UNSPEC, encryption,
|
||||
- blocking ? 1 : 0, kCupsTimeout.InMilliseconds(),
|
||||
- /*cancel=*/nullptr));
|
||||
- } else {
|
||||
- // Continue to use deprecated CUPS calls because because older Linux
|
||||
- // distribution such as RHEL/CentOS 7 are shipped with CUPS 1.6.
|
||||
- http_.reset(
|
||||
+ http_.reset(
|
||||
httpConnectEncrypt(print_server_url.host().c_str(), port, encryption));
|
||||
- }
|
||||
|
||||
if (!http_) {
|
||||
LOG(ERROR) << "CP_CUPS: Failed connecting to print server: "
|
||||
<< print_server_url;
|
||||
return;
|
||||
}
|
||||
-
|
||||
- if (!httpConnect2) {
|
||||
- httpBlocking(http(), blocking ? 1 : 0);
|
||||
- }
|
||||
}
|
||||
|
||||
HttpConnectionCUPS::~HttpConnectionCUPS() = default;
|
||||
|
||||
+void HttpConnectionCUPS::SetBlocking(bool blocking) {
|
||||
+ httpBlocking(http(), blocking ? 1 : 0);
|
||||
+}
|
||||
+
|
||||
http_t* HttpConnectionCUPS::http() {
|
||||
return http_.get();
|
||||
}
|
||||
diff -up chromium-126.0.6478.26/printing/backend/cups_helper.h.el7cups chromium-126.0.6478.26/printing/backend/cups_helper.h
|
||||
--- chromium-126.0.6478.26/printing/backend/cups_helper.h.el7cups 2024-06-03 17:23:35.923307842 +0200
|
||||
+++ chromium-126.0.6478.26/printing/backend/cups_helper.h 2024-06-03 17:25:50.887855460 +0200
|
||||
@@ -36,10 +36,11 @@ constexpr cups_ptype_t kDestinationsFilt
|
||||
class COMPONENT_EXPORT(PRINT_BACKEND) HttpConnectionCUPS {
|
||||
public:
|
||||
HttpConnectionCUPS(const GURL& print_server_url,
|
||||
- http_encryption_t encryption,
|
||||
- bool blocking);
|
||||
+ http_encryption_t encryption);
|
||||
~HttpConnectionCUPS();
|
||||
|
||||
+ void SetBlocking(bool blocking);
|
||||
+
|
||||
http_t* http();
|
||||
|
||||
private:
|
||||
diff -up chromium-126.0.6478.26/printing/backend/print_backend_cups.cc.el7cups chromium-126.0.6478.26/printing/backend/print_backend_cups.cc
|
||||
--- chromium-126.0.6478.26/printing/backend/print_backend_cups.cc.el7cups 2024-06-03 17:26:44.607871149 +0200
|
||||
+++ chromium-126.0.6478.26/printing/backend/print_backend_cups.cc 2024-06-03 17:29:15.889810651 +0200
|
||||
@@ -149,7 +149,7 @@ mojom::ResultCode PrintBackendCUPS::Enum
|
||||
// not showing as available. Using cupsEnumDests() allows us to do our own
|
||||
// filtering should any duplicates occur.
|
||||
CupsDestsData dests_data = {0, nullptr};
|
||||
- ipp_status_t last_error = IPP_STATUS_OK;
|
||||
+ ipp_status_t last_error = IPP_OK;
|
||||
if (print_server_url_.is_empty()) {
|
||||
VLOG(1) << "CUPS: using cupsEnumDests to enumerate printers";
|
||||
if (!cupsEnumDests(CUPS_DEST_FLAGS_NONE, kCupsTimeoutMs,
|
||||
@@ -176,7 +176,7 @@ mojom::ResultCode PrintBackendCUPS::Enum
|
||||
// no printer drivers installed. Rely upon CUPS error code to distinguish
|
||||
// between these.
|
||||
DCHECK(!dests_data.dests);
|
||||
- if (last_error != IPP_STATUS_ERROR_NOT_FOUND) {
|
||||
+ if (last_error != IPP_NOT_FOUND) {
|
||||
VLOG(1) << "CUPS: Error getting printers from CUPS server"
|
||||
<< ", server: " << print_server_url_
|
||||
<< ", error: " << static_cast<int>(last_error) << " - "
|
||||
@@ -311,7 +311,8 @@ int PrintBackendCUPS::GetDests(cups_dest
|
||||
if (print_server_url_.is_empty())
|
||||
return cupsGetDests2(CUPS_HTTP_DEFAULT, dests);
|
||||
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
|
||||
// This call must be made in the same scope as `http` because its destructor
|
||||
// closes the connection.
|
||||
@@ -337,7 +338,8 @@ base::FilePath PrintBackendCUPS::GetPPD(
|
||||
// connection will timeout after 10 seconds of no data period. And it will
|
||||
// return the same way as if data was completely and successfully
|
||||
// downloaded.
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
ppd_file_path = cupsGetPPD2(http.http(), name);
|
||||
// Check if the get full PPD, since non-blocking call may simply return
|
||||
// normally after timeout expired.
|
||||
@@ -373,7 +375,8 @@ ScopedDestination PrintBackendCUPS::GetN
|
||||
// Use default (local) print server.
|
||||
dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer_name.c_str(), nullptr);
|
||||
} else {
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
dest = cupsGetNamedDest(http.http(), printer_name.c_str(), nullptr);
|
||||
}
|
||||
return ScopedDestination(dest);
|
||||
1667
chromium-126-el7-rust-c_string.patch
Normal file
1667
chromium-126-el7-rust-c_string.patch
Normal file
File diff suppressed because it is too large
Load diff
96
chromium-126-el7-std_variant.patch
Normal file
96
chromium-126-el7-std_variant.patch
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
diff -up chromium-126.0.6478.26/components/visited_url_ranking/internal/visited_url_ranking_service_impl.cc.std_variant chromium-126.0.6478.26/components/visited_url_ranking/internal/visited_url_ranking_service_impl.cc
|
||||
--- chromium-126.0.6478.26/components/visited_url_ranking/internal/visited_url_ranking_service_impl.cc.std_variant 2024-06-04 12:31:10.602282813 +0200
|
||||
+++ chromium-126.0.6478.26/components/visited_url_ranking/internal/visited_url_ranking_service_impl.cc 2024-06-04 13:21:50.121345183 +0200
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
-#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include "base/barrier_callback.h"
|
||||
@@ -41,20 +40,16 @@ std::vector<URLVisitAggregate> ComputeUR
|
||||
for (std::pair<const URLMergeKey, URLVisitAggregate::URLVisitVariant>&
|
||||
url_data : result.data) {
|
||||
URLVisitAggregate& aggregate = url_visit_map[url_data.first];
|
||||
- std::visit(
|
||||
- URLVisitVariantHelper{
|
||||
- [&aggregate](URLVisitAggregate::TabData& tab_data) {
|
||||
- aggregate.fetcher_data_map.emplace(
|
||||
- tab_data.last_active_tab.session_name.has_value()
|
||||
- ? Fetcher::kSession
|
||||
- : Fetcher::kTabModel,
|
||||
- std::move(tab_data));
|
||||
- },
|
||||
- [&aggregate](URLVisitAggregate::HistoryData& history_data) {
|
||||
- aggregate.fetcher_data_map.emplace(Fetcher::kHistory,
|
||||
- std::move(history_data));
|
||||
- }},
|
||||
- url_data.second);
|
||||
+ if (std::holds_alternative<URLVisitAggregate::TabData>(url_data.second)) {
|
||||
+ auto& tab_data = std::get<URLVisitAggregate::TabData>(url_data.second);
|
||||
+ aggregate.fetcher_data_map.emplace(
|
||||
+ tab_data.last_active_tab.session_name.has_value()
|
||||
+ ? Fetcher::kSession
|
||||
+ : Fetcher::kTabModel,
|
||||
+ std::move(tab_data));
|
||||
+ }
|
||||
+ // TODO(crbug.com/330580109): Add support for history fetcher and
|
||||
+ // associated aggregate data type.
|
||||
}
|
||||
}
|
||||
|
||||
diff -up chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.cc.std_variant chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.cc
|
||||
--- chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.cc.std_variant 2024-06-04 12:29:20.593240495 +0200
|
||||
+++ chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.cc 2024-06-04 12:29:57.253921979 +0200
|
||||
@@ -37,14 +37,12 @@ URLVisitAggregate& URLVisitAggregate::op
|
||||
std::set<const GURL*> URLVisitAggregate::GetAssociatedURLs() const {
|
||||
std::set<const GURL*> urls = {};
|
||||
for (const auto& fetcher_entry : fetcher_data_map) {
|
||||
- std::visit(URLVisitVariantHelper{
|
||||
- [&urls](const URLVisitAggregate::TabData& tab_data) {
|
||||
- urls.insert(&tab_data.last_active_tab.visit.url);
|
||||
- },
|
||||
- [&urls](const URLVisitAggregate::HistoryData& history_data) {
|
||||
- urls.insert(&history_data.last_visited.url_row.url());
|
||||
- }},
|
||||
- fetcher_entry.second);
|
||||
+ if (std::holds_alternative<URLVisitAggregate::TabData>(
|
||||
+ fetcher_entry.second)) {
|
||||
+ const auto& tab_data =
|
||||
+ std::get<URLVisitAggregate::TabData>(fetcher_entry.second);
|
||||
+ urls.insert(&tab_data.last_active_tab.visit.url);
|
||||
+ }
|
||||
}
|
||||
return urls;
|
||||
}
|
||||
diff -up chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.h.std_variant chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.h
|
||||
--- chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.h.std_variant 2024-06-04 11:05:39.505847241 +0200
|
||||
+++ chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.h 2024-06-04 13:22:26.518007748 +0200
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
+#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include "base/functional/callback.h"
|
||||
@@ -140,18 +141,6 @@ struct URLVisitAggregate {
|
||||
bool bookmarked = false;
|
||||
};
|
||||
|
||||
-// Helper to visit each variant of URLVisitVariant.
|
||||
-// Usage:
|
||||
-// std::visit(URLVisitVariantHelper{
|
||||
-// [](Variant1& variant1) {},
|
||||
-// [](Variant2& variant1) {},
|
||||
-// [](Variant3& variant1) {},
|
||||
-// variant_data);
|
||||
-template <class... Ts>
|
||||
-struct URLVisitVariantHelper : Ts... {
|
||||
- using Ts::operator()...;
|
||||
-};
|
||||
-
|
||||
} // namespace visited_url_ranking
|
||||
|
||||
#endif // COMPONENTS_VISITED_URL_RANKING_PUBLIC_URL_VISIT_H_
|
||||
21
chromium-126-el7-stdformat.patch
Normal file
21
chromium-126-el7-stdformat.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff -up chromium-126.0.6478.26/chrome/renderer/accessibility/read_anything_app_model.cc.stdformat chromium-126.0.6478.26/chrome/renderer/accessibility/read_anything_app_model.cc
|
||||
--- chromium-126.0.6478.26/chrome/renderer/accessibility/read_anything_app_model.cc.stdformat 2024-06-03 22:52:18.596936767 +0200
|
||||
+++ chromium-126.0.6478.26/chrome/renderer/accessibility/read_anything_app_model.cc 2024-06-03 23:26:46.024734453 +0200
|
||||
@@ -1059,7 +1059,7 @@ std::string ReadAnythingAppModel::GetHtm
|
||||
int32_t hierarchical_level =
|
||||
ax_node->GetIntAttribute(ax::mojom::IntAttribute::kHierarchicalLevel);
|
||||
if (hierarchical_level) {
|
||||
- return std::format("h{}", hierarchical_level);
|
||||
+ return std::string("h" + std::to_string(hierarchical_level));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1159,7 +1159,7 @@ std::string ReadAnythingAppModel::GetHea
|
||||
int32_t hierarchical_level =
|
||||
ax_node->GetIntAttribute(ax::mojom::IntAttribute::kHierarchicalLevel);
|
||||
if (hierarchical_level) {
|
||||
- return std::format("h{}", hierarchical_level);
|
||||
+ return std::string("h" + std::to_string(hierarchical_level));
|
||||
}
|
||||
return html_tag;
|
||||
}
|
||||
30
chromium-126-el7-type-alias.patch
Normal file
30
chromium-126-el7-type-alias.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
diff -up chromium-126.0.6478.26/components/plus_addresses/plus_address_service.cc.el7-type-alias chromium-126.0.6478.26/components/plus_addresses/plus_address_service.cc
|
||||
--- chromium-126.0.6478.26/components/plus_addresses/plus_address_service.cc.el7-type-alias 2024-05-29 18:01:08.000000000 +0200
|
||||
+++ chromium-126.0.6478.26/components/plus_addresses/plus_address_service.cc 2024-06-02 17:32:29.917153207 +0200
|
||||
@@ -196,7 +196,7 @@ std::vector<Suggestion> PlusAddressServi
|
||||
bool is_off_the_record,
|
||||
std::u16string_view focused_field_value,
|
||||
autofill::AutofillSuggestionTriggerSource trigger_source) {
|
||||
- using enum autofill::AutofillSuggestionTriggerSource;
|
||||
+ using autofill::AutofillSuggestionTriggerSource;
|
||||
if (!SupportsPlusAddresses(last_committed_primary_main_frame_origin,
|
||||
is_off_the_record)) {
|
||||
return {};
|
||||
@@ -207,7 +207,7 @@ std::vector<Suggestion> PlusAddressServi
|
||||
std::optional<std::string> maybe_address =
|
||||
GetPlusAddress(OriginToFacet(last_committed_primary_main_frame_origin));
|
||||
if (maybe_address == std::nullopt) {
|
||||
- if (trigger_source != kManualFallbackPlusAddresses &&
|
||||
+ if (trigger_source != AutofillSuggestionTriggerSource::kManualFallbackPlusAddresses &&
|
||||
!normalized_field_value.empty()) {
|
||||
return {};
|
||||
}
|
||||
@@ -222,7 +222,7 @@ std::vector<Suggestion> PlusAddressServi
|
||||
|
||||
// Only suggest filling a plus address whose prefix matches the field's value.
|
||||
std::u16string address = base::UTF8ToUTF16(*maybe_address);
|
||||
- if (trigger_source != kManualFallbackPlusAddresses &&
|
||||
+ if (trigger_source != AutofillSuggestionTriggerSource::kManualFallbackPlusAddresses &&
|
||||
!address.starts_with(normalized_field_value)) {
|
||||
return {};
|
||||
}
|
||||
15
chromium-126-ifunc-header.patch
Normal file
15
chromium-126-ifunc-header.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff -up chromium-126.0.6478.55/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me chromium-126.0.6478.55/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h
|
||||
--- chromium-126.0.6478.55/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me 2024-06-12 13:09:47.539620293 -0400
|
||||
+++ chromium-126.0.6478.55/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h 2024-06-12 13:12:10.570739701 -0400
|
||||
@@ -10,9 +10,11 @@
|
||||
#include "partition_alloc/build_config.h"
|
||||
#include "partition_alloc/partition_alloc_buildflags.h"
|
||||
|
||||
+#if 0
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
|
||||
#define HAS_HW_CAPS
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(ARCH_CPU_ARM64) && defined(HAS_HW_CAPS)
|
||||
#include <asm/hwcap.h>
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
diff -up chromium-142.0.7444.52/build/config/compiler/BUILD.gn.split-threshold-for-reg-with-hint chromium-142.0.7444.52/build/config/compiler/BUILD.gn
|
||||
--- chromium-142.0.7444.52/build/config/compiler/BUILD.gn.split-threshold-for-reg-with-hint 2025-10-28 19:31:53.885979941 +0100
|
||||
+++ chromium-142.0.7444.52/build/config/compiler/BUILD.gn 2025-10-28 19:39:50.279574752 +0100
|
||||
@@ -680,22 +680,6 @@ config("compiler") {
|
||||
diff -up chromium-126.0.6478.26/build/config/compiler/BUILD.gn.me chromium-126.0.6478.26/build/config/compiler/BUILD.gn
|
||||
--- chromium-126.0.6478.26/build/config/compiler/BUILD.gn.me 2024-06-02 14:02:52.516602574 +0200
|
||||
+++ chromium-126.0.6478.26/build/config/compiler/BUILD.gn 2024-06-02 14:17:24.527503540 +0200
|
||||
@@ -575,24 +575,6 @@ config("compiler") {
|
||||
}
|
||||
}
|
||||
|
||||
- # TODO(crbug.com/40283598): This causes binary size growth and potentially
|
||||
- # other problems.
|
||||
- if (default_toolchain != "//build/toolchain/cros:target") {
|
||||
- # TODO(crbug.com/40284925): This isn't supported by Cronet's mainline llvm version.
|
||||
- if (default_toolchain != "//build/toolchain/cros:target" &&
|
||||
- !llvm_android_mainline) {
|
||||
- cflags += [
|
||||
- "-mllvm",
|
||||
- "-split-threshold-for-reg-with-hint=0",
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue