qt6-pdf: update to 6.7.2.

This commit is contained in:
Đoàn Trần Công Danh 2024-06-23 10:44:30 +07:00 committed by Đoàn Trần Công Danh
parent 3461399637
commit b3384817f5
79 changed files with 2647 additions and 3419 deletions

View file

@ -1,6 +1,6 @@
--- qt6-webengine-6.4.2.orig/cmake/Functions.cmake
+++ qt6-webengine-6.4.2/cmake/Functions.cmake
@@ -820,6 +820,8 @@ macro(append_build_type_setup)
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -844,6 +844,8 @@ macro(append_build_type_setup)
endif()
elseif(${config} STREQUAL "MinSizeRel")
list(APPEND gnArgArg is_debug=false symbol_level=0 optimize_for_size=true)

View file

@ -1,10 +1,10 @@
--- qt6-webengine-6.4.2.orig/src/core/api/CMakeLists.txt
+++ qt6-webengine-6.4.2/src/core/api/CMakeLists.txt
@@ -51,6 +51,7 @@ qt_internal_add_module(WebEngineCore
--- a/src/core/api/CMakeLists.txt
+++ b/src/core/api/CMakeLists.txt
@@ -57,6 +57,7 @@ qt_internal_add_module(WebEngineCore
Qt::Gui
Qt::Network
Qt::Quick
+ X11
EXTRA_CMAKE_FILES
"${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}WebEngineCoreDeploySupport.cmake"
)
set_target_properties(WebEngineCore PROPERTIES QTWEBENGINEPROCESS_NAME ${qtWebEngineProcessName})

View file

@ -1,28 +0,0 @@
Index: chromium-111.0.5563.64/third_party/angle/gni/angle.gni
===================================================================
--- chromium-111.0.5563.64.orig/third_party/angle/gni/angle.gni
+++ chromium-111.0.5563.64/third_party/angle/gni/angle.gni
@@ -105,7 +105,8 @@ declare_args() {
if (current_cpu == "arm64" || current_cpu == "x64" ||
current_cpu == "mips64el" || current_cpu == "s390x" ||
- current_cpu == "ppc64" || current_cpu == "loong64") {
+ current_cpu == "ppc64" || current_cpu == "loong64" ||
+ current_cpu == "riscv64") {
angle_64bit_current_cpu = true
} else if (current_cpu == "arm" || current_cpu == "x86" ||
current_cpu == "mipsel" || current_cpu == "s390" ||
Index: chromium-111.0.5563.64/third_party/angle/src/common/platform.h
===================================================================
--- chromium-111.0.5563.64.orig/third_party/angle/src/common/platform.h
+++ chromium-111.0.5563.64/third_party/angle/src/common/platform.h
@@ -108,7 +108,7 @@
#endif
// Mips and arm devices need to include stddef for size_t.
-#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
+#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
# include <stddef.h>
#endif

View file

@ -1 +0,0 @@
-Np1 --directory=src/3rdparty/chromium/

View file

@ -1,778 +0,0 @@
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context.h
@@ -637,6 +637,41 @@ struct MinidumpContextMIPS64 {
uint64_t fir;
};
+//! \brief 64bit RISC-V-specifc flags for MinidumpContextRISCV64::context_flags.
+//! Based on minidump_cpu_riscv64.h from breakpad
+enum MinidumpContextRISCV64Flags : uint32_t {
+ //! \brief Identifies the context structure as RISCV64.
+ kMinidumpContextRISCV64 = 0x00080000,
+
+ //! \brief Indicates the validity of integer registers.
+ //!
+ //! Registers `x1`-`x31` and pc are valid.
+ kMinidumpContextRISCV64Integer = kMinidumpContextRISCV64 | 0x00000002,
+
+ //! \brief Indicates the validity of floating point registers.
+ //!
+ //! Floating point registers `f0`-`f31`, and `fcsr` are valid
+ kMinidumpContextRISCV64FloatingPoint = kMinidumpContextRISCV64 | 0x00000004,
+
+ //! \brief Indicates the validity of all registers.
+ kMinidumpContextRISCV64All = kMinidumpContextRISCV64Integer |
+ kMinidumpContextRISCV64FloatingPoint,
+};
+
+//! \brief A 64bit RISCV CPU context (register state) carried in a minidump file.
+struct MinidumpContextRISCV64 {
+ uint64_t context_flags;
+
+ //! \brief General purpose registers.
+ uint64_t regs[32];
+
+ //! \brief FPU registers.
+ uint64_t fpregs[32];
+
+ //! \brief FPU status register.
+ uint64_t fcsr;
+};
+
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
@@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapsho
break;
}
+ case kCPUArchitectureRISCV64: {
+ context = std::make_unique<MinidumpContextRISCV64Writer>();
+ reinterpret_cast<MinidumpContextRISCV64Writer*>(context.get())
+ ->InitializeFromSnapshot(context_snapshot->riscv64);
+ break;
+ }
+
default: {
LOG(ERROR) << "unknown context architecture "
<< context_snapshot->architecture;
@@ -555,5 +562,42 @@ size_t MinidumpContextMIPS64Writer::Cont
DCHECK_GE(state(), kStateFrozen);
return sizeof(context_);
}
+
+MinidumpContextRISCV64Writer::MinidumpContextRISCV64Writer()
+ : MinidumpContextWriter(), context_() {
+ context_.context_flags = kMinidumpContextRISCV64;
+}
+
+MinidumpContextRISCV64Writer::~MinidumpContextRISCV64Writer() = default;
+
+void MinidumpContextRISCV64Writer::InitializeFromSnapshot(
+ const CPUContextRISCV64* context_snapshot) {
+ DCHECK_EQ(state(), kStateMutable);
+ DCHECK_EQ(context_.context_flags, kMinidumpContextRISCV64);
+
+ context_.context_flags = kMinidumpContextRISCV64All;
+
+ static_assert(sizeof(context_.regs) == sizeof(context_snapshot->regs),
+ "GPRs size mismatch");
+ memcpy(context_.regs, context_snapshot->regs, sizeof(context_.regs));
+
+ static_assert(sizeof(context_.fpregs) == sizeof(context_snapshot->fpregs),
+ "FPRs size mismatch");
+ memcpy(context_.fpregs,
+ context_snapshot->fpregs,
+ sizeof(context_.fpregs));
+ context_.fcsr = context_snapshot->fcsr;
+}
+
+bool MinidumpContextRISCV64Writer::WriteObject(
+ FileWriterInterface* file_writer) {
+ DCHECK_EQ(state(), kStateWritable);
+ return file_writer->Write(&context_, sizeof(context_));
+}
+
+size_t MinidumpContextRISCV64Writer::ContextSize() const {
+ DCHECK_GE(state(), kStateFrozen);
+ return sizeof(context_);
+}
} // namespace crashpad
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
@@ -369,6 +369,49 @@ class MinidumpContextMIPS64Writer final
MinidumpContextMIPS64 context_;
};
+//! \brief The writer for a MinidumpContextRISCV64 structure in a minidump file.
+class MinidumpContextRISCV64Writer final : public MinidumpContextWriter {
+ public:
+ MinidumpContextRISCV64Writer();
+
+ MinidumpContextRISCV64Writer(const MinidumpContextRISCV64Writer&) = delete;
+ MinidumpContextRISCV64Writer& operator=(const MinidumpContextRISCV64Writer&) =
+ delete;
+
+ ~MinidumpContextRISCV64Writer() override;
+
+ //! \brief Initializes the MinidumpContextRISCV based on \a context_snapshot.
+ //!
+ //! \param[in] context_snapshot The context snapshot to use as source data.
+ //!
+ //! \note Valid in #kStateMutable. No mutation of context() may be done before
+ //! calling this method, and it is not normally necessary to alter
+ //! context() after calling this method.
+ void InitializeFromSnapshot(const CPUContextRISCV64* context_snapshot);
+
+ //! \brief Returns a pointer to the context structure that this object will
+ //! write.
+ //!
+ //! \attention This returns a non-`const` pointer to this objects private
+ //! data so that a caller can populate the context structure directly.
+ //! This is done because providing setter interfaces to each field in the
+ //! context structure would be unwieldy and cumbersome. Care must be taken
+ //! to populate the context structure correctly. The context structure
+ //! must only be modified while this object is in the #kStateMutable
+ //! state.
+ MinidumpContextRISCV64* context() { return &context_; }
+
+ protected:
+ // MinidumpWritable:
+ bool WriteObject(FileWriterInterface* file_writer) override;
+
+ // MinidumpContextWriter:
+ size_t ContextSize() const override;
+
+ private:
+ MinidumpContextRISCV64 context_;
+};
+
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
@@ -175,6 +175,10 @@ std::string MinidumpMiscInfoDebugBuildSt
static constexpr char kCPU[] = "mips";
#elif defined(ARCH_CPU_MIPS64EL)
static constexpr char kCPU[] = "mips64";
+#elif defined(ARCH_CPU_RISCV32)
+ static constexpr char kCPU[] = "riscv32";
+#elif defined(ARCH_CPU_RISCV64)
+ static constexpr char kCPU[] = "riscv64";
#else
#error define kCPU for this CPU
#endif
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/capture_memory.cc
@@ -117,6 +117,16 @@ void CaptureMemory::PointedToByContext(c
for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ if (context.architecture == kCPUArchitectureRISCV64) {
+ for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) {
+ MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
+ }
+ } else {
+ for (size_t i = 0; i < std::size(context.riscv32->regs); ++i) {
+ MaybeCaptureMemoryAround(delegate, context.riscv32->regs[i]);
+ }
+ }
#else
#error Port.
#endif
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
@@ -43,7 +43,13 @@ enum CPUArchitecture {
kCPUArchitectureMIPSEL,
//! \brief 64-bit MIPSEL.
- kCPUArchitectureMIPS64EL
+ kCPUArchitectureMIPS64EL,
+
+ //! \brief 32-bit RISCV.
+ kCPUArchitectureRISCV32,
+
+ //! \brief 64-bit RISCV.
+ kCPUArchitectureRISCV64
};
} // namespace crashpad
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.cc
@@ -226,10 +226,12 @@ bool CPUContext::Is64Bit() const {
case kCPUArchitectureX86_64:
case kCPUArchitectureARM64:
case kCPUArchitectureMIPS64EL:
+ case kCPUArchitectureRISCV64:
return true;
case kCPUArchitectureX86:
case kCPUArchitectureARM:
case kCPUArchitectureMIPSEL:
+ case kCPUArchitectureRISCV32:
return false;
default:
NOTREACHED();
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/cpu_context.h
@@ -362,6 +362,20 @@ struct CPUContextMIPS64 {
uint64_t fir;
};
+//! \brief A context structure carrying RISCV32 CPU state.
+struct CPUContextRISCV32 {
+ uint32_t regs[32];
+ uint64_t fpregs[32];
+ uint32_t fcsr;
+};
+
+//! \brief A context structure carrying RISCV64 CPU state.
+struct CPUContextRISCV64 {
+ uint64_t regs[32];
+ uint64_t fpregs[32];
+ uint32_t fcsr;
+};
+
//! \brief A context structure capable of carrying the context of any supported
//! CPU architecture.
struct CPUContext {
@@ -402,6 +416,8 @@ struct CPUContext {
CPUContextARM64* arm64;
CPUContextMIPS* mipsel;
CPUContextMIPS64* mips64;
+ CPUContextRISCV32* riscv32;
+ CPUContextRISCV64* riscv64;
};
};
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
@@ -266,6 +266,30 @@ void InitializeCPUContextARM64_OnlyFPSIM
context->fpcr = float_context.fpcr;
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Traits>
+void InitializeCPUContextRISCV(
+ const typename Traits::SignalThreadContext& thread_context,
+ const typename Traits::SignalFloatContext& float_context,
+ typename Traits::CPUContext* context) {
+ static_assert(sizeof(context->regs) == sizeof(thread_context),
+ "registers size mismatch");
+ static_assert(sizeof(context->fpregs) == sizeof(float_context.f),
+ "fp registers size mismatch");
+ memcpy(&context->regs, &thread_context, sizeof(context->regs));
+ memcpy(&context->fpregs, &float_context.f, sizeof(context->fpregs));
+ context->fcsr = float_context.fcsr;
+}
+template void InitializeCPUContextRISCV<ContextTraits32>(
+ const ContextTraits32::SignalThreadContext& thread_context,
+ const ContextTraits32::SignalFloatContext& float_context,
+ ContextTraits32::CPUContext* context);
+template void InitializeCPUContextRISCV<ContextTraits64>(
+ const ContextTraits64::SignalThreadContext& thread_context,
+ const ContextTraits64::SignalFloatContext& float_context,
+ ContextTraits64::CPUContext* context);
+
#endif // ARCH_CPU_X86_FAMILY
} // namespace internal
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
@@ -174,6 +174,22 @@ void InitializeCPUContextMIPS(
#endif // ARCH_CPU_MIPS_FAMILY || DOXYGEN
+#if defined(ARCH_CPU_RISCV_FAMILY) || DOXYGEN
+
+//! \brief Initializes a CPUContextRISCV structure from native context
+//! structures on Linux.
+//!
+//! \param[in] thread_context The native thread context.
+//! \param[in] float_context The native float context.
+//! \param[out] context The CPUContextRISCV structure to initialize.
+template <typename Traits>
+void InitializeCPUContextRISCV(
+ const typename Traits::SignalThreadContext& thread_context,
+ const typename Traits::SignalFloatContext& float_context,
+ typename Traits::CPUContext* context);
+
+#endif // ARCH_CPU_RISCV_FAMILY || DOXYGEN
+
} // namespace internal
} // namespace crashpad
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
@@ -325,6 +325,61 @@ bool ExceptionSnapshotLinux::ReadContext
reader, context_address, context_.mips64);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Traits>
+static bool ReadContext(ProcessReaderLinux* reader,
+ LinuxVMAddress context_address,
+ typename Traits::CPUContext* dest_context) {
+ const ProcessMemory* memory = reader->Memory();
+
+ LinuxVMAddress gregs_address = context_address +
+ offsetof(UContext<Traits>, mcontext) +
+ offsetof(typename Traits::MContext, gregs);
+
+ typename Traits::SignalThreadContext thread_context;
+ if (!memory->Read(gregs_address, sizeof(thread_context), &thread_context)) {
+ LOG(ERROR) << "Couldn't read gregs";
+ return false;
+ }
+
+ LinuxVMAddress fpregs_address = context_address +
+ offsetof(UContext<Traits>, mcontext) +
+ offsetof(typename Traits::MContext, fpregs);
+
+ typename Traits::SignalFloatContext fp_context;
+ if (!memory->Read(fpregs_address, sizeof(fp_context), &fp_context)) {
+ LOG(ERROR) << "Couldn't read fpregs";
+ return false;
+ }
+
+ InitializeCPUContextRISCV<Traits>(thread_context, fp_context, dest_context);
+
+ return true;
+}
+
+template <>
+bool ExceptionSnapshotLinux::ReadContext<ContextTraits32>(
+ ProcessReaderLinux* reader,
+ LinuxVMAddress context_address) {
+ context_.architecture = kCPUArchitectureRISCV32;
+ context_.riscv32 = &context_union_.riscv32;
+
+ return internal::ReadContext<ContextTraits32>(
+ reader, context_address, context_.riscv32);
+}
+
+template <>
+bool ExceptionSnapshotLinux::ReadContext<ContextTraits64>(
+ ProcessReaderLinux* reader,
+ LinuxVMAddress context_address) {
+ context_.architecture = kCPUArchitectureRISCV64;
+ context_.riscv64 = &context_union_.riscv64;
+
+ return internal::ReadContext<ContextTraits64>(
+ reader, context_address, context_.riscv64);
+}
+
#endif // ARCH_CPU_X86_FAMILY
bool ExceptionSnapshotLinux::Initialize(
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
@@ -89,6 +89,9 @@ class ExceptionSnapshotLinux final : pub
#elif defined(ARCH_CPU_MIPS_FAMILY)
CPUContextMIPS mipsel;
CPUContextMIPS64 mips64;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ CPUContextRISCV32 riscv32;
+ CPUContextRISCV64 riscv64;
#endif
} context_union_;
CPUContext context_;
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
@@ -127,6 +127,9 @@ void ProcessReaderLinux::Thread::Initial
#elif defined(ARCH_CPU_MIPS_FAMILY)
stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.regs[29]
: thread_info.thread_context.t32.regs[29];
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.sp
+ : thread_info.thread_context.t32.sp;
#else
#error Port.
#endif
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
@@ -422,6 +422,67 @@ static_assert(offsetof(UContext<ContextT
"context offset mismatch");
#endif
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+struct MContext32 {
+ uint32_t gregs[32];
+ uint64_t fpregs[32];
+ unsigned int fcsr;
+};
+
+struct MContext64 {
+ uint64_t gregs[32];
+ uint64_t fpregs[32];
+ unsigned int fcsr;
+};
+
+struct ContextTraits32 : public Traits32 {
+ using MContext = MContext32;
+ using SignalThreadContext = ThreadContext::t32_t;
+ using SignalFloatContext = FloatContext::f32_t;
+ using CPUContext = CPUContextRISCV32;
+};
+
+struct ContextTraits64 : public Traits64 {
+ using MContext = MContext64;
+ using SignalThreadContext = ThreadContext::t64_t;
+ using SignalFloatContext = FloatContext::f64_t;
+ using CPUContext = CPUContextRISCV64;
+};
+
+template <typename Traits>
+struct UContext {
+ typename Traits::ULong flags;
+ typename Traits::Address link;
+ SignalStack<Traits> stack;
+ Sigset<Traits> sigmask;
+ char padding[128 - sizeof(sigmask)];
+ typename Traits::Char_64Only padding2[8];
+ typename Traits::MContext mcontext;
+};
+
+#if defined(ARCH_CPU_RISCV32)
+static_assert(offsetof(UContext<ContextTraits32>, mcontext) ==
+ offsetof(ucontext_t, uc_mcontext),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits32>, mcontext.gregs) ==
+ offsetof(ucontext_t, uc_mcontext.__gregs),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits32>, mcontext.fpregs) ==
+ offsetof(ucontext_t, uc_mcontext.__fpregs),
+ "context offset mismatch");
+#elif defined(ARCH_CPU_RISCV64)
+static_assert(offsetof(UContext<ContextTraits64>, mcontext) ==
+ offsetof(ucontext_t, uc_mcontext),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits64>, mcontext.gregs) ==
+ offsetof(ucontext_t, uc_mcontext.__gregs),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits64>, mcontext.fpregs) ==
+ offsetof(ucontext_t, uc_mcontext.__fpregs),
+ "context offset mismatch");
+#endif
+
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
@@ -205,6 +205,9 @@ CPUArchitecture SystemSnapshotLinux::Get
#elif defined(ARCH_CPU_MIPS_FAMILY)
return process_reader_->Is64Bit() ? kCPUArchitectureMIPS64EL
: kCPUArchitectureMIPSEL;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ return process_reader_->Is64Bit() ? kCPUArchitectureRISCV64
+ : kCPUArchitectureRISCV32;
#else
#error port to your architecture
#endif
@@ -220,6 +223,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return 0;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return 0;
#else
#error port to your architecture
#endif
@@ -240,6 +246,9 @@ std::string SystemSnapshotLinux::CPUVend
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return std::string();
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return std::string();
#else
#error port to your architecture
#endif
@@ -373,6 +382,9 @@ bool SystemSnapshotLinux::NXEnabled() co
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return false;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return false;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
@@ -190,6 +190,22 @@ bool ThreadSnapshotLinux::Initialize(
thread.thread_info.float_context.f32,
context_.mipsel);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ if (process_reader->Is64Bit()) {
+ context_.architecture = kCPUArchitectureRISCV64;
+ context_.riscv64 = &context_union_.riscv64;
+ InitializeCPUContextRISCV<ContextTraits64>(
+ thread.thread_info.thread_context.t64,
+ thread.thread_info.float_context.f64,
+ context_.riscv64);
+ } else {
+ context_.architecture = kCPUArchitectureRISCV32;
+ context_.riscv32 = &context_union_.riscv32;
+ InitializeCPUContextRISCV<ContextTraits32>(
+ thread.thread_info.thread_context.t32,
+ thread.thread_info.float_context.f32,
+ context_.riscv32);
+ }
#else
#error Port.
#endif
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
@@ -74,6 +74,9 @@ class ThreadSnapshotLinux final : public
#elif defined(ARCH_CPU_MIPS_FAMILY)
CPUContextMIPS mipsel;
CPUContextMIPS64 mips64;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ CPUContextRISCV32 riscv32;
+ CPUContextRISCV64 riscv64;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/ptracer.cc
@@ -398,6 +398,51 @@ bool GetThreadArea64(pid_t tid,
return true;
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Destination>
+bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
+ iovec iov;
+ iov.iov_base = dest;
+ iov.iov_len = sizeof(*dest);
+ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
+ PLOG_IF(ERROR, can_log) << "ptrace";
+ return false;
+ }
+ if (iov.iov_len != sizeof(*dest)) {
+ LOG_IF(ERROR, can_log) << "Unexpected registers size";
+ return false;
+ }
+ return true;
+}
+
+bool GetFloatingPointRegisters32(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return false;
+}
+
+bool GetFloatingPointRegisters64(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
+}
+
+bool GetThreadArea32(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ return false;
+}
+
+bool GetThreadArea64(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ *address = context.t64.tp;
+ return true;
+}
+
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/linux/thread_info.h
@@ -79,6 +79,40 @@ union ThreadContext {
uint32_t cp0_status;
uint32_t cp0_cause;
uint32_t padding1_;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Reflects user_regs_struct in asm/ptrace.h.
+ uint32_t pc;
+ uint32_t ra;
+ uint32_t sp;
+ uint32_t gp;
+ uint32_t tp;
+ uint32_t t0;
+ uint32_t t1;
+ uint32_t t2;
+ uint32_t s0;
+ uint32_t s1;
+ uint32_t a0;
+ uint32_t a1;
+ uint32_t a2;
+ uint32_t a3;
+ uint32_t a4;
+ uint32_t a5;
+ uint32_t a6;
+ uint32_t a7;
+ uint32_t s2;
+ uint32_t s3;
+ uint32_t s4;
+ uint32_t s5;
+ uint32_t s6;
+ uint32_t s7;
+ uint32_t s8;
+ uint32_t s9;
+ uint32_t s10;
+ uint32_t s11;
+ uint32_t t3;
+ uint32_t t4;
+ uint32_t t5;
+ uint32_t t6;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -132,6 +166,40 @@ union ThreadContext {
uint64_t cp0_badvaddr;
uint64_t cp0_status;
uint64_t cp0_cause;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Reflects user_regs_struct in asm/ptrace.h.
+ uint64_t pc;
+ uint64_t ra;
+ uint64_t sp;
+ uint64_t gp;
+ uint64_t tp;
+ uint64_t t0;
+ uint64_t t1;
+ uint64_t t2;
+ uint64_t s0;
+ uint64_t s1;
+ uint64_t a0;
+ uint64_t a1;
+ uint64_t a2;
+ uint64_t a3;
+ uint64_t a4;
+ uint64_t a5;
+ uint64_t a6;
+ uint64_t a7;
+ uint64_t s2;
+ uint64_t s3;
+ uint64_t s4;
+ uint64_t s5;
+ uint64_t s6;
+ uint64_t s7;
+ uint64_t s8;
+ uint64_t s9;
+ uint64_t s10;
+ uint64_t s11;
+ uint64_t t3;
+ uint64_t t4;
+ uint64_t t5;
+ uint64_t t6;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -143,11 +211,12 @@ union ThreadContext {
using NativeThreadContext = user_regs;
#elif defined(ARCH_CPU_MIPS_FAMILY)
// No appropriate NativeThreadsContext type available for MIPS
+#elif defined(ARCH_CPU_RISCV_FAMILY)
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64
-#if !defined(ARCH_CPU_MIPS_FAMILY)
+#if !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_RISCV_FAMILY)
#if defined(ARCH_CPU_32_BITS)
static_assert(sizeof(t32_t) == sizeof(NativeThreadContext), "Size mismatch");
#else // ARCH_CPU_64_BITS
@@ -218,6 +287,9 @@ union FloatContext {
} fpregs[32];
uint32_t fpcsr;
uint32_t fpu_id;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ uint64_t f[32];
+ uint32_t fcsr;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -252,6 +324,9 @@ union FloatContext {
double fpregs[32];
uint32_t fpcsr;
uint32_t fpu_id;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ uint64_t f[32];
+ uint32_t fcsr;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -281,6 +356,7 @@ union FloatContext {
static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch");
#elif defined(ARCH_CPU_MIPS_FAMILY)
// No appropriate floating point context native type for available MIPS.
+#elif defined(ARCH_CPU_RISCV_FAMILY)
#else
#error Port.
#endif // ARCH_CPU_X86
Index: chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
===================================================================
--- chromium-106.0.5249.91.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+++ chromium-106.0.5249.91/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
@@ -237,6 +237,8 @@ std::string UserAgent() {
#elif defined(ARCH_CPU_BIG_ENDIAN)
static constexpr char arch[] = "aarch64_be";
#endif
+#elif defined(ARCH_CPU_RISCV64)
+ static constexpr char arch[] = "riscv64";
#else
#error Port
#endif

View file

@ -1 +0,0 @@
-Np1 --directory=src/3rdparty/chromium/

View file

@ -1,44 +0,0 @@
Index: chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
===================================================================
--- /dev/null
+++ chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h
@@ -0,0 +1,38 @@
+/*
+ * Autogenerated by the Meson build system.
+ * Do not edit, your changes will be lost.
+ */
+
+#pragma once
+
+#define ARCH_AARCH64 0
+
+#define ARCH_ARM 0
+
+#define ARCH_PPC64LE 0
+
+#define ARCH_X86 0
+
+#define ARCH_X86_32 0
+
+#define ARCH_X86_64 0
+
+#define CONFIG_16BPC 1
+
+#define CONFIG_8BPC 1
+
+// #define CONFIG_LOG 1 -- Logging is controlled by Chromium
+
+#define ENDIANNESS_BIG 0
+
+#define HAVE_ASM 0
+
+#define HAVE_AS_FUNC 0
+
+#define HAVE_CLOCK_GETTIME 1
+
+#define HAVE_GETAUXVAL 1
+
+#define HAVE_POSIX_MEMALIGN 1
+
+#define HAVE_UNISTD_H 1

View file

@ -1 +0,0 @@
-Np1 --directory=src/3rdparty/chromium/

File diff suppressed because it is too large Load diff

View file

@ -1 +0,0 @@
-Np1 --directory=src/3rdparty/chromium/

View file

@ -1,11 +0,0 @@
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni 2023-10-03 21:49:54.000000000 +0200
+++ - 2023-10-27 19:05:06.146398062 +0200
@@ -14,7 +14,7 @@
if (is_nacl) {
# NaCl targets don't use 64-bit pointers.
has_64_bit_pointers = false
-} else if (current_cpu == "x64" || current_cpu == "arm64") {
+} else if (current_cpu == "x64" || current_cpu == "arm64" || current_cpu == "riscv64") {
has_64_bit_pointers = true
} else if (current_cpu == "x86" || current_cpu == "arm") {
has_64_bit_pointers = false

View file

@ -0,0 +1,52 @@
--- a/src/3rdparty/chromium/media/filters/audio_file_reader_unittest.cc
+++ b/src/3rdparty/chromium/media/filters/audio_file_reader_unittest.cc
@@ -121,11 +121,11 @@ class AudioFileReaderTest : public testi
EXPECT_FALSE(reader_->Open());
}
- void RunTestFailingDecode(const char* fn, int expect_read = 0) {
+ void RunTestFailingDecode(const char* fn) {
Initialize(fn);
EXPECT_TRUE(reader_->Open());
std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets;
- EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read);
+ EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0);
}
void RunTestPartialDecode(const char* fn) {
@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) {
}
TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) {
- RunTestFailingDecode("midstream_config_change.mp3", 42624);
+ RunTestFailingDecode("midstream_config_change.mp3");
}
#endif
--- a/src/3rdparty/chromium/media/filters/audio_video_metadata_extractor.cc
+++ b/src/3rdparty/chromium/media/filters/audio_video_metadata_extractor.cc
@@ -113,15 +113,6 @@ bool AudioVideoMetadataExtractor::Extrac
if (!stream)
continue;
- void* display_matrix =
- av_stream_get_side_data(stream, AV_PKT_DATA_DISPLAYMATRIX, nullptr);
- if (display_matrix) {
- rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(
- static_cast<int32_t*>(display_matrix))
- .rotation;
- info.tags["rotate"] = base::NumberToString(rotation_);
- }
-
// Extract dictionary from streams also. Needed for containers that attach
// metadata to contained streams instead the container itself, like OGG.
ExtractDictionary(stream->metadata, &info.tags);
@@ -264,6 +255,8 @@ void AudioVideoMetadataExtractor::Extrac
if (raw_tags->find(tag->key) == raw_tags->end())
(*raw_tags)[tag->key] = tag->value;
+ if (ExtractInt(tag, "rotate", &rotation_))
+ continue;
if (ExtractString(tag, "album", &album_))
continue;
if (ExtractString(tag, "artist", &artist_))

View file

@ -0,0 +1,37 @@
Patch-Source: https://github.com/archlinux/svntogit-packages/blob/a353833a5a731abfaa465b658f61894a516aa49b/trunk/angle-wayland-include-protocol.patch
--- a/src/3rdparty/chromium/third_party/angle/BUILD.gn
+++ b/src/3rdparty/chromium/third_party/angle/BUILD.gn
@@ -588,6 +588,12 @@ config("angle_vulkan_wayland_config") {
if (angle_enable_vulkan && angle_use_wayland &&
defined(vulkan_wayland_include_dirs)) {
include_dirs = vulkan_wayland_include_dirs
+ } else if (angle_enable_vulkan && angle_use_wayland) {
+ include_dirs = [
+ "$wayland_gn_dir/src/src",
+ "$wayland_gn_dir/include/src",
+ "$wayland_gn_dir/include/protocol",
+ ]
}
}
@@ -1176,6 +1182,7 @@ if (angle_use_wayland) {
include_dirs = [
"$wayland_dir/egl",
"$wayland_dir/src",
+ "$wayland_gn_dir/include/protocol",
]
}
--- a/src/3rdparty/chromium/third_party/angle/src/third_party/volk/BUILD.gn
+++ b/src/3rdparty/chromium/third_party/angle/src/third_party/volk/BUILD.gn
@@ -21,6 +21,9 @@ source_set("volk") {
configs += [ "$angle_root:angle_no_cfi_icall" ]
public_deps = [ "$angle_vulkan_headers_dir:vulkan_headers" ]
if (angle_use_wayland) {
- include_dirs = [ "$wayland_dir/src" ]
+ include_dirs = [
+ "$wayland_dir/src",
+ "$wayland_gn_dir/include/protocol",
+ ]
}
}

View file

@ -0,0 +1,84 @@
--- a/src/3rdparty/chromium/third_party/six/src/six.py
+++ b/src/3rdparty/chromium/third_party/six/src/six.py
@@ -29,7 +29,7 @@ import sys
import types
__author__ = "Benjamin Peterson <benjamin@python.org>"
-__version__ = "1.14.0"
+__version__ = "1.16.0"
# Useful for very coarse version differentiation.
@@ -71,6 +71,11 @@ else:
MAXSIZE = int((1 << 63) - 1)
del X
+if PY34:
+ from importlib.util import spec_from_loader
+else:
+ spec_from_loader = None
+
def _add_doc(func, doc):
"""Add documentation to a function."""
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
return self
return None
+ def find_spec(self, fullname, path, target=None):
+ if fullname in self.known_modules:
+ return spec_from_loader(fullname, self)
+ return None
+
def __get_module(self, fullname):
try:
return self.known_modules[fullname]
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
return None
get_source = get_code # same as get_code
+ def create_module(self, spec):
+ return self.load_module(spec.name)
+
+ def exec_module(self, module):
+ pass
+
_importer = _SixMetaPathImporter(__name__)
@@ -890,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', e
- `str` -> encoded to `bytes`
- `bytes` -> `bytes`
"""
+ if isinstance(s, binary_type):
+ return s
if isinstance(s, text_type):
return s.encode(encoding, errors)
- elif isinstance(s, binary_type):
- return s
- else:
- raise TypeError("not expecting type '%s'" % type(s))
+ raise TypeError("not expecting type '%s'" % type(s))
def ensure_str(s, encoding='utf-8', errors='strict'):
@@ -909,12 +924,15 @@ def ensure_str(s, encoding='utf-8', erro
- `str` -> `str`
- `bytes` -> decoded to `str`
"""
- if not isinstance(s, (text_type, binary_type)):
- raise TypeError("not expecting type '%s'" % type(s))
+ # Optimization: Fast return for the common case.
+ if type(s) is str:
+ return s
if PY2 and isinstance(s, text_type):
- s = s.encode(encoding, errors)
+ return s.encode(encoding, errors)
elif PY3 and isinstance(s, binary_type):
- s = s.decode(encoding, errors)
+ return s.decode(encoding, errors)
+ elif not isinstance(s, (text_type, binary_type)):
+ raise TypeError("not expecting type '%s'" % type(s))
return s

View file

@ -1,29 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/node/node.py
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/node/node.py
@@ -18,25 +18,7 @@ def which(cmd):
return None
def GetBinaryPath():
- if sys.platform == 'win32':
- nodejs = which('node.exe')
- if nodejs:
- return nodejs
- else:
- nodejs = which('nodejs')
- if nodejs:
- return nodejs
- nodejs = which('node')
- if nodejs:
- return nodejs
-
- darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else
- 'node-darwin-x64')
- return os_path.join(os_path.dirname(__file__), *{
- 'Darwin': ('mac', darwin_name, 'bin', 'node'),
- 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
- 'Windows': ('win', 'node.exe'),
- }[platform.system()])
+ return "/usr/bin/node"
def RunNode(cmd_parts, stdout=None):

View file

@ -0,0 +1,20 @@
From 345c58f1d85286b394c05bb8d871ac8173be90a3 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Fri, 31 Mar 2023 16:26:06 +0000
Subject: [PATCH] IWYU: add stdint.h for int types in maldoca
---
third_party/maldoca/src/maldoca/ole/header.h | 2 ++
1 file changed, 2 insertions(+)
--- a/src/3rdparty/chromium/third_party/maldoca/src/maldoca/ole/header.h
+++ b/src/3rdparty/chromium/third_party/maldoca/src/maldoca/ole/header.h
@@ -43,6 +43,8 @@
#ifndef MALDOCA_OLE_HEADER_H_
#define MALDOCA_OLE_HEADER_H_
+#include <stdint.h>
+
#include "absl/strings/string_view.h"
namespace maldoca {

View file

@ -0,0 +1,26 @@
Patch-Source: https://src.fedoraproject.org/rpms/chromium/blob/1f8fd846d2cc72c90c73c9867619f0da43b9c816/f/chromium-115-compiler-SkColor4f.patch
--- a/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
@@ -76,6 +76,7 @@ bool ParseCanvasColorString(const String
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);
@@ -83,12 +84,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();

View file

@ -1,18 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/files/scoped_file_linux.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/files/scoped_file_linux.cc
@@ -77,15 +77,3 @@ bool IsFDOwned(int fd) {
}
} // namespace base
-
-extern "C" {
-
-int __close(int);
-
-__attribute__((visibility("default"), noinline)) int close(int fd) {
- if (base::IsFDOwned(fd) && g_is_ownership_enforced)
- CrashOnFdOwnershipViolation();
- return __close(fd);
-}
-
-} // extern "C"

View file

@ -0,0 +1,91 @@
--- a/src/3rdparty/chromium/components/optimization_guide/core/tflite_model_executor.h
+++ b/src/3rdparty/chromium/components/optimization_guide/core/tflite_model_executor.h
@@ -240,7 +240,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_);
@@ -262,7 +262,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<absl::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_);
@@ -417,7 +417,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_);
@@ -434,7 +434,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<absl::optional<OutputType>>* outputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -494,7 +494,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_);
--- a/src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.cc
+++ b/src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.cc
@@ -399,7 +399,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();
}
@@ -435,7 +435,7 @@ class RetryingFetcherImpl final : public
}
// Client callback.
- ProtoFetcher<Response>::Callback callback_;
+ typename ProtoFetcher<Response>::Callback callback_;
// Retry controls.
base::OneShotTimer timer_;
@@ -578,7 +578,7 @@ ParallelFetchManager<Request, Response>:
template <typename Request, typename Response>
void ParallelFetchManager<Request, Response>::Fetch(
const Request& request,
- Fetcher::Callback callback) {
+ 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(
--- a/src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.h
+++ b/src/3rdparty/chromium/components/supervised_user/core/browser/proto_fetcher.h
@@ -165,10 +165,10 @@ 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);
private:
- using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
+ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
// Remove fetcher under key from requests_in_flight_.
void Remove(KeyType key);

View file

@ -1,10 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
@@ -3,6 +3,7 @@
#include <stddef.h>
+#include <cstdint>
#include <functional>
#include "quiche/common/platform/api/quiche_export.h"

View file

@ -0,0 +1,379 @@
--- a/src/3rdparty/chromium/base/memory/ref_counted.h
+++ b/src/3rdparty/chromium/base/memory/ref_counted.h
@@ -6,6 +6,7 @@
#define BASE_MEMORY_REF_COUNTED_H_
#include <stddef.h>
+#include <limits>
#include <limits>
#include <utility>
--- a/src/3rdparty/chromium/base/check_op.h
+++ b/src/3rdparty/chromium/base/check_op.h
@@ -5,6 +5,7 @@
#ifndef BASE_CHECK_OP_H_
#define BASE_CHECK_OP_H_
+#include <cstdint>
#include <cstddef>
#include <string>
#include <string_view>
--- a/src/3rdparty/chromium/base/debug/profiler.h
+++ b/src/3rdparty/chromium/base/debug/profiler.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <cstdint>
#include <string>
#include "base/base_export.h"
--- a/src/3rdparty/chromium/gpu/config/gpu_feature_info.h
+++ b/src/3rdparty/chromium/gpu/config/gpu_feature_info.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
#include <vector>
--- a/src/3rdparty/chromium/net/base/net_export.h
+++ b/src/3rdparty/chromium/net/base/net_export.h
@@ -5,6 +5,8 @@
#ifndef NET_BASE_NET_EXPORT_H_
#define NET_BASE_NET_EXPORT_H_
+#include <cstdint>
+
// Defines NET_EXPORT so that functionality implemented by the net module can
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
// access features not intended to be used directly by real consumers.
--- a/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_file_permission.h
+++ b/src/3rdparty/chromium/sandbox/linux/syscall_broker/broker_file_permission.h
@@ -5,6 +5,7 @@
#ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
#define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
+#include <cstdint>
#include <bitset>
#include <cstdint>
#include <string>
--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/string_view.h
+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/string_view.h
@@ -27,6 +27,7 @@
#ifndef ABSL_STRINGS_STRING_VIEW_H_
#define ABSL_STRINGS_STRING_VIEW_H_
+#include <cstdint>
#include <algorithm>
#include <cassert>
#include <cstddef>
--- a/src/3rdparty/chromium/third_party/angle/include/GLSLANG/ShaderVars.h
+++ b/src/3rdparty/chromium/third_party/angle/include/GLSLANG/ShaderVars.h
@@ -10,6 +10,7 @@
#ifndef GLSLANG_SHADERVARS_H_
#define GLSLANG_SHADERVARS_H_
+#include <cstdint>
#include <algorithm>
#include <array>
#include <cstdint>
--- a/src/3rdparty/chromium/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h
+++ b/src/3rdparty/chromium/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <array>
#include <cstdint>
#include <functional>
--- a/src/3rdparty/chromium/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
@@ -15,6 +15,7 @@
#ifndef SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
#define SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
+#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
--- a/src/3rdparty/chromium/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h
+++ b/src/3rdparty/chromium/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <functional>
#include <map>
#include <set>
--- a/src/3rdparty/chromium/third_party/swiftshader/src/System/LRUCache.hpp
+++ b/src/3rdparty/chromium/third_party/swiftshader/src/System/LRUCache.hpp
@@ -17,6 +17,7 @@
#include "System/Debug.hpp"
+#include <cstdint>
#include <cstddef>
#include <cstdint>
#include <functional>
--- a/src/3rdparty/chromium/ui/gfx/geometry/linear_gradient.h
+++ b/src/3rdparty/chromium/ui/gfx/geometry/linear_gradient.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <array>
#include <cstddef>
#include <cstdint>
--- a/src/3rdparty/chromium/third_party/ruy/src/ruy/profiler/instrumentation.h
+++ b/src/3rdparty/chromium/third_party/ruy/src/ruy/profiler/instrumentation.h
@@ -17,6 +17,7 @@ limitations under the License.
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
#ifdef RUY_PROFILER
+#include <string>
#include <cstdio>
#include <mutex>
#include <vector>
--- a/src/3rdparty/chromium/base/containers/flat_map.h
+++ b/src/3rdparty/chromium/base/containers/flat_map.h
@@ -5,6 +5,7 @@
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
#define BASE_CONTAINERS_FLAT_MAP_H_
+#include <cstdint>
#include <functional>
#include <tuple>
#include <type_traits>
--- a/src/3rdparty/chromium/components/crash/core/app/crash_reporter_client.h
+++ b/src/3rdparty/chromium/components/crash/core/app/crash_reporter_client.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
#include "build/build_config.h"
--- a/src/3rdparty/chromium/ui/base/prediction/kalman_filter.h
+++ b/src/3rdparty/chromium/ui/base/prediction/kalman_filter.h
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include <cstdint>
+
#include "base/component_export.h"
#include "ui/gfx/geometry/matrix3_f.h"
--- a/src/3rdparty/chromium/components/password_manager/core/browser/generation/password_generator.h
+++ b/src/3rdparty/chromium/components/password_manager/core/browser/generation/password_generator.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
--- a/src/3rdparty/chromium/components/feature_engagement/internal/event_storage_validator.h
+++ b/src/3rdparty/chromium/components/feature_engagement/internal/event_storage_validator.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
namespace feature_engagement {
--- a/src/3rdparty/chromium/components/feature_engagement/internal/never_event_storage_validator.h
+++ b/src/3rdparty/chromium/components/feature_engagement/internal/never_event_storage_validator.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
+#include <cstdint>
#include <string>
#include "components/feature_engagement/internal/event_storage_validator.h"
--- a/src/3rdparty/chromium/components/autofill/core/browser/autofill_ablation_study.h
+++ b/src/3rdparty/chromium/components/autofill/core/browser/autofill_ablation_study.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
class GURL;
--- a/src/3rdparty/chromium/components/payments/content/utility/fingerprint_parser.h
+++ b/src/3rdparty/chromium/components/payments/content/utility/fingerprint_parser.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
#define COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
+#include <cstdint>
#include <stddef.h>
#include <stdint.h>
--- a/src/3rdparty/chromium/pdf/document_attachment_info.h
+++ b/src/3rdparty/chromium/pdf/document_attachment_info.h
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
--- a/src/3rdparty/chromium/third_party/pdfium/constants/annotation_flags.h
+++ b/src/3rdparty/chromium/third_party/pdfium/constants/annotation_flags.h
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include <cstdint>
+
namespace pdfium {
namespace annotation_flags {
--- a/src/3rdparty/chromium/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
+++ b/src/3rdparty/chromium/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
@@ -2884,6 +2884,7 @@ static void vma_aligned_free(void* VMA_N
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
#if VMA_STATS_STRING_ENABLED
+#include <stdio.h>
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
{
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
--- a/src/3rdparty/chromium/gin/time_clamper.h
+++ b/src/3rdparty/chromium/gin/time_clamper.h
@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper {
const int64_t micros = now_micros % 1000;
// abs() is necessary for devices with times before unix-epoch (most likely
// configured incorrectly).
- if (abs(micros) + kResolutionMicros < 1000) {
+ if (std::abs(micros) + kResolutionMicros < 1000) {
return now_micros / 1000;
}
return ClampTimeResolution(now_micros) / 1000;
--- a/src/3rdparty/chromium/chrome/test/chromedriver/chrome/web_view_impl.cc
+++ b/src/3rdparty/chromium/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -11,6 +11,7 @@
#include <queue>
#include <utility>
#include <vector>
+#include <cstring>
#include "base/check.h"
#include "base/files/file_path.h"
--- a/src/3rdparty/chromium/skia/ext/skcolorspace_trfn.cc
+++ b/src/3rdparty/chromium/skia/ext/skcolorspace_trfn.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "skia/ext/skcolorspace_trfn.h"
+#include <cmath>
#include <cmath>
--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
+++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
@@ -11,6 +11,7 @@
#ifndef COMMON_VIDEO_H264_SPS_PARSER_H_
#define COMMON_VIDEO_H264_SPS_PARSER_H_
+#include <cstdint>
#include "absl/types/optional.h"
#include "rtc_base/bitstream_reader.h"
--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
@@ -11,6 +11,7 @@
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+#include <cstdint>
#include <limits>
#include "absl/types/optional.h"
--- a/src/3rdparty/chromium/ui/gfx/linux/drm_util_linux.h
+++ b/src/3rdparty/chromium/ui/gfx/linux/drm_util_linux.h
@@ -9,6 +9,8 @@
#include "ui/gfx/buffer_types.h"
+#include <cstdint>
+
namespace ui {
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
--- a/src/3rdparty/chromium/third_party/webrtc/audio/utility/channel_mixer.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/audio/utility/channel_mixer.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <cstring>
+
#include "audio/utility/channel_mixer.h"
#include "audio/utility/channel_mixing_matrix.h"
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc
@@ -10,6 +10,7 @@
#include "modules/video_coding/utility/ivf_file_reader.h"
+#include <cstring>
#include <string>
#include <vector>
--- a/src/3rdparty/chromium/third_party/ipcz/src/ipcz/router_link.h
+++ b/src/3rdparty/chromium/third_party/ipcz/src/ipcz/router_link.h
@@ -5,6 +5,7 @@
#ifndef IPCZ_SRC_IPCZ_ROUTER_LINK_H_
#define IPCZ_SRC_IPCZ_ROUTER_LINK_H_
+#include <memory>
#include <cstddef>
#include <functional>
#include <memory>
--- a/src/3rdparty/chromium/third_party/material_color_utilities/src/cpp/palettes/tones.cc
+++ b/src/3rdparty/chromium/third_party/material_color_utilities/src/cpp/palettes/tones.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <cmath>
#include "cpp/palettes/tones.h"
#include <cmath>
--- a/src/3rdparty/chromium/services/device/public/cpp/generic_sensor/sensor_reading.h
+++ b/src/3rdparty/chromium/services/device/public/cpp/generic_sensor/sensor_reading.h
@@ -8,6 +8,9 @@
#include <stddef.h>
#include <stdint.h>
+#include <cstddef>
+#include <cstdint>
+
#include <type_traits>
namespace device {
--- a/src/3rdparty/chromium/components/gwp_asan/client/lightweight_detector.h
+++ b/src/3rdparty/chromium/components/gwp_asan/client/lightweight_detector.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_GWP_ASAN_CLIENT_LIGHTWEIGHT_DETECTOR_H_
#define COMPONENTS_GWP_ASAN_CLIENT_LIGHTWEIGHT_DETECTOR_H_
+#include <atomic>
+
#include "base/gtest_prod_util.h"
#include "components/gwp_asan/client/export.h"
#include "components/gwp_asan/common/lightweight_detector_state.h"

View file

@ -0,0 +1,410 @@
--- a/src/3rdparty/chromium/ui/base/wayland/color_manager_util.h
+++ b/src/3rdparty/chromium/ui/base/wayland/color_manager_util.h
@@ -52,53 +52,53 @@ constexpr auto kChromaticityMap = base::
zcr_color_manager_v1_chromaticity_names,
PrimaryVersion>(
{{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_525_LINE,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_625_LINE,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT470BG,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT470BG,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE170M,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT709,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT2020,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SRGB,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_DISPLAYP3,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_ADOBERGB,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::ADOBE_RGB,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::ADOBE_RGB,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::WIDE_GAMUT_COLOR_SPIN,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::BT470M,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTE240M,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::XYZ_D50,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTEST428_1,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTEST431_2,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::FILM,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION)}});
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION}}});
// A map from the zcr_color_manager_v1 eotf_names enum values
// representing well-known EOTFs, to their equivalent TransferIDs.
@@ -107,65 +107,65 @@ constexpr auto kEotfMap = base::MakeFixe
zcr_color_manager_v1_eotf_names,
TransferVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferVersion(gfx::ColorSpace::TransferID::LINEAR,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::LINEAR,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferVersion(gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709,
- TransferVersion(gfx::ColorSpace::TransferID::BT709,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT709,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA24,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA24,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB,
// This is ever so slightly inaccurate. The number ought to be
// 2.19921875f, not 2.2
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA22,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA22,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ,
- TransferVersion(gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
- TransferVersion(gfx::ColorSpace::TransferID::HLG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::HLG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M,
- TransferVersion(gfx::ColorSpace::TransferID::SMPTE170M,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SMPTE170M,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M,
- TransferVersion(gfx::ColorSpace::TransferID::SMPTE240M,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SMPTE240M,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::SMPTEST428_1,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG,
- TransferVersion(gfx::ColorSpace::TransferID::LOG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::LOG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT,
- TransferVersion(gfx::ColorSpace::TransferID::LOG_SQRT,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::LOG_SQRT,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::IEC61966_2_4,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG,
- TransferVersion(gfx::ColorSpace::TransferID::BT1361_ECG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT1361_ECG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10,
- TransferVersion(gfx::ColorSpace::TransferID::BT2020_10,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT2020_10,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12,
- TransferVersion(gfx::ColorSpace::TransferID::BT2020_12,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT2020_12,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::SCRGB_LINEAR_80_NITS,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA18,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA18,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA28,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA28,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION}},
});
// A map from the SDR zcr_color_manager_v1 eotf_names enum values
@@ -174,18 +174,18 @@ constexpr auto kEotfMap = base::MakeFixe
constexpr auto kTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kRec709,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087,
- TransferFnVersion(gamma24, kDefaultSinceVersion)},
+ TransferFnVersion{gamma24, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB,
- TransferFnVersion(SkNamedTransferFnExt::kA98RGB,
- kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kA98RGB,
+ kDefaultSinceVersion}},
});
// A map from the HDR zcr_color_manager_v1 eotf_names enum values
@@ -194,68 +194,68 @@ constexpr auto kTransferMap =
constexpr auto kHDRTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>(
{{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ,
- TransferFnVersion(SkNamedTransferFn::kPQ, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kPQ, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
- TransferFnVersion(SkNamedTransferFn::kHLG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)},
+ TransferFnVersion{SkNamedTransferFn::kHLG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kSRGBExtended1023Over510,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION)}});
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION}}});
// A map from zcr_color_manager_v1 matrix_names enum values to
// gfx::ColorSpace::MatrixIDs.
constexpr auto kMatrixMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_matrix_names, MatrixVersion>(
{{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_RGB,
- MatrixVersion(gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT709,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT709,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT709,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG,
- MatrixVersion(
+ MatrixVersion{
gfx::ColorSpace::MatrixID::BT470BG,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_NCL,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_NCL,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_NCL,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_CL,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_CL,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_CL,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_FCC,
- MatrixVersion(gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG,
- MatrixVersion(gfx::ColorSpace::MatrixID::YCOCG,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::YCOCG,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX,
- MatrixVersion(gfx::ColorSpace::MatrixID::YDZDX,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::YDZDX,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR,
- MatrixVersion(gfx::ColorSpace::MatrixID::GBR,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::GBR,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE170M,
- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE170M,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE240M,
- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE240M,
- kDefaultSinceVersion)}});
+ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE240M,
+ kDefaultSinceVersion}}});
// A map from zcr_color_manager_v1 range_names enum values to
// gfx::ColorSpace::RangeIDs.
constexpr auto kRangeMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_range_names, RangeVersion>(
{{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_LIMITED,
- RangeVersion(gfx::ColorSpace::RangeID::LIMITED,
- kDefaultSinceVersion)},
+ RangeVersion{gfx::ColorSpace::RangeID::LIMITED,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_FULL,
- RangeVersion(gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion)},
+ RangeVersion{gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_DERIVED,
- RangeVersion(gfx::ColorSpace::RangeID::DERIVED,
- kDefaultSinceVersion)}});
+ RangeVersion{gfx::ColorSpace::RangeID::DERIVED,
+ kDefaultSinceVersion}}});
zcr_color_manager_v1_chromaticity_names ToColorManagerChromaticity(
gfx::ColorSpace::PrimaryID primaryID,
--- a/src/3rdparty/chromium/chrome/test/chromedriver/capabilities.cc
+++ b/src/3rdparty/chromium/chrome/test/chromedriver/capabilities.cc
@@ -346,7 +346,7 @@ Status ParseMobileEmulation(const base::
"'version' field of type string");
}
- brands.emplace_back(*brand, *version);
+ brands.emplace_back() = {*brand, *version};
}
client_hints.brands = std::move(brands);
@@ -384,7 +384,7 @@ Status ParseMobileEmulation(const base::
"a 'version' field of type string");
}
- full_version_list.emplace_back(*brand, *version);
+ full_version_list.emplace_back() = {*brand, *version};
}
client_hints.full_version_list = std::move(full_version_list);
--- a/src/3rdparty/chromium/base/trace_event/trace_log.cc
+++ b/src/3rdparty/chromium/base/trace_event/trace_log.cc
@@ -2190,8 +2190,8 @@ void TraceLog::SetTraceBufferForTesting(
#if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY)
void TraceLog::OnSetup(const perfetto::DataSourceBase::SetupArgs& args) {
AutoLock lock(track_event_lock_);
- track_event_sessions_.emplace_back(args.internal_instance_index, *args.config,
- args.backend_type);
+ track_event_sessions_.emplace_back() = {args.internal_instance_index, *args.config,
+ args.backend_type};
}
void TraceLog::OnStart(const perfetto::DataSourceBase::StartArgs&) {
--- a/src/3rdparty/chromium/ui/gtk/gtk_ui.cc
+++ b/src/3rdparty/chromium/ui/gtk/gtk_ui.cc
@@ -955,11 +955,11 @@ ui::DisplayConfig GtkUi::GetDisplayConfi
GdkRectangle geometry;
gdk_monitor_get_geometry(monitor, &geometry);
int monitor_scale = std::max(1, gdk_monitor_get_scale_factor(monitor));
- config.display_geometries.emplace_back(
+ config.display_geometries.emplace_back() = {
gfx::Rect(monitor_scale * geometry.x, monitor_scale * geometry.y,
monitor_scale * geometry.width,
monitor_scale * geometry.height),
- monitor_scale * font_scale);
+ static_cast<float>(monitor_scale * font_scale)};
}
return config;
}
--- a/src/3rdparty/chromium/components/autofill/core/browser/contact_info_sync_util.cc
+++ b/src/3rdparty/chromium/components/autofill/core/browser/contact_info_sync_util.cc
@@ -174,9 +174,9 @@ class ContactInfoProfileSetter {
CHECK(observations.empty());
for (const sync_pb::ContactInfoSpecifics::Observation& proto_observation :
proto_observations) {
- observations.emplace_back(proto_observation.type(),
+ observations.emplace_back() = {static_cast<unsigned char>(proto_observation.type()),
ProfileTokenQuality::FormSignatureHash(
- proto_observation.form_hash()));
+ proto_observation.form_hash())};
}
}
--- a/src/3rdparty/chromium/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc
+++ b/src/3rdparty/chromium/components/autofill/core/browser/webdata/autofill_sync_bridge_util.cc
@@ -553,11 +553,11 @@ ServerCvc AutofillWalletCvcStructDataFro
base::StringToInt64(wallet_credential_specifics.instrument_id(),
&instrument_id);
- return ServerCvc(
+ return ServerCvc{
instrument_id, base::UTF8ToUTF16(wallet_credential_specifics.cvc()),
base::Time::UnixEpoch() +
base::Milliseconds(wallet_credential_specifics
- .last_updated_time_unix_epoch_millis()));
+ .last_updated_time_unix_epoch_millis())};
}
VirtualCardUsageData VirtualCardUsageDataFromUsageSpecifics(
--- a/src/3rdparty/chromium/chrome/test/chromedriver/capabilities.cc
+++ b/src/3rdparty/chromium/chrome/test/chromedriver/capabilities.cc
@@ -346,7 +346,7 @@ Status ParseMobileEmulation(const base::
"'version' field of type string");
}
- brands.emplace_back() = {*brand, *version};
+ brands.emplace_back(*brand, *version);
}
client_hints.brands = std::move(brands);
@@ -384,7 +384,7 @@ Status ParseMobileEmulation(const base::
"a 'version' field of type string");
}
- full_version_list.emplace_back() = {*brand, *version};
+ full_version_list.emplace_back(*brand, *version);
}
client_hints.full_version_list = std::move(full_version_list);

View file

@ -0,0 +1,98 @@
--- a/src/3rdparty/chromium/base/write_build_date_header.py
+++ b/src/3rdparty/chromium/base/write_build_date_header.py
@@ -17,7 +17,7 @@ def main():
args = argument_parser.parse_args()
date_val = int(args.timestamp)
- date = datetime.datetime.utcfromtimestamp(date_val)
+ date = datetime.datetime.fromtimestamp(date_val, datetime.timezone.utc)
output = ('// Generated by //base/write_build_date_header.py\n'
'#ifndef BASE_GENERATED_BUILD_DATE_TIMESTAMP \n'
f'#define BASE_GENERATED_BUILD_DATE_TIMESTAMP {date_val}'
--- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
+++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
@@ -40,6 +40,12 @@ class GoogleProtobufModuleImporter:
return filepath
return None
+ def load_source(name: str, path: str) -> types.ModuleType:
+ spec = importlib.util.spec_from_file_location(name, path)
+ module = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(module)
+ return module
+
def _module_exists(self, fullname):
return self._fullname_to_filepath(fullname) is not None
--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py
+++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py
@@ -18,7 +18,7 @@ class HTMLGenerationController(object):
def GetHTMLForInlineStylesheet(self, contents):
if self.current_module is None:
- if re.search('url\(.+\)', contents):
+ if re.search(r'url\(.+\)', contents):
raise Exception(
'Default HTMLGenerationController cannot handle inline style urls')
return contents
--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py
+++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py
@@ -4,4 +4,4 @@
def EscapeJSIfNeeded(js):
- return js.replace('</script>', '<\/script>')
+ return js.replace(r'</script>', r'<\/script>')
--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py
+++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py
@@ -293,6 +293,6 @@ class HTMLModuleParser():
html = ''
else:
if html.find('< /script>') != -1:
- raise Exception('Escape script tags with <\/script>')
+ raise Exception(r'Escape script tags with <\/script>')
return HTMLModuleParserResults(html)
--- a/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py
+++ b/src/3rdparty/chromium/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py
@@ -60,7 +60,7 @@ class ParsedStyleSheet(object):
return 'url(data:image/%s;base64,%s)' % (ext[1:], data.decode('utf-8'))
# I'm assuming we only have url()'s associated with images
- return re.sub('url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
+ return re.sub(r'url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
InlineUrl, self.contents)
def AppendDirectlyDependentFilenamesTo(self, dependent_filenames):
@@ -72,7 +72,7 @@ class ParsedStyleSheet(object):
raise Exception('@imports are not supported')
matches = re.findall(
- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
+ r'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
self.contents)
def resolve_url(url):
--- a/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py
+++ b/src/3rdparty/chromium/third_party/dawn/generator/generator_lib.py
@@ -119,8 +119,8 @@ class _PreprocessingLoader(jinja2.BaseLo
source = self.preprocess(f.read())
return source, path, lambda: mtime == os.path.getmtime(path)
- blockstart = re.compile('{%-?\s*(if|elif|else|for|block|macro)[^}]*%}')
- blockend = re.compile('{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}')
+ blockstart = re.compile(r'{%-?\s*(if|elif|else|for|block|macro)[^}]*%}')
+ blockend = re.compile(r'{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}')
def preprocess(self, source):
lines = source.split('\n')
--- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
+++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
@@ -16,6 +16,7 @@ import re
import subprocess
import sys
import traceback
+import types
class GoogleProtobufModuleImporter:

View file

@ -0,0 +1,25 @@
--- a/src/3rdparty/chromium/media/base/cdm_promise_adapter.cc
+++ b/src/3rdparty/chromium/media/base/cdm_promise_adapter.cc
@@ -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");
--- a/src/3rdparty/chromium/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/src/3rdparty/chromium/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1409,7 +1409,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",

View file

@ -0,0 +1,23 @@
--- a/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
+++ b/src/3rdparty/chromium/media/gpu/vaapi/BUILD.gn
@@ -13,6 +13,12 @@ import("//tools/generate_stubs/rules.gni
assert(is_linux || is_chromeos)
assert(use_vaapi)
+config("vaapi_permissive") {
+ if (target_cpu == "x86") {
+ cflags = [ "-fpermissive" ]
+ }
+}
+
generate_stubs("libva_stubs") {
extra_header = "va_stub_header.fragment"
sigs = [ "va.sigs" ]
@@ -81,6 +87,7 @@ source_set("vaapi") {
configs += [
"//build/config/linux/libva",
"//third_party/libvpx:libvpx_config",
+ ":vaapi_permissive",
]
deps = [

View file

@ -1,60 +0,0 @@
diff --git a/src/3rdparty/chromium/net/dns/dns_reloader.cc b/src/3rdparty/chromium/net/dns/dns_reloader.cc
index 363eb14dc..3a86c12ee 100644
--- a/src/3rdparty/chromium/net/dns/dns_reloader.cc
+++ b/src/3rdparty/chromium/net/dns/dns_reloader.cc
@@ -8,7 +8,7 @@
// If we're not on a POSIX system, it's not even safe to try to include resolv.h
// - there's not guarantee it exists at all. :(
-#if BUILDFLAG(IS_POSIX)
+#if defined(__GLIBC__)
#include <resolv.h>
diff --git a/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc b/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
index d8142e8da..f2461b877 100644
--- a/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
+++ b/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
@@ -351,8 +351,9 @@ void HostResolverSystemTask::OnLookupComplete(const uint32_t attempt_number,
}
void EnsureSystemHostResolverCallReady() {
+#if defined(__GLIBC__)
EnsureDnsReloaderInit();
-#if BUILDFLAG(IS_WIN)
+#elif BUILDFLAG(IS_WIN)
EnsureWinsockInit();
#endif
}
@@ -434,7 +435,9 @@ int SystemHostResolverCall(const std::string& host,
// current process during that time.
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
base::BlockingType::WILL_BLOCK);
+#if defined(__GLIBC__)
DnsReloaderMaybeReload();
+#endif
auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network);
bool should_retry = false;
diff --git a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
index 2743697bf..36dc8adbf 100644
--- a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
+++ b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
@@ -13,7 +13,7 @@
namespace net {
ScopedResState::ScopedResState() {
-#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
+#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
// res_init behaves the same way.
memset(&_res, 0, sizeof(_res));
@@ -25,7 +25,7 @@ ScopedResState::ScopedResState() {
}
ScopedResState::~ScopedResState() {
-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
+#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
// Prefer res_ndestroy where available.
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)

View file

@ -1,6 +1,6 @@
This was dropped for some reason in 6951c37cecd05979b232a39e5c10e6346a0f74ef
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/closure_compiler/compiler.py
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/closure_compiler/compiler.py
--- a/src/3rdparty/chromium/third_party/closure_compiler/compiler.py
+++ b/src/3rdparty/chromium/third_party/closure_compiler/compiler.py
@@ -13,8 +13,9 @@ import subprocess

View file

@ -0,0 +1,20 @@
--- a/src/3rdparty/chromium/third_party/node/node.py
+++ b/src/3rdparty/chromium/third_party/node/node.py
@@ -32,11 +32,12 @@ def GetBinaryPath():
darwin_name = ('node-darwin-arm64' if platform.machine() == 'arm64' else
'node-darwin-x64')
- return os_path.join(os_path.dirname(__file__), *{
- 'Darwin': ('mac', darwin_name, 'bin', 'node'),
- 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
- 'Windows': ('win', 'node.exe'),
- }[platform.system()])
+ #return os_path.join(os_path.dirname(__file__), *{
+ # 'Darwin': ('mac', darwin_name, 'bin', 'node'),
+ # 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
+ # 'Windows': ('win', 'node.exe'),
+ #}[platform.system()])
+ return "/usr/bin/node"
def RunNode(cmd_parts, stdout=None):

View file

@ -1,6 +1,6 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/config/compiler/BUILD.gn
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/config/compiler/BUILD.gn
@@ -58,6 +58,10 @@ if (!is_clang) {
--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn
+++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
@@ -59,6 +59,10 @@ if (!is_clang) {
}
declare_args() {
@ -11,7 +11,7 @@
# Normally, Android builds are lightly optimized, even for debug builds, to
# keep binary size down. Setting this flag to true disables such optimization
android_full_debug = false
@@ -1003,8 +1003,13 @@
@@ -1190,8 +1194,13 @@ config("compiler_cpu_abi") {
} else if (current_cpu == "arm64") {
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
!(is_chromeos_lacros && is_chromeos_device)) {
@ -25,10 +25,10 @@
+ ldflags += [ "--target=aarch64-linux-gnu" ]
+ }
}
if (is_android) {
# Outline atomics crash on Exynos 9810. http://crbug.com/1272795
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn
} else if (current_cpu == "mipsel" && !is_nacl) {
ldflags += [ "-Wl,--hash-style=sysv" ]
--- a/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn
+++ b/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn
@@ -39,3 +39,22 @@ gcc_toolchain("host") {
current_os = current_os
}
@ -52,8 +52,8 @@
+ v8_current_cpu = target_cpu
+ }
+}
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/config/linux/pkg_config.gni
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/config/linux/pkg_config.gni
--- a/src/3rdparty/chromium/build/config/linux/pkg_config.gni
+++ b/src/3rdparty/chromium/build/config/linux/pkg_config.gni
@@ -92,7 +92,7 @@ template("pkg_config") {
assert(defined(invoker.packages),
"Variable |packages| must be defined to be a list in pkg_config.")

View file

@ -0,0 +1,13 @@
instead of hardcoding the version, use the defined macro.
--
--- a/src/3rdparty/chromium/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
+++ b/src/3rdparty/chromium/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
@@ -56,7 +56,7 @@ int main() {
FcFini();
// Check existence of intended fontconfig cache file.
- auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-9";
+ auto cache = fontconfig_caches + "/" + kCacheKey + "-le64.cache-" + FC_CACHE_VERSION;
bool cache_exists = access(cache.c_str(), F_OK) == 0;
return !cache_exists;
}

View file

@ -1,6 +1,6 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/allocator/partition_allocator/tagging.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/allocator/partition_allocator/tagging.cc
@@ -28,13 +28,25 @@
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/tagging.cc
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/tagging.cc
@@ -29,13 +29,25 @@
#endif
#endif
@ -25,5 +25,5 @@
+#endif
+#ifndef PR_MTE_TAG_MASK
#define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
#endif
#define HWCAP2_MTE (1 << 18)
#endif

View file

@ -0,0 +1,11 @@
--- a/src/3rdparty/chromium/extensions/renderer/bindings/argument_spec.cc
+++ b/src/3rdparty/chromium/extensions/renderer/bindings/argument_spec.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cmath>
+
#include "extensions/renderer/bindings/argument_spec.h"
#include <cmath>

View file

@ -0,0 +1,21 @@
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/media/web_media_player_impl.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/media/web_media_player_impl.cc
@@ -3732,15 +3732,15 @@ void WebMediaPlayerImpl::WriteSplitHisto
const T&... values) {
std::string strkey = std::string(key);
- if constexpr (Flags & kEncrypted) {
+ if constexpr (Flags & kEncrypted != 0) {
if (is_encrypted_)
UmaFunction(strkey + ".EME", values...);
}
- if constexpr (Flags & kTotal)
+ if constexpr (Flags & kTotal != 0)
UmaFunction(strkey + ".All", values...);
- if constexpr (Flags & kPlaybackType) {
+ if constexpr (Flags & kPlaybackType != 0) {
auto demuxer_type = GetDemuxerType();
if (!demuxer_type.has_value())
return;

View file

@ -0,0 +1,55 @@
From f815e833c946a59620a2ca9df37a1da746f61460 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 1 Oct 2022 00:21:09 +0000
Subject: [PATCH] fix dawn build for ppc64
---
third_party/dawn/src/dawn/common/Assert.cpp | 4 ++--
third_party/dawn/src/dawn/common/Platform.h | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
--- a/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Assert.cpp
+++ b/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Assert.cpp
@@ -39,9 +39,9 @@ void BreakPoint() {
__asm__ __volatile__("ebreak");
#elif DAWN_PLATFORM_IS(MIPS)
__asm__ __volatile__("break");
-#elif DAWN_PLATFORM_IS(S390) || DAWN_PLATFORM_IS_(S390X)
+#elif DAWN_PLATFORM_IS(S390) || DAWN_PLATFORM_IS(S390X)
__asm__ __volatile__(".word 0x0001");
-#elif DAWN_PLATFORM_IS(PPC) || DAWN_PLATFORM_IS_(PPC64)
+#elif DAWN_PLATFORM_IS(PPC) || DAWN_PLATFORM_IS(PPC64)
__asm__ __volatile__("twge 2,2");
#else
#error "Unsupported platform"
--- a/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Platform.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Platform.h
@@ -140,15 +140,15 @@
#define DAWN_PLATFORM_IS_MIPS64 1
#endif
-#elif defiend(__s390__)
+#elif defined(__s390__)
#define DAWN_PLATFORM_IS_S390 1
-#elif defiend(__s390x__)
+#elif defined(__s390x__)
#define DAWN_PLATFORM_IS_S390X 1
-#elif defined(__PPC__)
-#define DAWN_PLATFORM_IS_PPC 1
#elif defined(__PPC64__)
#define DAWN_PLATFORM_IS_PPC64 1
+#elif defined(__PPC__)
+#define DAWN_PLATFORM_IS_PPC 1
#else
#error "Unsupported platform."
@@ -166,7 +166,7 @@
static_assert(sizeof(sizeof(char)) == 8, "Expect sizeof(size_t) == 8");
#elif defined(DAWN_PLATFORM_IS_I386) || defined(DAWN_PLATFORM_IS_ARM32) || \
defined(DAWN_PLATFORM_IS_RISCV32) || defined(DAWN_PLATFORM_IS_MIPS32) || \
- defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC32) || \
+ defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC) || \
defined(DAWN_PLATFORM_IS_EMSCRIPTEN) || defined(DAWN_PLATFORM_IS_LOONGARCH32)
#define DAWN_PLATFORM_IS_32_BIT 1
static_assert(sizeof(sizeof(char)) == 4, "Expect sizeof(size_t) == 4");

View file

@ -1,7 +1,7 @@
This macro is defined in glibc, but not musl.
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/suid/process_util.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/suid/process_util.h
--- a/src/3rdparty/chromium/sandbox/linux/suid/process_util.h
+++ b/src/3rdparty/chromium/sandbox/linux/suid/process_util.h
@@ -12,6 +12,16 @@
#include <stdint.h>
#include <sys/types.h>

View file

@ -0,0 +1,10 @@
--- a/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
+++ b/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
@@ -4,6 +4,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <cstdint>
#include <functional>
#include "quiche/common/platform/api/quiche_export.h"

View file

@ -1,17 +0,0 @@
Allow SYS_sched_getparam and SYS_sched_getscheduler
musl uses them for pthread_getschedparam()
--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
@@ -94,6 +94,11 @@
case __NR_pwrite64:
case __NR_sched_get_priority_max:
case __NR_sched_get_priority_min:
+#ifndef __GLIBC__
+ case __NR_sched_getparam:
+ case __NR_sched_getscheduler:
+ case __NR_sched_setscheduler:
+#endif
case __NR_sysinfo:
case __NR_times:
case __NR_uname:

View file

@ -1,6 +1,6 @@
--- a/src/3rdparty/chromium/sandbox/linux/services/credentials.h
+++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.h
@@ -13,6 +13,7 @@
@@ -15,6 +15,7 @@
#include <string>
#include <vector>

View file

@ -1,5 +1,5 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
@@ -30,7 +30,8 @@
#include <algorithm>
#endif

View file

@ -1,5 +1,5 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/process/memory_linux.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/process/memory_linux.cc
--- a/src/3rdparty/chromium/base/process/memory_linux.cc
+++ b/src/3rdparty/chromium/base/process/memory_linux.cc
@@ -18,6 +18,13 @@
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
@ -14,8 +14,8 @@
namespace base {
namespace {
@@ -112,7 +119,7 @@ bool UncheckedMalloc(size_t size, void**
defined(TOOLKIT_QT) || !defined(LIBC_GLIBC)
@@ -111,7 +118,7 @@ bool UncheckedMalloc(size_t size, void**
#elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC) || defined(TOOLKIT_QT)
*result = malloc(size);
#elif defined(LIBC_GLIBC)
- *result = __libc_malloc(size);
@ -23,7 +23,7 @@
#endif
return *result != nullptr;
}
@@ -123,7 +130,7 @@ void UncheckedFree(void* ptr) {
@@ -122,7 +129,7 @@ void UncheckedFree(void* ptr) {
#elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC) || defined(TOOLKIT_QT)
free(ptr);
#elif defined(LIBC_GLIBC)

View file

@ -0,0 +1,68 @@
Source: https://git.alpinelinux.org/aports/plain/community/chromium/no-execinfo.patch
musl does not have execinfo.h, and hence no implementation of
. backtrace()
. backtrace_symbols()
for discussion about this, see https://www.openwall.com/lists/musl/2021/07/16/1
--
--- a/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc
+++ b/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc
@@ -12,7 +12,9 @@
#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
#define SYMBOLIZE_FUNCTION
+#if defined(__GLIBC__)
#include <execinfo.h>
+#endif
#include <vector>
@@ -118,7 +120,7 @@ void ExternalReferenceTable::Init(Isolat
}
const char* ExternalReferenceTable::ResolveSymbol(void* address) {
-#ifdef SYMBOLIZE_FUNCTION
+#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__)
char** names = backtrace_symbols(&address, 1);
const char* name = names[0];
// The array of names is malloc'ed. However, each name string is static
--- a/src/3rdparty/chromium/base/debug/stack_trace.cc
+++ b/src/3rdparty/chromium/base/debug/stack_trace.cc
@@ -273,7 +273,9 @@ void StackTrace::Print() const {
}
void StackTrace::OutputToStream(std::ostream* os) const {
+#if defined(__GLIBC__) && !defined(_AIX)
OutputToStreamWithPrefix(os, nullptr);
+#endif
}
std::string StackTrace::ToString() const {
@@ -281,7 +283,7 @@ std::string StackTrace::ToString() const
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
std::stringstream stream;
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
OutputToStreamWithPrefix(&stream, prefix_string);
#endif
return stream.str();
--- a/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc
+++ b/src/3rdparty/chromium/base/debug/stack_trace_unittest.cc
@@ -33,7 +33,7 @@ typedef MultiProcessTest StackTraceTest;
typedef testing::Test StackTraceTest;
#endif
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if !defined(__UCLIBC__) && !defined(_AIX) && defined(__GLIBC__)
// StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
// See https://crbug.com/706728
@@ -156,7 +156,7 @@ TEST_F(StackTraceTest, DebugOutputToStre
#endif // !defined(__UCLIBC__) && !defined(_AIX)
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID)
+#if (BUILDFLAG(IS_POSIX) && defined(__GLIBC__)) && !BUILDFLAG(IS_ANDROID)
#if !BUILDFLAG(IS_IOS)
static char* newArray() {
// Clang warns about the mismatched new[]/delete if they occur in the same

View file

@ -1,41 +1,10 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/process/process_metrics_posix.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/process/process_metrics_posix.cc
@@ -105,7 +105,8 @@ void IncreaseFdLimitTo(unsigned int max_
#endif // !BUILDFLAG(IS_FUCHSIA)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || \
+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
namespace {
size_t GetMallocUsageMallinfo() {
@@ -123,17 +124,18 @@ size_t GetMallocUsageMallinfo() {
}
} // namespace
-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
- // BUILDFLAG(IS_ANDROID)
+#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__) ||
+ // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
size_t ProcessMetrics::GetMallocUsage() {
#if BUILDFLAG(IS_APPLE)
malloc_statistics_t stats = {0};
malloc_zone_statistics(nullptr, &stats);
return stats.size_in_use;
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || \
+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
return GetMallocUsageMallinfo();
-#elif BUILDFLAG(IS_FUCHSIA)
+#elif BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
return 0;
#endif
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
@@ -185,7 +185,6 @@
Source: https://git.alpinelinux.org/aports/plain/community/chromium/no-mallinfo.patch
musl does not implement mallinfo()/mallinfo2()
(or rather, malloc-ng, musl's allocator, doesn't)
--
--- a/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
+++ b/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
@@ -199,7 +199,6 @@ void ReportMallinfoStats(ProcessMemoryDu
#define MALLINFO2_FOUND_IN_LIBC
struct mallinfo2 info = mallinfo2();
#endif
@ -43,15 +12,15 @@
#if !defined(MALLINFO2_FOUND_IN_LIBC)
struct mallinfo info = mallinfo();
#endif
@@ -205,6 +204,7 @@
sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize,
MemoryAllocatorDump::kUnitsBytes, info.uordblks);
@@ -221,6 +220,7 @@ void ReportMallinfoStats(ProcessMemoryDu
MemoryAllocatorDump::kUnitsBytes,
total_allocated_size);
}
+#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
}
#endif
@@ -339,7 +340,7 @@
@@ -359,7 +359,7 @@ bool MallocDumpProvider::OnMemoryDump(co
&allocated_objects_count);
#elif BUILDFLAG(IS_FUCHSIA)
// TODO(fuchsia): Port, see https://crbug.com/706592.
@ -60,17 +29,57 @@
ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
&allocated_objects_size, &allocated_objects_count);
#endif
musl does not implement mallinfo()/mallinfo2()
(or rather, malloc-ng, musl's allocator, doesn't)
--
--- a/src/3rdparty/chromium/base/process/process_metrics_posix.cc
+++ b/src/3rdparty/chromium/base/process/process_metrics_posix.cc
@@ -106,7 +106,7 @@ void IncreaseFdLimitTo(unsigned int max_
#endif // !BUILDFLAG(IS_FUCHSIA)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
namespace {
size_t GetMallocUsageMallinfo() {
@@ -124,7 +124,7 @@ size_t GetMallocUsageMallinfo() {
}
} // namespace
-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
+#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) ||
// BUILDFLAG(IS_ANDROID)
size_t ProcessMetrics::GetMallocUsage() {
@@ -132,9 +132,9 @@ size_t ProcessMetrics::GetMallocUsage()
malloc_statistics_t stats = {0};
malloc_zone_statistics(nullptr, &stats);
return stats.size_in_use;
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
+#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
return GetMallocUsageMallinfo();
-#elif BUILDFLAG(IS_FUCHSIA)
+#else
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
return 0;
#endif
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
@@ -717,7 +717,7 @@
@@ -736,7 +736,7 @@ SHIM_ALWAYS_EXPORT int mallopt(int cmd,
#endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if defined(__GLIBC__)
+#if 0
SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW {
base::SimplePartitionStatsDumper allocator_dumper;
partition_alloc::SimplePartitionStatsDumper allocator_dumper;
Allocator()->DumpStats("malloc", true, &allocator_dumper);
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
@@ -24,7 +24,7 @@ namespace allocator_shim::internal {
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
// Platforms on which we override weak libc symbols.
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS)
PA_NOINLINE void FreeForTest(void* data) {
free(data);

View file

@ -0,0 +1,11 @@
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_root.cc
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_root.cc
@@ -281,7 +281,7 @@ void PartitionAllocMallocInitOnce() {
return;
}
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS)
// When fork() is called, only the current thread continues to execute in the
// child process. If the lock is held, but *not* by this thread when fork() is
// called, we have a deadlock.

View file

@ -1,7 +1,7 @@
Use monotonic clock for pthread_cond_timedwait with musl too.
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/v8/src/base/platform/condition-variable.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/v8/src/base/platform/condition-variable.cc
--- a/src/3rdparty/chromium/v8/src/base/platform/condition-variable.cc
+++ b/src/3rdparty/chromium/v8/src/base/platform/condition-variable.cc
@@ -20,7 +20,7 @@ namespace base {
ConditionVariable::ConditionVariable() {

View file

@ -1,5 +1,5 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -490,7 +490,9 @@ bool ExceptionHandler::SimulateSignalDel
siginfo.si_code = SI_USER;
siginfo.si_pid = getpid();

View file

@ -0,0 +1,11 @@
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_config.h
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_config.h
@@ -153,7 +153,7 @@ static_assert(sizeof(void*) != 8, "");
defined(ARCH_CPU_LITTLE_ENDIAN))
#define PA_CONFIG_HAS_MEMORY_TAGGING() \
- (defined(ARCH_CPU_ARM64) && defined(__clang__) && \
+ (0 && defined(ARCH_CPU_ARM64) && defined(__clang__) && \
!defined(ADDRESS_SANITIZER) && \
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)))

View file

@ -0,0 +1,11 @@
--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn
+++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
@@ -1543,7 +1543,7 @@ config("compiler_deterministic") {
} else {
# -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
# and -fcoverage-compilation-dir=.
- cflags += [ "-ffile-compilation-dir=." ]
+ cflags += [ "-fdebug-compilation-dir=." ]
swiftflags += [ "-file-compilation-dir=." ]
}
if (!is_win) {

View file

@ -0,0 +1,19 @@
--- a/src/3rdparty/chromium/BUILD.gn
+++ b/src/3rdparty/chromium/BUILD.gn
@@ -1626,16 +1626,6 @@ if (use_blink && !is_cronet_build) {
}
}
-# TODO(cassew): Add more OS's that don't support x86.
-is_valid_x86_target =
- target_os != "ios" && target_os != "mac" &&
- (target_os != "linux" || use_libfuzzer || !build_with_chromium)
-
-# Note: v8_target_cpu == arm allows using the V8 arm simulator on x86 for fuzzing.
-assert(
- is_valid_x86_target || target_cpu != "x86" || v8_target_cpu == "arm",
- "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.")
-
group("chromium_builder_perf") {
testonly = true

View file

@ -1,5 +1,5 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
--- a/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
+++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
@@ -17,8 +17,6 @@
#include_next <sys/ptrace.h>
@ -9,8 +9,8 @@
// https://sourceware.org/bugzilla/show_bug.cgi?id=22433
#if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \
defined(__GLIBC__)
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h
--- a/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h
+++ b/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h
@@ -19,12 +19,13 @@
#ifndef __SYS_CORE_SYNC_H
#define __SYS_CORE_SYNC_H

View file

@ -0,0 +1,10 @@
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -433,6 +433,7 @@ bool SyscallSets::IsAllowedProcessStartO
switch (sysno) {
case __NR_exit:
case __NR_exit_group:
+ case __NR_membarrier:
case __NR_wait4:
case __NR_waitid:
#if defined(__i386__)

View file

@ -0,0 +1,849 @@
--- a/src/3rdparty/chromium/media/BUILD.gn
+++ b/src/3rdparty/chromium/media/BUILD.gn
@@ -96,6 +96,9 @@ config("media_config") {
defines += [ "DLOPEN_PULSEAUDIO" ]
}
}
+ if (use_sndio) {
+ defines += [ "USE_SNDIO" ]
+ }
if (use_cras) {
defines += [ "USE_CRAS" ]
}
--- a/src/3rdparty/chromium/media/audio/BUILD.gn
+++ b/src/3rdparty/chromium/media/audio/BUILD.gn
@@ -282,6 +282,17 @@ jumbo_source_set("audio") {
sources += [ "linux/audio_manager_linux.cc" ]
}
+ if (use_sndio) {
+ libs += [ "sndio" ]
+ sources += [
+ "sndio/audio_manager_sndio.cc",
+ "sndio/sndio_input.cc",
+ "sndio/sndio_input.h",
+ "sndio/sndio_output.cc",
+ "sndio/sndio_output.h"
+ ]
+ }
+
if (use_alsa) {
libs += [ "asound" ]
sources += [
--- a/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
+++ b/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
@@ -23,6 +23,11 @@
#include "media/audio/pulse/audio_manager_pulse.h"
#include "media/audio/pulse/pulse_util.h"
#endif
+#if defined(USE_SNDIO)
+#include "media/audio/sndio/audio_manager_sndio.h"
+#include "media/audio/sndio/sndio_input.h"
+#include "media/audio/sndio/sndio_output.h"
+#endif
namespace media {
--- /dev/null
+++ b/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.cc
@@ -0,0 +1,148 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/audio/sndio/audio_manager_sndio.h"
+
+#include "base/metrics/histogram_macros.h"
+#include "base/memory/ptr_util.h"
+#include "media/audio/audio_device_description.h"
+#include "media/audio/audio_output_dispatcher.h"
+#include "media/audio/sndio/sndio_input.h"
+#include "media/audio/sndio/sndio_output.h"
+#include "media/base/limits.h"
+#include "media/base/media_switches.h"
+
+namespace media {
+
+
+// Maximum number of output streams that can be open simultaneously.
+static const int kMaxOutputStreams = 4;
+
+// Default sample rate for input and output streams.
+static const int kDefaultSampleRate = 48000;
+
+void AddDefaultDevice(AudioDeviceNames* device_names) {
+ DCHECK(device_names->empty());
+ device_names->push_front(AudioDeviceName::CreateDefault());
+}
+
+bool AudioManagerSndio::HasAudioOutputDevices() {
+ return true;
+}
+
+bool AudioManagerSndio::HasAudioInputDevices() {
+ return true;
+}
+
+void AudioManagerSndio::GetAudioInputDeviceNames(
+ AudioDeviceNames* device_names) {
+ DCHECK(device_names->empty());
+ AddDefaultDevice(device_names);
+}
+
+void AudioManagerSndio::GetAudioOutputDeviceNames(
+ AudioDeviceNames* device_names) {
+ AddDefaultDevice(device_names);
+}
+
+const char* AudioManagerSndio::GetName() {
+ return "SNDIO";
+}
+
+AudioParameters AudioManagerSndio::GetInputStreamParameters(
+ const std::string& device_id) {
+ static const int kDefaultInputBufferSize = 1024;
+
+ int user_buffer_size = GetUserBufferSize();
+ int buffer_size = user_buffer_size ?
+ user_buffer_size : kDefaultInputBufferSize;
+
+ return AudioParameters(
+ AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO,
+ kDefaultSampleRate, buffer_size);
+}
+
+AudioManagerSndio::AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
+ AudioLogFactory* audio_log_factory)
+ : AudioManagerBase(std::move(audio_thread),
+ audio_log_factory) {
+ DLOG(WARNING) << "AudioManagerSndio";
+ SetMaxOutputStreamsAllowed(kMaxOutputStreams);
+}
+
+AudioManagerSndio::~AudioManagerSndio() {
+ Shutdown();
+}
+
+AudioOutputStream* AudioManagerSndio::MakeLinearOutputStream(
+ const AudioParameters& params,
+ const LogCallback& log_callback) {
+ DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
+ return MakeOutputStream(params);
+}
+
+AudioOutputStream* AudioManagerSndio::MakeLowLatencyOutputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) {
+ DLOG_IF(ERROR, !device_id.empty()) << "Not implemented!";
+ DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
+ return MakeOutputStream(params);
+}
+
+AudioInputStream* AudioManagerSndio::MakeLinearInputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) {
+ DCHECK_EQ(AudioParameters::AUDIO_PCM_LINEAR, params.format());
+ return MakeInputStream(params);
+}
+
+AudioInputStream* AudioManagerSndio::MakeLowLatencyInputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) {
+ DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
+ return MakeInputStream(params);
+}
+
+AudioParameters AudioManagerSndio::GetPreferredOutputStreamParameters(
+ const std::string& output_device_id,
+ const AudioParameters& input_params) {
+ // TODO(tommi): Support |output_device_id|.
+ DLOG_IF(ERROR, !output_device_id.empty()) << "Not implemented!";
+ static const int kDefaultOutputBufferSize = 2048;
+
+ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO;
+ int sample_rate = kDefaultSampleRate;
+ int buffer_size = kDefaultOutputBufferSize;
+ if (input_params.IsValid()) {
+ sample_rate = input_params.sample_rate();
+ channel_layout = input_params.channel_layout();
+ buffer_size = std::min(buffer_size, input_params.frames_per_buffer());
+ }
+
+ int user_buffer_size = GetUserBufferSize();
+ if (user_buffer_size)
+ buffer_size = user_buffer_size;
+
+ return AudioParameters(
+ AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
+ sample_rate, buffer_size);
+}
+
+AudioInputStream* AudioManagerSndio::MakeInputStream(
+ const AudioParameters& params) {
+ DLOG(WARNING) << "MakeInputStream";
+ return new SndioAudioInputStream(this,
+ AudioDeviceDescription::kDefaultDeviceId, params);
+}
+
+AudioOutputStream* AudioManagerSndio::MakeOutputStream(
+ const AudioParameters& params) {
+ DLOG(WARNING) << "MakeOutputStream";
+ return new SndioAudioOutputStream(params, this);
+}
+
+} // namespace media
--- /dev/null
+++ b/src/3rdparty/chromium/media/audio/sndio/audio_manager_sndio.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2012 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 MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
+#define MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
+
+#include <set>
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/threading/thread.h"
+#include "media/audio/audio_manager_base.h"
+
+namespace media {
+
+class MEDIA_EXPORT AudioManagerSndio : public AudioManagerBase {
+ public:
+ AudioManagerSndio(std::unique_ptr<AudioThread> audio_thread,
+ AudioLogFactory* audio_log_factory);
+ ~AudioManagerSndio() override;
+
+ // Implementation of AudioManager.
+ bool HasAudioOutputDevices() override;
+ bool HasAudioInputDevices() override;
+ void GetAudioInputDeviceNames(AudioDeviceNames* device_names) override;
+ void GetAudioOutputDeviceNames(AudioDeviceNames* device_names) override;
+ AudioParameters GetInputStreamParameters(
+ const std::string& device_id) override;
+ const char* GetName() override;
+
+ // Implementation of AudioManagerBase.
+ AudioOutputStream* MakeLinearOutputStream(
+ const AudioParameters& params,
+ const LogCallback& log_callback) override;
+ AudioOutputStream* MakeLowLatencyOutputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) override;
+ AudioInputStream* MakeLinearInputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) override;
+ AudioInputStream* MakeLowLatencyInputStream(
+ const AudioParameters& params,
+ const std::string& device_id,
+ const LogCallback& log_callback) override;
+
+ protected:
+ AudioParameters GetPreferredOutputStreamParameters(
+ const std::string& output_device_id,
+ const AudioParameters& input_params) override;
+
+ private:
+ // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
+ AudioOutputStream* MakeOutputStream(const AudioParameters& params);
+ AudioInputStream* MakeInputStream(const AudioParameters& params);
+
+ DISALLOW_COPY_AND_ASSIGN(AudioManagerSndio);
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_SNDIO_AUDIO_MANAGER_SNDIO_H_
--- /dev/null
+++ b/src/3rdparty/chromium/media/audio/sndio/sndio_input.cc
@@ -0,0 +1,200 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/bind.h"
+#include "base/logging.h"
+#include "base/macros.h"
+#include "media/base/audio_timestamp_helper.h"
+#include "media/audio/sndio/audio_manager_sndio.h"
+#include "media/audio/audio_manager.h"
+#include "media/audio/sndio/sndio_input.h"
+
+namespace media {
+
+static const SampleFormat kSampleFormat = kSampleFormatS16;
+
+void SndioAudioInputStream::OnMoveCallback(void *arg, int delta)
+{
+ SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
+
+ self->hw_delay += delta;
+}
+
+void *SndioAudioInputStream::ThreadEntry(void *arg) {
+ SndioAudioInputStream* self = static_cast<SndioAudioInputStream*>(arg);
+
+ self->ThreadLoop();
+ return NULL;
+}
+
+SndioAudioInputStream::SndioAudioInputStream(AudioManagerBase* manager,
+ const std::string& device_name,
+ const AudioParameters& params)
+ : manager(manager),
+ params(params),
+ audio_bus(AudioBus::Create(params)),
+ state(kClosed) {
+}
+
+SndioAudioInputStream::~SndioAudioInputStream() {
+ if (state != kClosed)
+ Close();
+}
+
+bool SndioAudioInputStream::Open() {
+ struct sio_par par;
+ int sig;
+
+ if (state != kClosed)
+ return false;
+
+ if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
+ params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
+ LOG(WARNING) << "Unsupported audio format.";
+ return false;
+ }
+
+ sio_initpar(&par);
+ par.rate = params.sample_rate();
+ par.rchan = params.channels();
+ par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
+ par.bps = par.bits / 8;
+ par.sig = sig = par.bits != 8 ? 1 : 0;
+ par.le = SIO_LE_NATIVE;
+ par.appbufsz = params.frames_per_buffer();
+
+ hdl = sio_open(SIO_DEVANY, SIO_REC, 0);
+
+ if (hdl == NULL) {
+ LOG(ERROR) << "Couldn't open audio device.";
+ return false;
+ }
+
+ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
+ LOG(ERROR) << "Couldn't set audio parameters.";
+ goto bad_close;
+ }
+
+ if (par.rate != (unsigned int)params.sample_rate() ||
+ par.rchan != (unsigned int)params.channels() ||
+ par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
+ par.sig != (unsigned int)sig ||
+ (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
+ (par.bits != par.bps * 8)) {
+ LOG(ERROR) << "Unsupported audio parameters.";
+ goto bad_close;
+ }
+ state = kStopped;
+ buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
+ sio_onmove(hdl, &OnMoveCallback, this);
+ return true;
+bad_close:
+ sio_close(hdl);
+ return false;
+}
+
+void SndioAudioInputStream::Start(AudioInputCallback* cb) {
+
+ StartAgc();
+
+ state = kRunning;
+ hw_delay = 0;
+ callback = cb;
+ sio_start(hdl);
+ if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
+ LOG(ERROR) << "Failed to create real-time thread for recording.";
+ sio_stop(hdl);
+ state = kStopped;
+ }
+}
+
+void SndioAudioInputStream::Stop() {
+
+ if (state == kStopped)
+ return;
+
+ state = kStopWait;
+ pthread_join(thread, NULL);
+ sio_stop(hdl);
+ state = kStopped;
+
+ StopAgc();
+}
+
+void SndioAudioInputStream::Close() {
+
+ if (state == kClosed)
+ return;
+
+ if (state == kRunning)
+ Stop();
+
+ state = kClosed;
+ delete [] buffer;
+ sio_close(hdl);
+
+ manager->ReleaseInputStream(this);
+}
+
+double SndioAudioInputStream::GetMaxVolume() {
+ // Not supported
+ return 0.0;
+}
+
+void SndioAudioInputStream::SetVolume(double volume) {
+ // Not supported. Do nothing.
+}
+
+double SndioAudioInputStream::GetVolume() {
+ // Not supported.
+ return 0.0;
+}
+
+bool SndioAudioInputStream::IsMuted() {
+ // Not supported.
+ return false;
+}
+
+void SndioAudioInputStream::SetOutputDeviceForAec(
+ const std::string& output_device_id) {
+ // Not supported.
+}
+
+void SndioAudioInputStream::ThreadLoop(void) {
+ size_t todo, n;
+ char *data;
+ unsigned int nframes;
+ double normalized_volume = 0.0;
+
+ nframes = audio_bus->frames();
+
+ while (state == kRunning && !sio_eof(hdl)) {
+
+ GetAgcVolume(&normalized_volume);
+
+ // read one block
+ todo = nframes * params.GetBytesPerFrame(kSampleFormat);
+ data = buffer;
+ while (todo > 0) {
+ n = sio_read(hdl, data, todo);
+ if (n == 0)
+ return; // unrecoverable I/O error
+ todo -= n;
+ data += n;
+ }
+ hw_delay -= nframes;
+
+ // convert frames count to TimeDelta
+ const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
+ params.sample_rate());
+
+ // push into bus
+ audio_bus->FromInterleaved<SignedInt16SampleTypeTraits>(reinterpret_cast<int16_t*>(buffer), nframes);
+
+ // invoke callback
+ callback->OnData(audio_bus.get(), base::TimeTicks::Now() - delay, 1.);
+ }
+}
+
+} // namespace media
--- /dev/null
+++ b/src/3rdparty/chromium/media/audio/sndio/sndio_input.h
@@ -0,0 +1,91 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
+#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
+
+#include <stdint.h>
+#include <string>
+#include <sndio.h>
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
+#include "media/audio/agc_audio_stream.h"
+#include "media/audio/audio_io.h"
+#include "media/audio/audio_device_description.h"
+#include "media/base/audio_parameters.h"
+
+namespace media {
+
+class AudioManagerBase;
+
+// Implementation of AudioOutputStream using sndio(7)
+class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> {
+ public:
+ // Pass this to the constructor if you want to attempt auto-selection
+ // of the audio recording device.
+ static const char kAutoSelectDevice[];
+
+ // Create a PCM Output stream for the SNDIO device identified by
+ // |device_name|. If unsure of what to use for |device_name|, use
+ // |kAutoSelectDevice|.
+ SndioAudioInputStream(AudioManagerBase* audio_manager,
+ const std::string& device_name,
+ const AudioParameters& params);
+
+ ~SndioAudioInputStream() override;
+
+ // Implementation of AudioInputStream.
+ bool Open() override;
+ void Start(AudioInputCallback* callback) override;
+ void Stop() override;
+ void Close() override;
+ double GetMaxVolume() override;
+ void SetVolume(double volume) override;
+ double GetVolume() override;
+ bool IsMuted() override;
+ void SetOutputDeviceForAec(const std::string& output_device_id) override;
+
+ private:
+
+ enum StreamState {
+ kClosed, // Not opened yet
+ kStopped, // Device opened, but not started yet
+ kRunning, // Started, device playing
+ kStopWait // Stopping, waiting for the real-time thread to exit
+ };
+
+ // C-style call-backs
+ static void OnMoveCallback(void *arg, int delta);
+ static void* ThreadEntry(void *arg);
+
+ // Continuously moves data from the device to the consumer
+ void ThreadLoop();
+ // Our creator, the audio manager needs to be notified when we close.
+ AudioManagerBase* manager;
+ // Parameters of the source
+ AudioParameters params;
+ // We store data here for consumer
+ std::unique_ptr<AudioBus> audio_bus;
+ // Call-back that consumes recorded data
+ AudioInputCallback* callback; // Valid during a recording session.
+ // Handle of the audio device
+ struct sio_hdl* hdl;
+ // Current state of the stream
+ enum StreamState state;
+ // High priority thread running ThreadLoop()
+ pthread_t thread;
+ // Number of frames buffered in the hardware
+ int hw_delay;
+ // Temporary buffer where data is stored sndio-compatible format
+ char* buffer;
+
+ DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream);
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_
--- /dev/null
+++ b/src/3rdparty/chromium/media/audio/sndio/sndio_output.cc
@@ -0,0 +1,183 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/logging.h"
+#include "base/time/time.h"
+#include "base/time/default_tick_clock.h"
+#include "media/audio/audio_manager_base.h"
+#include "media/base/audio_timestamp_helper.h"
+#include "media/audio/sndio/sndio_output.h"
+
+namespace media {
+
+static const SampleFormat kSampleFormat = kSampleFormatS16;
+
+void SndioAudioOutputStream::OnMoveCallback(void *arg, int delta) {
+ SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
+
+ self->hw_delay -= delta;
+}
+
+void SndioAudioOutputStream::OnVolCallback(void *arg, unsigned int vol) {
+ SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
+
+ self->vol = vol;
+}
+
+void *SndioAudioOutputStream::ThreadEntry(void *arg) {
+ SndioAudioOutputStream* self = static_cast<SndioAudioOutputStream*>(arg);
+
+ self->ThreadLoop();
+ return NULL;
+}
+
+SndioAudioOutputStream::SndioAudioOutputStream(const AudioParameters& params,
+ AudioManagerBase* manager)
+ : manager(manager),
+ params(params),
+ audio_bus(AudioBus::Create(params)),
+ state(kClosed),
+ mutex(PTHREAD_MUTEX_INITIALIZER) {
+}
+
+SndioAudioOutputStream::~SndioAudioOutputStream() {
+ if (state != kClosed)
+ Close();
+}
+
+bool SndioAudioOutputStream::Open() {
+ struct sio_par par;
+ int sig;
+
+ if (params.format() != AudioParameters::AUDIO_PCM_LINEAR &&
+ params.format() != AudioParameters::AUDIO_PCM_LOW_LATENCY) {
+ LOG(WARNING) << "Unsupported audio format.";
+ return false;
+ }
+ sio_initpar(&par);
+ par.rate = params.sample_rate();
+ par.pchan = params.channels();
+ par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
+ par.bps = par.bits / 8;
+ par.sig = sig = par.bits != 8 ? 1 : 0;
+ par.le = SIO_LE_NATIVE;
+ par.appbufsz = params.frames_per_buffer();
+
+ hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
+ if (hdl == NULL) {
+ LOG(ERROR) << "Couldn't open audio device.";
+ return false;
+ }
+ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par)) {
+ LOG(ERROR) << "Couldn't set audio parameters.";
+ goto bad_close;
+ }
+ if (par.rate != (unsigned int)params.sample_rate() ||
+ par.pchan != (unsigned int)params.channels() ||
+ par.bits != (unsigned int)SampleFormatToBitsPerChannel(kSampleFormat) ||
+ par.sig != (unsigned int)sig ||
+ (par.bps > 1 && par.le != SIO_LE_NATIVE) ||
+ (par.bits != par.bps * 8)) {
+ LOG(ERROR) << "Unsupported audio parameters.";
+ goto bad_close;
+ }
+ state = kStopped;
+ volpending = 0;
+ vol = 0;
+ buffer = new char[audio_bus->frames() * params.GetBytesPerFrame(kSampleFormat)];
+ sio_onmove(hdl, &OnMoveCallback, this);
+ sio_onvol(hdl, &OnVolCallback, this);
+ return true;
+ bad_close:
+ sio_close(hdl);
+ return false;
+}
+
+void SndioAudioOutputStream::Close() {
+ if (state == kClosed)
+ return;
+ if (state == kRunning)
+ Stop();
+ state = kClosed;
+ delete [] buffer;
+ sio_close(hdl);
+ manager->ReleaseOutputStream(this); // Calls the destructor
+}
+
+void SndioAudioOutputStream::Start(AudioSourceCallback* callback) {
+ state = kRunning;
+ hw_delay = 0;
+ source = callback;
+ sio_start(hdl);
+ if (pthread_create(&thread, NULL, &ThreadEntry, this) != 0) {
+ LOG(ERROR) << "Failed to create real-time thread.";
+ sio_stop(hdl);
+ state = kStopped;
+ }
+}
+
+void SndioAudioOutputStream::Stop() {
+ if (state == kStopped)
+ return;
+ state = kStopWait;
+ pthread_join(thread, NULL);
+ sio_stop(hdl);
+ state = kStopped;
+}
+
+void SndioAudioOutputStream::SetVolume(double v) {
+ pthread_mutex_lock(&mutex);
+ vol = v * SIO_MAXVOL;
+ volpending = 1;
+ pthread_mutex_unlock(&mutex);
+}
+
+void SndioAudioOutputStream::GetVolume(double* v) {
+ pthread_mutex_lock(&mutex);
+ *v = vol * (1. / SIO_MAXVOL);
+ pthread_mutex_unlock(&mutex);
+}
+
+// This stream is always used with sub second buffer sizes, where it's
+// sufficient to simply always flush upon Start().
+void SndioAudioOutputStream::Flush() {}
+
+void SndioAudioOutputStream::ThreadLoop(void) {
+ int avail, count, result;
+
+ while (state == kRunning) {
+ // Update volume if needed
+ pthread_mutex_lock(&mutex);
+ if (volpending) {
+ volpending = 0;
+ sio_setvol(hdl, vol);
+ }
+ pthread_mutex_unlock(&mutex);
+
+ // Get data to play
+ const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
+ params.sample_rate());
+ count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
+ audio_bus->ToInterleaved<SignedInt16SampleTypeTraits>(count, reinterpret_cast<int16_t*>(buffer));
+ if (count == 0) {
+ // We have to submit something to the device
+ count = audio_bus->frames();
+ memset(buffer, 0, count * params.GetBytesPerFrame(kSampleFormat));
+ LOG(WARNING) << "No data to play, running empty cycle.";
+ }
+
+ // Submit data to the device
+ avail = count * params.GetBytesPerFrame(kSampleFormat);
+ result = sio_write(hdl, buffer, avail);
+ if (result == 0) {
+ LOG(WARNING) << "Audio device disconnected.";
+ break;
+ }
+
+ // Update hardware pointer
+ hw_delay += count;
+ }
+}
+
+} // namespace media
--- /dev/null
+++ b/src/3rdparty/chromium/media/audio/sndio/sndio_output.h
@@ -0,0 +1,86 @@
+// Copyright (c) 2012 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 MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
+#define MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
+
+#include <pthread.h>
+#include <sndio.h>
+
+#include "base/time/tick_clock.h"
+#include "base/time/time.h"
+#include "media/audio/audio_io.h"
+
+namespace media {
+
+class AudioManagerBase;
+
+// Implementation of AudioOutputStream using sndio(7)
+class SndioAudioOutputStream : public AudioOutputStream {
+ public:
+ // The manager is creating this object
+ SndioAudioOutputStream(const AudioParameters& params,
+ AudioManagerBase* manager);
+ virtual ~SndioAudioOutputStream();
+
+ // Implementation of AudioOutputStream.
+ bool Open() override;
+ void Close() override;
+ void Start(AudioSourceCallback* callback) override;
+ void Stop() override;
+ void SetVolume(double volume) override;
+ void GetVolume(double* volume) override;
+ void Flush() override;
+
+ friend void sndio_onmove(void *arg, int delta);
+ friend void sndio_onvol(void *arg, unsigned int vol);
+ friend void *sndio_threadstart(void *arg);
+
+ private:
+ enum StreamState {
+ kClosed, // Not opened yet
+ kStopped, // Device opened, but not started yet
+ kRunning, // Started, device playing
+ kStopWait // Stopping, waiting for the real-time thread to exit
+ };
+
+ // C-style call-backs
+ static void OnMoveCallback(void *arg, int delta);
+ static void OnVolCallback(void *arg, unsigned int vol);
+ static void* ThreadEntry(void *arg);
+
+ // Continuously moves data from the producer to the device
+ void ThreadLoop(void);
+
+ // Our creator, the audio manager needs to be notified when we close.
+ AudioManagerBase* manager;
+ // Parameters of the source
+ AudioParameters params;
+ // Source stores data here
+ std::unique_ptr<AudioBus> audio_bus;
+ // Call-back that produces data to play
+ AudioSourceCallback* source;
+ // Handle of the audio device
+ struct sio_hdl* hdl;
+ // Current state of the stream
+ enum StreamState state;
+ // High priority thread running ThreadLoop()
+ pthread_t thread;
+ // Protects vol, volpending and hw_delay
+ pthread_mutex_t mutex;
+ // Current volume in the 0..SIO_MAXVOL range
+ int vol;
+ // Set to 1 if volumes must be refreshed in the realtime thread
+ int volpending;
+ // Number of frames buffered in the hardware
+ int hw_delay;
+ // Temporary buffer where data is stored sndio-compatible format
+ char* buffer;
+
+ DISALLOW_COPY_AND_ASSIGN(SndioAudioOutputStream);
+};
+
+} // namespace media
+
+#endif // MEDIA_AUDIO_SNDIO_SNDIO_OUTPUT_H_
--- a/src/3rdparty/chromium/media/media_options.gni
+++ b/src/3rdparty/chromium/media/media_options.gni
@@ -189,6 +189,9 @@ declare_args() {
# Enables runtime selection of ALSA library for audio.
use_alsa = false
+ # Enable runtime selection of sndio(7)
+ use_sndio = false
+
# Alsa should be used on all non-Android, non-Mac POSIX systems - with the
# exception of CastOS desktop builds.
#

View file

@ -1,6 +1,6 @@
--- a/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
+++ b/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
@@ -58,6 +58,8 @@
@@ -60,6 +60,8 @@
#include "config.h"
#include "glog/logging.h"

View file

@ -1,5 +1,5 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/linux/unbundle/ffmpeg.gn
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/linux/unbundle/ffmpeg.gn
--- a/src/3rdparty/chromium/build/linux/unbundle/ffmpeg.gn
+++ b/src/3rdparty/chromium/build/linux/unbundle/ffmpeg.gn
@@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") {
"libavformat",
"libavutil",

View file

@ -1,5 +1,5 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn
--- a/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn
+++ b/src/3rdparty/chromium/build/toolchain/linux/unbundle/BUILD.gn
@@ -35,8 +35,8 @@ gcc_toolchain("host") {
extra_ldflags = getenv("BUILD_LDFLAGS")

View file

@ -0,0 +1,10 @@
--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
@@ -14,6 +14,7 @@
#include <stddef.h>
#include <array>
+#include <cstddef>
namespace webrtc {

View file

@ -1,10 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
@@ -14,6 +14,7 @@
#include <stddef.h>
#include <array>
+#include <cstddef>
namespace webrtc {

View file

@ -1,16 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h
@@ -222,11 +222,11 @@ inline void DefaultHistogramBoolean(Plat
using ProgramKeyType = std::array<uint8_t, 20>;
using CacheProgramFunc = void (*)(PlatformMethods *platform,
const ProgramKeyType &key,
- size_t programSize,
+ std::size_t programSize,
const uint8_t *programBytes);
inline void DefaultCacheProgram(PlatformMethods *platform,
const ProgramKeyType &key,
- size_t programSize,
+ std::size_t programSize,
const uint8_t *programBytes)
{}

View file

@ -1,11 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/services/credentials.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/services/credentials.h
@@ -14,6 +14,8 @@
#include <string>
#include <vector>
+#include <sys/types.h>
+
#include "sandbox/linux/system_headers/capability.h"
#include "sandbox/sandbox_export.h"

View file

@ -1,38 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/debug/stack_trace.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/debug/stack_trace.cc
@@ -234,7 +234,7 @@ bool StackTrace::WillSymbolizeToStreamFo
// Symbols are not expected to be reliable when gn args specifies
// symbol_level=0.
return false;
-#elif defined(__UCLIBC__) || defined(_AIX)
+#elif defined(__GLIBC__) || defined(_AIX)
// StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
// See https://crbug.com/706728
return false;
@@ -273,7 +273,9 @@ void StackTrace::Print() const {
}
void StackTrace::OutputToStream(std::ostream* os) const {
+#if defined(__GLIBC__)
OutputToStreamWithPrefix(os, nullptr);
+#endif
}
std::string StackTrace::ToString() const {
@@ -281,14 +283,14 @@ std::string StackTrace::ToString() const
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
std::stringstream stream;
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
OutputToStreamWithPrefix(&stream, prefix_string);
#endif
return stream.str();
}
std::ostream& operator<<(std::ostream& os, const StackTrace& s) {
-#if !defined(__UCLIBC__) && !defined(_AIX)
+#if defined(__GLIBC__) && !defined(_AIX)
s.OutputToStream(&os);
#else
os << "StackTrace::OutputToStream not implemented.";

View file

@ -1,70 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -134,6 +134,7 @@ namespace sandbox {
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
const Arg<unsigned long> flags(0);
+#ifdef __GLIBC__
// TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
CLONE_SIGHAND | CLONE_THREAD |
@@ -160,6 +161,16 @@ ResultExpr RestrictCloneToThreadsAndEPER
return If(IsAndroid() ? android_test : glibc_test, Allow())
.ElseIf(is_fork_or_clone_vfork, Error(EPERM))
.Else(CrashSIGSYSClone());
+#else
+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_THREAD | CLONE_SYSVSEM;
+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
+ CLONE_DETACHED;
+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
+ return If(thread_clone_ok, Allow())
+ .ElseIf((flags & (CLONE_VM | CLONE_THREAD)) == 0, Error(EPERM))
+ .Else(CrashSIGSYSClone());
+#endif
}
#ifndef PR_PAC_RESET_KEYS
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -424,6 +424,9 @@ bool SyscallSets::IsAllowedProcessStartO
#if defined(__i386__)
case __NR_waitpid:
#endif
+#if !defined(__GLIBC__)
+ case __NR_set_tid_address:
+#endif
return true;
case __NR_clone: // Should be parameter-restricted.
case __NR_setns: // Privileged.
@@ -436,7 +439,9 @@ bool SyscallSets::IsAllowedProcessStartO
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
case __NR_set_thread_area:
#endif
+#if defined(__GLIBC__)
case __NR_set_tid_address:
+#endif
case __NR_unshare:
#if !defined(__mips__) && !defined(__aarch64__)
case __NR_vfork:
@@ -550,6 +555,10 @@ bool SyscallSets::IsAllowedAddressSpaceA
case __NR_mlock:
case __NR_munlock:
case __NR_munmap:
+#ifndef __GLIBC__
+ case __NR_mremap:
+ case __NR_membarrier:
+#endif
return true;
case __NR_madvise:
case __NR_mincore:
@@ -567,7 +575,9 @@ bool SyscallSets::IsAllowedAddressSpaceA
case __NR_modify_ldt:
#endif
case __NR_mprotect:
+#ifdef __GLIBC__
case __NR_mremap:
+#endif
case __NR_msync:
case __NR_munlockall:
case __NR_readahead:

View file

@ -1,10 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/skia/BUILD.gn
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/skia/BUILD.gn
@@ -786,7 +786,6 @@ skia_source_set("skia_opts") {
# Root build config sets -mfpu=$arm_fpu, which we expect to be neon
# when running this.
if (!arm_use_neon) {
- configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
cflags += [ "-mfpu=neon" ]
}
}

View file

@ -1,30 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
@@ -38,7 +38,12 @@
#include "client/linux/minidump_writer/linux_ptrace_dumper.h"
+#if defined(__GLIBC__)
#include <asm/ptrace.h>
+#else
+/* For arm*-musl this definition is missing */
+#define ARM_sp uregs[13]
+#endif
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
@@ -32,7 +32,12 @@
#include "client/linux/minidump_writer/linux_core_dumper.h"
+#if defined(__GLIBC__)
#include <asm/ptrace.h>
+#else
+/* For arm*-musl this definition is missing */
+#define ARM_sp uregs[13]
+#endif
#include <assert.h>
#include <elf.h>
#include <stdio.h>

View file

@ -1,20 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
@@ -17,6 +17,17 @@
#include <stdint.h>
#include <sys/user.h>
+#if !defined(__GLIBC__)
+struct user_vfp {
+ unsigned long long fpregs[32];
+ unsigned long fpscr;
+};
+struct user_vfp_exc {
+ unsigned long fpexc;
+ unsigned long fpinst;
+ unsigned long fpinst2;
+};
+#endif /* !defined(__GLIBC__) */
#include <type_traits>

View file

@ -1,18 +0,0 @@
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/v8/src/base/cpu.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/v8/src/base/cpu.cc
@@ -165,6 +165,15 @@ static V8_INLINE void __cpuid(int cpu_in
#if V8_HOST_ARCH_ARM || V8_HOST_ARCH_ARM64
+#ifndef __GLIBC__
+#include <elf.h>
+#ifdef __LP64__
+typedef Elf64_auxv_t elf_auxv_t;
+#else
+typedef Elf32_auxv_t elf_auxv_t;
+#endif
+#endif
+
static uint32_t ReadELFHWCaps() {
uint32_t result = 0;
#if V8_GLIBC_PREREQ(2, 16)

View file

@ -1,13 +0,0 @@
--- a/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
+++ b/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
@@ -293,6 +293,10 @@ struct kernel_rusage {
long ru_nivcsw;
};
+#ifdef fstatat64
+#undef fstatat64
+#endif
+
#if defined(__i386__) || defined(__ARM_EABI__) || defined(__ARM_ARCH_3__) \
|| defined(__PPC__) || (defined(__s390__) && !defined(__s390x__)) \
|| defined(__e2k__)

View file

@ -0,0 +1,121 @@
Source: https://git.alpinelinux.org/aports/tree/community/chromium/musl-sandbox.patch
musl uses different syscalls from glibc for some functions,
so the sandbox has to account for that
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -132,6 +132,7 @@ namespace sandbox {
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
const Arg<unsigned long> flags(0);
+#ifdef __GLIBC__
// TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
CLONE_SIGHAND | CLONE_THREAD |
@@ -146,6 +147,13 @@ ResultExpr RestrictCloneToThreadsAndEPER
const BoolExpr android_test =
AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
flags == kGlibcPthreadFlags);
+#else
+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_THREAD | CLONE_SYSVSEM;
+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
+ CLONE_DETACHED;
+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
+#endif
// The following two flags are the two important flags in any vfork-emulating
// clone call. EPERM any clone call that contains both of them.
@@ -155,7 +163,11 @@ ResultExpr RestrictCloneToThreadsAndEPER
AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
(flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
+#ifdef __GLIBC__
return If(IsAndroid() ? android_test : glibc_test, Allow())
+#else
+ return If(thread_clone_ok, Allow())
+#endif
.ElseIf(is_fork_or_clone_vfork, Error(EPERM))
.Else(CrashSIGSYSClone());
}
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -439,6 +439,9 @@ bool SyscallSets::IsAllowedProcessStartO
#if defined(__i386__)
case __NR_waitpid:
#endif
+#if !defined(__GLIBC__)
+ case __NR_set_tid_address:
+#endif
return true;
case __NR_clone: // Should be parameter-restricted.
case __NR_setns: // Privileged.
@@ -451,7 +454,9 @@ bool SyscallSets::IsAllowedProcessStartO
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
case __NR_set_thread_area:
#endif
+#if defined(__GLIBC__)
case __NR_set_tid_address:
+#endif
case __NR_unshare:
#if !defined(__mips__) && !defined(__aarch64__)
case __NR_vfork:
@@ -549,6 +554,10 @@ bool SyscallSets::IsAllowedAddressSpaceA
case __NR_mlock:
case __NR_munlock:
case __NR_munmap:
+#ifndef __GLIBC__
+ case __NR_mremap:
+ case __NR_membarrier:
+#endif
return true;
case __NR_madvise:
case __NR_mincore:
@@ -566,7 +575,9 @@ bool SyscallSets::IsAllowedAddressSpaceA
case __NR_modify_ldt:
#endif
case __NR_mprotect:
+#ifdef __GLIBC__
case __NR_mremap:
+#endif
case __NR_msync:
case __NR_munlockall:
case __NR_readahead:
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -225,12 +225,26 @@ ResultExpr EvaluateSyscallImpl(int fs_de
if (sysno == __NR_getpriority || sysno ==__NR_setpriority)
return RestrictGetSetpriority(current_pid);
+#ifndef __GLIBC__
+ // XXX: hacks for musl sandbox, calls needed?
+ if (sysno == __NR_sched_getparam || sysno == __NR_sched_getscheduler ||
+ sysno == __NR_sched_setscheduler) {
+ return Allow();
+ }
+#endif
+
// The scheduling syscalls are used in threading libraries and also heavily in
// abseil. See for example https://crbug.com/1370394.
+#ifdef __GLIBC__
if (sysno == __NR_sched_getaffinity || sysno == __NR_sched_getparam ||
sysno == __NR_sched_getscheduler || sysno == __NR_sched_setscheduler) {
return RestrictSchedTarget(current_pid, sysno);
}
+#else
+ if (sysno == __NR_sched_getaffinity) {
+ return RestrictSchedTarget(current_pid, sysno);
+ }
+#endif
if (sysno == __NR_getrandom) {
return RestrictGetRandom();
--- a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h
+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h
@@ -10,6 +10,7 @@
#define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
#include "build/build_config.h"
+#include <sys/syscall.h>
#if defined(__x86_64__)
#include "sandbox/linux/system_headers/x86_64_linux_syscalls.h"

View file

@ -2,13 +2,13 @@ Source: https://git.alpinelinux.org/aports/plain/community/chromium/musl-tid-cac
the sandbox caching of thread id's only works with glibc
see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32356
see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579
--
--- a/src/3rdparty/chromium/sandbox/linux/services/namespace_sandbox.cc
+++ b/src/3rdparty/chromium/sandbox/linux/services/namespace_sandbox.cc
@@ -209,6 +209,70 @@
@@ -208,6 +208,72 @@ base::Process NamespaceSandbox::LaunchPr
return base::LaunchProcess(argv, launch_options_copy);
}
+#ifndef __GLIBC__
+#if defined(__aarch64__) || defined(__arm__) || defined(__powerpc__)
+#define TLS_ABOVE_TP
+#endif
@ -72,15 +72,16 @@ see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579
+ pid_t* cached_tid_location = &reinterpret_cast<struct musl_pthread*>(pthread_self())->tid;
+ *cached_tid_location = real_tid;
+}
+#endif
+
// static
pid_t NamespaceSandbox::ForkInNewPidNamespace(bool drop_capabilities_in_child) {
const pid_t pid =
@@ -226,6 +290,8 @@
@@ -225,6 +291,9 @@ pid_t NamespaceSandbox::ForkInNewPidName
#if defined(LIBC_GLIBC)
MaybeUpdateGlibcTidCache();
-#endif
+#else
#endif
+#ifndef __GLIBC__
+ MaybeUpdateMuslTidCache();
+#endif
return 0;

View file

@ -0,0 +1,20 @@
--- a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
+++ b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
@@ -13,7 +13,7 @@
namespace net {
ScopedResState::ScopedResState() {
-#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
+#ifndef __GLIBC__
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
// res_init behaves the same way.
memset(&_res, 0, sizeof(_res));
@@ -30,7 +30,7 @@ ScopedResState::~ScopedResState() {
// Prefer res_ndestroy where available.
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
res_ndestroy(&res_);
-#else
+#elif defined(__GLIBC__)
res_nclose(&res_);
#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)

View file

@ -0,0 +1,10 @@
--- a/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h
+++ b/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h
@@ -5,6 +5,7 @@
#ifndef GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_
#define GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_
+#include <cstdint>
#include <vector>
#include "build/build_config.h"

View file

@ -1,18 +0,0 @@
--- a/examples/CMakeLists.txt 2023-10-03 21:49:54.000000000 +0200
+++ - 2023-10-27 11:12:01.573293042 +0200
@@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
qt_examples_build_begin(EXTERNAL_BUILD)
-if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533
+#if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533
if(TARGET Qt::WebEngineCore)
add_subdirectory(webenginequick)
endif()
@@ -17,5 +17,5 @@
if(TARGET Qt::PdfWidgets)
add_subdirectory(pdfwidgets)
endif()
-endif()
+#endif()
qt_examples_build_end()

View file

@ -0,0 +1,11 @@
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
qt_examples_build_begin(EXTERNAL_BUILD)
-if(NOT CMAKE_CROSSCOMPILING) #QTBUG-86533
+if(TRUE) #QTBUG-86533
if(TARGET Qt::WebEngineCore)
add_subdirectory(webenginequick)
endif()

View file

@ -1,20 +0,0 @@
--- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/fileutil.py 2023-10-03 21:49:54.000000000 +0200
+++ - 2023-10-13 23:26:56.151025878 +0200
@@ -3,7 +3,6 @@
# found in the LICENSE file.
import errno
-import imp
import os.path
import sys
--- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py 2023-10-03 21:49:54.000000000 +0200
+++ - 2023-10-13 23:28:56.391987051 +0200
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
import os.path
import sys

View file

@ -1,27 +1,15 @@
--- a/src/3rdparty/chromium/BUILD.gn
+++ b/src/3rdparty/chromium/BUILD.gn
@@ -1647,9 +1647,7 @@ if (!is_ios && !is_qtwebengine) {
}
# TODO(cassew): Add more OS's that don't support x86.
-is_valid_x86_target =
- target_os != "ios" && target_os != "mac" &&
- (target_os != "linux" || use_libfuzzer || !build_with_chromium)
+is_valid_x86_target = true
# Note: v8_target_cpu == arm allows using the V8 arm simulator on x86 for fuzzing.
assert(
--- a/src/host/CMakeLists.txt
+++ b/src/host/CMakeLists.txt
@@ -48,18 +48,3 @@ if(QT_FEATURE_qtpdf_build)
@@ -50,19 +50,3 @@ if(QT_FEATURE_qtpdf_build)
DESTINATION ${WEBENGINE_ROOT_BUILD_DIR}/src/pdf/v8_toolchain
)
endif()
-
-# TODO: this could be run as part of main configure with execute_process
-# Skip for qtpdf(android)
-
-if(CMAKE_CXX_COMPILER_ID STREQUAL GNU AND TEST_architecture_arch STREQUAL "x86_64"
-AND GN_TARGET_CPU STREQUAL "arm")
- AND GN_TARGET_CPU STREQUAL "arm" AND NOT MINGW AND NOT ANDROID)
- try_compile(
- has32HostCompiler
- "${CMAKE_CURRENT_BINARY_DIR}/config.tests/hostcompiler"

View file

@ -1,36 +0,0 @@
From cbf5f7ad619a967bd54482e1d1df36d80b28145a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
Date: Thu, 13 Jul 2023 12:18:00 +0200
Subject: [PATCH] Partial migration from imp to importlib
---
.../resources/protobufs/binary_proto_generator.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
index 2a1802d..ba67251 100755
--- a/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
+++ b/src/3rdparty/chromium/components/resources/protobufs/binary_proto_generator.py
@@ -9,7 +9,7 @@
"""
from __future__ import print_function
import abc
-import imp
+from importlib import util
import optparse
import os
import re
@@ -68,7 +68,9 @@ class GoogleProtobufModuleImporter:
raise ImportError(fullname)
filepath = self._fullname_to_filepath(fullname)
- return imp.load_source(fullname, filepath)
+ spec = util.spec_from_file_location(fullname, filepath)
+ loaded = util.module_from_spec(spec)
+ return spec.loader.exec_module(loaded)
class BinaryProtoGenerator:
--
2.41.0

View file

@ -1,34 +0,0 @@
Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
index d53835e9675793e..2eaea31ed29b90f 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
void reset();
+#if LIBXML_VERSION >= 21200
+ static void ParseErrorFunc(void* user_data, const xmlError*);
+#else
static void ParseErrorFunc(void* user_data, xmlError*);
+#endif
static void GenericErrorFunc(void* user_data, const char* msg, ...);
// Only for libXSLT callbacks
diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
index 133e0b3355d2f09..f424077089da87d 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
// It would be nice to do something with this error message.
}
+#if LIBXML_VERSION >= 21200
+void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
+#else
void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
+#endif
FrameConsole* console = static_cast<FrameConsole*>(user_data);
if (!console)
return;

View file

@ -1,18 +0,0 @@
Patch-Source: https://webrtc-review.googlesource.com/c/src/+/305120
--
diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
index 5878180..b2ad7ad 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
@@ -452,8 +452,8 @@
PipeWireThreadLoopLock thread_loop_lock(pw_main_loop_);
if (fd >= 0) {
- pw_core_ = pw_context_connect_fd(
- pw_context_, fcntl(fd, F_DUPFD_CLOEXEC), nullptr, 0);
+ pw_core_ = pw_context_connect_fd(
+ pw_context_, fcntl(fd, F_DUPFD_CLOEXEC, 0), nullptr, 0);
} else {
pw_core_ = pw_context_connect(pw_context_, nullptr, 0);
}

View file

@ -1,7 +1,7 @@
# Template file for 'qt6-pdf'
pkgname=qt6-pdf
version=6.6.0
revision=3
version=6.7.2
revision=1
build_style=cmake
configure_args="-DQT_FEATURE_qtpdf_build=ON
-DQT_FEATURE_qtpdf_widgets_build=ON
@ -10,7 +10,8 @@ configure_args="-DQT_FEATURE_qtpdf_build=ON
-DQT_BUILD_EXAMPLES=ON"
hostmakedepends="qt6-base-devel perl pkg-config nodejs python3-html5lib
qt6-declarative-host-tools gperf bison flex nss-devel"
makedepends="qt6-base-devel qt6-declarative-devel qt6-svg-devel zlib-devel
makedepends="qt6-base-private-devel qt6-declarative-private-devel
qt6-svg-devel zlib-devel
pciutils-devel opus-devel libxslt-devel libxml2-devel ffmpeg-devel
lcms2-devel libwebp-devel icu-devel re2-devel snappy-devel libevent-devel
libvpx-devel minizip-devel tiff-devel libpng-devel harfbuzz-devel
@ -21,7 +22,7 @@ maintainer="John <me@johnnynator.dev>"
license="GPL-3.0-only, GPL-2.0-only, LGPL-3.0-only, BSD-3-Clause"
homepage="https://www.qt.io"
distfiles="https://download.qt.io/official_releases/qt/${version%.*}/${version}/submodules/qtwebengine-everywhere-src-${version}.tar.xz"
checksum=d5dc9ff05a2c57adbf99cbf0c7cb6f19527f67216caf627b0cc160a1d253b780
checksum=c7755875594d8be382b07bf3634d44fd77012805794d8b588891709a6405ffd1
if [ "$XBPS_LIBC" = "musl" ]; then
hostmakedepends+=" musl-legacy-compat"
@ -62,6 +63,7 @@ if [ "$_have_webengine" = yes ]; then
-DQT_FEATURE_webengine_system_libevent=ON
-DQT_FEATURE_webengine_system_gn=ON
-DQT_FEATURE_webengine_system_icu=ON
-DQT_FEATURE_webengine_system_re2=ON
-DQT_FEATURE_webengine_webrtc_pipewire=ON
-DQT_FEATURE_webengine_embedded_build=OFF
-DQT_FEATURE_webengine_proprietary_codecs=ON"
@ -167,6 +169,8 @@ pre_install() {
post_install() {
local _file
rm -rf "${DESTDIR}/usr/tests"
rm -f "${DESTDIR}/usr/lib/qt6/bin/testbrowser"
find "${DESTDIR}"/usr/lib/qt6/examples \
-path '*/lib/qt6/**/lib/qt6/*' -type f |
while read _file; do