* [PR PATCH] New package: electron28-28.2.2
@ 2024-02-13 9:21 Johnnynator
2024-02-13 9:25 ` [PR PATCH] [Updated] " Johnnynator
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Johnnynator @ 2024-02-13 9:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]
There is a new pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages electron28
https://github.com/void-linux/void-packages/pull/48690
New package: electron28-28.2.2
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, `x86_64,` `x86_64-musl`
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/48690.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-electron28-48690.patch --]
[-- Type: text/x-diff, Size: 254128 bytes --]
From b033f8fdc930aaea988703dcc209ae51f6cffe25 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Tue, 13 Feb 2024 10:18:45 +0100
Subject: [PATCH] New package: electron28-28.2.2
---
srcpkgs/electron28-devel | 1 +
.../chromium-disable-dns_config_service.patch | 15 +
.../musl-patches/chromium-libc++-musl.patch | 12 +
.../musl-patches/chromium-musl-sandbox.patch | 125 +++
.../chromium-musl-tid-caching.patch | 86 ++
.../chromium-no-res-ninit-nclose.patch | 33 +
...mium-105.0.5195.52-python-six-1.16.0.patch | 134 +++
.../chromium-114-maldoca-include.patch | 25 +
.../chromium-115-compiler-SkColor4f.patch | 27 +
.../patches/chromium-117-string-convert.patch | 21 +
.../files/patches/chromium-119-assert.patch | 12 +
.../patches/chromium-119-ffmpeg-4.4.patch | 20 +
.../chromium-119-fix-aarch64-musl.patch | 11 +
.../chromium-120-arm64-memory_tagging.patch | 14 +
...hromium-120-disable-FFmpegAllowLists.patch | 12 +
...ble-GlobalMediaControlsCastStartStop.patch | 14 +
...chromium-120-el7-clang-build-failure.patch | 230 +++++
...ium-120-el7-clang-build-failure.patch.args | 1 +
...romium-120-el7-clang-version-warning.patch | 16 +
.../chromium-120-gn-workaround-atspi.patch | 13 +
| 448 +++++++++
...chromium-120-no_matching_constructor.patch | 742 +++++++++++++++
...20-split-threshold-for-reg-with-hint.patch | 28 +
.../files/patches/chromium-120-typename.patch | 205 ++++
...karound_clang_bug-structured_binding.patch | 51 +
...ERT-roll-src-third_party-ffmpeg-m102.patch | 333 +++++++
...oll-src-third_party-ffmpeg-m102.patch.args | 1 +
...ERT-roll-src-third_party-ffmpeg-m106.patch | 55 ++
...oll-src-third_party-ffmpeg-m106.patch.args | 1 +
.../chromium-angle-wayland-include.patch | 39 +
...5e6b91ccdf8b2518ef733d75c04823979d18.patch | 61 ++
.../patches/chromium-browser-size_t.patch | 10 +
.../files/patches/chromium-cross-build.patch | 65 ++
.../patches/chromium-fc-cache-version.patch | 13 +
...x-aarch64-musl-memory-tagging-macros.patch | 29 +
...romium-fix-argument_spec-isnan-isinf.patch | 11 +
.../chromium-fix-constexpr-narrowing.patch | 21 +
.../patches/chromium-fix-dawn-platform.patch | 62 ++
.../chromium-fix-libc-version-include.patch | 15 +
...fix-missing-TEMP_FAILURE_RETRY-macro.patch | 21 +
...ium-fix-missing-cstdint-include-musl.patch | 10 +
...um-fix-musl-missing-unistd_h-include.patch | 10 +
...mium-fix-perfetto-GetThreadName-musl.patch | 22 +
...ium-fix-swiftshader-llvm-musl-config.patch | 0
.../chromium-i686-vaapi-fpermissive.patch | 23 +
.../files/patches/chromium-libc_malloc.patch | 34 +
.../patches/chromium-musl-no-execinfo.patch | 85 ++
.../patches/chromium-musl-no-mallinfo.patch | 125 +++
.../chromium-musl-partition-atfork.patch | 11 +
...-v8-monotonic-pthread-cont_timedwait.patch | 24 +
.../patches/chromium-no-getcontext.patch | 27 +
.../files/patches/chromium-old-clang.patch | 11 +
.../patches/chromium-perfetto-libstdc++.patch | 20 +
.../chromium-reenable-linux-i686-builds.patch | 19 +
.../chromium-remove-sys-cdefs-includes.patch | 39 +
.../chromium-revert-drop-of-system-java.patch | 15 +
.../patches/chromium-sandbox-membarrier.patch | 10 +
.../files/patches/chromium-sndio.patch | 877 ++++++++++++++++++
.../patches/chromium-system-nodejs.patch | 20 +
.../files/patches/chromium-systypes.patch | 11 +
...undle-ffmpeg-av_stream_get_first_dts.patch | 12 +
.../chromium-unbundled-cross-toolchain.patch | 12 +
.../patches/chromium-webauthn-variant.patch | 14 +
.../patches/chromium-webrtc-size_t.patch | 10 +
...a-script-to-list-patch-targets.patch.patch | 42 +
.../patches/electron-Build-fixes.patch.patch | 12 +
...lectron-exclude-content-test-patches.patch | 10 +
.../patches/electron-no-need-for-husky.patch | 10 +
srcpkgs/electron28/template | 478 ++++++++++
srcpkgs/electron28/update | 2 +
70 files changed, 5028 insertions(+)
create mode 120000 srcpkgs/electron28-devel
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-disable-dns_config_service.patch
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-libc++-musl.patch
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-musl-sandbox.patch
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-musl-tid-caching.patch
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-no-res-ninit-nclose.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-105.0.5195.52-python-six-1.16.0.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-114-maldoca-include.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-115-compiler-SkColor4f.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-117-string-convert.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-119-assert.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-119-ffmpeg-4.4.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-119-fix-aarch64-musl.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-arm64-memory_tagging.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-disable-FFmpegAllowLists.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-disable-GlobalMediaControlsCastStartStop.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch.args
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-el7-clang-version-warning.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-gn-workaround-atspi.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-missing-header-files.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-no_matching_constructor.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-split-threshold-for-reg-with-hint.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-typename.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-workaround_clang_bug-structured_binding.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch.args
create mode 100644 srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch.args
create mode 100644 srcpkgs/electron28/files/patches/chromium-angle-wayland-include.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-b74d5e6b91ccdf8b2518ef733d75c04823979d18.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-browser-size_t.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-cross-build.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fc-cache-version.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-aarch64-musl-memory-tagging-macros.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-argument_spec-isnan-isinf.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-constexpr-narrowing.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-dawn-platform.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-libc-version-include.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-missing-cstdint-include-musl.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-musl-missing-unistd_h-include.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-perfetto-GetThreadName-musl.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-swiftshader-llvm-musl-config.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-i686-vaapi-fpermissive.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-libc_malloc.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-musl-no-execinfo.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-musl-no-mallinfo.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-musl-partition-atfork.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-musl-v8-monotonic-pthread-cont_timedwait.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-no-getcontext.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-old-clang.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-perfetto-libstdc++.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-reenable-linux-i686-builds.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-remove-sys-cdefs-includes.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-revert-drop-of-system-java.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-sandbox-membarrier.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-sndio.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-system-nodejs.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-systypes.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-unbundled-cross-toolchain.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-webauthn-variant.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-webrtc-size_t.patch
create mode 100644 srcpkgs/electron28/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch
create mode 100644 srcpkgs/electron28/files/patches/electron-Build-fixes.patch.patch
create mode 100644 srcpkgs/electron28/files/patches/electron-exclude-content-test-patches.patch
create mode 100644 srcpkgs/electron28/files/patches/electron-no-need-for-husky.patch
create mode 100644 srcpkgs/electron28/template
create mode 100644 srcpkgs/electron28/update
diff --git a/srcpkgs/electron28-devel b/srcpkgs/electron28-devel
new file mode 120000
index 0000000000000..da626e98e8d29
--- /dev/null
+++ b/srcpkgs/electron28-devel
@@ -0,0 +1 @@
+electron28
\ No newline at end of file
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-disable-dns_config_service.patch b/srcpkgs/electron28/files/musl-patches/chromium-disable-dns_config_service.patch
new file mode 100644
index 0000000000000..a72e1c47c7e20
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-disable-dns_config_service.patch
@@ -0,0 +1,15 @@
+diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
+index f36bf68..805d9a6 100644
+--- a/net/dns/BUILD.gn
++++ b/net/dns/BUILD.gn
+@@ -130,8 +130,8 @@ source_set("dns") {
+ ]
+ } else if (is_linux) {
+ sources += [
+- "dns_config_service_linux.cc",
+- "dns_config_service_linux.h",
++ "dns_config_service_fuchsia.cc",
++ "dns_config_service_fuchsia.h",
+ ]
+ } else if (is_posix) {
+ sources += [
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-libc++-musl.patch b/srcpkgs/electron28/files/musl-patches/chromium-libc++-musl.patch
new file mode 100644
index 0000000000000..b90a54daa8b49
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-libc++-musl.patch
@@ -0,0 +1,12 @@
+Source: https://git.alpinelinux.org/aports/tree/community/chromium/yes-musl.patch
+--- ./buildtools/third_party/libc++/__config_site.orig
++++ ./buildtools/third_party/libc++/__config_site
+@@ -18,7 +18,7 @@
+ /* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
+ /* #undef _LIBCPP_HAS_NO_THREADS */
+ /* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
+-/* #undef _LIBCPP_HAS_MUSL_LIBC */
++#define _LIBCPP_HAS_MUSL_LIBC 1
+ /* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
+ /* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
+ /* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-musl-sandbox.patch b/srcpkgs/electron28/files/musl-patches/chromium-musl-sandbox.patch
new file mode 100644
index 0000000000000..22d865aa42f5d
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-musl-sandbox.patch
@@ -0,0 +1,125 @@
+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
+--
+diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+index ff5a1c0..da56b9b 100644
+--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -139,21 +139,11 @@ namespace sandbox {
+ // present (as in newer versions of posix_spawn).
+ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
+ const Arg<unsigned long> flags(0);
+-
+- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
+- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
+- CLONE_SIGHAND | CLONE_THREAD |
+- CLONE_SYSVSEM;
+- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED;
+-
+- const uint64_t kGlibcPthreadFlags =
+- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD |
+- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID;
+- const BoolExpr glibc_test = flags == kGlibcPthreadFlags;
+-
+- const BoolExpr android_test =
+- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
+- flags == kGlibcPthreadFlags);
++ 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;
+
+ // The following two flags are the two important flags in any vfork-emulating
+ // clone call. EPERM any clone call that contains both of them.
+@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
+ AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
+ (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
+
+- return If(IsAndroid() ? android_test : glibc_test, Allow())
++ return If(thread_clone_ok, Allow())
+ .ElseIf(is_fork_or_clone_vfork, Error(EPERM))
+ .Else(CrashSIGSYSClone());
+ }
+diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+index d9d1882..0567557 100644
+--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -392,6 +392,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
+ #if defined(__i386__)
+ case __NR_waitpid:
+ #endif
++ case __NR_set_tid_address:
+ return true;
+ case __NR_clone: // Should be parameter-restricted.
+ case __NR_setns: // Privileged.
+@@ -404,7 +405,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+ case __NR_set_thread_area:
+ #endif
+- case __NR_set_tid_address:
+ case __NR_unshare:
+ #if !defined(__mips__) && !defined(__aarch64__)
+ case __NR_vfork:
+@@ -514,6 +514,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+ case __NR_mlock:
+ case __NR_munlock:
+ case __NR_munmap:
++ case __NR_mremap:
++ case __NR_membarrier:
+ return true;
+ case __NR_madvise:
+ case __NR_mincore:
+@@ -531,7 +533,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+ case __NR_modify_ldt:
+ #endif
+ case __NR_mprotect:
+- case __NR_mremap:
+ case __NR_msync:
+ case __NR_munlockall:
+ case __NR_readahead:
+diff --git a/sandbox/linux/system_headers/linux_syscalls.h ./sandbox/linux/system_headers/linux_syscalls.h
+index 2b78a0c..b6fedb5 100644
+--- a/sandbox/linux/system_headers/linux_syscalls.h
++++ b/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"
+--- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc
++++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+@@ -94,6 +94,9 @@
+ case __NR_pwrite64:
+ case __NR_sched_get_priority_max:
+ case __NR_sched_get_priority_min:
++ case __NR_sched_getparam:
++ case __NR_sched_getscheduler:
++ case __NR_sched_setscheduler:
+ case __NR_sysinfo:
+ case __NR_times:
+ case __NR_uname:
+--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
++++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+@@ -225,10 +225,15 @@
+ if (sysno == __NR_getpriority || sysno ==__NR_setpriority)
+ return RestrictGetSetpriority(current_pid);
+
++ // XXX: hacks for musl sandbox, calls needed?
++ if (sysno == __NR_sched_getparam || sysno == __NR_sched_getscheduler ||
++ sysno == __NR_sched_setscheduler) {
++ return Allow();
++ }
++
+ // The scheduling syscalls are used in threading libraries and also heavily in
+ // abseil. See for example https://crbug.com/1370394.
+- if (sysno == __NR_sched_getaffinity || sysno == __NR_sched_getparam ||
+- sysno == __NR_sched_getscheduler || sysno == __NR_sched_setscheduler) {
++ if (sysno == __NR_sched_getaffinity) {
+ return RestrictSchedTarget(current_pid, sysno);
+ }
+
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-musl-tid-caching.patch b/srcpkgs/electron28/files/musl-patches/chromium-musl-tid-caching.patch
new file mode 100644
index 0000000000000..52bbe775ad2a9
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-musl-tid-caching.patch
@@ -0,0 +1,86 @@
+Source: https://git.alpinelinux.org/aports/plain/community/chromium/musl-tid-caching.patch
+the sandbox caching of thread id's only works with glibc
+see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32356
+see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579
+--
+--- a/sandbox/linux/services/namespace_sandbox.cc
++++ b/sandbox/linux/services/namespace_sandbox.cc
+@@ -209,6 +209,70 @@
+ return base::LaunchProcess(argv, launch_options_copy);
+ }
+
++#if defined(__aarch64__) || defined(__arm__) || defined(__powerpc__)
++#define TLS_ABOVE_TP
++#endif
++
++struct musl_pthread
++{
++ /* Part 1 -- these fields may be external or
++ * internal (accessed via asm) ABI. Do not change. */
++ struct pthread *self;
++#ifndef TLS_ABOVE_TP
++ uintptr_t *dtv;
++#endif
++ struct pthread *prev, *next; /* non-ABI */
++ uintptr_t sysinfo;
++#ifndef TLS_ABOVE_TP
++#ifdef CANARY_PAD
++ uintptr_t canary_pad;
++#endif
++ uintptr_t canary;
++#endif
++
++/* Part 2 -- implementation details, non-ABI. */
++ int tid;
++ int errno_val;
++ volatile int detach_state;
++ volatile int cancel;
++ volatile unsigned char canceldisable, cancelasync;
++ unsigned char tsd_used:1;
++ unsigned char dlerror_flag:1;
++ unsigned char *map_base;
++ size_t map_size;
++ void *stack;
++ size_t stack_size;
++ size_t guard_size;
++ void *result;
++ struct __ptcb *cancelbuf;
++ void **tsd;
++ struct {
++ volatile void *volatile head;
++ long off;
++ volatile void *volatile pending;
++ } robust_list;
++ int h_errno_val;
++ volatile int timer_id;
++ locale_t locale;
++ volatile int killlock[1];
++ char *dlerror_buf;
++ void *stdio_locks;
++
++ /* Part 3 -- the positions of these fields relative to
++ * the end of the structure is external and internal ABI. */
++#ifdef TLS_ABOVE_TP
++ uintptr_t canary;
++ uintptr_t *dtv;
++#endif
++};
++
++void MaybeUpdateMuslTidCache()
++{
++ pid_t real_tid = sys_gettid();
++ pid_t* cached_tid_location = &reinterpret_cast<struct musl_pthread*>(pthread_self())->tid;
++ *cached_tid_location = real_tid;
++}
++
+ // static
+ pid_t NamespaceSandbox::ForkInNewPidNamespace(bool drop_capabilities_in_child) {
+ const pid_t pid =
+@@ -226,6 +290,7 @@
+ #if defined(LIBC_GLIBC)
+ MaybeUpdateGlibcTidCache();
+ #endif
++ MaybeUpdateMuslTidCache();
+ return 0;
+ }
+
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-no-res-ninit-nclose.patch b/srcpkgs/electron28/files/musl-patches/chromium-no-res-ninit-nclose.patch
new file mode 100644
index 0000000000000..6884039efb884
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-no-res-ninit-nclose.patch
@@ -0,0 +1,33 @@
+Source: https://git.alpinelinux.org/aports/plain/community/chromium/no-res-ninit-nclose.patch
+similar to dns-resolver.patch, musl doesn't have res_ninit and so on
+--
+--- a/net/dns/public/scoped_res_state.cc
++++ b/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) || defined(_GNU_SOURCE)
+ // Note: res_ninit in glibc always returns 0 and sets RES_INIT.
+ // res_init behaves the same way.
+ memset(&_res, 0, sizeof(_res));
+@@ -25,16 +25,8 @@
+ }
+
+ ScopedResState::~ScopedResState() {
+-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
+-
+- // Prefer res_ndestroy where available.
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
+- res_ndestroy(&res_);
+-#else
+- res_nclose(&res_);
+-#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
+-
+-#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
++ // musl res_init() doesn't actually do anything
++ // no destruction is necessary as no memory has been allocated
+ }
+
+ bool ScopedResState::IsValid() const {
diff --git a/srcpkgs/electron28/files/patches/chromium-105.0.5195.52-python-six-1.16.0.patch b/srcpkgs/electron28/files/patches/chromium-105.0.5195.52-python-six-1.16.0.patch
new file mode 100644
index 0000000000000..497c2df40b321
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-105.0.5195.52-python-six-1.16.0.patch
@@ -0,0 +1,134 @@
+diff -up chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py
+--- chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 2022-07-05 13:31:29.434673638 +0000
++++ chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py 2022-07-05 21:52:01.884578748 +0000
+@@ -29,7 +29,7 @@ import sys
+ import types
+
+ __author__ = "Benjamin Peterson <benjamin@python.org>"
+-__version__ = "1.15.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__)
+
+
+diff -up chromium-103.0.5060.53/third_party/six/src/six.py.116 chromium-103.0.5060.53/third_party/six/src/six.py
+--- chromium-103.0.5060.53/third_party/six/src/six.py.116 2022-07-05 13:32:28.916687658 +0000
++++ chromium-103.0.5060.53/third_party/six/src/six.py 2022-07-05 21:59:42.561240407 +0000
+@@ -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
+
+
diff --git a/srcpkgs/electron28/files/patches/chromium-114-maldoca-include.patch b/srcpkgs/electron28/files/patches/chromium-114-maldoca-include.patch
new file mode 100644
index 0000000000000..0259cb9b0d017
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-114-maldoca-include.patch
@@ -0,0 +1,25 @@
+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(+)
+
+diff --git a/third_party/maldoca/src/maldoca/ole/header.h b/third_party/maldoca/src/maldoca/ole/header.h
+index 174f704..41c41d5 100644
+--- a/third_party/maldoca/src/maldoca/ole/header.h
++++ b/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 {
+--
+2.39.2
+
diff --git a/srcpkgs/electron28/files/patches/chromium-115-compiler-SkColor4f.patch b/srcpkgs/electron28/files/patches/chromium-115-compiler-SkColor4f.patch
new file mode 100644
index 0000000000000..ffa0e7ed108c9
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-115-compiler-SkColor4f.patch
@@ -0,0 +1,27 @@
+Patch-Source: https://src.fedoraproject.org/rpms/chromium/blob/1f8fd846d2cc72c90c73c9867619f0da43b9c816/f/chromium-115-compiler-SkColor4f.patch
+diff -up chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
+--- chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me 2023-06-24 10:38:11.011511463 +0200
++++ chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc 2023-06-24 13:07:35.865375884 +0200
+@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
+
+ void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
+ float global_alpha) const {
++ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha};
+ switch (type_) {
+ case kColor:
+ ApplyColorToFlags(flags, global_alpha);
+@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
+ case kGradient:
+ GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
+ ImageDrawOptions());
+- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
++ flags.setColor(custom_color);
+ break;
+ case kImagePattern:
+ GetCanvasPattern()->GetPattern()->ApplyToFlags(
+ flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
+- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
++ flags.setColor(custom_color);
+ break;
+ default:
+ NOTREACHED();
diff --git a/srcpkgs/electron28/files/patches/chromium-117-string-convert.patch b/srcpkgs/electron28/files/patches/chromium-117-string-convert.patch
new file mode 100644
index 0000000000000..cb48e4b21a617
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-117-string-convert.patch
@@ -0,0 +1,21 @@
+diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc
+diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me chromium-117.0.5938.62/net/dns/host_resolver_cache.h
+--- chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me 2023-09-14 15:21:24.632965004 +0200
++++ chromium-117.0.5938.62/net/dns/host_resolver_cache.h 2023-09-15 09:15:48.511300845 +0200
+@@ -143,12 +143,14 @@ class NET_EXPORT HostResolverCache final
+ }
+
+ bool operator()(const Key& lhs, const KeyRef& rhs) const {
++ const std::string rhs_domain_name{rhs.domain_name};
+ return std::tie(lhs.domain_name, lhs.network_anonymization_key) <
+- std::tie(rhs.domain_name, *rhs.network_anonymization_key);
++ std::tie(rhs_domain_name, *rhs.network_anonymization_key);
+ }
+
+ bool operator()(const KeyRef& lhs, const Key& rhs) const {
+- return std::tie(lhs.domain_name, *lhs.network_anonymization_key) <
++ const std::string lhs_domain_name{lhs.domain_name};
++ return std::tie(lhs_domain_name, *lhs.network_anonymization_key) <
+ std::tie(rhs.domain_name, rhs.network_anonymization_key);
+ }
+ };
diff --git a/srcpkgs/electron28/files/patches/chromium-119-assert.patch b/srcpkgs/electron28/files/patches/chromium-119-assert.patch
new file mode 100644
index 0000000000000..6c502f13a5955
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-119-assert.patch
@@ -0,0 +1,12 @@
+diff -up chromium-119.0.6045.59/v8/src/base/small-vector.h.than chromium-119.0.6045.59/v8/src/base/small-vector.h
+--- chromium-119.0.6045.59/v8/src/base/small-vector.h.than 2023-11-01 16:13:12.645301345 +0100
++++ chromium-119.0.6045.59/v8/src/base/small-vector.h 2023-11-01 16:13:29.660610182 +0100
+@@ -22,7 +22,7 @@ template <typename T, size_t kSize, type
+ class SmallVector {
+ // Currently only support trivially copyable and trivially destructible data
+ // types, as it uses memcpy to copy elements and never calls destructors.
+- ASSERT_TRIVIALLY_COPYABLE(T);
++ //ASSERT_TRIVIALLY_COPYABLE(T);
+ static_assert(std::is_trivially_destructible<T>::value);
+
+ public:
diff --git a/srcpkgs/electron28/files/patches/chromium-119-ffmpeg-4.4.patch b/srcpkgs/electron28/files/patches/chromium-119-ffmpeg-4.4.patch
new file mode 100644
index 0000000000000..04d04b166ba37
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-119-ffmpeg-4.4.patch
@@ -0,0 +1,20 @@
+--- a/media/filters/ffmpeg_demuxer.cc.orig
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -390,7 +390,7 @@
+
+ scoped_refptr<DecoderBuffer> buffer;
+
+- size_t side_data_size = 0;
++ int side_data_size = 0;
+ uint8_t* side_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+
+@@ -453,7 +453,7 @@
+ packet->size - data_offset);
+ }
+
+- size_t skip_samples_size = 0;
++ int skip_samples_size = 0;
+ const uint32_t* skip_samples_ptr =
+ reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
diff --git a/srcpkgs/electron28/files/patches/chromium-119-fix-aarch64-musl.patch b/srcpkgs/electron28/files/patches/chromium-119-fix-aarch64-musl.patch
new file mode 100644
index 0000000000000..cbb2ec14c90fb
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-119-fix-aarch64-musl.patch
@@ -0,0 +1,11 @@
+--- a/v8/src/base/cpu.cc
++++ b/v8/src/base/cpu.cc
+@@ -14,7 +14,7 @@
+ #if V8_OS_LINUX
+ #include <linux/auxvec.h> // AT_HWCAP
+ #endif
+-#if V8_GLIBC_PREREQ(2, 16) || V8_OS_ANDROID
++#if V8_OS_LINUX || V8_OS_ANDROID
+ #include <sys/auxv.h> // getauxval()
+ #endif
+ #if V8_OS_QNX
diff --git a/srcpkgs/electron28/files/patches/chromium-120-arm64-memory_tagging.patch b/srcpkgs/electron28/files/patches/chromium-120-arm64-memory_tagging.patch
new file mode 100644
index 0000000000000..bb461ef3664a2
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-arm64-memory_tagging.patch
@@ -0,0 +1,14 @@
+--- chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.than 2023-11-26 13:50:07.005519877 +0100
++++ chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h 2023-11-26 13:50:49.727267240 +0100
+@@ -152,10 +152,7 @@
+ (!BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \
+ defined(ARCH_CPU_LITTLE_ENDIAN))
+
+-#define PA_CONFIG_HAS_MEMORY_TAGGING() \
+- (defined(ARCH_CPU_ARM64) && defined(__clang__) && \
+- !defined(ADDRESS_SANITIZER) && \
+- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)))
++#define PA_CONFIG_HAS_MEMORY_TAGGING() 0
+
+ #if PA_CONFIG(HAS_MEMORY_TAGGING)
+ static_assert(sizeof(void*) == 8);
diff --git a/srcpkgs/electron28/files/patches/chromium-120-disable-FFmpegAllowLists.patch b/srcpkgs/electron28/files/patches/chromium-120-disable-FFmpegAllowLists.patch
new file mode 100644
index 0000000000000..98216ddb465ca
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-disable-FFmpegAllowLists.patch
@@ -0,0 +1,12 @@
+diff -up chromium-120.0.6099.56/media/base/media_switches.cc.me chromium-120.0.6099.56/media/base/media_switches.cc
+--- chromium-120.0.6099.56/media/base/media_switches.cc.me 2023-12-02 11:43:21.990775897 +0100
++++ chromium-120.0.6099.56/media/base/media_switches.cc 2023-12-02 11:45:23.248006377 +0100
+@@ -1636,7 +1636,7 @@ BASE_FEATURE(kUseSharedImagesForPepperVi
+ // Enables FFmpeg allow lists for supported codecs / containers.
+ BASE_FEATURE(kFFmpegAllowLists,
+ "FFmpegAllowLists",
+- base::FEATURE_ENABLED_BY_DEFAULT);
++ base::FEATURE_DISABLED_BY_DEFAULT);
+
+ #if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
+ // Allows decoding of theora / vp3 content.
diff --git a/srcpkgs/electron28/files/patches/chromium-120-disable-GlobalMediaControlsCastStartStop.patch b/srcpkgs/electron28/files/patches/chromium-120-disable-GlobalMediaControlsCastStartStop.patch
new file mode 100644
index 0000000000000..6a2585b953c3b
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-disable-GlobalMediaControlsCastStartStop.patch
@@ -0,0 +1,14 @@
+--- chromium-120.0.6099.35/chrome/browser/media/router/media_router_feature.cc.orig 2023-11-26 13:25:34.724228755 +0100
++++ chromium-120.0.6099.35/chrome/browser/media/router/media_router_feature.cc 2023-11-26 13:28:26.452359146 +0100
+@@ -71,11 +71,7 @@
+ // TODO(b/202294946): Remove when enabled by default on ChromeOS.
+ BASE_FEATURE(kGlobalMediaControlsCastStartStop,
+ "GlobalMediaControlsCastStartStop",
+-#if BUILDFLAG(IS_CHROMEOS)
+ base::FEATURE_DISABLED_BY_DEFAULT);
+-#else
+- base::FEATURE_ENABLED_BY_DEFAULT);
+-#endif // BUILDFLAG(IS_CHROMEOS)
+ #endif // !BUILDFLAG(IS_ANDROID)
+
+ namespace {
diff --git a/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch
new file mode 100644
index 0000000000000..96258e67aaebb
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch
@@ -0,0 +1,230 @@
+commit 57526b8dc45b2e6c67bba7306f1dde73b1f2910c
+Author: sisidovski <sisidovski@chromium.org>
+Date: Tue Oct 24 09:32:49 2023 +0000
+
+ Remove unused items from the RaceNetworkRequest hashmap
+
+ When the AutoPreload or the race-network-and-fetch-handler option in the
+ static routing API is enabled, network requests are dispatched and
+ URLLoaderFactories are held in a hashmap in ServiceWorkerGlobalScope.
+ Those are consumed inside the fetch handler when fetch(e.request) is
+ called. But if the fetch handler doesn't call fetch() e.g. fallback,
+ those hashmap items does not have a chance to be removed.
+
+ This CL changes the hashmap items to be removed when the fetch event
+ finishes, and the URLLoaderFactory is still not consumed at that time.
+ This may loose the dedupe capability if fetch() is called later e.g.
+ setTimeout(() => fetch()), but it makes sense to prioritize keeping the
+ hashmap small.
+
+ Change-Id: I51bdc9d5eb5185f2b5b4df6ee785715b1180c848
+ Bug: 1492640
+ Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964840
+ Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
+ Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
+ Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
+ Cr-Commit-Position: refs/heads/main@{#1214064}
+
+diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
+index 02887edc10883..b3624fc0162df 100644
+--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
++++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
+@@ -46,6 +46,7 @@
+ #include "services/network/public/cpp/cross_origin_embedder_policy.h"
+ #include "services/network/public/mojom/cookie_manager.mojom-blink.h"
+ #include "services/network/public/mojom/cross_origin_embedder_policy.mojom.h"
++#include "services/network/public/mojom/url_loader_factory.mojom-blink.h"
+ #include "third_party/blink/public/common/features.h"
+ #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+ #include "third_party/blink/public/mojom/notifications/notification.mojom-blink.h"
+@@ -1096,6 +1097,10 @@ void ServiceWorkerGlobalScope::DidHandleFetchEvent(
+ TRACE_ID_WITH_SCOPE(kServiceWorkerGlobalScopeTraceScope,
+ TRACE_ID_LOCAL(event_id)),
+ TRACE_EVENT_FLAG_FLOW_IN, "status", MojoEnumToString(status));
++
++ // Delete the URLLoaderFactory for the RaceNetworkRequest if it's not used.
++ RemoveItemFromRaceNetworkRequests(event_id);
++
+ if (!RunEventCallback(&fetch_event_callbacks_, event_queue_.get(), event_id,
+ status)) {
+ // The event may have been aborted. Its response callback also needs to be
+@@ -1495,6 +1500,7 @@ void ServiceWorkerGlobalScope::AbortCallbackForFetchEvent(
+ response_callback_iter->value->TakeValue().reset();
+ fetch_response_callbacks_.erase(response_callback_iter);
+ }
++ RemoveItemFromRaceNetworkRequests(event_id);
+
+ // Run the event callback with the error code.
+ auto event_callback_iter = fetch_event_callbacks_.find(event_id);
+@@ -1551,52 +1557,11 @@ void ServiceWorkerGlobalScope::StartFetchEvent(
+
+ if (params->race_network_request_loader_factory &&
+ params->request->service_worker_race_network_request_token) {
+- auto insert_result = race_network_request_loader_factories_.insert(
+- String(params->request->service_worker_race_network_request_token
+- ->ToString()),
+- std::move(params->race_network_request_loader_factory));
+-
+- // DumpWithoutCrashing if the token is empty, or not inserted as a new entry
+- // to |race_network_request_loader_factories_|.
+- // TODO(crbug.com/1492640) Remove DumpWithoutCrashing once we collect data
+- // and identify the cause.
+- static bool has_dumped_without_crashing_for_empty_token = false;
+- static bool has_dumped_without_crashing_for_not_new_entry = false;
+- if (!has_dumped_without_crashing_for_empty_token &&
+- params->request->service_worker_race_network_request_token
+- ->is_empty()) {
+- has_dumped_without_crashing_for_empty_token = true;
+- SCOPED_CRASH_KEY_BOOL(
+- "SWGlobalScope", "empty_race_token",
+- params->request->service_worker_race_network_request_token
+- ->is_empty());
+- SCOPED_CRASH_KEY_STRING64(
+- "SWGlobalScope", "race_token_string",
+- params->request->service_worker_race_network_request_token
+- ->ToString());
+- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
+- insert_result.is_new_entry);
+- SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
+- params->request->url.GetString().Utf8());
+- base::debug::DumpWithoutCrashing();
+- }
+- if (!has_dumped_without_crashing_for_not_new_entry &&
+- !insert_result.is_new_entry) {
+- has_dumped_without_crashing_for_not_new_entry = true;
+- SCOPED_CRASH_KEY_BOOL(
+- "SWGlobalScope", "empty_race_token",
+- params->request->service_worker_race_network_request_token
+- ->is_empty());
+- SCOPED_CRASH_KEY_STRING64(
+- "SWGlobalScope", "race_token_string",
+- params->request->service_worker_race_network_request_token
+- ->ToString());
+- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
+- insert_result.is_new_entry);
+- SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
+- params->request->url.GetString().Utf8());
+- base::debug::DumpWithoutCrashing();
+- }
++ InsertNewItemToRaceNetworkRequests(
++ event_id,
++ params->request->service_worker_race_network_request_token.value(),
++ std::move(params->race_network_request_loader_factory),
++ params->request->url);
+ }
+
+ Request* request = Request::Create(
+@@ -2808,12 +2773,71 @@ bool ServiceWorkerGlobalScope::SetAttributeEventListener(
+ absl::optional<mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>
+ ServiceWorkerGlobalScope::FindRaceNetworkRequestURLLoaderFactory(
+ const base::UnguessableToken& token) {
+- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory> result =
+- race_network_request_loader_factories_.Take(String(token.ToString()));
++ std::unique_ptr<RaceNetworkRequestInfo> result =
++ race_network_requests_.Take(String(token.ToString()));
+ if (result) {
+- return result;
++ race_network_request_fetch_event_ids_.erase(result->fetch_event_id);
++ return absl::optional<
++ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>(
++ std::move(result->url_loader_factory));
+ }
+ return absl::nullopt;
+ }
+
++void ServiceWorkerGlobalScope::InsertNewItemToRaceNetworkRequests(
++ int fetch_event_id,
++ const base::UnguessableToken& token,
++ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
++ url_loader_factory,
++ const KURL& request_url) {
++ auto race_network_request_token = String(token.ToString());
++ auto info = std::make_unique<RaceNetworkRequestInfo>(
++ fetch_event_id, race_network_request_token,
++ std::move(url_loader_factory));
++ race_network_request_fetch_event_ids_.insert(fetch_event_id, info.get());
++ auto insert_result = race_network_requests_.insert(race_network_request_token,
++ std::move(info));
++
++ // DumpWithoutCrashing if the token is empty, or not inserted as a new entry
++ // to |race_network_request_loader_factories_|.
++ // TODO(crbug.com/1492640) Remove DumpWithoutCrashing once we collect data
++ // and identify the cause.
++ static bool has_dumped_without_crashing_for_empty_token = false;
++ static bool has_dumped_without_crashing_for_not_new_entry = false;
++ if (!has_dumped_without_crashing_for_empty_token && token.is_empty()) {
++ has_dumped_without_crashing_for_empty_token = true;
++ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "empty_race_token",
++ token.is_empty());
++ SCOPED_CRASH_KEY_STRING64("SWGlobalScope", "race_token_string",
++ token.ToString());
++ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
++ insert_result.is_new_entry);
++ SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
++ request_url.GetString().Utf8());
++ base::debug::DumpWithoutCrashing();
++ }
++ if (!has_dumped_without_crashing_for_not_new_entry &&
++ !insert_result.is_new_entry) {
++ has_dumped_without_crashing_for_not_new_entry = true;
++ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "empty_race_token",
++ token.is_empty());
++ SCOPED_CRASH_KEY_STRING64("SWGlobalScope", "race_token_string",
++ token.ToString());
++ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
++ insert_result.is_new_entry);
++ SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
++ request_url.GetString().Utf8());
++ base::debug::DumpWithoutCrashing();
++ }
++}
++
++void ServiceWorkerGlobalScope::RemoveItemFromRaceNetworkRequests(
++ int fetch_event_id) {
++ RaceNetworkRequestInfo* info =
++ race_network_request_fetch_event_ids_.Take(fetch_event_id);
++ if (info) {
++ race_network_requests_.erase(info->token);
++ }
++}
++
+ } // namespace blink
+diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h
+index 46c431b395825..ac4cac0b1d8fb 100644
+--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h
++++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h
+@@ -623,6 +623,14 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final
+ // ServiceWorker.FetchEvent.QueuingTime histogram.
+ void RecordQueuingTime(base::TimeTicks created_time);
+
++ void InsertNewItemToRaceNetworkRequests(
++ int fetch_event_id,
++ const base::UnguessableToken& token,
++ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
++ url_loader_factory,
++ const KURL& request_url);
++ void RemoveItemFromRaceNetworkRequests(int fetch_event_id);
++
+ Member<ServiceWorkerClients> clients_;
+ Member<ServiceWorkerRegistration> registration_;
+ Member<::blink::ServiceWorker> service_worker_;
+@@ -768,10 +776,17 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final
+
+ blink::BlinkStorageKey storage_key_;
+
++ struct RaceNetworkRequestInfo {
++ int fetch_event_id;
++ String token;
++ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
++ url_loader_factory;
++ };
+ // TODO(crbug.com/918702) WTF::HashMap cannot use base::UnguessableToken as a
+ // key. As a workaround uses WTF::String as a key instead.
+- HashMap<String, mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>
+- race_network_request_loader_factories_;
++ HashMap<String, std::unique_ptr<RaceNetworkRequestInfo>>
++ race_network_requests_;
++ HashMap<int, RaceNetworkRequestInfo*> race_network_request_fetch_event_ids_;
+
+ HeapMojoAssociatedRemote<mojom::blink::AssociatedInterfaceProvider>
+ remote_associated_interfaces_{this};
diff --git a/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch.args b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch.args
new file mode 100644
index 0000000000000..8bbbbe9483632
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch.args
@@ -0,0 +1 @@
+-RNp1
diff --git a/srcpkgs/electron28/files/patches/chromium-120-el7-clang-version-warning.patch b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-version-warning.patch
new file mode 100644
index 0000000000000..112da65b4d9b6
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-version-warning.patch
@@ -0,0 +1,16 @@
+diff -up chromium-120.0.6099.56/third_party/libc++/src/include/__config.me chromium-120.0.6099.56/third_party/libc++/src/include/__config
+--- chromium-120.0.6099.56/third_party/libc++/src/include/__config.me 2023-12-03 00:05:51.254483474 +0100
++++ chromium-120.0.6099.56/third_party/libc++/src/include/__config 2023-12-03 00:06:05.872863168 +0100
+@@ -32,11 +32,7 @@
+
+ // Warn if a compiler version is used that is not supported anymore
+ // LLVM RELEASE Update the minimum compiler versions
+-# if defined(_LIBCPP_CLANG_VER)
+-# if _LIBCPP_CLANG_VER < 1500
+-# warning "Libc++ only supports Clang 15 and later"
+-# endif
+-# elif defined(_LIBCPP_APPLE_CLANG_VER)
++# if defined(_LIBCPP_APPLE_CLANG_VER)
+ # if _LIBCPP_APPLE_CLANG_VER < 1500
+ # warning "Libc++ only supports AppleClang 15 and later"
+ # endif
diff --git a/srcpkgs/electron28/files/patches/chromium-120-gn-workaround-atspi.patch b/srcpkgs/electron28/files/patches/chromium-120-gn-workaround-atspi.patch
new file mode 100644
index 0000000000000..72c7b7ec41c28
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-gn-workaround-atspi.patch
@@ -0,0 +1,13 @@
+diff -up chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn.me chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn
+--- chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn.me 2023-11-26 16:14:15.364064126 +0100
++++ chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn 2023-11-26 16:41:16.877321990 +0100
+@@ -21,6 +21,9 @@ if (use_atk) {
+ minor = atspi_version[1]
+ micro = atspi_version[2]
+
++ # gn workaround for the error: Assignment had no effect
++ print("ATSPI Version: $major.$minor.$micro")
++
+ # ATSPI 2.49.90 now defines these for us and it's an error for us to
+ # redefine them on the compiler command line.
+ # See ATSPI 927344a34cd5bf81fc64da4968241735ecb4f03b
--git a/srcpkgs/electron28/files/patches/chromium-120-missing-header-files.patch b/srcpkgs/electron28/files/patches/chromium-120-missing-header-files.patch
new file mode 100644
index 0000000000000..1e7d2692a8f6d
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-missing-header-files.patch
@@ -0,0 +1,448 @@
+diff -up chromium-110.0.5481.177/base/memory/ref_counted.h.me chromium-110.0.5481.177/base/memory/ref_counted.h
+--- chromium-110.0.5481.177/base/memory/ref_counted.h.me 2023-02-23 13:34:33.174817255 -0500
++++ chromium-110.0.5481.177/base/memory/ref_counted.h 2023-02-23 13:42:28.646052469 -0500
+@@ -6,6 +6,7 @@
+ #define BASE_MEMORY_REF_COUNTED_H_
+
+ #include <stddef.h>
++#include <limits>
+
+ #include <utility>
+
+diff -up chromium-109.0.5414.74/base/check_op.h.me chromium-109.0.5414.74/base/check_op.h
+--- chromium-109.0.5414.74/base/check_op.h.me 2023-01-17 17:39:27.620875883 +0100
++++ chromium-109.0.5414.74/base/check_op.h 2023-01-17 17:39:42.546060957 +0100
+@@ -5,6 +5,7 @@
+ #ifndef BASE_CHECK_OP_H_
+ #define BASE_CHECK_OP_H_
+
++#include <cstdint>
+ #include <cstddef>
+ #include <string>
+ #include <type_traits>
+diff -up chromium-109.0.5414.74/base/debug/profiler.h.me chromium-109.0.5414.74/base/debug/profiler.h
+--- chromium-109.0.5414.74/base/debug/profiler.h.me 2023-01-17 16:29:26.368090073 +0100
++++ chromium-109.0.5414.74/base/debug/profiler.h 2023-01-17 16:59:41.190628679 +0100
+@@ -7,6 +7,7 @@
+
+ #include <stddef.h>
+
++#include <cstdint>
+ #include <string>
+
+ #include "base/base_export.h"
+diff -up chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me chromium-109.0.5414.74/gpu/config/gpu_feature_info.h
+--- chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me 2023-01-17 19:06:53.530675129 +0100
++++ chromium-109.0.5414.74/gpu/config/gpu_feature_info.h 2023-01-17 19:07:08.874849879 +0100
+@@ -5,6 +5,7 @@
+ #ifndef GPU_CONFIG_GPU_FEATURE_INFO_H_
+ #define GPU_CONFIG_GPU_FEATURE_INFO_H_
+
++#include <cstdint>
+ #include <string>
+ #include <vector>
+
+diff -up chromium-109.0.5414.74/net/base/net_export.h.me chromium-109.0.5414.74/net/base/net_export.h
+--- chromium-109.0.5414.74/net/base/net_export.h.me 2023-01-17 18:16:34.133854615 +0100
++++ chromium-109.0.5414.74/net/base/net_export.h 2023-01-17 18:16:15.945623153 +0100
+@@ -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.
+diff -up chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h
+--- chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me 2023-01-17 17:12:34.184686515 +0100
++++ chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h 2023-01-17 17:13:16.537162420 +0100
+@@ -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 <string>
+
+diff -up chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h
+--- chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me 2023-01-17 17:33:20.895717307 +0100
++++ chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h 2023-01-17 17:34:03.456185365 +0100
+@@ -27,6 +27,7 @@
+ #ifndef ABSL_STRINGS_STRING_VIEW_H_
+ #define ABSL_STRINGS_STRING_VIEW_H_
+
++#include <cstdint>
+ #include <algorithm>
+ #include <cassert>
+ #include <cstddef>
+diff -up chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h
+--- chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me 2023-01-17 17:36:15.017616250 +0100
++++ chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h 2023-01-17 17:36:48.960982195 +0100
+@@ -10,6 +10,7 @@
+ #ifndef GLSLANG_SHADERVARS_H_
+ #define GLSLANG_SHADERVARS_H_
+
++#include <cstdint>
+ #include <algorithm>
+ #include <array>
+ #include <string>
+diff -up chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h
+--- chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me 2023-01-17 19:17:40.480876171 +0100
++++ chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h 2023-01-17 19:17:46.803958320 +0100
+@@ -5,6 +5,7 @@
+ #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
+ #define THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
+
++#include <cstdint>
+ #include <array>
+ #include <string>
+
+diff -up chromium-117.0.5938.48/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.me chromium-117.0.5938.48/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
+--- chromium-117.0.5938.48/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.me 2023-01-17 18:02:44.681538107 +0100
++++ chromium-117.0.5938.48/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h 2023-01-17 18:02:57.208679140 +0100
+@@ -15,6 +15,7 @@
+ #ifndef SRC_TINT_READER_SPIRV_NAMER_H_
+ #define SRC_TINT_READER_SPIRV_NAMER_H_
+
++#include <cstdint>
+ #include <string>
+ #include <unordered_map>
+ #include <vector>
+diff -up chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h
+--- chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me 2023-01-18 15:22:38.472940648 +0100
++++ chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h 2023-01-18 15:23:09.380255101 +0100
+@@ -5,6 +5,7 @@
+ #ifndef DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
+ #define DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
+
++#include <cstdint>
+ #include <functional>
+ #include <map>
+ #include <set>
+diff -up chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp
+--- chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me 2023-01-17 15:37:48.530626516 +0100
++++ chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp 2023-01-17 16:57:46.025548092 +0100
+@@ -17,6 +17,7 @@
+
+ #include "System/Debug.hpp"
+
++#include <cstdint>
+ #include <cstddef>
+ #include <functional>
+ #include <unordered_set>
+diff -up chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h
+--- chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me 2023-01-17 18:08:25.745491353 +0100
++++ chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h 2023-01-17 18:08:35.777667632 +0100
+@@ -5,6 +5,7 @@
+ #ifndef UI_GFX_LINEAR_GRADIENT_H_
+ #define UI_GFX_LINEAR_GRADIENT_H_
+
++#include <cstdint>
+ #include <array>
+ #include <string>
+
+diff -up chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h
+--- chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me 2023-01-19 10:10:21.287876736 +0100
++++ chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h 2023-01-19 10:11:21.714778896 +0100
+@@ -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>
+diff -up chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
+--- chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me 2023-01-19 10:30:27.533861985 +0100
++++ chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2023-01-19 10:31:12.585554183 +0100
+@@ -31,6 +31,7 @@ limitations under the License.
+ #ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
+ #define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
+
++#include <cstdint>
+ #include <complex>
+ #include <deque>
+ #include <vector>
+diff -up chromium-109.0.5414.74/base/containers/flat_map.h.mee chromium-109.0.5414.74/base/containers/flat_map.h
+--- chromium-109.0.5414.74/base/containers/flat_map.h.mee 2023-01-19 10:59:52.214957773 +0100
++++ chromium-109.0.5414.74/base/containers/flat_map.h 2023-01-19 11:00:06.415215309 +0100
+@@ -5,6 +5,7 @@
+ #ifndef BASE_CONTAINERS_FLAT_MAP_H_
+ #define BASE_CONTAINERS_FLAT_MAP_H_
+
++#include <cstdint>
+ #include <functional>
+ #include <tuple>
+ #include <utility>
+diff -up chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h
+--- chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee 2023-01-19 11:45:15.953159755 +0100
++++ chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h 2023-01-19 11:45:22.320246241 +0100
+@@ -5,6 +5,8 @@
+ #ifndef UI_BASE_PREDICTION_KALMAN_FILTER_H_
+ #define UI_BASE_PREDICTION_KALMAN_FILTER_H_
+
++#include <cstdint>
++
+ #include "base/component_export.h"
+ #include "ui/gfx/geometry/matrix3_f.h"
+
+diff -up chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h
+--- chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me 2023-01-19 15:20:07.620987949 +0100
++++ chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h 2023-01-19 15:20:18.324173702 +0100
+@@ -5,6 +5,7 @@
+ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
+ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
+
++#include <cstdint>
+ #include <string>
+
+
+diff -up chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h
+--- chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me 2023-01-19 16:00:14.350186515 +0100
++++ chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h 2023-01-19 16:00:21.643307993 +0100
+@@ -5,6 +5,7 @@
+ #ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
+ #define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
+
++#include <cstdint>
+ #include <string>
+
+ namespace feature_engagement {
+diff -up chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h
+--- chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me 2023-01-19 15:59:18.210239416 +0100
++++ chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h 2023-01-19 15:59:34.513515030 +0100
+@@ -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"
+diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
+--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me 2023-01-19 16:09:29.216477182 +0100
++++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2023-01-19 16:10:05.657089208 +0100
+@@ -45,6 +45,7 @@
+ #include "llvm/Support/SaveAndRestore.h"
+ #include "llvm/Support/raw_ostream.h"
+ #include <algorithm>
++#include <cstdint>
+ #include <string>
+ #include <sysexits.h>
+ #ifdef HAVE_BACKTRACE
+diff -up chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h
+--- chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me 2023-01-19 16:32:05.338160131 +0100
++++ chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h 2023-01-19 16:32:16.213326798 +0100
+@@ -5,6 +5,7 @@
+ #ifndef CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
+ #define CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
+
++#include <cstdint>
+ #include <map>
+
+ #include "base/containers/flat_set.h"
+diff -up chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h
+--- chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me 2023-01-19 16:47:55.548571102 +0100
++++ chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h 2023-01-19 16:48:29.214146529 +0100
+@@ -5,6 +5,7 @@
+ #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
+ #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
+
++#include <cstdint>
+ #include <string>
+
+ class GURL;
+diff -up chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h
+--- chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me 2023-01-19 16:57:29.525372814 +0100
++++ chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h 2023-01-19 16:58:02.667979288 +0100
+@@ -5,6 +5,7 @@
+ #ifndef COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
+ #define COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
+
++#include <cstdint>
+ #include <string>
+ #include <utility>
+ #include <vector>
+diff -up chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h
+--- chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me 2023-01-19 17:02:45.258544665 +0100
++++ chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h 2023-01-19 17:02:52.577611757 +0100
+@@ -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 <string>
+diff -up chromium-109.0.5414.74/pdf/document_attachment_info.h.me chromium-109.0.5414.74/pdf/document_attachment_info.h
+--- chromium-109.0.5414.74/pdf/document_attachment_info.h.me 2023-01-19 17:28:28.552063534 +0100
++++ chromium-109.0.5414.74/pdf/document_attachment_info.h 2023-01-19 17:28:48.072379953 +0100
+@@ -5,6 +5,7 @@
+ #ifndef PDF_DOCUMENT_ATTACHMENT_INFO_H_
+ #define PDF_DOCUMENT_ATTACHMENT_INFO_H_
+
++#include <cstdint>
+ #include <string>
+
+
+diff -up chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h
+--- chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me 2023-01-19 18:25:47.648193710 +0100
++++ chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h 2023-01-19 18:26:11.488593556 +0100
+@@ -5,6 +5,8 @@
+ #ifndef CONSTANTS_ANNOTATION_FLAGS_H_
+ #define CONSTANTS_ANNOTATION_FLAGS_H_
+
++#include <cstdint>
++
+ namespace pdfium {
+ namespace annotation_flags {
+
+diff -up chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
+--- chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me 2023-04-15 16:44:55.344305412 +0200
++++ chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2023-04-15 16:47:09.028666995 +0200
+@@ -2854,6 +2854,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));
+diff -up chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h
+--- chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me 2023-04-18 15:55:44.774916319 +0200
++++ chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h 2023-04-18 15:55:54.441085882 +0200
+@@ -8,6 +8,7 @@
+ #include <memory>
+ #include <string>
+ #include <vector>
++#include <variant>
+
+ #include "base/containers/span.h"
+ #include "base/functional/callback_forward.h"
+diff -up chromium-113.0.5672.37/gin/time_clamper.h.me chromium-113.0.5672.37/gin/time_clamper.h
+--- chromium-113.0.5672.37/gin/time_clamper.h.me 2023-04-18 16:38:41.180437467 +0200
++++ chromium-113.0.5672.37/gin/time_clamper.h 2023-04-18 16:39:43.857049432 +0200
+@@ -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;
+diff -up chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc
+--- chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me 2023-04-21 08:07:55.362714544 +0200
++++ chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc 2023-04-21 08:14:35.424158693 +0200
+@@ -10,6 +10,7 @@
+ #include <queue>
+ #include <utility>
+ #include <vector>
++#include <cstring>
+
+ #include "base/check.h"
+ #include "base/files/file_path.h"
+diff -up chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc
+--- chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me 2023-06-18 12:33:52.387412788 +0200
++++ chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc 2023-06-18 12:35:28.229148935 +0200
+@@ -3,6 +3,7 @@
+ // found in the LICENSE file.
+
+ #include "skia/ext/skcolorspace_trfn.h"
++#include <cmath>
+
+ namespace skia {
+
+diff -up chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h
+--- chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint 2021-11-19 17:05:31.379750350 -0500
++++ chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h 2021-11-19 17:07:35.191520127 -0500
+@@ -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"
+
+diff -up chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h
+--- chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint 2021-11-12 05:28:10.000000000 -0500
++++ chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h 2021-11-19 17:05:31.379750350 -0500
+@@ -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"
+diff -up chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h
+--- chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint 2021-11-12 05:25:24.000000000 -0500
++++ chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h 2021-11-19 17:05:31.379750350 -0500
+@@ -9,6 +9,8 @@
+
+ #include "ui/gfx/buffer_types.h"
+
++#include <cstdint>
++
+ namespace ui {
+
+ int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
+diff -up chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc
+--- chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring 2021-11-12 05:28:09.000000000 -0500
++++ chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc 2021-11-19 17:10:02.927438695 -0500
+@@ -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"
+diff -up chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc
+--- chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring 2021-11-12 05:28:10.000000000 -0500
++++ chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2021-11-19 17:10:02.928438701 -0500
+@@ -10,6 +10,7 @@
+
+ #include "modules/video_coding/utility/ivf_file_reader.h"
+
++#include <cstring>
+ #include <string>
+ #include <vector>
+
+diff -up chromium-117.0.5938.48/third_party/ipcz/src/ipcz/router_link.h.me chromium-117.0.5938.48/third_party/ipcz/src/ipcz/router_link.h
+--- chromium-117.0.5938.48/third_party/ipcz/src/ipcz/router_link.h.me 2023-09-10 17:53:04.826298351 +0200
++++ chromium-117.0.5938.48/third_party/ipcz/src/ipcz/router_link.h 2023-09-10 17:53:22.201756894 +0200
+@@ -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 <string>
+diff -up chromium-117.0.5938.48/third_party/material_color_utilities/src/cpp/palettes/tones.cc.me chromium-117.0.5938.48/third_party/material_color_utilities/src/cpp/palettes/tones.cc
+--- chromium-117.0.5938.48/third_party/material_color_utilities/src/cpp/palettes/tones.cc.me 2023-09-10 17:36:27.199841051 +0200
++++ chromium-117.0.5938.48/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2023-09-10 17:44:51.870554233 +0200
+@@ -14,6 +14,7 @@
+ * limitations under the License.
+ */
+
++#include <cmath>
+ #include "cpp/palettes/tones.h"
+
+ #include "cpp/cam/cam.h"
+diff -up chromium-118.0.5993.32/services/device/public/cpp/generic_sensor/sensor_reading.h.me chromium-118.0.5993.32/services/device/public/cpp/generic_sensor/sensor_reading.h
+--- chromium-118.0.5993.32/services/device/public/cpp/generic_sensor/sensor_reading.h.me 2023-10-01 13:55:01.913193186 +0200
++++ chromium-118.0.5993.32/services/device/public/cpp/generic_sensor/sensor_reading.h 2023-10-01 14:05:38.488038429 +0200
+@@ -5,6 +5,9 @@
+ #ifndef SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_
+ #define SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_
+
++#include <cstddef>
++#include <cstdint>
++
+ #include <type_traits>
+
+ namespace device {
diff --git a/srcpkgs/electron28/files/patches/chromium-120-no_matching_constructor.patch b/srcpkgs/electron28/files/patches/chromium-120-no_matching_constructor.patch
new file mode 100644
index 0000000000000..b1d987adeff8d
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-no_matching_constructor.patch
@@ -0,0 +1,742 @@
+diff -up chromium-120.0.6099.56/base/metrics/persistent_histogram_allocator.cc.no_matching_constructor chromium-120.0.6099.56/base/metrics/persistent_histogram_allocator.cc
+--- chromium-120.0.6099.56/base/metrics/persistent_histogram_allocator.cc.no_matching_constructor 2023-11-29 22:39:40.000000000 +0100
++++ chromium-120.0.6099.56/base/metrics/persistent_histogram_allocator.cc 2023-12-03 17:31:25.748420189 +0100
+@@ -218,13 +218,13 @@ PersistentSparseHistogramDataManager::Lo
+ // The sample-record could be for any sparse histogram. Add the reference
+ // to the appropriate collection for later use.
+ if (found_id == match_id) {
+- found_records.emplace_back(ref, value);
++ found_records.emplace_back() = {ref, value};
+ found = true;
+ } else {
+ std::vector<ReferenceAndSample>* samples =
+ GetSampleMapRecordsWhileLocked(found_id);
+ CHECK(samples);
+- samples->emplace_back(ref, value);
++ samples->emplace_back() = {ref, value};
+ }
+ }
+
+diff -up chromium-120.0.6099.56/base/trace_event/trace_log.cc.no_matching_constructor chromium-120.0.6099.56/base/trace_event/trace_log.cc
+--- chromium-120.0.6099.56/base/trace_event/trace_log.cc.no_matching_constructor 2023-11-29 22:39:40.000000000 +0100
++++ chromium-120.0.6099.56/base/trace_event/trace_log.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -2191,8 +2191,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&) {
+diff -up chromium-120.0.6099.56/chrome/browser/content_settings/one_time_permission_provider.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/content_settings/one_time_permission_provider.cc
+--- chromium-120.0.6099.56/chrome/browser/content_settings/one_time_permission_provider.cc.no_matching_constructor 2023-11-29 22:39:47.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/content_settings/one_time_permission_provider.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -226,8 +226,8 @@ void OneTimePermissionProvider::OnSuspen
+
+ while (rule_iterator && rule_iterator->HasNext()) {
+ auto rule = rule_iterator->Next();
+- patterns_to_delete.emplace_back(setting_type, rule->primary_pattern,
+- rule->secondary_pattern);
++ patterns_to_delete.emplace_back() = {setting_type, rule->primary_pattern,
++ rule->secondary_pattern};
+ permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
+ setting_type,
+ permissions::OneTimePermissionEvent::EXPIRED_ON_SUSPEND);
+@@ -329,8 +329,8 @@ void OneTimePermissionProvider::DeleteEn
+ auto rule = rule_iterator->Next();
+ if (rule->primary_pattern.Matches(origin_gurl) &&
+ rule->secondary_pattern.Matches(origin_gurl)) {
+- patterns_to_delete.emplace_back(
+- content_setting_type, rule->primary_pattern, rule->secondary_pattern);
++ patterns_to_delete.emplace_back() = {
++ content_setting_type, rule->primary_pattern, rule->secondary_pattern};
+ permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
+ content_setting_type, trigger_event);
+ }
+diff -up chromium-120.0.6099.56/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc
+--- chromium-120.0.6099.56/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.no_matching_constructor 2023-11-29 22:39:48.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -67,8 +67,8 @@ base::flat_map<std::string, SAMLProfileA
+ // TODO(crbug.com/1445072): Add actual domains with attribute names.
+ profile_attributes->insert(std::make_pair(
+ "supported.test",
+- SAMLProfileAttributes("placeholderName", "placeholderDomain",
+- "placeholderToken")));
++ SAMLProfileAttributes{"placeholderName", "placeholderDomain",
++ "placeholderToken"}));
+
+ // Extract domains and attributes from the command line switch.
+ const base::CommandLine& command_line =
+diff -up chromium-120.0.6099.56/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.no_matching_constructor 2023-11-29 22:39:52.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/omnibox/chrome_omnibox_client.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -474,10 +474,10 @@ void ChromeOmniboxClient::OnAutocomplete
+ alternative_nav_match);
+
+ // Store the details necessary to open the omnibox match via browser commands.
+- location_bar_->set_navigation_params(LocationBar::NavigationParams(
++ location_bar_->set_navigation_params(LocationBar::NavigationParams{
+ destination_url, disposition, transition, match_selection_timestamp,
+ destination_url_entered_without_scheme,
+- destination_url_entered_with_http_scheme));
++ destination_url_entered_with_http_scheme});
+
+ if (browser_) {
+ auto navigation = chrome::OpenCurrentURL(browser_);
+diff -up chromium-120.0.6099.56/chrome/browser/ui/safety_hub/menu_notification_service.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/safety_hub/menu_notification_service.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/safety_hub/menu_notification_service.cc.no_matching_constructor 2023-11-29 22:39:52.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/safety_hub/menu_notification_service.cc 2023-12-03 17:31:25.756420342 +0100
+@@ -148,8 +148,8 @@ SafetyHubMenuNotificationService::GetNot
+ // The information related to showing the notification needs to be persisted
+ // as well.
+ SaveNotificationsToPrefs();
+- return MenuNotificationEntry(notification_to_show->GetNotificationCommandId(),
+- notification_to_show->GetNotificationString());
++ return MenuNotificationEntry{notification_to_show->GetNotificationCommandId(),
++ notification_to_show->GetNotificationString()};
+ }
+
+ absl::optional<ResultMap>
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -55,12 +55,12 @@ std::vector<EmbeddedPermissionPromptAskV
+ EmbeddedPermissionPromptAskView::GetButtonsConfiguration() const {
+ std::vector<ButtonConfiguration> buttons;
+ if (base::FeatureList::IsEnabled(permissions::features::kOneTimePermission)) {
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW_THIS_TIME),
+- ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal);
++ ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal};
+ }
+- buttons.emplace_back(l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW),
+- ButtonType::kAllow, ui::ButtonStyle::kTonal);
++ buttons.emplace_back() = {l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW),
++ ButtonType::kAllow, ui::ButtonStyle::kTonal};
+ return buttons;
+ }
+
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h 2023-12-03 17:31:25.750420227 +0100
+@@ -86,6 +86,7 @@ class EmbeddedPermissionPromptBaseView :
+ struct RequestLineConfiguration {
+ const raw_ptr<const gfx::VectorIcon> icon;
+ std::u16string message;
++ RequestLineConfiguration(auto i, auto m) : icon(i), message(m) { }
+ };
+
+ struct ButtonConfiguration {
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc 2023-12-03 17:31:25.750420227 +0100
+@@ -48,8 +48,8 @@ EmbeddedPermissionPromptPolicyView::GetR
+ std::vector<EmbeddedPermissionPromptPolicyView::ButtonConfiguration>
+ EmbeddedPermissionPromptPolicyView::GetButtonsConfiguration() const {
+ std::vector<ButtonConfiguration> buttons;
+- buttons.emplace_back(l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_OK_LABEL),
+- ButtonType::kPolicyOK, ui::ButtonStyle::kTonal);
++ buttons.emplace_back() = {l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_OK_LABEL),
++ ButtonType::kPolicyOK, ui::ButtonStyle::kTonal};
+ return buttons;
+ }
+
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_denied_view.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_denied_view.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_denied_view.cc.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_denied_view.cc 2023-12-03 17:31:25.756420342 +0100
+@@ -63,18 +63,18 @@ EmbeddedPermissionPromptPreviouslyDenied
+ std::vector<EmbeddedPermissionPromptPreviouslyDeniedView::ButtonConfiguration>
+ EmbeddedPermissionPromptPreviouslyDeniedView::GetButtonsConfiguration() const {
+ std::vector<ButtonConfiguration> buttons;
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_CONTINUE_NOT_ALLOWING),
+- ButtonType::kContinueNotAllowing, ui::ButtonStyle::kTonal);
++ ButtonType::kContinueNotAllowing, ui::ButtonStyle::kTonal};
+
+ if (base::FeatureList::IsEnabled(permissions::features::kOneTimePermission)) {
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW_THIS_TIME),
+- ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal);
++ ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal};
+ } else {
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW_THIS_TIME),
+- ButtonType::kAllow, ui::ButtonStyle::kTonal);
++ ButtonType::kAllow, ui::ButtonStyle::kTonal};
+ }
+ return buttons;
+ }
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc 2023-12-03 17:31:25.750420227 +0100
+@@ -57,13 +57,13 @@ EmbeddedPermissionPromptPreviouslyGrante
+ std::vector<EmbeddedPermissionPromptPreviouslyGrantedView::ButtonConfiguration>
+ EmbeddedPermissionPromptPreviouslyGrantedView::GetButtonsConfiguration() const {
+ std::vector<ButtonConfiguration> buttons;
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_CONTINUE_ALLOWING),
+- ButtonType::kContinueAllowing, ui::ButtonStyle::kTonal);
++ ButtonType::kContinueAllowing, ui::ButtonStyle::kTonal};
+
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_STOP_ALLOWING),
+- ButtonType::kStopAllowing, ui::ButtonStyle::kTonal);
++ ButtonType::kStopAllowing, ui::ButtonStyle::kTonal};
+ return buttons;
+ }
+
+diff -up chromium-120.0.6099.56/chrome/test/chromedriver/capabilities.cc.no_matching_constructor chromium-120.0.6099.56/chrome/test/chromedriver/capabilities.cc
+--- chromium-120.0.6099.56/chrome/test/chromedriver/capabilities.cc.no_matching_constructor 2023-11-29 22:39:54.000000000 +0100
++++ chromium-120.0.6099.56/chrome/test/chromedriver/capabilities.cc 2023-12-03 17:31:25.750420227 +0100
+@@ -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);
+diff -up chromium-120.0.6099.56/components/autofill/core/browser/contact_info_sync_util.cc.no_matching_constructor chromium-120.0.6099.56/components/autofill/core/browser/contact_info_sync_util.cc
+--- chromium-120.0.6099.56/components/autofill/core/browser/contact_info_sync_util.cc.no_matching_constructor 2023-11-29 22:39:57.000000000 +0100
++++ chromium-120.0.6099.56/components/autofill/core/browser/contact_info_sync_util.cc 2023-12-03 17:31:25.750420227 +0100
+@@ -197,9 +197,9 @@ class ContactInfoProfileSetter {
+ CHECK(observations.empty());
+ for (const sync_pb::ContactInfoSpecifics::Observation& proto_observation :
+ metadata.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())};
+ }
+ }
+ }
+diff -up chromium-120.0.6099.56/components/autofill/core/browser/webdata/autofill_table.cc.no_matching_constructor chromium-120.0.6099.56/components/autofill/core/browser/webdata/autofill_table.cc
+--- chromium-120.0.6099.56/components/autofill/core/browser/webdata/autofill_table.cc.no_matching_constructor 2023-11-29 22:39:57.000000000 +0100
++++ chromium-120.0.6099.56/components/autofill/core/browser/webdata/autofill_table.cc 2023-12-03 17:31:25.751420246 +0100
+@@ -1763,10 +1763,10 @@ std::unique_ptr<AutofillProfile> Autofil
+ }
+
+ base::span<const uint8_t> observations_data = s.ColumnBlob(3);
+- field_type_values.emplace_back(
++ field_type_values.emplace_back() = {
+ type, s.ColumnString16(1), s.ColumnInt(2),
+ std::vector<uint8_t>(observations_data.begin(),
+- observations_data.end()));
++ observations_data.end())};
+
+ if (type == ADDRESS_HOME_COUNTRY) {
+ country_code = base::UTF16ToUTF8(s.ColumnString16(1));
+diff -up chromium-120.0.6099.56/components/password_manager/core/browser/password_manager.cc.no_matching_constructor chromium-120.0.6099.56/components/password_manager/core/browser/password_manager.cc
+--- chromium-120.0.6099.56/components/password_manager/core/browser/password_manager.cc.no_matching_constructor 2023-11-29 22:39:58.000000000 +0100
++++ chromium-120.0.6099.56/components/password_manager/core/browser/password_manager.cc 2023-12-03 17:31:25.751420246 +0100
+@@ -630,7 +630,7 @@ void PasswordManager::OnUserModifiedNonP
+ // |driver| might be empty on iOS or in tests.
+ int driver_id = driver ? driver->GetId() : 0;
+ possible_usernames_.Put(
+- PossibleUsernameFieldIdentifier(driver_id, renderer_id),
++ PossibleUsernameFieldIdentifier{driver_id, renderer_id},
+ PossibleUsernameData(GetSignonRealm(driver->GetLastCommittedURL()),
+ renderer_id, value, base::Time::Now(), driver_id,
+ autocomplete_attribute_has_username, is_likely_otp));
+diff -up chromium-120.0.6099.56/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.no_matching_constructor chromium-120.0.6099.56/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
+--- chromium-120.0.6099.56/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.no_matching_constructor 2023-11-29 22:40:01.000000000 +0100
++++ chromium-120.0.6099.56/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc 2023-12-03 17:31:25.751420246 +0100
+@@ -1567,7 +1567,7 @@ void SkiaOutputSurfaceImplOnGpu::CopyOut
+
+ // Issue readbacks from the surfaces:
+ for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) {
+- SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height());
++ SkISize size{plane_surfaces[i]->width(), plane_surfaces[i]->height()};
+ SkImageInfo dst_info = SkImageInfo::Make(
+ size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType,
+ kUnpremul_SkAlphaType);
+diff -up chromium-120.0.6099.56/content/browser/download/save_package.cc.no_matching_constructor chromium-120.0.6099.56/content/browser/download/save_package.cc
+--- chromium-120.0.6099.56/content/browser/download/save_package.cc.no_matching_constructor 2023-11-29 22:40:01.000000000 +0100
++++ chromium-120.0.6099.56/content/browser/download/save_package.cc 2023-12-03 17:31:25.752420265 +0100
+@@ -767,8 +767,8 @@ void SavePackage::Finish() {
+ if (download_) {
+ std::vector<download::DownloadSaveItemData::ItemInfo> files;
+ for (auto& item : saved_success_items_) {
+- files.emplace_back(item.second->full_path(), item.second->url(),
+- item.second->referrer().url);
++ files.emplace_back() = {item.second->full_path(), item.second->url(),
++ item.second->referrer().url};
+ }
+ download::DownloadSaveItemData::AttachItemData(download_, std::move(files));
+ }
+diff -up chromium-120.0.6099.56/content/browser/interest_group/interest_group_storage.cc.no_matching_constructor chromium-120.0.6099.56/content/browser/interest_group/interest_group_storage.cc
+--- chromium-120.0.6099.56/content/browser/interest_group/interest_group_storage.cc.no_matching_constructor 2023-11-29 22:40:01.000000000 +0100
++++ chromium-120.0.6099.56/content/browser/interest_group/interest_group_storage.cc 2023-12-03 17:31:25.752420265 +0100
+@@ -3002,10 +3002,10 @@ DoGetKAnonymityData(sql::Database& db,
+
+ std::vector<StorageInterestGroup::KAnonymityData> k_anon_data;
+ while (interest_group_kanon_query.Step()) {
+- k_anon_data.emplace_back(
++ k_anon_data.emplace_back() = {
+ /*key=*/interest_group_kanon_query.ColumnString(0),
+ /*is_k_anonymous=*/interest_group_kanon_query.ColumnBool(1),
+- /*last_updated=*/interest_group_kanon_query.ColumnTime(2));
++ /*last_updated=*/interest_group_kanon_query.ColumnTime(2)};
+ }
+ if (!interest_group_kanon_query.Succeeded()) {
+ return absl::nullopt;
+diff -up chromium-120.0.6099.56/content/browser/renderer_host/render_frame_host_impl.cc.no_matching_constructor chromium-120.0.6099.56/content/browser/renderer_host/render_frame_host_impl.cc
+--- chromium-120.0.6099.56/content/browser/renderer_host/render_frame_host_impl.cc.no_matching_constructor 2023-11-29 22:40:01.000000000 +0100
++++ chromium-120.0.6099.56/content/browser/renderer_host/render_frame_host_impl.cc 2023-12-03 20:49:28.059042672 +0100
+@@ -8685,7 +8685,7 @@ void RenderFrameHostImpl::SendFencedFram
+ for (const blink::FencedFrame::ReportingDestination& destination :
+ destinations) {
+ SendFencedFrameReportingBeaconInternal(
+- DestinationEnumEvent(event_type, event_data), destination,
++ DestinationEnumEvent{event_type, event_data}, destination,
+ /*from_renderer=*/true, attribution_reporting_runtime_features);
+ }
+ }
+@@ -8720,7 +8720,7 @@ void RenderFrameHostImpl::SendFencedFram
+ }
+
+ SendFencedFrameReportingBeaconInternal(
+- DestinationURLEvent(destination_url),
++ DestinationURLEvent{destination_url},
+ blink::FencedFrame::ReportingDestination::kBuyer,
+ /*from_renderer=*/true, attribution_reporting_runtime_features);
+ }
+@@ -8820,7 +8820,7 @@ void RenderFrameHostImpl::MaybeSendFence
+ data = info->data;
+ }
+ initiator_rfh->SendFencedFrameReportingBeaconInternal(
+- AutomaticBeaconEvent(event_type, data), destination,
++ AutomaticBeaconEvent{event_type, data}, destination,
+ /*from_renderer=*/false, attribution_reporting_features,
+ navigation_request.GetNavigationId());
+ }
+@@ -8832,7 +8832,7 @@ void RenderFrameHostImpl::MaybeSendFence
+ for (blink::FencedFrame::ReportingDestination destination :
+ info->destinations) {
+ initiator_rfh->SendFencedFrameReportingBeaconInternal(
+- AutomaticBeaconEvent(event_type, info->data), destination,
++ AutomaticBeaconEvent{event_type, info->data}, destination,
+ /*from_renderer=*/false, info->attribution_reporting_runtime_features,
+ navigation_request.GetNavigationId());
+ }
+diff -up chromium-120.0.6099.56/net/dns/host_resolver_cache.cc.no_matching_constructor chromium-120.0.6099.56/net/dns/host_resolver_cache.cc
+--- chromium-120.0.6099.56/net/dns/host_resolver_cache.cc.no_matching_constructor 2023-11-29 22:40:07.000000000 +0100
++++ chromium-120.0.6099.56/net/dns/host_resolver_cache.cc 2023-12-03 17:31:25.754420303 +0100
+@@ -368,7 +368,7 @@ void HostResolverCache::Set(
+
+ std::string domain_name = result->domain_name();
+ entries_.emplace(
+- Key(std::move(domain_name), network_anonymization_key),
++ Key{std::move(domain_name), network_anonymization_key},
+ Entry(std::move(result), source, secure, staleness_generation));
+
+ if (entries_.size() > max_entries_) {
+diff -up chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/font_palette.h.no_matching_constructor chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/font_palette.h
+--- chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/font_palette.h.no_matching_constructor 2023-11-29 22:40:12.000000000 +0100
++++ chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/font_palette.h 2023-12-03 17:31:25.754420303 +0100
+@@ -96,7 +96,7 @@ class PLATFORM_EXPORT FontPalette : publ
+ Color::ColorSpace color_interpolation_space,
+ absl::optional<Color::HueInterpolationMethod> hue_interpolation_method) {
+ return base::AdoptRef(new FontPalette(
+- start, end, NonNormalizedPercentages(start_percentage, end_percentage),
++ start, end, NonNormalizedPercentages{start_percentage, end_percentage},
+ normalized_percentage, alpha_multiplier, color_interpolation_space,
+ hue_interpolation_method));
+ }
+@@ -170,7 +170,7 @@ class PLATFORM_EXPORT FontPalette : publ
+ double normalized_percentage) {
+ double end_percentage = normalized_percentage * 100.0;
+ double start_percentage = 100.0 - end_percentage;
+- return NonNormalizedPercentages(start_percentage, end_percentage);
++ return NonNormalizedPercentages{start_percentage, end_percentage};
+ }
+
+ double GetAlphaMultiplier() const {
+diff -up chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.no_matching_constructor chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/palette_interpolation.cc
+--- chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.no_matching_constructor 2023-11-29 22:40:12.000000000 +0100
++++ chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/palette_interpolation.cc 2023-12-03 17:31:25.755420323 +0100
+@@ -31,7 +31,7 @@ Vector<FontPalette::FontPaletteOverride>
+ color_interpolation_space, hue_interpolation_method, start_color,
+ end_color, percentage, alpha_multiplier);
+
+- FontPalette::FontPaletteOverride result_color_record(i, result_color);
++ FontPalette::FontPaletteOverride result_color_record{static_cast<int>(i), result_color};
+ result_color_records.push_back(result_color_record);
+ }
+ return result_color_records;
+diff -up chromium-120.0.6099.56/third_party/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp.no_matching_constructor chromium-120.0.6099.56/third_party/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp
+--- chromium-120.0.6099.56/third_party/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp.no_matching_constructor 2023-11-29 22:41:46.000000000 +0100
++++ chromium-120.0.6099.56/third_party/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp 2023-12-03 17:31:25.756420342 +0100
+@@ -491,7 +491,7 @@ void CPDF_RenderStatus::ProcessClipPath(
+ } else {
+ m_pDevice->SetClip_PathFill(
+ *pPath, &mtObj2Device,
+- CFX_FillRenderOptions(ClipPath.GetClipType(i)));
++ CFX_FillRenderOptions{ClipPath.GetClipType(i)});
+ }
+ }
+
+diff -up chromium-120.0.6099.56/ui/base/wayland/color_manager_util.h.no_matching_constructor chromium-120.0.6099.56/ui/base/wayland/color_manager_util.h
+--- chromium-120.0.6099.56/ui/base/wayland/color_manager_util.h.no_matching_constructor 2023-11-29 22:40:44.000000000 +0100
++++ chromium-120.0.6099.56/ui/base/wayland/color_manager_util.h 2023-12-03 17:31:25.755420323 +0100
+@@ -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,68 +107,68 @@ 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_SRGB_HDR,
+- TransferVersion(gfx::ColorSpace::TransferID::SRGB_HDR,
+- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)},
++ TransferVersion{gfx::ColorSpace::TransferID::SRGB_HDR,
++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION}},
+ {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
+@@ -177,18 +177,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
+@@ -197,70 +197,70 @@ 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_HDR,
+- TransferFnVersion(
++ TransferFnVersion{
+ SkNamedTransferFnExt::kSRGB,
+- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)},
++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION}},
+ {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,
+@@ -283,4 +283,4 @@ zcr_color_manager_v1_eotf_names ToColorM
+
+ } // namespace ui::wayland
+
+-#endif // UI_BASE_WAYLAND_COLOR_MANAGER_UTIL_H_
+\ Kein Zeilenumbruch am Dateiende.
++#endif // UI_BASE_WAYLAND_COLOR_MANAGER_UTIL_H_
+diff -up chromium-120.0.6099.56/ui/gtk/gtk_ui.cc.no_matching_constructor chromium-120.0.6099.56/ui/gtk/gtk_ui.cc
+--- chromium-120.0.6099.56/ui/gtk/gtk_ui.cc.no_matching_constructor 2023-11-29 22:40:44.000000000 +0100
++++ chromium-120.0.6099.56/ui/gtk/gtk_ui.cc 2023-12-03 17:31:25.756420342 +0100
+@@ -1013,11 +1013,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;
+ }
diff --git a/srcpkgs/electron28/files/patches/chromium-120-split-threshold-for-reg-with-hint.patch b/srcpkgs/electron28/files/patches/chromium-120-split-threshold-for-reg-with-hint.patch
new file mode 100644
index 0000000000000..e80ed715aaf29
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-split-threshold-for-reg-with-hint.patch
@@ -0,0 +1,28 @@
+diff -up chromium-120.0.6099.35/build/config/compiler/BUILD.gn.than chromium-120.0.6099.35/build/config/compiler/BUILD.gn
+--- chromium-120.0.6099.35/build/config/compiler/BUILD.gn.than 2023-11-26 17:02:25.647022746 +0100
++++ chromium-120.0.6099.35/build/config/compiler/BUILD.gn 2023-11-26 17:15:58.025585358 +0100
+@@ -616,24 +616,6 @@ config("compiler") {
+ }
+ }
+
+- # TODO(crbug.com/1488374): This causes binary size growth and potentially
+- # other problems.
+- # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
+- if (default_toolchain != "//build/toolchain/cros:target" &&
+- !llvm_android_mainline) {
+- cflags += [
+- "-mllvm",
+- "-split-threshold-for-reg-with-hint=0",
+- ]
+- if (use_thin_lto && is_a_target_toolchain) {
+- if (is_win) {
+- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
+- } else {
+- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
+- }
+- }
+- }
+-
+ # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+ if (is_win) {
+ cflags += [ "/clang:-ffp-contract=off" ]
diff --git a/srcpkgs/electron28/files/patches/chromium-120-typename.patch b/srcpkgs/electron28/files/patches/chromium-120-typename.patch
new file mode 100644
index 0000000000000..9a2d878b12b54
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-typename.patch
@@ -0,0 +1,205 @@
+--- chromium-120.0.6099.56/base/containers/map_util.h.me 2023-12-02 19:00:19.696801563 +0100
++++ chromium-120.0.6099.56/base/containers/map_util.h 2023-12-02 19:00:47.049337547 +0100
+@@ -42,7 +42,7 @@
+ template <typename Map,
+ typename Key,
+ typename MappedElementType =
+- std::pointer_traits<internal::MappedType<Map>>::element_type>
++ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
+ constexpr const MappedElementType* FindPtrOrNull(const Map& map,
+ const Key& key) {
+ auto it = map.find(key);
+@@ -58,7 +58,7 @@
+ template <typename Map,
+ typename Key,
+ typename MappedElementType =
+- std::pointer_traits<internal::MappedType<Map>>::element_type>
++ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
+ constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) {
+ auto it = map.find(key);
+ return it != map.end() ? std::to_address(it->second) : nullptr;
+diff -up chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc
+--- chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me 2023-06-17 14:50:56.342591702 +0200
++++ chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-06-17 14:57:48.024377375 +0200
+@@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item)
+ // Helper to get an iterator to the last element in the cache. The cache
+ // must not be empty.
+ template <typename Item>
+-SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
++typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
+ CHECK(!cache.empty());
+ auto it = cache.end();
+ return std::prev(it);
+@@ -967,9 +967,9 @@ bool DownloadBubbleUpdateService::CacheM
+ }
+
+ template <typename Id, typename Item>
+-SortedItems<Item>::iterator
++typename SortedItems<Item>::iterator
+ DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter(
+- SortedItems<Item>::iterator iter,
++ typename SortedItems<Item>::iterator iter,
+ SortedItems<Item>& cache,
+ IterMap<Id, Item>& iter_map) {
+ CHECK(iter != cache.end());
+diff -up chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h
+--- chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me 2023-06-18 21:52:53.515625237 +0200
++++ chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h 2023-06-18 21:53:06.881881293 +0200
+@@ -189,7 +189,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_);
+diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
+--- chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me 2023-06-19 10:03:32.319218678 +0200
++++ chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2023-06-19 10:04:12.023942232 +0200
+@@ -169,7 +169,7 @@ class HTMLFastPathParser {
+ using Span = base::span<const Char>;
+ using USpan = base::span<const UChar>;
+ // 32 matches that used by HTMLToken::Attribute.
+- typedef std::conditional<std::is_same_v<Char, UChar>,
++ typedef typename std::conditional<std::is_same_v<Char, UChar>,
+ UCharLiteralBuffer<32>,
+ LCharLiteralBuffer<32>>::type LiteralBufferType;
+ typedef UCharLiteralBuffer<32> UCharLiteralBufferType;
+diff -up chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h
+--- chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me 2023-08-02 16:18:30.380108125 +0200
++++ chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h 2023-08-02 16:20:59.660024578 +0200
+@@ -127,10 +127,10 @@ class CONTENT_EXPORT WebUIBrowserInterfa
+ //
+ // TODO(crbug.com/1407936): Point to WebUIJsBridge documentation.
+ template <typename ControllerType>
+- JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
++ typename JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
+ using Traits = JsBridgeTraits<ControllerType>;
+- using Interface = Traits::Interface;
+- using JsBridgeBinderInitializer = Traits::BinderInitializer;
++ using Interface = typename Traits::Interface;
++ using JsBridgeBinderInitializer = typename Traits::BinderInitializer;
+
+ // WebUIController::GetType() requires an instantiated WebUIController
+ // (because it's a virtual method and can't be static). Here we only have
+diff -up chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
+--- chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me 2023-08-02 20:41:23.984729462 +0200
++++ chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h 2023-08-02 20:41:53.737583093 +0200
+@@ -270,8 +270,8 @@ class CORE_EXPORT ObjectPaintPropertiesS
+ NodeList& nodes,
+ NodeId node_id,
+ const ParentType& parent,
+- NodeType::State&& state,
+- const NodeType::AnimationState& animation_state =
++ typename NodeType::State&& state,
++ const typename NodeType::AnimationState& animation_state =
+ NodeType::AnimationState()) {
+ // First, check if we need to add a new node.
+ if (!nodes.HasField(node_id)) {
+diff -up chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h.me chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h
+--- chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h.me 2023-09-15 10:22:51.889698402 +0200
++++ chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h 2023-09-15 10:28:26.702716224 +0200
+@@ -234,7 +234,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_);
+@@ -389,7 +389,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_);
+
+@@ -406,7 +406,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_);
+@@ -466,7 +466,7 @@ class TFLiteModelExecutor : public Model
+ // Unloads the model if needed.
+ void BatchExecuteLoadedModelAndRunCallback(
+ BatchExecutionCallback callback_on_complete,
+- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+ ExecutionStatus execution_status) {
+ DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+diff -up chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc.me chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc
+--- chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc.me 2023-09-15 17:20:22.550657586 +0200
++++ chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc 2023-09-15 17:24:11.396716734 +0200
+@@ -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(
+diff -up chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h.me chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h
+--- chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h.me 2023-09-15 17:20:56.540460391 +0200
++++ chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h 2023-09-15 17:22:18.246237817 +0200
+@@ -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);
+diff -up chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h.me chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h
+--- chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h.me 2023-12-04 00:29:35.197209538 +0100
++++ chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h 2023-12-04 00:30:24.436233249 +0100
+@@ -220,7 +220,7 @@ class PairAsyncIterable {
+ private:
+ virtual IterationSource* CreateIterationSource(
+ ScriptState* script_state,
+- IterationSource::Kind kind,
++ typename IterationSource::Kind kind,
+ ExceptionState& exception_state) = 0;
+ };
+
+@@ -262,7 +262,7 @@ class ValueAsyncIterable {
+ private:
+ virtual IterationSource* CreateIterationSource(
+ ScriptState* script_state,
+- IterationSource::Kind kind,
++ typename IterationSource::Kind kind,
+ ExceptionState& exception_state) = 0;
+ };
+
diff --git a/srcpkgs/electron28/files/patches/chromium-120-workaround_clang_bug-structured_binding.patch b/srcpkgs/electron28/files/patches/chromium-120-workaround_clang_bug-structured_binding.patch
new file mode 100644
index 0000000000000..b06e29f29047a
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-workaround_clang_bug-structured_binding.patch
@@ -0,0 +1,51 @@
+diff -up chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc
+--- chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:37.000000000 +0200
++++ chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc 2023-06-17 16:53:20.216628557 +0200
+@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
+ void CdmPromiseAdapter::Clear(ClearReason reason) {
+ // Reject all outstanding promises.
+ DCHECK(thread_checker_.CalledOnValidThread());
+- for (auto& [promise_id, promise] : promises_) {
++ for (auto& [p_i, p_e] : promises_) {
++ auto& promise_id = p_i;
++ auto& promise = p_e;
+ TRACE_EVENT_NESTABLE_ASYNC_END1(
+ "media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
+ "status", "cleared");
+diff -up chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc
+--- chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me 2023-06-19 08:04:02.287072722 +0200
++++ chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc 2023-06-19 08:18:24.576814950 +0200
+@@ -1393,7 +1393,8 @@ void ServiceWorkerContextWrapper::MaybeP
+ return;
+ }
+
+- auto [document_url, key, callback] = std::move(*request);
++ auto [d_u, key, callback] = std::move(*request);
++ auto document_url = d_u;
+
+ DCHECK(document_url.is_valid());
+ TRACE_EVENT1("ServiceWorker",
+diff -up chromium-120.0.6099.56/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc.me chromium-120.0.6099.56/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
+--- chromium-120.0.6099.56/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc.me 2023-12-03 22:17:50.922083200 +0100
++++ chromium-120.0.6099.56/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc 2023-12-03 22:22:55.437484343 +0100
+@@ -3447,7 +3447,8 @@ void GridLayoutAlgorithm::PlaceGridItems
+ DCHECK(out_row_break_between);
+
+ const auto& container_space = ConstraintSpace();
+- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
++ const auto& [grid_items, l_d, tree_size] = sizing_tree.TreeRootData();
++ const auto& layout_data = l_d;
+
+ const auto* cached_layout_subtree = container_space.GetGridLayoutSubtree();
+ const auto container_writing_direction =
+@@ -3611,7 +3612,9 @@ void GridLayoutAlgorithm::PlaceGridItems
+
+ // TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true.
+ const auto& constraint_space = ConstraintSpace();
+- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
++ const auto& [g_i, l_d, tree_size] = sizing_tree.TreeRootData();
++ const auto& grid_items = g_i;
++ const auto& layout_data = l_d;
+
+ const auto* cached_layout_subtree = constraint_space.GetGridLayoutSubtree();
+ const auto container_writing_direction =
diff --git a/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch
new file mode 100644
index 0000000000000..e739b40a2733c
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch
@@ -0,0 +1,333 @@
+From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001
+From: Dale Curtis <dalecurtis@chromium.org>
+Date: Sat, 2 Apr 2022 05:13:53 +0000
+Subject: [PATCH] Roll src/third_party/ffmpeg/ 574c39cce..32b2d1d526 (1125
+ commits)
+
+https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/574c39cce323..32b2d1d526
+
+Created with:
+ roll-dep src/third_party/ffmpeg
+
+Fixed: 1293918
+Cq-Include-Trybots: luci.chromium.try:mac_chromium_asan_rel_ng,linux_chromium_asan_rel_ng,linux_chromium_chromeos_asan_rel_ng
+Change-Id: I41945d0f963e3d1f65940067bac22f63b68e37d2
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565647
+Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
+Reviewed-by: Dan Sanders <sandersd@chromium.org>
+Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#988253}
+---
+ .../clear_key_cdm/ffmpeg_cdm_audio_decoder.cc | 29 ++++++++++---------
+ media/ffmpeg/ffmpeg_common.cc | 11 +++----
+ media/filters/audio_file_reader.cc | 9 +++---
+ media/filters/audio_file_reader_unittest.cc | 6 ++--
+ .../filters/audio_video_metadata_extractor.cc | 11 +++++--
+ .../filters/ffmpeg_aac_bitstream_converter.cc | 7 +++--
+ ...ffmpeg_aac_bitstream_converter_unittest.cc | 2 +-
+ media/filters/ffmpeg_audio_decoder.cc | 13 +++++----
+ 8 files changed, 51 insertions(+), 37 deletions(-)
+
+diff --git a/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
+index e4fc3f460e2..9b1ad9f7675 100644
+--- a/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
++++ b/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
+@@ -74,7 +74,7 @@ void CdmAudioDecoderConfigToAVCodecContext(
+ codec_context->sample_fmt = AV_SAMPLE_FMT_NONE;
+ }
+
+- codec_context->channels = config.channel_count;
++ codec_context->ch_layout.nb_channels = config.channel_count;
+ codec_context->sample_rate = config.samples_per_second;
+
+ if (config.extra_data) {
+@@ -124,8 +124,8 @@ void CopySamples(cdm::AudioFormat cdm_format,
+ case cdm::kAudioFormatPlanarS16:
+ case cdm::kAudioFormatPlanarF32: {
+ const int decoded_size_per_channel =
+- decoded_audio_size / av_frame.channels;
+- for (int i = 0; i < av_frame.channels; ++i) {
++ decoded_audio_size / av_frame.ch_layout.nb_channels;
++ for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) {
+ memcpy(output_buffer, av_frame.extended_data[i],
+ decoded_size_per_channel);
+ output_buffer += decoded_size_per_channel;
+@@ -185,13 +185,14 @@ bool FFmpegCdmAudioDecoder::Initialize(
+ // Success!
+ decoding_loop_ = std::make_unique<FFmpegDecodingLoop>(codec_context_.get());
+ samples_per_second_ = config.samples_per_second;
+- bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8;
++ bytes_per_frame_ =
++ codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8;
+ output_timestamp_helper_ =
+ std::make_unique<AudioTimestampHelper>(config.samples_per_second);
+ is_initialized_ = true;
+
+ // Store initial values to guard against midstream configuration changes.
+- channels_ = codec_context_->channels;
++ channels_ = codec_context_->ch_layout.nb_channels;
+ av_sample_format_ = codec_context_->sample_fmt;
+
+ return true;
+@@ -291,17 +292,19 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
+ for (auto& frame : audio_frames) {
+ int decoded_audio_size = 0;
+ if (frame->sample_rate != samples_per_second_ ||
+- frame->channels != channels_ || frame->format != av_sample_format_) {
++ frame->ch_layout.nb_channels != channels_ ||
++ frame->format != av_sample_format_) {
+ DLOG(ERROR) << "Unsupported midstream configuration change!"
+ << " Sample Rate: " << frame->sample_rate << " vs "
+- << samples_per_second_ << ", Channels: " << frame->channels
+- << " vs " << channels_ << ", Sample Format: " << frame->format
+- << " vs " << av_sample_format_;
++ << samples_per_second_
++ << ", Channels: " << frame->ch_layout.nb_channels << " vs "
++ << channels_ << ", Sample Format: " << frame->format << " vs "
++ << av_sample_format_;
+ return cdm::kDecodeError;
+ }
+
+ decoded_audio_size = av_samples_get_buffer_size(
+- nullptr, codec_context_->channels, frame->nb_samples,
++ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
+ codec_context_->sample_fmt, 1);
+ if (!decoded_audio_size)
+ continue;
+@@ -320,9 +323,9 @@ bool FFmpegCdmAudioDecoder::OnNewFrame(
+ size_t* total_size,
+ std::vector<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>* audio_frames,
+ AVFrame* frame) {
+- *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels,
+- frame->nb_samples,
+- codec_context_->sample_fmt, 1);
++ *total_size += av_samples_get_buffer_size(
++ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
++ codec_context_->sample_fmt, 1);
+ audio_frames->emplace_back(av_frame_clone(frame));
+ return true;
+ }
+diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
+index 87ca8969626..76f03d6608e 100644
+--- a/media/ffmpeg/ffmpeg_common.cc
++++ b/media/ffmpeg/ffmpeg_common.cc
+@@ -345,10 +345,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
+ codec_context->sample_fmt, codec_context->codec_id);
+
+ ChannelLayout channel_layout =
+- codec_context->channels > 8
++ codec_context->ch_layout.nb_channels > 8
+ ? CHANNEL_LAYOUT_DISCRETE
+- : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout,
+- codec_context->channels);
++ : ChannelLayoutToChromeChannelLayout(
++ codec_context->ch_layout.u.mask,
++ codec_context->ch_layout.nb_channels);
+
+ int sample_rate = codec_context->sample_rate;
+ switch (codec) {
+@@ -401,7 +402,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
+ extra_data, encryption_scheme, seek_preroll,
+ codec_context->delay);
+ if (channel_layout == CHANNEL_LAYOUT_DISCRETE)
+- config->SetChannelsForDiscrete(codec_context->channels);
++ config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels);
+
+ #if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO)
+ // These are bitstream formats unknown to ffmpeg, so they don't have
+@@ -470,7 +471,7 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config,
+
+ // TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses
+ // said information to decode.
+- codec_context->channels = config.channels();
++ codec_context->ch_layout.nb_channels = config.channels();
+ codec_context->sample_rate = config.samples_per_second();
+
+ if (config.extra_data().empty()) {
+diff --git a/media/filters/audio_file_reader.cc b/media/filters/audio_file_reader.cc
+index 5f257bdfaa6..e1be5aa9a5b 100644
+--- a/media/filters/audio_file_reader.cc
++++ b/media/filters/audio_file_reader.cc
+@@ -113,14 +113,15 @@ bool AudioFileReader::OpenDecoder() {
+
+ // Verify the channel layout is supported by Chrome. Acts as a sanity check
+ // against invalid files. See http://crbug.com/171962
+- if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout,
+- codec_context_->channels) ==
++ if (ChannelLayoutToChromeChannelLayout(
++ codec_context_->ch_layout.u.mask,
++ codec_context_->ch_layout.nb_channels) ==
+ CHANNEL_LAYOUT_UNSUPPORTED) {
+ return false;
+ }
+
+ // Store initial values to guard against midstream configuration changes.
+- channels_ = codec_context_->channels;
++ channels_ = codec_context_->ch_layout.nb_channels;
+ audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id);
+ sample_rate_ = codec_context_->sample_rate;
+ av_sample_format_ = codec_context_->sample_fmt;
+@@ -223,7 +224,7 @@ bool AudioFileReader::OnNewFrame(
+ if (frames_read < 0)
+ return false;
+
+- const int channels = frame->channels;
++ const int channels = frame->ch_layout.nb_channels;
+ if (frame->sample_rate != sample_rate_ || channels != channels_ ||
+ frame->format != av_sample_format_) {
+ DLOG(ERROR) << "Unsupported midstream configuration change!"
+diff --git a/media/filters/audio_file_reader_unittest.cc b/media/filters/audio_file_reader_unittest.cc
+index 2aba7927a31..1f45a50cace 100644
+--- a/media/filters/audio_file_reader_unittest.cc
++++ b/media/filters/audio_file_reader_unittest.cc
+@@ -121,11 +121,11 @@ class AudioFileReaderTest : public testing::Test {
+ EXPECT_FALSE(reader_->Open());
+ }
+
+- void RunTestFailingDecode(const char* fn) {
++ void RunTestFailingDecode(const char* fn, int expect_read = 0) {
+ Initialize(fn);
+ EXPECT_TRUE(reader_->Open());
+ std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets;
+- EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0);
++ EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read);
+ }
+
+ void RunTestPartialDecode(const char* fn) {
+@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) {
+ }
+
+ TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) {
+- RunTestFailingDecode("midstream_config_change.mp3");
++ RunTestFailingDecode("midstream_config_change.mp3", 42624);
+ }
+ #endif
+
+diff --git a/media/filters/audio_video_metadata_extractor.cc b/media/filters/audio_video_metadata_extractor.cc
+index 185819eb936..69ff508c221 100644
+--- a/media/filters/audio_video_metadata_extractor.cc
++++ b/media/filters/audio_video_metadata_extractor.cc
+@@ -113,6 +113,15 @@ bool AudioVideoMetadataExtractor::Extract(DataSource* source,
+ 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);
+@@ -255,8 +264,6 @@ void AudioVideoMetadataExtractor::ExtractDictionary(AVDictionary* metadata,
+ 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_))
+diff --git a/media/filters/ffmpeg_aac_bitstream_converter.cc b/media/filters/ffmpeg_aac_bitstream_converter.cc
+index 6f231c85729..ca5e5fb927d 100644
+--- a/media/filters/ffmpeg_aac_bitstream_converter.cc
++++ b/media/filters/ffmpeg_aac_bitstream_converter.cc
+@@ -195,14 +195,15 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) {
+ if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id ||
+ audio_profile_ != stream_codec_parameters_->profile ||
+ sample_rate_index_ != sample_rate_index ||
+- channel_configuration_ != stream_codec_parameters_->channels ||
++ channel_configuration_ !=
++ stream_codec_parameters_->ch_layout.nb_channels ||
+ frame_length_ != header_plus_packet_size) {
+ header_generated_ =
+ GenerateAdtsHeader(stream_codec_parameters_->codec_id,
+ 0, // layer
+ stream_codec_parameters_->profile, sample_rate_index,
+ 0, // private stream
+- stream_codec_parameters_->channels,
++ stream_codec_parameters_->ch_layout.nb_channels,
+ 0, // originality
+ 0, // home
+ 0, // copyrighted_stream
+@@ -214,7 +215,7 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) {
+ codec_ = stream_codec_parameters_->codec_id;
+ audio_profile_ = stream_codec_parameters_->profile;
+ sample_rate_index_ = sample_rate_index;
+- channel_configuration_ = stream_codec_parameters_->channels;
++ channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels;
+ frame_length_ = header_plus_packet_size;
+ }
+
+diff --git a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
+index 1fd4c5ccd7d..f59bcd8fdaf 100644
+--- a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
++++ b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
+@@ -34,7 +34,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test {
+ memset(&test_parameters_, 0, sizeof(AVCodecParameters));
+ test_parameters_.codec_id = AV_CODEC_ID_AAC;
+ test_parameters_.profile = FF_PROFILE_AAC_MAIN;
+- test_parameters_.channels = 2;
++ test_parameters_.ch_layout.nb_channels = 2;
+ test_parameters_.extradata = extradata_header_;
+ test_parameters_.extradata_size = sizeof(extradata_header_);
+ }
+diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
+index 6a56c675f7d..4615fdeb3fb 100644
+--- a/media/filters/ffmpeg_audio_decoder.cc
++++ b/media/filters/ffmpeg_audio_decoder.cc
+@@ -28,7 +28,7 @@ namespace media {
+
+ // Return the number of channels from the data in |frame|.
+ static inline int DetermineChannels(AVFrame* frame) {
+- return frame->channels;
++ return frame->ch_layout.nb_channels;
+ }
+
+ // Called by FFmpeg's allocation routine to allocate a buffer. Uses
+@@ -231,7 +231,7 @@ bool FFmpegAudioDecoder::OnNewFrame(const DecoderBuffer& buffer,
+ // Translate unsupported into discrete layouts for discrete configurations;
+ // ffmpeg does not have a labeled discrete configuration internally.
+ ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout(
+- codec_context_->channel_layout, codec_context_->channels);
++ codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels);
+ if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
+ config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
+ channel_layout = CHANNEL_LAYOUT_DISCRETE;
+@@ -348,11 +348,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
+ // Success!
+ av_sample_format_ = codec_context_->sample_fmt;
+
+- if (codec_context_->channels != config.channels()) {
++ if (codec_context_->ch_layout.nb_channels != config.channels()) {
+ MEDIA_LOG(ERROR, media_log_)
+ << "Audio configuration specified " << config.channels()
+ << " channels, but FFmpeg thinks the file contains "
+- << codec_context_->channels << " channels";
++ << codec_context_->ch_layout.nb_channels << " channels";
+ ReleaseFFmpegResources();
+ state_ = DecoderState::kUninitialized;
+ return false;
+@@ -403,7 +403,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
+ if (frame->nb_samples <= 0)
+ return AVERROR(EINVAL);
+
+- if (s->channels != channels) {
++ if (s->ch_layout.nb_channels != channels) {
+ DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count.";
+ return AVERROR(EINVAL);
+ }
+@@ -436,7 +436,8 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
+ ChannelLayout channel_layout =
+ config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE
+ ? CHANNEL_LAYOUT_DISCRETE
+- : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels);
++ : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask,
++ s->ch_layout.nb_channels);
+
+ if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) {
+ DLOG(ERROR) << "Unsupported channel layout.";
diff --git a/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch.args b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch.args
new file mode 100644
index 0000000000000..8bbbbe9483632
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch.args
@@ -0,0 +1 @@
+-RNp1
diff --git a/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch
new file mode 100644
index 0000000000000..b2a113791734c
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch
@@ -0,0 +1,55 @@
+From ded379824f5de39357b6b1894578101aba5cdf05 Mon Sep 17 00:00:00 2001
+From: Eugene Zemtsov <eugene@chromium.org>
+Date: Fri, 29 Jul 2022 04:41:04 +0000
+Subject: [PATCH] Roll src/third_party/ffmpeg/ 880df5ede..b71ecd02b (279
+ commits)
+
+https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/880df5ede50a..b71ecd02b479
+
+$ git log 880df5ede..b71ecd02b --date=short --no-merges --format='%ad %ae %s'
+2022-07-27 eugene Roll for M106
+2022-07-25 andreas.rheinhardt avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx()
+2022-07-22 andreas.rheinhardt avcodec/hevcdec: Output MD5-message in one piece
+2022-07-24 epirat07 configure: properly require libx264 if enabled
+2022-07-24 zane avformat/argo_cvg: expose loop/reverb/checksum via metadata
+(...)
+2022-05-03 leo.izen avcodec/libjxldec: properly tag output colorspace
+2022-06-25 ffmpeg avfilter/Makefile: always make colorspace.o
+2022-03-02 brad avutil/ppc/cpu: Use proper header for OpenBSD PPC CPU detection
+2022-06-24 jamrial avformat/http: include version.h
+2022-05-16 mbonda-at-nvidia.com AV1 VDPAU hwaccel Decode support
+
+Created with:
+ roll-dep src/third_party/ffmpeg
+
+ffmpeg usage fix:
+ Switch from AVFrame::pkt_duration to AVFrame::duration,
+ AVFrame::pkt_duration is deprecated
+
+Bug: 1344646
+Change-Id: Iaa3abf48ef81dae6d282bca8f0fa2a8dffeeba25
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3788638
+Reviewed-by: Will Cassella <cassew@chromium.org>
+Commit-Queue: Eugene Zemtsov <eugene@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#1029623}
+---
+ media/filters/audio_file_reader.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/media/filters/audio_file_reader.cc b/media/filters/audio_file_reader.cc
+index e1be5aa9a5b..951c003956f 100644
+--- a/media/filters/audio_file_reader.cc
++++ b/media/filters/audio_file_reader.cc
+@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame(
+ // silence from being output. In the case where we are also discarding some
+ // portion of the packet (as indicated by a negative pts), we further want to
+ // adjust the duration downward by however much exists before zero.
+- if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) {
++ if (audio_codec_ == AudioCodec::kAAC && frame->duration) {
+ const base::TimeDelta pkt_duration = ConvertFromTimeBase(
+ glue_->format_context()->streams[stream_index_]->time_base,
+- frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts));
++ frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
+ const base::TimeDelta frame_duration =
+ base::Seconds(frames_read / static_cast<double>(sample_rate_));
+
diff --git a/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch.args b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch.args
new file mode 100644
index 0000000000000..8bbbbe9483632
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch.args
@@ -0,0 +1 @@
+-RNp1
diff --git a/srcpkgs/electron28/files/patches/chromium-angle-wayland-include.patch b/srcpkgs/electron28/files/patches/chromium-angle-wayland-include.patch
new file mode 100644
index 0000000000000..65770b9439c59
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-angle-wayland-include.patch
@@ -0,0 +1,39 @@
+Patch-Source: https://github.com/archlinux/svntogit-packages/blob/a353833a5a731abfaa465b658f61894a516aa49b/trunk/angle-wayland-include-protocol.patch
+diff -upr third_party/angle.orig/BUILD.gn third_party/angle/BUILD.gn
+--- a/third_party/angle.orig/BUILD.gn 2022-08-17 19:38:11.000000000 +0000
++++ b/third_party/angle/BUILD.gn 2022-08-18 11:04:09.061751111 +0000
+@@ -489,6 +489,12 @@ config("angle_vulkan_wayland_config") {
+ if (angle_enable_vulkan && angle_use_wayland &&
+ defined(vulkan_wayland_include_dirs)) {
+ include_dirs = vulkan_wayland_include_dirs
++ } else if (angle_enable_vulkan && angle_use_wayland) {
++ include_dirs = [
++ "$wayland_gn_dir/src/src",
++ "$wayland_gn_dir/include/src",
++ "$wayland_gn_dir/include/protocol",
++ ]
+ }
+ }
+
+@@ -1073,6 +1079,7 @@ if (angle_use_wayland) {
+ include_dirs = [
+ "$wayland_dir/egl",
+ "$wayland_dir/src",
++ "$wayland_gn_dir/include/protocol",
+ ]
+ }
+
+diff -upr third_party/angle.orig/src/third_party/volk/BUILD.gn third_party/angle/src/third_party/volk/BUILD.gn
+--- a/third_party/angle.orig/src/third_party/volk/BUILD.gn 2022-08-17 19:38:12.000000000 +0000
++++ b/third_party/angle/src/third_party/volk/BUILD.gn 2022-08-18 11:04:36.499828006 +0000
+@@ -21,6 +21,9 @@ source_set("volk") {
+ configs += [ "$angle_root:angle_no_cfi_icall" ]
+ public_deps = [ "$angle_vulkan_headers_dir:vulkan_headers" ]
+ if (angle_use_wayland) {
+- include_dirs = [ "$wayland_dir/src" ]
++ include_dirs = [
++ "$wayland_dir/src",
++ "$wayland_gn_dir/include/protocol",
++ ]
+ }
+ }
diff --git a/srcpkgs/electron28/files/patches/chromium-b74d5e6b91ccdf8b2518ef733d75c04823979d18.patch b/srcpkgs/electron28/files/patches/chromium-b74d5e6b91ccdf8b2518ef733d75c04823979d18.patch
new file mode 100644
index 0000000000000..a6a7fa3ccc967
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-b74d5e6b91ccdf8b2518ef733d75c04823979d18.patch
@@ -0,0 +1,61 @@
+From b74d5e6b91ccdf8b2518ef733d75c04823979d18 Mon Sep 17 00:00:00 2001
+From: Lei Zhang <thestig@chromium.org>
+Date: Fri, 10 Nov 2023 17:51:39 +0000
+Subject: [PATCH] [PA] Use std::nullptr_t instead of nullptr_t
+
+nullptr_t is not part of C until C23, while std::nullptr_t is part of
+C++11. Meanwhile, the GN cflags_c value is set to C11.
+
+Bug: 957519,pdfium:2097
+Change-Id: Ib3db790ed1368e8f335c95561fe906780add745c
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5014522
+Reviewed-by: Benoit Lize <lizeb@chromium.org>
+Commit-Queue: Lei Zhang <thestig@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#1223002}
+---
+ .../partition_alloc_base/strings/safe_sprintf.h | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
+index a2f62ac934284b..2d62f65e011e5a 100644
+--- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
++++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
+@@ -5,10 +5,11 @@
+ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_SAFE_SPRINTF_H_
+ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_SAFE_SPRINTF_H_
+
+-#include <stddef.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+
++#include <cstddef>
++
+ #include "build/build_config.h"
+
+ #if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+@@ -178,18 +179,20 @@ struct Arg {
+ integer.width = sizeof(long long);
+ }
+
+- // nullptr_t would be ambiguous between char* and const char*; to get
++ // std::nullptr_t would be ambiguous between char* and const char*; to get
+ // consistent behavior with NULL, which prints with all three of %d, %p, and
+ // %s, treat it as an integer zero internally.
+ //
+ // Warning: don't just do Arg(NULL) here because in some libcs, NULL is an
+- // alias for nullptr!
+- Arg(nullptr_t p) : type(INT) {
++ // alias for std::nullptr!
++ //
++ // NOLINTNEXTLINE(runtime/explicit)
++ Arg(std::nullptr_t p) : type(INT) {
+ integer.i = 0;
+ // Internally, SafeSprintf expects to represent nulls as integers whose
+ // width is equal to sizeof(NULL), which is not necessarily equal to
+- // sizeof(nullptr_t) - eg, on Windows, NULL is defined to 0 (with size 4)
+- // while nullptr_t is of size 8.
++ // sizeof(std::nullptr_t) - eg, on Windows, NULL is defined to 0 (with size
++ // 4) while std::nullptr_t is of size 8.
+ integer.width = sizeof(NULL);
+ }
+
diff --git a/srcpkgs/electron28/files/patches/chromium-browser-size_t.patch b/srcpkgs/electron28/files/patches/chromium-browser-size_t.patch
new file mode 100644
index 0000000000000..36af0ec6c4a7f
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-browser-size_t.patch
@@ -0,0 +1,10 @@
+--- a/chrome/browser/search/background/ntp_backgrounds.h 2020-08-10 20:39:20.000000000 +0200
++++ b/chrome/browser/search/background/ntp_backgrounds.h 2020-09-04 13:48:22.640023256 +0200
+@@ -6,6 +6,7 @@
+ #define CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_
+
+ #include <array>
++#include <cstddef>
+
+ class GURL;
+
diff --git a/srcpkgs/electron28/files/patches/chromium-cross-build.patch b/srcpkgs/electron28/files/patches/chromium-cross-build.patch
new file mode 100644
index 0000000000000..53df490bac97a
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-cross-build.patch
@@ -0,0 +1,65 @@
+--- a/build/config/compiler/BUILD.gn.orig
++++ b/build/config/compiler/BUILD.gn
+@@ -55,6 +55,10 @@
+ }
+
+ declare_args() {
++ is_musl = false
++}
++
++declare_args() {
+ # 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
+@@ -917,8 +917,13 @@
+ } else if (current_cpu == "arm64") {
+ if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+ !(is_chromeos_lacros && is_chromeos_device)) {
+- cflags += [ "--target=aarch64-linux-gnu" ]
+- ldflags += [ "--target=aarch64-linux-gnu" ]
++ if (is_musl) {
++ cflags += [ "--target=aarch64-linux-musl" ]
++ ldflags += [ "--target=aarch64-linux-musl" ]
++ } else {
++ cflags += [ "--target=aarch64-linux-gnu" ]
++ ldflags += [ "--target=aarch64-linux-gnu" ]
++ }
+ }
+ if (is_android) {
+ # Outline atomics crash on Exynos 9810. http://crbug.com/1272795
+--- a/build/toolchain/linux/unbundle/BUILD.gn.orig
++++ b/build/toolchain/linux/unbundle/BUILD.gn
+@@ -39,3 +39,22 @@
+ current_os = host_os
+ }
+ }
++
++gcc_toolchain("v8_snapshot_cross") {
++ cc = getenv("BUILD_CC")
++ cxx = getenv("BUILD_CXX")
++ ar = getenv("BUILD_AR")
++ nm = getenv("BUILD_NM")
++ ld = cxx
++
++ extra_cflags = getenv("BUILD_CFLAGS")
++ extra_cppflags = getenv("BUILD_CPPFLAGS")
++ extra_cxxflags = getenv("BUILD_CXXFLAGS")
++ extra_ldflags = getenv("BUILD_LDFLAGS")
++
++ toolchain_args = {
++ current_cpu = host_cpu
++ current_os = host_os
++ v8_current_cpu = target_cpu
++ }
++}
+--- a/build/config/linux/pkg_config.gni.orig
++++ b/build/config/linux/pkg_config.gni
+@@ -91,7 +91,7 @@
+ assert(defined(invoker.packages),
+ "Variable |packages| must be defined to be a list in pkg_config.")
+ config(target_name) {
+- if (host_toolchain == current_toolchain) {
++ if (current_cpu != target_cpu) {
+ args = common_pkg_config_args + host_pkg_config_args + invoker.packages
+ } else {
+ args = common_pkg_config_args + pkg_config_args + invoker.packages
diff --git a/srcpkgs/electron28/files/patches/chromium-fc-cache-version.patch b/srcpkgs/electron28/files/patches/chromium-fc-cache-version.patch
new file mode 100644
index 0000000000000..3b768978a43d6
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fc-cache-version.patch
@@ -0,0 +1,13 @@
+instead of hardcoding the version, use the defined macro.
+--
+--- a/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
++++ b/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
+@@ -56,7 +56,7 @@
+ 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;
+ }
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-aarch64-musl-memory-tagging-macros.patch b/srcpkgs/electron28/files/patches/chromium-fix-aarch64-musl-memory-tagging-macros.patch
new file mode 100644
index 0000000000000..b3dd2c33f0f21
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-aarch64-musl-memory-tagging-macros.patch
@@ -0,0 +1,29 @@
+--- a/base/allocator/partition_allocator/src/partition_alloc/tagging.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/tagging.cc
+@@ -28,13 +28,25 @@
+ #endif
+ #endif
+
+-#ifndef HAS_PR_MTE_MACROS
++#ifndef PR_MTE_TCF_SHIFT
+ #define PR_MTE_TCF_SHIFT 1
++#endif
++#ifndef PR_MTE_TCF_NONE
+ #define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
++#endif
++#ifndef PR_MTE_TCF_SYNC
+ #define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
++#endif
++#ifndef PR_MTE_TCF_ASYNC
+ #define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
++#endif
++#ifndef PR_MTE_TCF_MASK
+ #define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
++#endif
++#ifndef PR_MTE_TAG_SHIFT
+ #define PR_MTE_TAG_SHIFT 3
++#endif
++#ifndef PR_MTE_TAG_MASK
+ #define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
+ #endif
+ #endif
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-argument_spec-isnan-isinf.patch b/srcpkgs/electron28/files/patches/chromium-fix-argument_spec-isnan-isinf.patch
new file mode 100644
index 0000000000000..837a0312dcbca
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-argument_spec-isnan-isinf.patch
@@ -0,0 +1,11 @@
+--- a/extensions/renderer/bindings/argument_spec.cc
++++ b/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 "base/check.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-constexpr-narrowing.patch b/srcpkgs/electron28/files/patches/chromium-fix-constexpr-narrowing.patch
new file mode 100644
index 0000000000000..570ca6e69a805
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-constexpr-narrowing.patch
@@ -0,0 +1,21 @@
+--- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc.orig
++++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
+@@ -3881,15 +3881,15 @@
+ 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;
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-dawn-platform.patch b/srcpkgs/electron28/files/patches/chromium-fix-dawn-platform.patch
new file mode 100644
index 0000000000000..93631294fc772
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-dawn-platform.patch
@@ -0,0 +1,62 @@
+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(-)
+
+diff --git a/third_party/dawn/src/dawn/common/Assert.cpp b/third_party/dawn/src/dawn/common/Assert.cpp
+index ecc92dfc..8ee91a90 100644
+--- a/third_party/dawn/src/dawn/common/Assert.cpp
++++ b/third_party/dawn/src/dawn/common/Assert.cpp
+@@ -31,9 +31,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"
+diff --git a/third_party/dawn/src/dawn/common/Platform.h b/third_party/dawn/src/dawn/common/Platform.h
+index 39d5eb41..2011367d 100644
+--- a/third_party/dawn/src/dawn/common/Platform.h
++++ b/third_party/dawn/src/dawn/common/Platform.h
+@@ -124,15 +124,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."
+@@ -149,7 +149,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");
+--
+2.34.1
+
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-libc-version-include.patch b/srcpkgs/electron28/files/patches/chromium-fix-libc-version-include.patch
new file mode 100644
index 0000000000000..d94dcf6deac56
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-libc-version-include.patch
@@ -0,0 +1,15 @@
+--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
++++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+@@ -61,8 +61,11 @@
+
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++
++#if defined(__GLIBC__)
+ #include <gnu/libc-version.h>
++#endif
+
+ #include "base/linux_util.h"
+ #include "base/strings/string_split.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch b/srcpkgs/electron28/files/patches/chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch
new file mode 100644
index 0000000000000..b56717b9ce32e
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch
@@ -0,0 +1,21 @@
+This macro is defined in glibc, but not musl.
+
+--- a/sandbox/linux/suid/process_util.h.orig
++++ b/sandbox/linux/suid/process_util.h
+@@ -11,6 +11,16 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+
++// Some additional functions
++#if !defined(TEMP_FAILURE_RETRY)
++# define TEMP_FAILURE_RETRY(expression) \
++ (__extension__ \
++ ({ long int __result; \
++ do __result = (long int) (expression); \
++ while (__result == -1L && errno == EINTR); \
++ __result; }))
++#endif
++
+ // This adjusts /proc/process/oom_score_adj so the Linux OOM killer
+ // will prefer certain process types over others. The range for the
+ // adjustment is [-1000, 1000], with [0, 1000] being user accessible.
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-missing-cstdint-include-musl.patch b/srcpkgs/electron28/files/patches/chromium-fix-missing-cstdint-include-musl.patch
new file mode 100644
index 0000000000000..6ca2897f3dd29
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-missing-cstdint-include-musl.patch
@@ -0,0 +1,10 @@
+--- a/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
++++ b/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
+@@ -3,6 +3,7 @@
+
+ #include <stddef.h>
+
++#include <cstdint>
+ #include <functional>
+
+ #include "quiche/common/platform/api/quiche_export.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-musl-missing-unistd_h-include.patch b/srcpkgs/electron28/files/patches/chromium-fix-musl-missing-unistd_h-include.patch
new file mode 100644
index 0000000000000..e14d009a9e0ba
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-musl-missing-unistd_h-include.patch
@@ -0,0 +1,10 @@
+--- a/sandbox/linux/services/credentials.h
++++ b/sandbox/linux/services/credentials.h
+@@ -13,6 +13,7 @@
+
+ #include <string>
+ #include <vector>
++#include <unistd.h>
+
+ #include "sandbox/linux/system_headers/capability.h"
+ #include "sandbox/sandbox_export.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-perfetto-GetThreadName-musl.patch b/srcpkgs/electron28/files/patches/chromium-fix-perfetto-GetThreadName-musl.patch
new file mode 100644
index 0000000000000..4014d1ee5e691
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-perfetto-GetThreadName-musl.patch
@@ -0,0 +1,22 @@
+--- a/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
++++ b/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+@@ -30,7 +30,8 @@
+ #include <algorithm>
+ #endif
+
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
++ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__))
+ #include <sys/prctl.h>
+ #endif
+
+@@ -58,7 +59,8 @@
+
+ inline bool GetThreadName(std::string& out_result) {
+ char buf[16] = {};
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
++ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__))
+ if (prctl(PR_GET_NAME, buf) != 0)
+ return false;
+ #else
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-swiftshader-llvm-musl-config.patch b/srcpkgs/electron28/files/patches/chromium-fix-swiftshader-llvm-musl-config.patch
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/srcpkgs/electron28/files/patches/chromium-i686-vaapi-fpermissive.patch b/srcpkgs/electron28/files/patches/chromium-i686-vaapi-fpermissive.patch
new file mode 100644
index 0000000000000..77c0b58c94e11
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-i686-vaapi-fpermissive.patch
@@ -0,0 +1,23 @@
+--- a/media/gpu/vaapi/BUILD.gn.orig
++++ b/media/gpu/vaapi/BUILD.gn
+@@ -14,6 +14,12 @@
+ 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" ]
+@@ -90,6 +96,7 @@
+ configs += [
+ "//build/config/linux/libva",
+ "//third_party/libvpx:libvpx_config",
++ ":vaapi_permissive",
+ ]
+
+ deps = [
diff --git a/srcpkgs/electron28/files/patches/chromium-libc_malloc.patch b/srcpkgs/electron28/files/patches/chromium-libc_malloc.patch
new file mode 100644
index 0000000000000..414f28765d69c
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-libc_malloc.patch
@@ -0,0 +1,34 @@
+--- a/base/process/memory_linux.cc
++++ b/base/process/memory_linux.cc
+@@ -18,6 +18,13 @@
+ #include "base/threading/thread_restrictions.h"
+ #include "build/build_config.h"
+
++#if defined(LIBC_GLIBC)
++extern "C" {
++extern void *__libc_malloc(size_t size);
++extern void *__libc_free(void *ptr);
++}
++#endif
++
+ namespace base {
+
+ namespace {
+@@ -111,7 +118,7 @@
+ #elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC)
+ *result = malloc(size);
+ #elif defined(LIBC_GLIBC)
+- *result = __libc_malloc(size);
++ *result = ::__libc_malloc(size);
+ #endif
+ return *result != nullptr;
+ }
+@@ -122,7 +129,7 @@
+ #elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC)
+ free(ptr);
+ #elif defined(LIBC_GLIBC)
+- __libc_free(ptr);
++ ::__libc_free(ptr);
+ #endif
+ }
+
diff --git a/srcpkgs/electron28/files/patches/chromium-musl-no-execinfo.patch b/srcpkgs/electron28/files/patches/chromium-musl-no-execinfo.patch
new file mode 100644
index 0000000000000..7407f1b9db38a
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-musl-no-execinfo.patch
@@ -0,0 +1,85 @@
+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/v8/src/codegen/external-reference-table.cc
++++ b/v8/src/codegen/external-reference-table.cc
+@@ -11,7 +11,9 @@
+
+ #if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
+ #define SYMBOLIZE_FUNCTION
++#if defined(__GLIBC__)
+ #include <execinfo.h>
++#endif
+
+ #include <vector>
+
+@@ -96,7 +98,7 @@
+ }
+
+ 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/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
++++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
+@@ -17,7 +17,11 @@
+ #define ENABLE_CRASH_OVERRIDES 0
+
+ /* Define to 1 if you have the `backtrace' function. */
++#ifdef __GLIBC__
+ #define HAVE_BACKTRACE 1
++#else
++#define HAVE_BACKTRACE 0
++#endif
+
+ /* Define to 1 if you have the <CrashReporterClient.h> header file. */
+ /* #undef HAVE_CRASHREPORTERCLIENT_H */
+@@ -58,7 +62,11 @@
+ #define HAVE_ERRNO_H 1
+
+ /* Define to 1 if you have the <execinfo.h> header file. */
++#ifdef __GLIBC__
+ #define HAVE_EXECINFO_H 1
++#else
++#define HAVE_EXECINFO_H 0
++#endif
+
+ /* Define to 1 if you have the <fcntl.h> header file. */
+ #define HAVE_FCNTL_H 1
+--- a/base/debug/stack_trace.cc
++++ b/base/debug/stack_trace.cc
+@@ -251,7 +253,9 @@
+ }
+
+ void StackTrace::OutputToStream(std::ostream* os) const {
++#if defined(__GLIBC__) && !defined(_AIX)
+ OutputToStreamWithPrefix(os, nullptr);
++#endif
+ }
+
+ std::string StackTrace::ToString() const {
+@@ -281,7 +281,7 @@
+ }
+ 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/base/debug/stack_trace_unittest.cc
++++ b/base/debug/stack_trace_unittest.cc
+@@ -33,7 +33,7 @@
+ typedef testing::Test StackTraceTest;
+ #endif
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if !defined(__UCLIBC__) && !defined(_AIX) && defined(__GLIBC__)
+ // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
+ // See https://crbug.com/706728
+
diff --git a/srcpkgs/electron28/files/patches/chromium-musl-no-mallinfo.patch b/srcpkgs/electron28/files/patches/chromium-musl-no-mallinfo.patch
new file mode 100644
index 0000000000000..a58ee08a435a0
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-musl-no-mallinfo.patch
@@ -0,0 +1,125 @@
+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/base/trace_event/malloc_dump_provider.cc
++++ b/base/trace_event/malloc_dump_provider.cc
+@@ -185,7 +185,6 @@
+ #define MALLINFO2_FOUND_IN_LIBC
+ struct mallinfo2 info = mallinfo2();
+ #endif
+-#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #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);
+ }
++#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ }
+ #endif
+
+@@ -339,7 +340,7 @@
+ &allocated_objects_count);
+ #elif BUILDFLAG(IS_FUCHSIA)
+ // TODO(fuchsia): Port, see https://crbug.com/706592.
+-#else
++#elif defined(__GLIBC__)
+ ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
+ &allocated_objects_size, &allocated_objects_count);
+ #endif
+--- a/base/process/process_metrics_posix.cc
++++ b/base/process/process_metrics_posix.cc
+@@ -105,7 +105,7 @@
+
+ #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,7 +123,7 @@
+ }
+
+ } // namespace
+-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
++#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) ||
+ // BUILDFLAG(IS_ANDROID)
+
+ size_t ProcessMetrics::GetMallocUsage() {
+@@ -131,9 +131,9 @@
+ 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
+--- ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc.orig
++++ ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
+@@ -35,7 +35,7 @@
+
+ MemoryUsage GetMemoryUsage() {
+ MemoryUsage result;
+-#ifdef __linux__
++#if defined(__linux__) && defined(__GLIBC__)
+ rusage res;
+ if (getrusage(RUSAGE_SELF, &res) == 0) {
+ result.max_rss_kb = res.ru_maxrss;
+--- ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc
++++ ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc.orig
+@@ -86,11 +86,11 @@
+ }
+
+ size_t Process::GetMallocUsage() {
+-#if defined(HAVE_MALLINFO2)
++#if defined(HAVE_MALLINFO2) && defined(__GLIBC__)
+ struct mallinfo2 mi;
+ mi = ::mallinfo2();
+ return mi.uordblks;
+-#elif defined(HAVE_MALLINFO)
++#elif defined(HAVE_MALLINFO) && defined(__GLIBC__)
+ struct mallinfo mi;
+ mi = ::mallinfo();
+ return mi.uordblks;
+
+--- ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h.orig 2019-09-30 13:03:42.556880537 -0400
++++ ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h 2019-09-30 13:07:27.989821227 -0400
+@@ -122,7 +122,9 @@
+ /* #undef HAVE_MALLCTL */
+
+ /* Define to 1 if you have the `mallinfo' function. */
++#if defined(__GLIBC__)
+ #define HAVE_MALLINFO 1
++#endif
+
+ /* Define to 1 if you have the <malloc.h> header file. */
+ #define HAVE_MALLOC_H 1
+--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
+@@ -717,7 +717,7 @@
+
+ #endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID)
+
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if 0
+ SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW {
+ base::SimplePartitionStatsDumper allocator_dumper;
+ Allocator()->DumpStats("malloc", true, &allocator_dumper);
+--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
+@@ -24,7 +24,7 @@
+ #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+
+ // Platforms on which we override weak libc symbols.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS)
+
+ NOINLINE void FreeForTest(void* data) {
+ free(data);
diff --git a/srcpkgs/electron28/files/patches/chromium-musl-partition-atfork.patch b/srcpkgs/electron28/files/patches/chromium-musl-partition-atfork.patch
new file mode 100644
index 0000000000000..35d810055fbb5
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-musl-partition-atfork.patch
@@ -0,0 +1,11 @@
+--- a/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
+@@ -239,7 +239,7 @@
+ if (!g_global_init_called.compare_exchange_strong(expected, true))
+ 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.
diff --git a/srcpkgs/electron28/files/patches/chromium-musl-v8-monotonic-pthread-cont_timedwait.patch b/srcpkgs/electron28/files/patches/chromium-musl-v8-monotonic-pthread-cont_timedwait.patch
new file mode 100644
index 0000000000000..56a4ad1c807e5
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-musl-v8-monotonic-pthread-cont_timedwait.patch
@@ -0,0 +1,24 @@
+Use monotonic clock for pthread_cond_timedwait with musl too.
+
+diff --git a/v8/src/base/platform/condition-variable.cc b/v8/src/base/platform/condition-variable.cc
+index 5ea7083..c13027e 100644
+--- a/v8/src/base/platform/condition-variable.cc
++++ b/v8/src/base/platform/condition-variable.cc
+@@ -16,7 +16,7 @@ namespace base {
+
+ ConditionVariable::ConditionVariable() {
+ #if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
+- (V8_OS_LINUX && V8_LIBC_GLIBC))
++ V8_OS_LINUX)
+ // On Free/Net/OpenBSD and Linux with glibc we can change the time
+ // source for pthread_cond_timedwait() to use the monotonic clock.
+ pthread_condattr_t attr;
+@@ -92,7 +92,7 @@ bool ConditionVariable::WaitFor(Mutex* mutex, const TimeDelta& rel_time) {
+ &native_handle_, &mutex->native_handle(), &ts);
+ #else
+ #if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
+- (V8_OS_LINUX && V8_LIBC_GLIBC))
++ V8_OS_LINUX)
+ // On Free/Net/OpenBSD and Linux with glibc we can change the time
+ // source for pthread_cond_timedwait() to use the monotonic clock.
+ result = clock_gettime(CLOCK_MONOTONIC, &ts);
diff --git a/srcpkgs/electron28/files/patches/chromium-no-getcontext.patch b/srcpkgs/electron28/files/patches/chromium-no-getcontext.patch
new file mode 100644
index 0000000000000..f9bc2e02d2456
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-no-getcontext.patch
@@ -0,0 +1,27 @@
+--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 09:59:55.554536646 +0100
++++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 10:01:16.818238035 +0100
+@@ -477,7 +477,9 @@ bool ExceptionHandler::SimulateSignalDel
+ siginfo.si_code = SI_USER;
+ siginfo.si_pid = getpid();
+ ucontext_t context;
++#if defined(__GLIBC__)
+ getcontext(&context);
++#endif
+ return HandleSignal(sig, &siginfo, &context);
+ }
+
+@@ -647,9 +649,14 @@ bool ExceptionHandler::WriteMinidump() {
+ sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
+
+ CrashContext context;
++
++#if defined(__GLIBC__)
+ int getcontext_result = getcontext(&context.context);
+ if (getcontext_result)
+ return false;
++#else
++ return false;
++#endif
+
+ #if defined(__i386__)
+ // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved
diff --git a/srcpkgs/electron28/files/patches/chromium-old-clang.patch b/srcpkgs/electron28/files/patches/chromium-old-clang.patch
new file mode 100644
index 0000000000000..b773d09fbd7df
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-old-clang.patch
@@ -0,0 +1,11 @@
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -1288,7 +1288,7 @@
+ } 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) {
diff --git a/srcpkgs/electron28/files/patches/chromium-perfetto-libstdc++.patch b/srcpkgs/electron28/files/patches/chromium-perfetto-libstdc++.patch
new file mode 100644
index 0000000000000..31ff9d95bb52a
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-perfetto-libstdc++.patch
@@ -0,0 +1,20 @@
+--- a/third_party/perfetto/src/trace_processor/perfetto_sql/engine/created_function.cc
++++ b/third_party/perfetto/src/trace_processor/perfetto_sql/engine/created_function.cc
+@@ -107,7 +107,7 @@
+ // the destructors run correctly for non-trivial members of the
+ // union.
+ using Data =
+- std::variant<int64_t, double, OwnedString, OwnedBytes, nullptr_t>;
++ std::variant<int64_t, double, OwnedString, OwnedBytes, std::nullptr_t>;
+
+ StoredSqlValue(SqlValue value) {
+ switch (value.type) {
+@@ -132,7 +132,7 @@
+ }
+
+ SqlValue AsSqlValue() {
+- if (std::holds_alternative<nullptr_t>(data)) {
++ if (std::holds_alternative<std::nullptr_t>(data)) {
+ return SqlValue();
+ } else if (std::holds_alternative<int64_t>(data)) {
+ return SqlValue::Long(std::get<int64_t>(data));
diff --git a/srcpkgs/electron28/files/patches/chromium-reenable-linux-i686-builds.patch b/srcpkgs/electron28/files/patches/chromium-reenable-linux-i686-builds.patch
new file mode 100644
index 0000000000000..b18718e436496
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-reenable-linux-i686-builds.patch
@@ -0,0 +1,19 @@
+--- a/BUILD.gn.orig
++++ b/BUILD.gn
+@@ -1616,16 +1616,6 @@
+ }
+ }
+
+-# 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
+
diff --git a/srcpkgs/electron28/files/patches/chromium-remove-sys-cdefs-includes.patch b/srcpkgs/electron28/files/patches/chromium-remove-sys-cdefs-includes.patch
new file mode 100644
index 0000000000000..00344073f4613
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-remove-sys-cdefs-includes.patch
@@ -0,0 +1,39 @@
+--- a/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
++++ b/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
+@@ -17,8 +17,6 @@
+
+ #include_next <sys/ptrace.h>
+
+-#include <sys/cdefs.h>
+-
+ // https://sourceware.org/bugzilla/show_bug.cgi?id=22433
+ #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \
+ defined(__GLIBC__)
+--- a/third_party/libsync/src/include/sync/sync.h
++++ b/third_party/libsync/src/include/sync/sync.h
+@@ -19,12 +19,13 @@
+ #ifndef __SYS_CORE_SYNC_H
+ #define __SYS_CORE_SYNC_H
+
+-#include <sys/cdefs.h>
+ #include <stdint.h>
+
+ #include <linux/types.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ struct sync_legacy_merge_data {
+ int32_t fd2;
+@@ -158,6 +159,8 @@
+ struct sync_pt_info *itr);
+ void sync_fence_info_free(struct sync_fence_info_data *info);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* __SYS_CORE_SYNC_H */
diff --git a/srcpkgs/electron28/files/patches/chromium-revert-drop-of-system-java.patch b/srcpkgs/electron28/files/patches/chromium-revert-drop-of-system-java.patch
new file mode 100644
index 0000000000000..117a50f8e4f63
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-revert-drop-of-system-java.patch
@@ -0,0 +1,15 @@
+This was dropped for some reason in 6951c37cecd05979b232a39e5c10e6346a0f74ef
+--- a/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
++++ b/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
+@@ -13,8 +13,9 @@
+
+
+ _CURRENT_DIR = os.path.join(os.path.dirname(__file__))
+-_JAVA_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
+-assert os.path.isfile(_JAVA_PATH), "java only allowed in android builds"
++_JAVA_BIN = "java"
++_JDK_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
++_JAVA_PATH = _JDK_PATH if os.path.isfile(_JDK_PATH) else _JAVA_BIN
+
+ class Compiler(object):
+ """Runs the Closure compiler on given source files to typecheck them
diff --git a/srcpkgs/electron28/files/patches/chromium-sandbox-membarrier.patch b/srcpkgs/electron28/files/patches/chromium-sandbox-membarrier.patch
new file mode 100644
index 0000000000000..55ef2516194a2
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-sandbox-membarrier.patch
@@ -0,0 +1,10 @@
+--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -370,6 +370,7 @@
+ switch (sysno) {
+ case __NR_exit:
+ case __NR_exit_group:
++ case __NR_membarrier:
+ case __NR_wait4:
+ case __NR_waitid:
+ #if defined(__i386__)
diff --git a/srcpkgs/electron28/files/patches/chromium-sndio.patch b/srcpkgs/electron28/files/patches/chromium-sndio.patch
new file mode 100644
index 0000000000000..077ceaa8acbce
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-sndio.patch
@@ -0,0 +1,877 @@
+diff -Naur chromium-83.0.4103.97.orig/media/BUILD.gn chromium-83.0.4103.97/media/BUILD.gn
+--- a/media/BUILD.gn 2020-06-03 20:40:26.000000000 +0200
++++ b/media/BUILD.gn 2021-06-13 17:32:28.510395975 +0200
+@@ -65,6 +65,9 @@
+ defines += [ "DLOPEN_PULSEAUDIO" ]
+ }
+ }
++ if (use_sndio) {
++ defines += [ "USE_SNDIO" ]
++ }
+ if (use_cras) {
+ defines += [ "USE_CRAS" ]
+ }
+diff -Naur chromium-83.0.4103.97.orig/media/audio/BUILD.gn chromium-83.0.4103.97/media/audio/BUILD.gn
+--- a/media/audio/BUILD.gn 2020-06-03 20:39:37.000000000 +0200
++++ b/media/audio/BUILD.gn 2020-06-13 17:32:28.511395969 +0200
+@@ -236,6 +236,17 @@
+ 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 += [
+diff -Naur chromium-83.0.4103.97.orig/media/audio/linux/audio_manager_linux.cc chromium-83.0.4103.97/media/audio/linux/audio_manager_linux.cc
+--- a/media/audio/linux/audio_manager_linux.cc 2020-06-03 20:39:37.000000000 +0200
++++ b/media/audio/linux/audio_manager_linux.cc 2020-06-13 18:09:43.623333167 +0200
+@@ -19,6 +19,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 {
+
+ std::unique_ptr<media::AudioManager> CreateAudioManager(
+@@ -39,6 +45,16 @@
+ audio_log_factory);
+ }
+
++#if defined(USE_SNDIO)
++ struct sio_hdl *hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
++ if (hdl != NULL) {
++ sio_close(hdl);
++ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax + 1);
++ return std::make_unique<AudioManagerSndio>(std::move(audio_thread),
++ audio_log_factory);
++ }
++#endif
++
+ #if defined(USE_CRAS)
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseCras)) {
+ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kCras, kAudioIOMax + 1);
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/audio_manager_sndio.cc chromium-83.0.4103.97/media/audio/sndio/audio_manager_sndio.cc
+--- a/media/audio/sndio/audio_manager_sndio.cc 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/audio_manager_sndio.cc 2020-06-13 17:32:28.511395969 +0200
+@@ -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
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/audio_manager_sndio.h chromium-83.0.4103.97/media/audio/sndio/audio_manager_sndio.h
+--- a/media/audio/sndio/audio_manager_sndio.h 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/audio_manager_sndio.h 2020-06-13 17:32:28.511395969 +0200
+@@ -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_
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_input.cc chromium-83.0.4103.97/media/audio/sndio/sndio_input.cc
+--- a/media/audio/sndio/sndio_input.cc 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/sndio_input.cc 2020-06-13 17:32:28.511395969 +0200
+@@ -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
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_input.h chromium-83.0.4103.97/media/audio/sndio/sndio_input.h
+--- a/media/audio/sndio/sndio_input.h 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/sndio_input.h 2020-06-13 17:32:28.511395969 +0200
+@@ -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_
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_output.cc chromium-83.0.4103.97/media/audio/sndio/sndio_output.cc
+--- a/media/audio/sndio/sndio_output.cc 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/sndio_output.cc 2020-06-13 17:32:28.511395969 +0200
+@@ -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
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_output.h chromium-83.0.4103.97/media/audio/sndio/sndio_output.h
+--- a/media/audio/sndio/sndio_output.h 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/sndio_output.h 2020-06-13 17:32:28.511395969 +0200
+@@ -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_
+diff -Naur chromium-83.0.4103.97.orig/media/media_options.gni chromium-83.0.4103.97/media/media_options.gni
+--- a/media/media_options.gni
++++ b/media/media_options.gni
+@@ -158,6 +158,9 @@
+ # 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.
+ #
diff --git a/srcpkgs/electron28/files/patches/chromium-system-nodejs.patch b/srcpkgs/electron28/files/patches/chromium-system-nodejs.patch
new file mode 100644
index 0000000000000..83e8b93b9fcff
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-system-nodejs.patch
@@ -0,0 +1,20 @@
+--- a/third_party/node/node.py
++++ b/third_party/node/node.py
+@@ -13,11 +13,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):
diff --git a/srcpkgs/electron28/files/patches/chromium-systypes.patch b/srcpkgs/electron28/files/patches/chromium-systypes.patch
new file mode 100644
index 0000000000000..1ccebbd2f2b31
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-systypes.patch
@@ -0,0 +1,11 @@
+--- a/base/third_party/symbolize/symbolize.h
++++ b/base/third_party/symbolize/symbolize.h
+@@ -58,6 +58,8 @@
+ #include "config.h"
+ #include "glog/logging.h"
+
++#include <sys/types.h>
++
+ #ifdef HAVE_SYMBOLIZE
+
+ #if defined(__ELF__) // defined by gcc
diff --git a/srcpkgs/electron28/files/patches/chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch b/srcpkgs/electron28/files/patches/chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch
new file mode 100644
index 0000000000000..dae1adde0bc66
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch
@@ -0,0 +1,12 @@
+diff --git a/build/linux/unbundle/ffmpeg.gn b/build/linux/unbundle/ffmpeg.gn
+index 16e20744706..6a079b32221 100644
+--- a/build/linux/unbundle/ffmpeg.gn
++++ b/build/linux/unbundle/ffmpeg.gn
+@@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") {
+ "libavformat",
+ "libavutil",
+ ]
++ defines = [ "av_stream_get_first_dts(stream)=stream->first_dts" ]
+ }
+
+ buildflag_header("ffmpeg_features") {
diff --git a/srcpkgs/electron28/files/patches/chromium-unbundled-cross-toolchain.patch b/srcpkgs/electron28/files/patches/chromium-unbundled-cross-toolchain.patch
new file mode 100644
index 0000000000000..c3f2294ac4b2c
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-unbundled-cross-toolchain.patch
@@ -0,0 +1,12 @@
+--- a/build/toolchain/linux/unbundle/BUILD.gn.orig
++++ b/build/toolchain/linux/unbundle/BUILD.gn
+@@ -35,7 +35,7 @@
+ extra_ldflags = getenv("BUILD_LDFLAGS")
+
+ toolchain_args = {
+- current_cpu = current_cpu
+- current_os = current_os
++ current_cpu = host_cpu
++ current_os = host_os
+ }
+ }
diff --git a/srcpkgs/electron28/files/patches/chromium-webauthn-variant.patch b/srcpkgs/electron28/files/patches/chromium-webauthn-variant.patch
new file mode 100644
index 0000000000000..2ee02f5e5fe1b
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-webauthn-variant.patch
@@ -0,0 +1,14 @@
+Patch-Source: https://github.com/archlinux/svntogit-packages/blob/79b774aedeaecd4d31b2adb84e3e4b901dc980aa/trunk/webauthn-variant.patch
+--
+diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.h b/chrome/browser/webauthn/authenticator_request_dialog_model.h
+index f4992a74bd6..45cabe39974 100644
+--- a/chrome/browser/webauthn/authenticator_request_dialog_model.h
++++ b/chrome/browser/webauthn/authenticator_request_dialog_model.h
+@@ -7,6 +7,7 @@
+
+ #include <memory>
+ #include <string>
++#include <variant>
+ #include <vector>
+
+ #include "base/containers/span.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-webrtc-size_t.patch b/srcpkgs/electron28/files/patches/chromium-webrtc-size_t.patch
new file mode 100644
index 0000000000000..dd46fe14cd2b1
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-webrtc-size_t.patch
@@ -0,0 +1,10 @@
+--- a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-08-10 20:42:29.000000000 +0200
++++ b/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-09-04 12:47:07.014833633 +0200
+@@ -12,6 +12,7 @@
+ #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
+
+ #include <array>
++#include <cstddef>
+
+ namespace webrtc {
+
diff --git a/srcpkgs/electron28/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch b/srcpkgs/electron28/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch
new file mode 100644
index 0000000000000..4258b65ecc36f
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch
@@ -0,0 +1,42 @@
+From ff4122f236b70c272c746d0c336cdbd588d78cd1 Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Thu, 12 Dec 2019 16:12:18 -0500
+Subject: [PATCH] Add a script to list patch targets
+
+---
+ script/list_patch_targets.py | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+ create mode 100755 script/list_patch_targets.py
+
+diff --git a/script/list_patch_targets.py b/script/list_patch_targets.py
+new file mode 100755
+index 000000000..55173bac9
+--- /dev/null
++++ b/script/list_patch_targets.py
+@@ -0,0 +1,23 @@
++#!/usr/bin/env python
++
++import argparse
++import json
++
++
++def parse_args():
++ parser = argparse.ArgumentParser(description='Apply Electron patches')
++ parser.add_argument('config', nargs='+',
++ type=argparse.FileType('r'),
++ help='patches\' config(s) in the JSON format')
++ return parser.parse_args()
++
++
++def main():
++ configs = parse_args().config
++ for config_json in configs:
++ for patch_dir, repo in json.load(config_json).items():
++ print(repo)
++
++
++if __name__ == '__main__':
++ main()
+--
+2.23.0
+
diff --git a/srcpkgs/electron28/files/patches/electron-Build-fixes.patch.patch b/srcpkgs/electron28/files/patches/electron-Build-fixes.patch.patch
new file mode 100644
index 0000000000000..a98ee020d34ab
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/electron-Build-fixes.patch.patch
@@ -0,0 +1,12 @@
+diff --git a/build/npm.gni b/build/npm.gni
+index a1987d095..fb33a14c3 100644
+--- a/build/npm.gni
++++ b/build/npm.gni
+@@ -35,7 +35,6 @@ template("npm_action") {
+ if (!defined(deps)) {
+ deps = []
+ }
+- deps += [ ":npm_pre_flight_" + target_name ]
+
+ script = "//electron/build/npm-run.py"
+ args = [
diff --git a/srcpkgs/electron28/files/patches/electron-exclude-content-test-patches.patch b/srcpkgs/electron28/files/patches/electron-exclude-content-test-patches.patch
new file mode 100644
index 0000000000000..049ff4bdd040e
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/electron-exclude-content-test-patches.patch
@@ -0,0 +1,10 @@
+--- a/script/apply_all_patches.py 2023-05-03 15:27:52.000000000 +0200
++++ - 2023-05-04 23:12:01.430619050 +0200
+@@ -14,6 +14,7 @@
+ if os.path.exists(repo):
+ git.import_patches(repo=repo, patch_data=patch_from_dir(patch_dir),
+ threeway=threeway is not None,
++ exclude=['third_party/blink/tools/**', 'test/mjsunit/**', 'content/test/**', 'test/cctest/**', 'test/unittests/**', 'third_party/blink/web_tests/**', '.gitignore'],
+ committer_name="Electron Scripts", committer_email="scripts@electron")
+
+
diff --git a/srcpkgs/electron28/files/patches/electron-no-need-for-husky.patch b/srcpkgs/electron28/files/patches/electron-no-need-for-husky.patch
new file mode 100644
index 0000000000000..0b074254c43ca
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/electron-no-need-for-husky.patch
@@ -0,0 +1,10 @@
+--- a/package.json 2022-07-06 17:31:50.000000000 +0200
++++ - 2022-07-08 23:04:43.654812957 +0200
+@@ -98,7 +98,6 @@
+ "precommit": "lint-staged",
+ "preinstall": "node -e 'process.exit(0)'",
+ "prepack": "check-for-leaks",
+- "prepare": "husky install",
+ "repl": "node ./script/start.js --interactive",
+ "start": "node ./script/start.js",
+ "test": "node ./script/spec-runner.js",
diff --git a/srcpkgs/electron28/template b/srcpkgs/electron28/template
new file mode 100644
index 0000000000000..a06ee0ed376a5
--- /dev/null
+++ b/srcpkgs/electron28/template
@@ -0,0 +1,478 @@
+# Template file for 'electron28'
+pkgname=electron28
+version=28.2.2
+revision=1
+_nodever=18.18.2
+_chromiumver=120.0.6099.272
+archs="x86_64* aarch64*"
+create_wrksrc=yes
+build_wrksrc="src"
+hostmakedepends="$(vopt_if clang "clang lld llvm15") pkg-config perl
+ gperf bison ninja nodejs hwids which git yarn openjdk jq python3.11
+ libepoxy-devel libevent-devel libglib-devel"
+makedepends="libpng-devel gtk+3-devel nss-devel pciutils-devel
+ libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
+ libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel
+ libXScrnSaver-devel alsa-lib-devel snappy-devel libdrm-devel
+ libxml2-devel libxslt-devel $(vopt_if pulseaudio pulseaudio-devel) libexif-devel
+ libXcursor-devel libflac-devel speex-devel libmtp-devel libwebp-devel
+ libjpeg-turbo-devel libevent-devel json-c-devel minizip-devel jsoncpp-devel
+ zlib-devel libcap-devel libXdamage-devel fontconfig-devel freetype-devel opus-devel libffi-devel
+ $(vopt_if sndio sndio-devel) ffmpeg-devel libva-devel libuv-devel c-ares-devel libnotify-devel
+ $(vopt_if pipewire pipewire-devel) wayland-devel libcurl-devel libxshmfence-devel"
+short_desc="Cross platform application framework based on web technologies"
+maintainer="John <me@johnnynator.dev>"
+license="BSD-3-Clause"
+homepage="https://electronjs.org"
+distfiles="https://github.com/electron/electron/archive/v$version.tar.gz>electron-${version}.tar.gz
+ https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$_chromiumver.tar.xz
+ https://github.com/nodejs/node/archive/v$_nodever.tar.gz>node-$_nodever.tar.gz"
+checksum="7a20c98125eb1afde63be09235e2dcf148b21e4eca6ce06a9b9e73d5c6ec8d1f
+ 0cf2eec144bccb4ca668ca3b65517647a058225991b1d2543cb4626fb421cba7
+ b1c20070ec2cfc930572e8d3c3f1de4be8bc7e2259956031db00709b7775a0da"
+
+if [ "$XBPS_LIBC" = musl ]; then
+ hostmakedepends+=" musl-legacy-compat"
+fi
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ makedepends+=" musl-legacy-compat"
+fi
+
+no_generic_pkgconfig_link=yes
+lib32disabled=yes
+
+build_options="clang libcxx debug vaapi pulseaudio sndio pipewire"
+build_options_default="clang libcxx vaapi pulseaudio pipewire"
+desc_option_clang="Use clang to build"
+desc_option_libcxx="Use bundled libc++"
+desc_option_debug="Build with debug symbols"
+desc_option_pipewire="Enable support for screen sharing for WebRTC via PipeWire"
+
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" libX11-devel libxcb-devel pciutils-devel libXext-devel libglvnd-devel
+ libjpeg-turbo-devel libXi-devel nss-devel libpng-devel libwebp-devel
+ libxml2-devel $(vopt_if pulseaudio pulseaudio-devel) libxslt-devel libxkbcommon-devel
+ $(vopt_if pipewire pipewire-devel) ffmpeg-devel opus-devel pango-devel libva-devel
+ libcurl-devel snappy-devel libXrandr-devel libXcomposite-devel cups-devel
+ mit-krb5-devel alsa-lib-devel libXdamage-devel libepoxy-devel libevdev-devel
+ libavif-devel libaom-devel libdav1d-devel libflac-devel
+ libdrm-devel libgbm-devel"
+fi
+
+if [ ! "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then
+ broken="chromium (v8) can only be cross compiled if word size matches"
+fi
+
+if [ "$CROSS_BUILD" ]; then
+ case "${XBPS_TARGET_MACHINE}" in
+ #aarch64*) ;;
+ *) nocross="chromium can not be cross compiled for this architecture" ;;
+ esac
+fi
+
+_buildtype=Release
+
+_setup_clang() {
+ export CC=clang
+ export CXX=clang++
+ export AR=llvm-ar
+ export NM=llvm-nm
+ export CFLAGS="-Wno-unknown-warning-option -fdebug-prefix-map=$wrksrc=."
+ export CXXFLAGS="-Wno-unknown-warning-option -fdebug-prefix-map=$wrksrc=."
+ export LDFLAGS=""
+ export BUILD_CC=clang
+ export BUILD_CXX=clang++
+ export BUILD_AR=llvm-ar
+ export BUILD_NM=llvm-nm
+ export BUILD_CFLAGS="-Wno-unknown-warning-option"
+ export BUILD_CXXFLAGS="-Wno-unknown-warning-option"
+ if [[ -n "$CROSS_BUILD" ]]; then
+ CFLAGS+=" --sysroot=${XBPS_CROSS_BASE}"
+ CXXFLAGS+=" --sysroot=${XBPS_CROSS_BASE}"
+ LDFLAGS+=" --sysroot=${XBPS_CROSS_BASE}"
+ if [[ -z "$build_option_libcxx" ]]; then
+ local gcc_version=$(gcc -dumpversion)
+ local clang_version=$(clang -dumpversion)
+ CFLAGS+=" --gcc-toolchain=/usr"
+ CFLAGS+=" -nostdinc"
+ CFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include"
+ CFLAGS+=" -isystem /usr/lib/clang/${clang_version}/include"
+ CXXFLAGS+=" --gcc-toolchain=/usr"
+ CXXFLAGS+=" -nostdinc++"
+ CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}"
+ CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}/${XBPS_CROSS_TRIPLET}"
+ CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}/backward"
+ CXXFLAGS+=" -nostdinc"
+ CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include"
+ CXXFLAGS+=" -isystem /usr/lib/clang/${clang_version}/include"
+ LDFLAGS+=" --gcc-toolchain=/usr"
+ fi
+ fi
+}
+
+_setup_toolchain() {
+ if [ "$build_option_clang" ]; then
+ _setup_clang
+ fi
+}
+
+_apply_patch() {
+ local args="$1" pname="$(basename $2)"
+
+ if [ ! -f ".${pname}_done" ]; then
+ if [ -f "${2}.args" ]; then
+ args=$(<"${2}.args")
+ fi
+ msg_normal "$pkgver: patching: ${pname}.\n"
+ patch -N $args -i $2
+ touch .${pname}_done
+ fi
+}
+
+_git_am() {
+ local pname="$(basename $1)"
+
+ if [ ! -f ".${pname}_done" ]; then
+ msg_normal "$pkgver: patching: ${pname}.\n"
+ git -c 'user.name=Electron build' -c 'user.email=electron@ebuild' \
+ am --exclude "third_party/blink/tools/**" \
+ --exclude "test/mjsunit/**" --exclude "content/test/**" \
+ --exclude "test/cctest/**" --exclude "test/unittests/**" \
+ --exclude "third_party/blink/web_tests/**" \
+ --exclude "chrome/test/**" \
+ $1
+ touch .${pname}_done
+ fi
+}
+
+
+_get_chromium_arch() {
+ case "$1" in
+ x86_64*) echo x64 ;;
+ i686*) echo x86 ;;
+ arm*) echo arm ;;
+ aarch64*) echo arm64 ;;
+ ppc64*) echo ppc64 ;;
+ ppc*) echo ppc ;;
+ mipsel*) echo mipsel ;;
+ mips*) echo mips ;;
+ *) msg_error "$pkgver: cannot be compiled for ${XBPS_TARGET_MACHINE}.\n" ;;
+ esac
+}
+
+post_extract() {
+ mv chromium-${_chromiumver} src
+ mkdir -p src/third_party/
+ mv node-$_nodever src/third_party/electron_node
+ mv electron-${version} src/electron
+}
+
+_git_init() {
+ repopath="$1"
+ cd "$wrksrc"/"$repopath"
+ git init -q
+ git config "gc.auto" 0
+ if [ "$repopath" != "src" ]; then
+ echo "/${repopath#src/}" >> "$wrksrc/$build_wrksrc/.gitignore"
+ fi
+ git add .
+ git -c 'user.name=Electron build' -c 'user.email=electron@ebuild' \
+ commit -q -m "." || true
+
+}
+
+post_patch() {
+ cd $wrksrc
+ for x in $FILESDIR/patches/*.patch; do
+ case "${x##*/}" in
+ electron*.patch)
+ cd src/electron
+ _apply_patch -p1 "$x"
+ cd "$wrksrc";;
+ esac
+ done
+
+ # Sigh, electron uses git am...
+ if [ ! -f ".electron_patches_done" ]; then
+ mv src/electron/patches/config.json config.json.old
+ jq 'del(."src/electron/patches/Mantle", ."src/electron/patches/ReactiveObjC",
+ ."src/electron/patches/squirrel.mac", ."src/electron/patches/nan")' \
+ config.json.old > src/electron/patches/config.json
+
+ python3.11 src/electron/script/list_patch_targets.py src/electron/patches/config.json | while read -r repopath; do
+ _git_init $repopath
+ done
+ _git_init src/electron
+ cd $wrksrc
+
+ for x in $FILESDIR/chromium-upstream-patches/*.patch; do
+ [ -f $x ] || continue
+ cd src
+ _git_am "$x"
+ cd "$wrksrc"
+ done
+
+ python3.11 src/electron/script/apply_all_patches.py src/electron/patches/config.json
+ touch .electron_patches_done
+ fi
+
+ for x in $FILESDIR/patches/*; do
+ case "${x##*/}" in
+ chromium*.patch)
+ cd src
+ _apply_patch -p1 "$x"
+ cd "$wrksrc";;
+ esac
+ done
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ for x in $FILESDIR/musl-patches/*; do
+ case "${x##*/}" in
+ chromium*.patch)
+ cd src
+ _apply_patch -p1 "$x"
+ cd "$wrksrc";;
+ electron*.patch)
+ cd src/electron
+ _apply_patch -p1 "$x"
+ cd "$wrksrc";;
+ esac
+ done
+ fi
+ if [ "$build_option_sndio" ]; then
+ mkdir -p ${wrksrc}/${build_wrksrc}/media/audio/{sndio,openbsd}
+ cp ${FILESDIR}/sndio-files/sndio_*put.* \
+ ${wrksrc}/${build_wrksrc}/media/audio/sndio
+ cp ${FILESDIR}/sndio-files/audio_manager_openbsd.* \
+ ${wrksrc}/${build_wrksrc}/media/audio/openbsd
+ for f in "${FILESDIR}"/sndio-patches/*.patch; do
+ cd src
+ _apply_patch -p0 "$f"
+ cd "$wrksrc"
+ done
+ fi
+ vsed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+ src/tools/generate_shim_headers/generate_shim_headers.py
+}
+
+pre_configure() {
+ ln -sf "/usr/bin/python3.11" "${XBPS_WRAPPERDIR}/python3"
+ cd "$wrksrc/$build_wrksrc"
+
+ # https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
+ touch chrome/test/data/webui/i18n_process_css_test.html
+ # Use the file at run time instead of effectively compiling it in
+ sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
+ -i services/device/public/cpp/usb/BUILD.gn
+
+ vsed -e 's|python3.10|python3.11|g' -i third_party/electron_node/configure
+ vsed -e "s|(3, 10)|(3, 11)|" -i third_party/electron_node/configure
+
+ mkdir -p third_party/node/linux/node-linux-x64/bin
+ ln -sf /usr/bin/node third_party/node/linux/node-linux-x64/bin/
+ rm -f third_party/devtools-frontend/src/third_party/esbuild/esbuild
+
+ # compile gn early, so it can be used to generate gni stuff
+ msg_normal "Bootstrapping GN\n"
+ CC="clang" CXX="${CXX_FOR_BUILD:-$CXX}" LD="${LD_FOR_BUILD:-$LD}" \
+ CFLAGS="${CFLAGS_FOR_BUILD:-$CFLAGS} -Wno-error=redundant-move" \
+ CXXFLAGS="${CXXFLAGS_FOR_BUILD:-$CXXFLAGS} -Wno-error=redundant-move" \
+ LDFLAGS="${XBPS_LDFLAGS}" \
+ python3.11 tools/gn/bootstrap/bootstrap.py -s -v --skip-generate-buildfiles
+
+ # reusable system library settings
+ local use_system="
+ ffmpeg
+ flac
+ fontconfig
+ freetype
+ libdrm
+ libevent
+ libjpeg
+ libpng
+ libwebp
+ libxml
+ libxslt
+ opus
+ snappy
+ "
+ for _lib in $use_system libjpeg_turbo; do
+ msg_normal "Removing buildscripts for system provided $_lib\n"
+ find -type f -path "*third_party/$_lib/*" \
+ \! -path "*third_party/$_lib/chromium/*" \
+ \! -path "*third_party/$_lib/google/*" \
+ \! -path './base/third_party/icu/*' \
+ \! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
+ \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
+ -delete
+ done
+
+
+ msg_normal "Replacing gn files\n"
+ python3.11 build/linux/unbundle/replace_gn_files.py \
+ --system-libraries $use_system
+ third_party/libaddressinput/chromium/tools/update-strings.py
+
+ # Satisfy some scripts that use git describe to figure out the electron version
+ cd ${wrksrc}/src/electron
+ git tag -f "v${version}"
+}
+
+do_configure() {
+ local target_arch="$(_get_chromium_arch ${XBPS_TARGET_MACHINE})"
+ local host_arch="$(_get_chromium_arch ${XBPS_MACHINE})"
+ local conf=()
+ cd third_party/electron_node
+ if [ "$CROSS_BUILD" ]; then
+ conf_args=" --dest-cpu=${target_arch} --cross-compiling"
+ fi
+ ./configure --prefix=/usr \
+ --shared-zlib \
+ --shared-libuv \
+ --shared-openssl \
+ --shared-cares \
+ --openssl-use-def-ca-store \
+ --without-npm \
+ --without-dtrace \
+ --without-bundled-v8 \
+ ${conf_args}
+
+ cd "$wrksrc/$build_wrksrc"/electron
+ yarn install --frozen-lockfile
+ cd "$wrksrc/$build_wrksrc"
+
+ conf+=(
+ 'import("//electron/build/args/release.gn")'
+ "override_electron_version=\"${version}\""
+ )
+
+ conf+=(
+ 'enable_nacl=false'
+ 'enable_rust=false'
+
+ 'use_sysroot=false'
+
+ 'host_pkg_config="/usr/bin/pkg-config"'
+
+ "is_clang=$(vopt_if clang true false)"
+ "use_lld=$(vopt_if clang true false)"
+ 'clang_use_chrome_plugins=false'
+ 'clang_base_path="/usr"'
+
+ "gold_path=\"${XBPS_CROSS_BASE}/usr/bin/ld.gold\""
+ "use_custom_libcxx=$(vopt_if libcxx true false)" # https://github.com/llvm/llvm-project/issues/61705
+ 'use_gold=false'
+
+ 'rust_sysroot_absolute="/usr"'
+
+ # is_debug makes the build a debug build, changes some things.
+ # might be useful for real debugging vs just debug symbols.
+ "is_debug=false"
+ "blink_symbol_level=$(vopt_if debug 1 0)"
+ "symbol_level=$(vopt_if debug 1 0)"
+
+ 'icu_use_data_file=true'
+
+ 'enable_widevine=false'
+ 'enable_hangout_services_extension=true'
+
+ 'use_system_harfbuzz=false'
+ 'use_system_libffi=true'
+
+ 'use_qt=false'
+
+ 'use_cups=true'
+
+ "use_vaapi=$(vopt_if vaapi true false)"
+
+ "use_pulseaudio=$(vopt_if pulseaudio true false)"
+ "link_pulseaudio=$(vopt_if pulseaudio true false)"
+
+ "rtc_use_pipewire=$(vopt_if pipewire true false)"
+
+ "use_sndio=$(vopt_if sndio true false)"
+
+ # Always support proprietary codecs.
+ # Enable H.264 support in bundled ffmpeg.
+ 'proprietary_codecs=true'
+ 'ffmpeg_branding="Chrome"'
+
+ # Make sure that -Werror doesn't get added to CFLAGS by the build system.
+ # Depending on GCC version the warnings are different and we don't want
+ # the build to fail because of that.
+ 'treat_warnings_as_errors=false'
+ 'fatal_linker_warnings=false'
+
+ # Save space by removing DLOG and DCHECK messages (about 6% reduction).
+ # 'logging_like_official_build=true'
+ 'disable_fieldtrial_testing_config=true'
+
+ 'is_official_build=true'
+
+ # segfaults with llvm-12.0.1
+ 'is_cfi=false'
+ 'use_thin_lto=false'
+ 'use_cfi_icall=false'
+ 'chrome_pgo_phase=0'
+ )
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ conf+=( 'is_musl=true' )
+ fi
+
+ if [ "$CROSS_BUILD" ]; then
+ conf+=(
+ 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'host_toolchain="//build/toolchain/linux/unbundle:host"'
+ 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:v8_snapshot_cross"'
+ )
+ else
+ conf+=(
+ 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'host_toolchain="//build/toolchain/linux/unbundle:default"'
+ )
+ fi
+
+ conf+=(
+ "target_cpu=\"$target_arch\""
+ "host_cpu=\"$host_arch\""
+ )
+
+ _setup_toolchain
+ msg_normal "Configuring build\n"
+ out/Release/gn gen out/$_buildtype --args="${conf[*]}"
+}
+
+do_build() {
+ _setup_toolchain
+ msg_normal "Ninja turtles GO!\n"
+ ninja ${makejobs} -C out/$_buildtype node_gypi_headers node_version_header electron_dist_zip
+ cp -vf out/Release/gen/node_headers/include/node/config.gypi third_party/electron_node/config.gypi
+}
+
+do_install() {
+ vmkdir /usr/lib/$pkgname
+ vmkdir /usr/include/$pkgname
+ bsdtar -xf out/$_buildtype/dist.zip -C "$DESTDIR/usr/lib/$pkgname"
+
+ (
+ cd third_party/electron_node
+ HEADERS_ONLY=1 python3.11 ./tools/install.py install "$pkgdir" "${DESTDIR}/usr/include/${pkgname}/node_headers"
+ )
+ vlicense ${wrksrc}/src/LICENSE chromium.LICENSE
+ vlicense ${wrksrc}/src/electron/LICENSE electron.LICENSE
+ vlicense ${wrksrc}/src/third_party/electron_node/LICENSE node.LICENSE
+
+ vmkdir /usr/bin
+ ln -s ../lib/$pkgname/electron "$DESTDIR"/usr/bin/$pkgname
+}
+
+electron28-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ }
+}
diff --git a/srcpkgs/electron28/update b/srcpkgs/electron28/update
new file mode 100644
index 0000000000000..3af8e58b53580
--- /dev/null
+++ b/srcpkgs/electron28/update
@@ -0,0 +1,2 @@
+site=https://www.electronjs.org/releases/stable?version=${version%%.*}
+pattern='tag/v\K[\d\.]+(?=")'
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Updated] New package: electron28-28.2.2
2024-02-13 9:21 [PR PATCH] New package: electron28-28.2.2 Johnnynator
@ 2024-02-13 9:25 ` Johnnynator
2024-05-14 1:46 ` github-actions
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Johnnynator @ 2024-02-13 9:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages electron28
https://github.com/void-linux/void-packages/pull/48690
New package: electron28-28.2.2
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, `x86_64,` `x86_64-musl`
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/48690.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-electron28-48690.patch --]
[-- Type: text/x-diff, Size: 254125 bytes --]
From e94e821b7a3d075e065e10a2989ea4988344bb0e Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Tue, 13 Feb 2024 10:18:45 +0100
Subject: [PATCH] New package: electron28-28.2.2
---
srcpkgs/electron28-devel | 1 +
.../chromium-disable-dns_config_service.patch | 15 +
.../musl-patches/chromium-libc++-musl.patch | 12 +
.../musl-patches/chromium-musl-sandbox.patch | 125 +++
.../chromium-musl-tid-caching.patch | 86 ++
.../chromium-no-res-ninit-nclose.patch | 33 +
...mium-105.0.5195.52-python-six-1.16.0.patch | 134 +++
.../chromium-114-maldoca-include.patch | 25 +
.../chromium-115-compiler-SkColor4f.patch | 27 +
.../patches/chromium-117-string-convert.patch | 21 +
.../files/patches/chromium-119-assert.patch | 12 +
.../patches/chromium-119-ffmpeg-4.4.patch | 20 +
.../chromium-119-fix-aarch64-musl.patch | 11 +
.../chromium-120-arm64-memory_tagging.patch | 14 +
...hromium-120-disable-FFmpegAllowLists.patch | 12 +
...ble-GlobalMediaControlsCastStartStop.patch | 14 +
...chromium-120-el7-clang-build-failure.patch | 230 +++++
...ium-120-el7-clang-build-failure.patch.args | 1 +
...romium-120-el7-clang-version-warning.patch | 16 +
.../chromium-120-gn-workaround-atspi.patch | 13 +
| 448 +++++++++
...chromium-120-no_matching_constructor.patch | 742 +++++++++++++++
...20-split-threshold-for-reg-with-hint.patch | 28 +
.../files/patches/chromium-120-typename.patch | 205 ++++
...karound_clang_bug-structured_binding.patch | 51 +
...ERT-roll-src-third_party-ffmpeg-m102.patch | 333 +++++++
...oll-src-third_party-ffmpeg-m102.patch.args | 1 +
...ERT-roll-src-third_party-ffmpeg-m106.patch | 55 ++
...oll-src-third_party-ffmpeg-m106.patch.args | 1 +
.../chromium-angle-wayland-include.patch | 39 +
...5e6b91ccdf8b2518ef733d75c04823979d18.patch | 61 ++
.../patches/chromium-browser-size_t.patch | 10 +
.../files/patches/chromium-cross-build.patch | 65 ++
.../patches/chromium-fc-cache-version.patch | 13 +
...x-aarch64-musl-memory-tagging-macros.patch | 29 +
...romium-fix-argument_spec-isnan-isinf.patch | 11 +
.../chromium-fix-constexpr-narrowing.patch | 21 +
.../patches/chromium-fix-dawn-platform.patch | 62 ++
.../chromium-fix-libc-version-include.patch | 15 +
...fix-missing-TEMP_FAILURE_RETRY-macro.patch | 21 +
...ium-fix-missing-cstdint-include-musl.patch | 10 +
...um-fix-musl-missing-unistd_h-include.patch | 10 +
...mium-fix-perfetto-GetThreadName-musl.patch | 22 +
...ium-fix-swiftshader-llvm-musl-config.patch | 0
.../chromium-i686-vaapi-fpermissive.patch | 23 +
.../files/patches/chromium-libc_malloc.patch | 34 +
.../patches/chromium-musl-no-execinfo.patch | 85 ++
.../patches/chromium-musl-no-mallinfo.patch | 125 +++
.../chromium-musl-partition-atfork.patch | 11 +
...-v8-monotonic-pthread-cont_timedwait.patch | 24 +
.../patches/chromium-no-getcontext.patch | 27 +
.../files/patches/chromium-old-clang.patch | 11 +
.../patches/chromium-perfetto-libstdc++.patch | 20 +
.../chromium-reenable-linux-i686-builds.patch | 19 +
.../chromium-remove-sys-cdefs-includes.patch | 39 +
.../chromium-revert-drop-of-system-java.patch | 15 +
.../patches/chromium-sandbox-membarrier.patch | 10 +
.../files/patches/chromium-sndio.patch | 877 ++++++++++++++++++
.../patches/chromium-system-nodejs.patch | 20 +
.../files/patches/chromium-systypes.patch | 11 +
...undle-ffmpeg-av_stream_get_first_dts.patch | 12 +
.../chromium-unbundled-cross-toolchain.patch | 12 +
.../patches/chromium-webauthn-variant.patch | 14 +
.../patches/chromium-webrtc-size_t.patch | 10 +
...a-script-to-list-patch-targets.patch.patch | 42 +
.../patches/electron-Build-fixes.patch.patch | 12 +
...lectron-exclude-content-test-patches.patch | 10 +
.../patches/electron-no-need-for-husky.patch | 10 +
srcpkgs/electron28/template | 477 ++++++++++
srcpkgs/electron28/update | 2 +
70 files changed, 5027 insertions(+)
create mode 120000 srcpkgs/electron28-devel
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-disable-dns_config_service.patch
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-libc++-musl.patch
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-musl-sandbox.patch
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-musl-tid-caching.patch
create mode 100644 srcpkgs/electron28/files/musl-patches/chromium-no-res-ninit-nclose.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-105.0.5195.52-python-six-1.16.0.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-114-maldoca-include.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-115-compiler-SkColor4f.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-117-string-convert.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-119-assert.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-119-ffmpeg-4.4.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-119-fix-aarch64-musl.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-arm64-memory_tagging.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-disable-FFmpegAllowLists.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-disable-GlobalMediaControlsCastStartStop.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch.args
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-el7-clang-version-warning.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-gn-workaround-atspi.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-missing-header-files.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-no_matching_constructor.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-split-threshold-for-reg-with-hint.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-typename.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-120-workaround_clang_bug-structured_binding.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch.args
create mode 100644 srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch.args
create mode 100644 srcpkgs/electron28/files/patches/chromium-angle-wayland-include.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-b74d5e6b91ccdf8b2518ef733d75c04823979d18.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-browser-size_t.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-cross-build.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fc-cache-version.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-aarch64-musl-memory-tagging-macros.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-argument_spec-isnan-isinf.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-constexpr-narrowing.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-dawn-platform.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-libc-version-include.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-missing-cstdint-include-musl.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-musl-missing-unistd_h-include.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-perfetto-GetThreadName-musl.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-fix-swiftshader-llvm-musl-config.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-i686-vaapi-fpermissive.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-libc_malloc.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-musl-no-execinfo.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-musl-no-mallinfo.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-musl-partition-atfork.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-musl-v8-monotonic-pthread-cont_timedwait.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-no-getcontext.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-old-clang.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-perfetto-libstdc++.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-reenable-linux-i686-builds.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-remove-sys-cdefs-includes.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-revert-drop-of-system-java.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-sandbox-membarrier.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-sndio.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-system-nodejs.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-systypes.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-unbundled-cross-toolchain.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-webauthn-variant.patch
create mode 100644 srcpkgs/electron28/files/patches/chromium-webrtc-size_t.patch
create mode 100644 srcpkgs/electron28/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch
create mode 100644 srcpkgs/electron28/files/patches/electron-Build-fixes.patch.patch
create mode 100644 srcpkgs/electron28/files/patches/electron-exclude-content-test-patches.patch
create mode 100644 srcpkgs/electron28/files/patches/electron-no-need-for-husky.patch
create mode 100644 srcpkgs/electron28/template
create mode 100644 srcpkgs/electron28/update
diff --git a/srcpkgs/electron28-devel b/srcpkgs/electron28-devel
new file mode 120000
index 0000000000000..da626e98e8d29
--- /dev/null
+++ b/srcpkgs/electron28-devel
@@ -0,0 +1 @@
+electron28
\ No newline at end of file
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-disable-dns_config_service.patch b/srcpkgs/electron28/files/musl-patches/chromium-disable-dns_config_service.patch
new file mode 100644
index 0000000000000..a72e1c47c7e20
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-disable-dns_config_service.patch
@@ -0,0 +1,15 @@
+diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
+index f36bf68..805d9a6 100644
+--- a/net/dns/BUILD.gn
++++ b/net/dns/BUILD.gn
+@@ -130,8 +130,8 @@ source_set("dns") {
+ ]
+ } else if (is_linux) {
+ sources += [
+- "dns_config_service_linux.cc",
+- "dns_config_service_linux.h",
++ "dns_config_service_fuchsia.cc",
++ "dns_config_service_fuchsia.h",
+ ]
+ } else if (is_posix) {
+ sources += [
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-libc++-musl.patch b/srcpkgs/electron28/files/musl-patches/chromium-libc++-musl.patch
new file mode 100644
index 0000000000000..b90a54daa8b49
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-libc++-musl.patch
@@ -0,0 +1,12 @@
+Source: https://git.alpinelinux.org/aports/tree/community/chromium/yes-musl.patch
+--- ./buildtools/third_party/libc++/__config_site.orig
++++ ./buildtools/third_party/libc++/__config_site
+@@ -18,7 +18,7 @@
+ /* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
+ /* #undef _LIBCPP_HAS_NO_THREADS */
+ /* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */
+-/* #undef _LIBCPP_HAS_MUSL_LIBC */
++#define _LIBCPP_HAS_MUSL_LIBC 1
+ /* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */
+ /* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */
+ /* #undef _LIBCPP_HAS_THREAD_API_WIN32 */
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-musl-sandbox.patch b/srcpkgs/electron28/files/musl-patches/chromium-musl-sandbox.patch
new file mode 100644
index 0000000000000..22d865aa42f5d
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-musl-sandbox.patch
@@ -0,0 +1,125 @@
+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
+--
+diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+index ff5a1c0..da56b9b 100644
+--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -139,21 +139,11 @@ namespace sandbox {
+ // present (as in newer versions of posix_spawn).
+ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
+ const Arg<unsigned long> flags(0);
+-
+- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
+- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
+- CLONE_SIGHAND | CLONE_THREAD |
+- CLONE_SYSVSEM;
+- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED;
+-
+- const uint64_t kGlibcPthreadFlags =
+- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD |
+- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID;
+- const BoolExpr glibc_test = flags == kGlibcPthreadFlags;
+-
+- const BoolExpr android_test =
+- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
+- flags == kGlibcPthreadFlags);
++ 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;
+
+ // The following two flags are the two important flags in any vfork-emulating
+ // clone call. EPERM any clone call that contains both of them.
+@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
+ AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
+ (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
+
+- return If(IsAndroid() ? android_test : glibc_test, Allow())
++ return If(thread_clone_ok, Allow())
+ .ElseIf(is_fork_or_clone_vfork, Error(EPERM))
+ .Else(CrashSIGSYSClone());
+ }
+diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+index d9d1882..0567557 100644
+--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -392,6 +392,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
+ #if defined(__i386__)
+ case __NR_waitpid:
+ #endif
++ case __NR_set_tid_address:
+ return true;
+ case __NR_clone: // Should be parameter-restricted.
+ case __NR_setns: // Privileged.
+@@ -404,7 +405,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+ case __NR_set_thread_area:
+ #endif
+- case __NR_set_tid_address:
+ case __NR_unshare:
+ #if !defined(__mips__) && !defined(__aarch64__)
+ case __NR_vfork:
+@@ -514,6 +514,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+ case __NR_mlock:
+ case __NR_munlock:
+ case __NR_munmap:
++ case __NR_mremap:
++ case __NR_membarrier:
+ return true;
+ case __NR_madvise:
+ case __NR_mincore:
+@@ -531,7 +533,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+ case __NR_modify_ldt:
+ #endif
+ case __NR_mprotect:
+- case __NR_mremap:
+ case __NR_msync:
+ case __NR_munlockall:
+ case __NR_readahead:
+diff --git a/sandbox/linux/system_headers/linux_syscalls.h ./sandbox/linux/system_headers/linux_syscalls.h
+index 2b78a0c..b6fedb5 100644
+--- a/sandbox/linux/system_headers/linux_syscalls.h
++++ b/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"
+--- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc
++++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+@@ -94,6 +94,9 @@
+ case __NR_pwrite64:
+ case __NR_sched_get_priority_max:
+ case __NR_sched_get_priority_min:
++ case __NR_sched_getparam:
++ case __NR_sched_getscheduler:
++ case __NR_sched_setscheduler:
+ case __NR_sysinfo:
+ case __NR_times:
+ case __NR_uname:
+--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
++++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+@@ -225,10 +225,15 @@
+ if (sysno == __NR_getpriority || sysno ==__NR_setpriority)
+ return RestrictGetSetpriority(current_pid);
+
++ // XXX: hacks for musl sandbox, calls needed?
++ if (sysno == __NR_sched_getparam || sysno == __NR_sched_getscheduler ||
++ sysno == __NR_sched_setscheduler) {
++ return Allow();
++ }
++
+ // The scheduling syscalls are used in threading libraries and also heavily in
+ // abseil. See for example https://crbug.com/1370394.
+- if (sysno == __NR_sched_getaffinity || sysno == __NR_sched_getparam ||
+- sysno == __NR_sched_getscheduler || sysno == __NR_sched_setscheduler) {
++ if (sysno == __NR_sched_getaffinity) {
+ return RestrictSchedTarget(current_pid, sysno);
+ }
+
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-musl-tid-caching.patch b/srcpkgs/electron28/files/musl-patches/chromium-musl-tid-caching.patch
new file mode 100644
index 0000000000000..52bbe775ad2a9
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-musl-tid-caching.patch
@@ -0,0 +1,86 @@
+Source: https://git.alpinelinux.org/aports/plain/community/chromium/musl-tid-caching.patch
+the sandbox caching of thread id's only works with glibc
+see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/32356
+see: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13579
+--
+--- a/sandbox/linux/services/namespace_sandbox.cc
++++ b/sandbox/linux/services/namespace_sandbox.cc
+@@ -209,6 +209,70 @@
+ return base::LaunchProcess(argv, launch_options_copy);
+ }
+
++#if defined(__aarch64__) || defined(__arm__) || defined(__powerpc__)
++#define TLS_ABOVE_TP
++#endif
++
++struct musl_pthread
++{
++ /* Part 1 -- these fields may be external or
++ * internal (accessed via asm) ABI. Do not change. */
++ struct pthread *self;
++#ifndef TLS_ABOVE_TP
++ uintptr_t *dtv;
++#endif
++ struct pthread *prev, *next; /* non-ABI */
++ uintptr_t sysinfo;
++#ifndef TLS_ABOVE_TP
++#ifdef CANARY_PAD
++ uintptr_t canary_pad;
++#endif
++ uintptr_t canary;
++#endif
++
++/* Part 2 -- implementation details, non-ABI. */
++ int tid;
++ int errno_val;
++ volatile int detach_state;
++ volatile int cancel;
++ volatile unsigned char canceldisable, cancelasync;
++ unsigned char tsd_used:1;
++ unsigned char dlerror_flag:1;
++ unsigned char *map_base;
++ size_t map_size;
++ void *stack;
++ size_t stack_size;
++ size_t guard_size;
++ void *result;
++ struct __ptcb *cancelbuf;
++ void **tsd;
++ struct {
++ volatile void *volatile head;
++ long off;
++ volatile void *volatile pending;
++ } robust_list;
++ int h_errno_val;
++ volatile int timer_id;
++ locale_t locale;
++ volatile int killlock[1];
++ char *dlerror_buf;
++ void *stdio_locks;
++
++ /* Part 3 -- the positions of these fields relative to
++ * the end of the structure is external and internal ABI. */
++#ifdef TLS_ABOVE_TP
++ uintptr_t canary;
++ uintptr_t *dtv;
++#endif
++};
++
++void MaybeUpdateMuslTidCache()
++{
++ pid_t real_tid = sys_gettid();
++ pid_t* cached_tid_location = &reinterpret_cast<struct musl_pthread*>(pthread_self())->tid;
++ *cached_tid_location = real_tid;
++}
++
+ // static
+ pid_t NamespaceSandbox::ForkInNewPidNamespace(bool drop_capabilities_in_child) {
+ const pid_t pid =
+@@ -226,6 +290,7 @@
+ #if defined(LIBC_GLIBC)
+ MaybeUpdateGlibcTidCache();
+ #endif
++ MaybeUpdateMuslTidCache();
+ return 0;
+ }
+
diff --git a/srcpkgs/electron28/files/musl-patches/chromium-no-res-ninit-nclose.patch b/srcpkgs/electron28/files/musl-patches/chromium-no-res-ninit-nclose.patch
new file mode 100644
index 0000000000000..6884039efb884
--- /dev/null
+++ b/srcpkgs/electron28/files/musl-patches/chromium-no-res-ninit-nclose.patch
@@ -0,0 +1,33 @@
+Source: https://git.alpinelinux.org/aports/plain/community/chromium/no-res-ninit-nclose.patch
+similar to dns-resolver.patch, musl doesn't have res_ninit and so on
+--
+--- a/net/dns/public/scoped_res_state.cc
++++ b/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) || defined(_GNU_SOURCE)
+ // Note: res_ninit in glibc always returns 0 and sets RES_INIT.
+ // res_init behaves the same way.
+ memset(&_res, 0, sizeof(_res));
+@@ -25,16 +25,8 @@
+ }
+
+ ScopedResState::~ScopedResState() {
+-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
+-
+- // Prefer res_ndestroy where available.
+-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
+- res_ndestroy(&res_);
+-#else
+- res_nclose(&res_);
+-#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
+-
+-#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
++ // musl res_init() doesn't actually do anything
++ // no destruction is necessary as no memory has been allocated
+ }
+
+ bool ScopedResState::IsValid() const {
diff --git a/srcpkgs/electron28/files/patches/chromium-105.0.5195.52-python-six-1.16.0.patch b/srcpkgs/electron28/files/patches/chromium-105.0.5195.52-python-six-1.16.0.patch
new file mode 100644
index 0000000000000..497c2df40b321
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-105.0.5195.52-python-six-1.16.0.patch
@@ -0,0 +1,134 @@
+diff -up chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py
+--- chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 2022-07-05 13:31:29.434673638 +0000
++++ chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py 2022-07-05 21:52:01.884578748 +0000
+@@ -29,7 +29,7 @@ import sys
+ import types
+
+ __author__ = "Benjamin Peterson <benjamin@python.org>"
+-__version__ = "1.15.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__)
+
+
+diff -up chromium-103.0.5060.53/third_party/six/src/six.py.116 chromium-103.0.5060.53/third_party/six/src/six.py
+--- chromium-103.0.5060.53/third_party/six/src/six.py.116 2022-07-05 13:32:28.916687658 +0000
++++ chromium-103.0.5060.53/third_party/six/src/six.py 2022-07-05 21:59:42.561240407 +0000
+@@ -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
+
+
diff --git a/srcpkgs/electron28/files/patches/chromium-114-maldoca-include.patch b/srcpkgs/electron28/files/patches/chromium-114-maldoca-include.patch
new file mode 100644
index 0000000000000..0259cb9b0d017
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-114-maldoca-include.patch
@@ -0,0 +1,25 @@
+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(+)
+
+diff --git a/third_party/maldoca/src/maldoca/ole/header.h b/third_party/maldoca/src/maldoca/ole/header.h
+index 174f704..41c41d5 100644
+--- a/third_party/maldoca/src/maldoca/ole/header.h
++++ b/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 {
+--
+2.39.2
+
diff --git a/srcpkgs/electron28/files/patches/chromium-115-compiler-SkColor4f.patch b/srcpkgs/electron28/files/patches/chromium-115-compiler-SkColor4f.patch
new file mode 100644
index 0000000000000..ffa0e7ed108c9
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-115-compiler-SkColor4f.patch
@@ -0,0 +1,27 @@
+Patch-Source: https://src.fedoraproject.org/rpms/chromium/blob/1f8fd846d2cc72c90c73c9867619f0da43b9c816/f/chromium-115-compiler-SkColor4f.patch
+diff -up chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
+--- chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me 2023-06-24 10:38:11.011511463 +0200
++++ chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc 2023-06-24 13:07:35.865375884 +0200
+@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
+
+ void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
+ float global_alpha) const {
++ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha};
+ switch (type_) {
+ case kColor:
+ ApplyColorToFlags(flags, global_alpha);
+@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
+ case kGradient:
+ GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
+ ImageDrawOptions());
+- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
++ flags.setColor(custom_color);
+ break;
+ case kImagePattern:
+ GetCanvasPattern()->GetPattern()->ApplyToFlags(
+ flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
+- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
++ flags.setColor(custom_color);
+ break;
+ default:
+ NOTREACHED();
diff --git a/srcpkgs/electron28/files/patches/chromium-117-string-convert.patch b/srcpkgs/electron28/files/patches/chromium-117-string-convert.patch
new file mode 100644
index 0000000000000..cb48e4b21a617
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-117-string-convert.patch
@@ -0,0 +1,21 @@
+diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc
+diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me chromium-117.0.5938.62/net/dns/host_resolver_cache.h
+--- chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me 2023-09-14 15:21:24.632965004 +0200
++++ chromium-117.0.5938.62/net/dns/host_resolver_cache.h 2023-09-15 09:15:48.511300845 +0200
+@@ -143,12 +143,14 @@ class NET_EXPORT HostResolverCache final
+ }
+
+ bool operator()(const Key& lhs, const KeyRef& rhs) const {
++ const std::string rhs_domain_name{rhs.domain_name};
+ return std::tie(lhs.domain_name, lhs.network_anonymization_key) <
+- std::tie(rhs.domain_name, *rhs.network_anonymization_key);
++ std::tie(rhs_domain_name, *rhs.network_anonymization_key);
+ }
+
+ bool operator()(const KeyRef& lhs, const Key& rhs) const {
+- return std::tie(lhs.domain_name, *lhs.network_anonymization_key) <
++ const std::string lhs_domain_name{lhs.domain_name};
++ return std::tie(lhs_domain_name, *lhs.network_anonymization_key) <
+ std::tie(rhs.domain_name, rhs.network_anonymization_key);
+ }
+ };
diff --git a/srcpkgs/electron28/files/patches/chromium-119-assert.patch b/srcpkgs/electron28/files/patches/chromium-119-assert.patch
new file mode 100644
index 0000000000000..6c502f13a5955
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-119-assert.patch
@@ -0,0 +1,12 @@
+diff -up chromium-119.0.6045.59/v8/src/base/small-vector.h.than chromium-119.0.6045.59/v8/src/base/small-vector.h
+--- chromium-119.0.6045.59/v8/src/base/small-vector.h.than 2023-11-01 16:13:12.645301345 +0100
++++ chromium-119.0.6045.59/v8/src/base/small-vector.h 2023-11-01 16:13:29.660610182 +0100
+@@ -22,7 +22,7 @@ template <typename T, size_t kSize, type
+ class SmallVector {
+ // Currently only support trivially copyable and trivially destructible data
+ // types, as it uses memcpy to copy elements and never calls destructors.
+- ASSERT_TRIVIALLY_COPYABLE(T);
++ //ASSERT_TRIVIALLY_COPYABLE(T);
+ static_assert(std::is_trivially_destructible<T>::value);
+
+ public:
diff --git a/srcpkgs/electron28/files/patches/chromium-119-ffmpeg-4.4.patch b/srcpkgs/electron28/files/patches/chromium-119-ffmpeg-4.4.patch
new file mode 100644
index 0000000000000..04d04b166ba37
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-119-ffmpeg-4.4.patch
@@ -0,0 +1,20 @@
+--- a/media/filters/ffmpeg_demuxer.cc.orig
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -390,7 +390,7 @@
+
+ scoped_refptr<DecoderBuffer> buffer;
+
+- size_t side_data_size = 0;
++ int side_data_size = 0;
+ uint8_t* side_data = av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+
+@@ -453,7 +453,7 @@
+ packet->size - data_offset);
+ }
+
+- size_t skip_samples_size = 0;
++ int skip_samples_size = 0;
+ const uint32_t* skip_samples_ptr =
+ reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+ packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
diff --git a/srcpkgs/electron28/files/patches/chromium-119-fix-aarch64-musl.patch b/srcpkgs/electron28/files/patches/chromium-119-fix-aarch64-musl.patch
new file mode 100644
index 0000000000000..cbb2ec14c90fb
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-119-fix-aarch64-musl.patch
@@ -0,0 +1,11 @@
+--- a/v8/src/base/cpu.cc
++++ b/v8/src/base/cpu.cc
+@@ -14,7 +14,7 @@
+ #if V8_OS_LINUX
+ #include <linux/auxvec.h> // AT_HWCAP
+ #endif
+-#if V8_GLIBC_PREREQ(2, 16) || V8_OS_ANDROID
++#if V8_OS_LINUX || V8_OS_ANDROID
+ #include <sys/auxv.h> // getauxval()
+ #endif
+ #if V8_OS_QNX
diff --git a/srcpkgs/electron28/files/patches/chromium-120-arm64-memory_tagging.patch b/srcpkgs/electron28/files/patches/chromium-120-arm64-memory_tagging.patch
new file mode 100644
index 0000000000000..bb461ef3664a2
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-arm64-memory_tagging.patch
@@ -0,0 +1,14 @@
+--- chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.than 2023-11-26 13:50:07.005519877 +0100
++++ chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h 2023-11-26 13:50:49.727267240 +0100
+@@ -152,10 +152,7 @@
+ (!BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \
+ defined(ARCH_CPU_LITTLE_ENDIAN))
+
+-#define PA_CONFIG_HAS_MEMORY_TAGGING() \
+- (defined(ARCH_CPU_ARM64) && defined(__clang__) && \
+- !defined(ADDRESS_SANITIZER) && \
+- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)))
++#define PA_CONFIG_HAS_MEMORY_TAGGING() 0
+
+ #if PA_CONFIG(HAS_MEMORY_TAGGING)
+ static_assert(sizeof(void*) == 8);
diff --git a/srcpkgs/electron28/files/patches/chromium-120-disable-FFmpegAllowLists.patch b/srcpkgs/electron28/files/patches/chromium-120-disable-FFmpegAllowLists.patch
new file mode 100644
index 0000000000000..98216ddb465ca
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-disable-FFmpegAllowLists.patch
@@ -0,0 +1,12 @@
+diff -up chromium-120.0.6099.56/media/base/media_switches.cc.me chromium-120.0.6099.56/media/base/media_switches.cc
+--- chromium-120.0.6099.56/media/base/media_switches.cc.me 2023-12-02 11:43:21.990775897 +0100
++++ chromium-120.0.6099.56/media/base/media_switches.cc 2023-12-02 11:45:23.248006377 +0100
+@@ -1636,7 +1636,7 @@ BASE_FEATURE(kUseSharedImagesForPepperVi
+ // Enables FFmpeg allow lists for supported codecs / containers.
+ BASE_FEATURE(kFFmpegAllowLists,
+ "FFmpegAllowLists",
+- base::FEATURE_ENABLED_BY_DEFAULT);
++ base::FEATURE_DISABLED_BY_DEFAULT);
+
+ #if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
+ // Allows decoding of theora / vp3 content.
diff --git a/srcpkgs/electron28/files/patches/chromium-120-disable-GlobalMediaControlsCastStartStop.patch b/srcpkgs/electron28/files/patches/chromium-120-disable-GlobalMediaControlsCastStartStop.patch
new file mode 100644
index 0000000000000..6a2585b953c3b
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-disable-GlobalMediaControlsCastStartStop.patch
@@ -0,0 +1,14 @@
+--- chromium-120.0.6099.35/chrome/browser/media/router/media_router_feature.cc.orig 2023-11-26 13:25:34.724228755 +0100
++++ chromium-120.0.6099.35/chrome/browser/media/router/media_router_feature.cc 2023-11-26 13:28:26.452359146 +0100
+@@ -71,11 +71,7 @@
+ // TODO(b/202294946): Remove when enabled by default on ChromeOS.
+ BASE_FEATURE(kGlobalMediaControlsCastStartStop,
+ "GlobalMediaControlsCastStartStop",
+-#if BUILDFLAG(IS_CHROMEOS)
+ base::FEATURE_DISABLED_BY_DEFAULT);
+-#else
+- base::FEATURE_ENABLED_BY_DEFAULT);
+-#endif // BUILDFLAG(IS_CHROMEOS)
+ #endif // !BUILDFLAG(IS_ANDROID)
+
+ namespace {
diff --git a/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch
new file mode 100644
index 0000000000000..96258e67aaebb
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch
@@ -0,0 +1,230 @@
+commit 57526b8dc45b2e6c67bba7306f1dde73b1f2910c
+Author: sisidovski <sisidovski@chromium.org>
+Date: Tue Oct 24 09:32:49 2023 +0000
+
+ Remove unused items from the RaceNetworkRequest hashmap
+
+ When the AutoPreload or the race-network-and-fetch-handler option in the
+ static routing API is enabled, network requests are dispatched and
+ URLLoaderFactories are held in a hashmap in ServiceWorkerGlobalScope.
+ Those are consumed inside the fetch handler when fetch(e.request) is
+ called. But if the fetch handler doesn't call fetch() e.g. fallback,
+ those hashmap items does not have a chance to be removed.
+
+ This CL changes the hashmap items to be removed when the fetch event
+ finishes, and the URLLoaderFactory is still not consumed at that time.
+ This may loose the dedupe capability if fetch() is called later e.g.
+ setTimeout(() => fetch()), but it makes sense to prioritize keeping the
+ hashmap small.
+
+ Change-Id: I51bdc9d5eb5185f2b5b4df6ee785715b1180c848
+ Bug: 1492640
+ Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964840
+ Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
+ Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
+ Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
+ Cr-Commit-Position: refs/heads/main@{#1214064}
+
+diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
+index 02887edc10883..b3624fc0162df 100644
+--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
++++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
+@@ -46,6 +46,7 @@
+ #include "services/network/public/cpp/cross_origin_embedder_policy.h"
+ #include "services/network/public/mojom/cookie_manager.mojom-blink.h"
+ #include "services/network/public/mojom/cross_origin_embedder_policy.mojom.h"
++#include "services/network/public/mojom/url_loader_factory.mojom-blink.h"
+ #include "third_party/blink/public/common/features.h"
+ #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
+ #include "third_party/blink/public/mojom/notifications/notification.mojom-blink.h"
+@@ -1096,6 +1097,10 @@ void ServiceWorkerGlobalScope::DidHandleFetchEvent(
+ TRACE_ID_WITH_SCOPE(kServiceWorkerGlobalScopeTraceScope,
+ TRACE_ID_LOCAL(event_id)),
+ TRACE_EVENT_FLAG_FLOW_IN, "status", MojoEnumToString(status));
++
++ // Delete the URLLoaderFactory for the RaceNetworkRequest if it's not used.
++ RemoveItemFromRaceNetworkRequests(event_id);
++
+ if (!RunEventCallback(&fetch_event_callbacks_, event_queue_.get(), event_id,
+ status)) {
+ // The event may have been aborted. Its response callback also needs to be
+@@ -1495,6 +1500,7 @@ void ServiceWorkerGlobalScope::AbortCallbackForFetchEvent(
+ response_callback_iter->value->TakeValue().reset();
+ fetch_response_callbacks_.erase(response_callback_iter);
+ }
++ RemoveItemFromRaceNetworkRequests(event_id);
+
+ // Run the event callback with the error code.
+ auto event_callback_iter = fetch_event_callbacks_.find(event_id);
+@@ -1551,52 +1557,11 @@ void ServiceWorkerGlobalScope::StartFetchEvent(
+
+ if (params->race_network_request_loader_factory &&
+ params->request->service_worker_race_network_request_token) {
+- auto insert_result = race_network_request_loader_factories_.insert(
+- String(params->request->service_worker_race_network_request_token
+- ->ToString()),
+- std::move(params->race_network_request_loader_factory));
+-
+- // DumpWithoutCrashing if the token is empty, or not inserted as a new entry
+- // to |race_network_request_loader_factories_|.
+- // TODO(crbug.com/1492640) Remove DumpWithoutCrashing once we collect data
+- // and identify the cause.
+- static bool has_dumped_without_crashing_for_empty_token = false;
+- static bool has_dumped_without_crashing_for_not_new_entry = false;
+- if (!has_dumped_without_crashing_for_empty_token &&
+- params->request->service_worker_race_network_request_token
+- ->is_empty()) {
+- has_dumped_without_crashing_for_empty_token = true;
+- SCOPED_CRASH_KEY_BOOL(
+- "SWGlobalScope", "empty_race_token",
+- params->request->service_worker_race_network_request_token
+- ->is_empty());
+- SCOPED_CRASH_KEY_STRING64(
+- "SWGlobalScope", "race_token_string",
+- params->request->service_worker_race_network_request_token
+- ->ToString());
+- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
+- insert_result.is_new_entry);
+- SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
+- params->request->url.GetString().Utf8());
+- base::debug::DumpWithoutCrashing();
+- }
+- if (!has_dumped_without_crashing_for_not_new_entry &&
+- !insert_result.is_new_entry) {
+- has_dumped_without_crashing_for_not_new_entry = true;
+- SCOPED_CRASH_KEY_BOOL(
+- "SWGlobalScope", "empty_race_token",
+- params->request->service_worker_race_network_request_token
+- ->is_empty());
+- SCOPED_CRASH_KEY_STRING64(
+- "SWGlobalScope", "race_token_string",
+- params->request->service_worker_race_network_request_token
+- ->ToString());
+- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
+- insert_result.is_new_entry);
+- SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
+- params->request->url.GetString().Utf8());
+- base::debug::DumpWithoutCrashing();
+- }
++ InsertNewItemToRaceNetworkRequests(
++ event_id,
++ params->request->service_worker_race_network_request_token.value(),
++ std::move(params->race_network_request_loader_factory),
++ params->request->url);
+ }
+
+ Request* request = Request::Create(
+@@ -2808,12 +2773,71 @@ bool ServiceWorkerGlobalScope::SetAttributeEventListener(
+ absl::optional<mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>
+ ServiceWorkerGlobalScope::FindRaceNetworkRequestURLLoaderFactory(
+ const base::UnguessableToken& token) {
+- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory> result =
+- race_network_request_loader_factories_.Take(String(token.ToString()));
++ std::unique_ptr<RaceNetworkRequestInfo> result =
++ race_network_requests_.Take(String(token.ToString()));
+ if (result) {
+- return result;
++ race_network_request_fetch_event_ids_.erase(result->fetch_event_id);
++ return absl::optional<
++ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>(
++ std::move(result->url_loader_factory));
+ }
+ return absl::nullopt;
+ }
+
++void ServiceWorkerGlobalScope::InsertNewItemToRaceNetworkRequests(
++ int fetch_event_id,
++ const base::UnguessableToken& token,
++ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
++ url_loader_factory,
++ const KURL& request_url) {
++ auto race_network_request_token = String(token.ToString());
++ auto info = std::make_unique<RaceNetworkRequestInfo>(
++ fetch_event_id, race_network_request_token,
++ std::move(url_loader_factory));
++ race_network_request_fetch_event_ids_.insert(fetch_event_id, info.get());
++ auto insert_result = race_network_requests_.insert(race_network_request_token,
++ std::move(info));
++
++ // DumpWithoutCrashing if the token is empty, or not inserted as a new entry
++ // to |race_network_request_loader_factories_|.
++ // TODO(crbug.com/1492640) Remove DumpWithoutCrashing once we collect data
++ // and identify the cause.
++ static bool has_dumped_without_crashing_for_empty_token = false;
++ static bool has_dumped_without_crashing_for_not_new_entry = false;
++ if (!has_dumped_without_crashing_for_empty_token && token.is_empty()) {
++ has_dumped_without_crashing_for_empty_token = true;
++ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "empty_race_token",
++ token.is_empty());
++ SCOPED_CRASH_KEY_STRING64("SWGlobalScope", "race_token_string",
++ token.ToString());
++ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
++ insert_result.is_new_entry);
++ SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
++ request_url.GetString().Utf8());
++ base::debug::DumpWithoutCrashing();
++ }
++ if (!has_dumped_without_crashing_for_not_new_entry &&
++ !insert_result.is_new_entry) {
++ has_dumped_without_crashing_for_not_new_entry = true;
++ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "empty_race_token",
++ token.is_empty());
++ SCOPED_CRASH_KEY_STRING64("SWGlobalScope", "race_token_string",
++ token.ToString());
++ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
++ insert_result.is_new_entry);
++ SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
++ request_url.GetString().Utf8());
++ base::debug::DumpWithoutCrashing();
++ }
++}
++
++void ServiceWorkerGlobalScope::RemoveItemFromRaceNetworkRequests(
++ int fetch_event_id) {
++ RaceNetworkRequestInfo* info =
++ race_network_request_fetch_event_ids_.Take(fetch_event_id);
++ if (info) {
++ race_network_requests_.erase(info->token);
++ }
++}
++
+ } // namespace blink
+diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h
+index 46c431b395825..ac4cac0b1d8fb 100644
+--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h
++++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h
+@@ -623,6 +623,14 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final
+ // ServiceWorker.FetchEvent.QueuingTime histogram.
+ void RecordQueuingTime(base::TimeTicks created_time);
+
++ void InsertNewItemToRaceNetworkRequests(
++ int fetch_event_id,
++ const base::UnguessableToken& token,
++ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
++ url_loader_factory,
++ const KURL& request_url);
++ void RemoveItemFromRaceNetworkRequests(int fetch_event_id);
++
+ Member<ServiceWorkerClients> clients_;
+ Member<ServiceWorkerRegistration> registration_;
+ Member<::blink::ServiceWorker> service_worker_;
+@@ -768,10 +776,17 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final
+
+ blink::BlinkStorageKey storage_key_;
+
++ struct RaceNetworkRequestInfo {
++ int fetch_event_id;
++ String token;
++ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
++ url_loader_factory;
++ };
+ // TODO(crbug.com/918702) WTF::HashMap cannot use base::UnguessableToken as a
+ // key. As a workaround uses WTF::String as a key instead.
+- HashMap<String, mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>
+- race_network_request_loader_factories_;
++ HashMap<String, std::unique_ptr<RaceNetworkRequestInfo>>
++ race_network_requests_;
++ HashMap<int, RaceNetworkRequestInfo*> race_network_request_fetch_event_ids_;
+
+ HeapMojoAssociatedRemote<mojom::blink::AssociatedInterfaceProvider>
+ remote_associated_interfaces_{this};
diff --git a/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch.args b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch.args
new file mode 100644
index 0000000000000..8bbbbe9483632
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-build-failure.patch.args
@@ -0,0 +1 @@
+-RNp1
diff --git a/srcpkgs/electron28/files/patches/chromium-120-el7-clang-version-warning.patch b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-version-warning.patch
new file mode 100644
index 0000000000000..112da65b4d9b6
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-el7-clang-version-warning.patch
@@ -0,0 +1,16 @@
+diff -up chromium-120.0.6099.56/third_party/libc++/src/include/__config.me chromium-120.0.6099.56/third_party/libc++/src/include/__config
+--- chromium-120.0.6099.56/third_party/libc++/src/include/__config.me 2023-12-03 00:05:51.254483474 +0100
++++ chromium-120.0.6099.56/third_party/libc++/src/include/__config 2023-12-03 00:06:05.872863168 +0100
+@@ -32,11 +32,7 @@
+
+ // Warn if a compiler version is used that is not supported anymore
+ // LLVM RELEASE Update the minimum compiler versions
+-# if defined(_LIBCPP_CLANG_VER)
+-# if _LIBCPP_CLANG_VER < 1500
+-# warning "Libc++ only supports Clang 15 and later"
+-# endif
+-# elif defined(_LIBCPP_APPLE_CLANG_VER)
++# if defined(_LIBCPP_APPLE_CLANG_VER)
+ # if _LIBCPP_APPLE_CLANG_VER < 1500
+ # warning "Libc++ only supports AppleClang 15 and later"
+ # endif
diff --git a/srcpkgs/electron28/files/patches/chromium-120-gn-workaround-atspi.patch b/srcpkgs/electron28/files/patches/chromium-120-gn-workaround-atspi.patch
new file mode 100644
index 0000000000000..72c7b7ec41c28
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-gn-workaround-atspi.patch
@@ -0,0 +1,13 @@
+diff -up chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn.me chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn
+--- chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn.me 2023-11-26 16:14:15.364064126 +0100
++++ chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn 2023-11-26 16:41:16.877321990 +0100
+@@ -21,6 +21,9 @@ if (use_atk) {
+ minor = atspi_version[1]
+ micro = atspi_version[2]
+
++ # gn workaround for the error: Assignment had no effect
++ print("ATSPI Version: $major.$minor.$micro")
++
+ # ATSPI 2.49.90 now defines these for us and it's an error for us to
+ # redefine them on the compiler command line.
+ # See ATSPI 927344a34cd5bf81fc64da4968241735ecb4f03b
--git a/srcpkgs/electron28/files/patches/chromium-120-missing-header-files.patch b/srcpkgs/electron28/files/patches/chromium-120-missing-header-files.patch
new file mode 100644
index 0000000000000..1e7d2692a8f6d
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-missing-header-files.patch
@@ -0,0 +1,448 @@
+diff -up chromium-110.0.5481.177/base/memory/ref_counted.h.me chromium-110.0.5481.177/base/memory/ref_counted.h
+--- chromium-110.0.5481.177/base/memory/ref_counted.h.me 2023-02-23 13:34:33.174817255 -0500
++++ chromium-110.0.5481.177/base/memory/ref_counted.h 2023-02-23 13:42:28.646052469 -0500
+@@ -6,6 +6,7 @@
+ #define BASE_MEMORY_REF_COUNTED_H_
+
+ #include <stddef.h>
++#include <limits>
+
+ #include <utility>
+
+diff -up chromium-109.0.5414.74/base/check_op.h.me chromium-109.0.5414.74/base/check_op.h
+--- chromium-109.0.5414.74/base/check_op.h.me 2023-01-17 17:39:27.620875883 +0100
++++ chromium-109.0.5414.74/base/check_op.h 2023-01-17 17:39:42.546060957 +0100
+@@ -5,6 +5,7 @@
+ #ifndef BASE_CHECK_OP_H_
+ #define BASE_CHECK_OP_H_
+
++#include <cstdint>
+ #include <cstddef>
+ #include <string>
+ #include <type_traits>
+diff -up chromium-109.0.5414.74/base/debug/profiler.h.me chromium-109.0.5414.74/base/debug/profiler.h
+--- chromium-109.0.5414.74/base/debug/profiler.h.me 2023-01-17 16:29:26.368090073 +0100
++++ chromium-109.0.5414.74/base/debug/profiler.h 2023-01-17 16:59:41.190628679 +0100
+@@ -7,6 +7,7 @@
+
+ #include <stddef.h>
+
++#include <cstdint>
+ #include <string>
+
+ #include "base/base_export.h"
+diff -up chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me chromium-109.0.5414.74/gpu/config/gpu_feature_info.h
+--- chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me 2023-01-17 19:06:53.530675129 +0100
++++ chromium-109.0.5414.74/gpu/config/gpu_feature_info.h 2023-01-17 19:07:08.874849879 +0100
+@@ -5,6 +5,7 @@
+ #ifndef GPU_CONFIG_GPU_FEATURE_INFO_H_
+ #define GPU_CONFIG_GPU_FEATURE_INFO_H_
+
++#include <cstdint>
+ #include <string>
+ #include <vector>
+
+diff -up chromium-109.0.5414.74/net/base/net_export.h.me chromium-109.0.5414.74/net/base/net_export.h
+--- chromium-109.0.5414.74/net/base/net_export.h.me 2023-01-17 18:16:34.133854615 +0100
++++ chromium-109.0.5414.74/net/base/net_export.h 2023-01-17 18:16:15.945623153 +0100
+@@ -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.
+diff -up chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h
+--- chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me 2023-01-17 17:12:34.184686515 +0100
++++ chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h 2023-01-17 17:13:16.537162420 +0100
+@@ -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 <string>
+
+diff -up chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h
+--- chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me 2023-01-17 17:33:20.895717307 +0100
++++ chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h 2023-01-17 17:34:03.456185365 +0100
+@@ -27,6 +27,7 @@
+ #ifndef ABSL_STRINGS_STRING_VIEW_H_
+ #define ABSL_STRINGS_STRING_VIEW_H_
+
++#include <cstdint>
+ #include <algorithm>
+ #include <cassert>
+ #include <cstddef>
+diff -up chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h
+--- chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me 2023-01-17 17:36:15.017616250 +0100
++++ chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h 2023-01-17 17:36:48.960982195 +0100
+@@ -10,6 +10,7 @@
+ #ifndef GLSLANG_SHADERVARS_H_
+ #define GLSLANG_SHADERVARS_H_
+
++#include <cstdint>
+ #include <algorithm>
+ #include <array>
+ #include <string>
+diff -up chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h
+--- chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me 2023-01-17 19:17:40.480876171 +0100
++++ chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h 2023-01-17 19:17:46.803958320 +0100
+@@ -5,6 +5,7 @@
+ #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
+ #define THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
+
++#include <cstdint>
+ #include <array>
+ #include <string>
+
+diff -up chromium-117.0.5938.48/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.me chromium-117.0.5938.48/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
+--- chromium-117.0.5938.48/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.me 2023-01-17 18:02:44.681538107 +0100
++++ chromium-117.0.5938.48/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h 2023-01-17 18:02:57.208679140 +0100
+@@ -15,6 +15,7 @@
+ #ifndef SRC_TINT_READER_SPIRV_NAMER_H_
+ #define SRC_TINT_READER_SPIRV_NAMER_H_
+
++#include <cstdint>
+ #include <string>
+ #include <unordered_map>
+ #include <vector>
+diff -up chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h
+--- chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me 2023-01-18 15:22:38.472940648 +0100
++++ chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h 2023-01-18 15:23:09.380255101 +0100
+@@ -5,6 +5,7 @@
+ #ifndef DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
+ #define DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
+
++#include <cstdint>
+ #include <functional>
+ #include <map>
+ #include <set>
+diff -up chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp
+--- chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me 2023-01-17 15:37:48.530626516 +0100
++++ chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp 2023-01-17 16:57:46.025548092 +0100
+@@ -17,6 +17,7 @@
+
+ #include "System/Debug.hpp"
+
++#include <cstdint>
+ #include <cstddef>
+ #include <functional>
+ #include <unordered_set>
+diff -up chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h
+--- chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me 2023-01-17 18:08:25.745491353 +0100
++++ chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h 2023-01-17 18:08:35.777667632 +0100
+@@ -5,6 +5,7 @@
+ #ifndef UI_GFX_LINEAR_GRADIENT_H_
+ #define UI_GFX_LINEAR_GRADIENT_H_
+
++#include <cstdint>
+ #include <array>
+ #include <string>
+
+diff -up chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h
+--- chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me 2023-01-19 10:10:21.287876736 +0100
++++ chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h 2023-01-19 10:11:21.714778896 +0100
+@@ -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>
+diff -up chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
+--- chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me 2023-01-19 10:30:27.533861985 +0100
++++ chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2023-01-19 10:31:12.585554183 +0100
+@@ -31,6 +31,7 @@ limitations under the License.
+ #ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
+ #define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
+
++#include <cstdint>
+ #include <complex>
+ #include <deque>
+ #include <vector>
+diff -up chromium-109.0.5414.74/base/containers/flat_map.h.mee chromium-109.0.5414.74/base/containers/flat_map.h
+--- chromium-109.0.5414.74/base/containers/flat_map.h.mee 2023-01-19 10:59:52.214957773 +0100
++++ chromium-109.0.5414.74/base/containers/flat_map.h 2023-01-19 11:00:06.415215309 +0100
+@@ -5,6 +5,7 @@
+ #ifndef BASE_CONTAINERS_FLAT_MAP_H_
+ #define BASE_CONTAINERS_FLAT_MAP_H_
+
++#include <cstdint>
+ #include <functional>
+ #include <tuple>
+ #include <utility>
+diff -up chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h
+--- chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee 2023-01-19 11:45:15.953159755 +0100
++++ chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h 2023-01-19 11:45:22.320246241 +0100
+@@ -5,6 +5,8 @@
+ #ifndef UI_BASE_PREDICTION_KALMAN_FILTER_H_
+ #define UI_BASE_PREDICTION_KALMAN_FILTER_H_
+
++#include <cstdint>
++
+ #include "base/component_export.h"
+ #include "ui/gfx/geometry/matrix3_f.h"
+
+diff -up chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h
+--- chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me 2023-01-19 15:20:07.620987949 +0100
++++ chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h 2023-01-19 15:20:18.324173702 +0100
+@@ -5,6 +5,7 @@
+ #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
+ #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
+
++#include <cstdint>
+ #include <string>
+
+
+diff -up chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h
+--- chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me 2023-01-19 16:00:14.350186515 +0100
++++ chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h 2023-01-19 16:00:21.643307993 +0100
+@@ -5,6 +5,7 @@
+ #ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
+ #define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
+
++#include <cstdint>
+ #include <string>
+
+ namespace feature_engagement {
+diff -up chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h
+--- chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me 2023-01-19 15:59:18.210239416 +0100
++++ chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h 2023-01-19 15:59:34.513515030 +0100
+@@ -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"
+diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
+--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me 2023-01-19 16:09:29.216477182 +0100
++++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2023-01-19 16:10:05.657089208 +0100
+@@ -45,6 +45,7 @@
+ #include "llvm/Support/SaveAndRestore.h"
+ #include "llvm/Support/raw_ostream.h"
+ #include <algorithm>
++#include <cstdint>
+ #include <string>
+ #include <sysexits.h>
+ #ifdef HAVE_BACKTRACE
+diff -up chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h
+--- chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me 2023-01-19 16:32:05.338160131 +0100
++++ chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h 2023-01-19 16:32:16.213326798 +0100
+@@ -5,6 +5,7 @@
+ #ifndef CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
+ #define CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
+
++#include <cstdint>
+ #include <map>
+
+ #include "base/containers/flat_set.h"
+diff -up chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h
+--- chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me 2023-01-19 16:47:55.548571102 +0100
++++ chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h 2023-01-19 16:48:29.214146529 +0100
+@@ -5,6 +5,7 @@
+ #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
+ #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
+
++#include <cstdint>
+ #include <string>
+
+ class GURL;
+diff -up chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h
+--- chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me 2023-01-19 16:57:29.525372814 +0100
++++ chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h 2023-01-19 16:58:02.667979288 +0100
+@@ -5,6 +5,7 @@
+ #ifndef COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
+ #define COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
+
++#include <cstdint>
+ #include <string>
+ #include <utility>
+ #include <vector>
+diff -up chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h
+--- chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me 2023-01-19 17:02:45.258544665 +0100
++++ chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h 2023-01-19 17:02:52.577611757 +0100
+@@ -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 <string>
+diff -up chromium-109.0.5414.74/pdf/document_attachment_info.h.me chromium-109.0.5414.74/pdf/document_attachment_info.h
+--- chromium-109.0.5414.74/pdf/document_attachment_info.h.me 2023-01-19 17:28:28.552063534 +0100
++++ chromium-109.0.5414.74/pdf/document_attachment_info.h 2023-01-19 17:28:48.072379953 +0100
+@@ -5,6 +5,7 @@
+ #ifndef PDF_DOCUMENT_ATTACHMENT_INFO_H_
+ #define PDF_DOCUMENT_ATTACHMENT_INFO_H_
+
++#include <cstdint>
+ #include <string>
+
+
+diff -up chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h
+--- chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me 2023-01-19 18:25:47.648193710 +0100
++++ chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h 2023-01-19 18:26:11.488593556 +0100
+@@ -5,6 +5,8 @@
+ #ifndef CONSTANTS_ANNOTATION_FLAGS_H_
+ #define CONSTANTS_ANNOTATION_FLAGS_H_
+
++#include <cstdint>
++
+ namespace pdfium {
+ namespace annotation_flags {
+
+diff -up chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
+--- chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me 2023-04-15 16:44:55.344305412 +0200
++++ chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2023-04-15 16:47:09.028666995 +0200
+@@ -2854,6 +2854,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));
+diff -up chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h
+--- chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me 2023-04-18 15:55:44.774916319 +0200
++++ chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h 2023-04-18 15:55:54.441085882 +0200
+@@ -8,6 +8,7 @@
+ #include <memory>
+ #include <string>
+ #include <vector>
++#include <variant>
+
+ #include "base/containers/span.h"
+ #include "base/functional/callback_forward.h"
+diff -up chromium-113.0.5672.37/gin/time_clamper.h.me chromium-113.0.5672.37/gin/time_clamper.h
+--- chromium-113.0.5672.37/gin/time_clamper.h.me 2023-04-18 16:38:41.180437467 +0200
++++ chromium-113.0.5672.37/gin/time_clamper.h 2023-04-18 16:39:43.857049432 +0200
+@@ -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;
+diff -up chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc
+--- chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me 2023-04-21 08:07:55.362714544 +0200
++++ chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc 2023-04-21 08:14:35.424158693 +0200
+@@ -10,6 +10,7 @@
+ #include <queue>
+ #include <utility>
+ #include <vector>
++#include <cstring>
+
+ #include "base/check.h"
+ #include "base/files/file_path.h"
+diff -up chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc
+--- chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me 2023-06-18 12:33:52.387412788 +0200
++++ chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc 2023-06-18 12:35:28.229148935 +0200
+@@ -3,6 +3,7 @@
+ // found in the LICENSE file.
+
+ #include "skia/ext/skcolorspace_trfn.h"
++#include <cmath>
+
+ namespace skia {
+
+diff -up chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h
+--- chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint 2021-11-19 17:05:31.379750350 -0500
++++ chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h 2021-11-19 17:07:35.191520127 -0500
+@@ -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"
+
+diff -up chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h
+--- chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint 2021-11-12 05:28:10.000000000 -0500
++++ chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h 2021-11-19 17:05:31.379750350 -0500
+@@ -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"
+diff -up chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h
+--- chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint 2021-11-12 05:25:24.000000000 -0500
++++ chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h 2021-11-19 17:05:31.379750350 -0500
+@@ -9,6 +9,8 @@
+
+ #include "ui/gfx/buffer_types.h"
+
++#include <cstdint>
++
+ namespace ui {
+
+ int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
+diff -up chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc
+--- chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring 2021-11-12 05:28:09.000000000 -0500
++++ chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc 2021-11-19 17:10:02.927438695 -0500
+@@ -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"
+diff -up chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc
+--- chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring 2021-11-12 05:28:10.000000000 -0500
++++ chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2021-11-19 17:10:02.928438701 -0500
+@@ -10,6 +10,7 @@
+
+ #include "modules/video_coding/utility/ivf_file_reader.h"
+
++#include <cstring>
+ #include <string>
+ #include <vector>
+
+diff -up chromium-117.0.5938.48/third_party/ipcz/src/ipcz/router_link.h.me chromium-117.0.5938.48/third_party/ipcz/src/ipcz/router_link.h
+--- chromium-117.0.5938.48/third_party/ipcz/src/ipcz/router_link.h.me 2023-09-10 17:53:04.826298351 +0200
++++ chromium-117.0.5938.48/third_party/ipcz/src/ipcz/router_link.h 2023-09-10 17:53:22.201756894 +0200
+@@ -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 <string>
+diff -up chromium-117.0.5938.48/third_party/material_color_utilities/src/cpp/palettes/tones.cc.me chromium-117.0.5938.48/third_party/material_color_utilities/src/cpp/palettes/tones.cc
+--- chromium-117.0.5938.48/third_party/material_color_utilities/src/cpp/palettes/tones.cc.me 2023-09-10 17:36:27.199841051 +0200
++++ chromium-117.0.5938.48/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2023-09-10 17:44:51.870554233 +0200
+@@ -14,6 +14,7 @@
+ * limitations under the License.
+ */
+
++#include <cmath>
+ #include "cpp/palettes/tones.h"
+
+ #include "cpp/cam/cam.h"
+diff -up chromium-118.0.5993.32/services/device/public/cpp/generic_sensor/sensor_reading.h.me chromium-118.0.5993.32/services/device/public/cpp/generic_sensor/sensor_reading.h
+--- chromium-118.0.5993.32/services/device/public/cpp/generic_sensor/sensor_reading.h.me 2023-10-01 13:55:01.913193186 +0200
++++ chromium-118.0.5993.32/services/device/public/cpp/generic_sensor/sensor_reading.h 2023-10-01 14:05:38.488038429 +0200
+@@ -5,6 +5,9 @@
+ #ifndef SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_
+ #define SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_
+
++#include <cstddef>
++#include <cstdint>
++
+ #include <type_traits>
+
+ namespace device {
diff --git a/srcpkgs/electron28/files/patches/chromium-120-no_matching_constructor.patch b/srcpkgs/electron28/files/patches/chromium-120-no_matching_constructor.patch
new file mode 100644
index 0000000000000..b1d987adeff8d
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-no_matching_constructor.patch
@@ -0,0 +1,742 @@
+diff -up chromium-120.0.6099.56/base/metrics/persistent_histogram_allocator.cc.no_matching_constructor chromium-120.0.6099.56/base/metrics/persistent_histogram_allocator.cc
+--- chromium-120.0.6099.56/base/metrics/persistent_histogram_allocator.cc.no_matching_constructor 2023-11-29 22:39:40.000000000 +0100
++++ chromium-120.0.6099.56/base/metrics/persistent_histogram_allocator.cc 2023-12-03 17:31:25.748420189 +0100
+@@ -218,13 +218,13 @@ PersistentSparseHistogramDataManager::Lo
+ // The sample-record could be for any sparse histogram. Add the reference
+ // to the appropriate collection for later use.
+ if (found_id == match_id) {
+- found_records.emplace_back(ref, value);
++ found_records.emplace_back() = {ref, value};
+ found = true;
+ } else {
+ std::vector<ReferenceAndSample>* samples =
+ GetSampleMapRecordsWhileLocked(found_id);
+ CHECK(samples);
+- samples->emplace_back(ref, value);
++ samples->emplace_back() = {ref, value};
+ }
+ }
+
+diff -up chromium-120.0.6099.56/base/trace_event/trace_log.cc.no_matching_constructor chromium-120.0.6099.56/base/trace_event/trace_log.cc
+--- chromium-120.0.6099.56/base/trace_event/trace_log.cc.no_matching_constructor 2023-11-29 22:39:40.000000000 +0100
++++ chromium-120.0.6099.56/base/trace_event/trace_log.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -2191,8 +2191,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&) {
+diff -up chromium-120.0.6099.56/chrome/browser/content_settings/one_time_permission_provider.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/content_settings/one_time_permission_provider.cc
+--- chromium-120.0.6099.56/chrome/browser/content_settings/one_time_permission_provider.cc.no_matching_constructor 2023-11-29 22:39:47.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/content_settings/one_time_permission_provider.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -226,8 +226,8 @@ void OneTimePermissionProvider::OnSuspen
+
+ while (rule_iterator && rule_iterator->HasNext()) {
+ auto rule = rule_iterator->Next();
+- patterns_to_delete.emplace_back(setting_type, rule->primary_pattern,
+- rule->secondary_pattern);
++ patterns_to_delete.emplace_back() = {setting_type, rule->primary_pattern,
++ rule->secondary_pattern};
+ permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
+ setting_type,
+ permissions::OneTimePermissionEvent::EXPIRED_ON_SUSPEND);
+@@ -329,8 +329,8 @@ void OneTimePermissionProvider::DeleteEn
+ auto rule = rule_iterator->Next();
+ if (rule->primary_pattern.Matches(origin_gurl) &&
+ rule->secondary_pattern.Matches(origin_gurl)) {
+- patterns_to_delete.emplace_back(
+- content_setting_type, rule->primary_pattern, rule->secondary_pattern);
++ patterns_to_delete.emplace_back() = {
++ content_setting_type, rule->primary_pattern, rule->secondary_pattern};
+ permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
+ content_setting_type, trigger_event);
+ }
+diff -up chromium-120.0.6099.56/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc
+--- chromium-120.0.6099.56/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.no_matching_constructor 2023-11-29 22:39:48.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -67,8 +67,8 @@ base::flat_map<std::string, SAMLProfileA
+ // TODO(crbug.com/1445072): Add actual domains with attribute names.
+ profile_attributes->insert(std::make_pair(
+ "supported.test",
+- SAMLProfileAttributes("placeholderName", "placeholderDomain",
+- "placeholderToken")));
++ SAMLProfileAttributes{"placeholderName", "placeholderDomain",
++ "placeholderToken"}));
+
+ // Extract domains and attributes from the command line switch.
+ const base::CommandLine& command_line =
+diff -up chromium-120.0.6099.56/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.no_matching_constructor 2023-11-29 22:39:52.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/omnibox/chrome_omnibox_client.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -474,10 +474,10 @@ void ChromeOmniboxClient::OnAutocomplete
+ alternative_nav_match);
+
+ // Store the details necessary to open the omnibox match via browser commands.
+- location_bar_->set_navigation_params(LocationBar::NavigationParams(
++ location_bar_->set_navigation_params(LocationBar::NavigationParams{
+ destination_url, disposition, transition, match_selection_timestamp,
+ destination_url_entered_without_scheme,
+- destination_url_entered_with_http_scheme));
++ destination_url_entered_with_http_scheme});
+
+ if (browser_) {
+ auto navigation = chrome::OpenCurrentURL(browser_);
+diff -up chromium-120.0.6099.56/chrome/browser/ui/safety_hub/menu_notification_service.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/safety_hub/menu_notification_service.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/safety_hub/menu_notification_service.cc.no_matching_constructor 2023-11-29 22:39:52.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/safety_hub/menu_notification_service.cc 2023-12-03 17:31:25.756420342 +0100
+@@ -148,8 +148,8 @@ SafetyHubMenuNotificationService::GetNot
+ // The information related to showing the notification needs to be persisted
+ // as well.
+ SaveNotificationsToPrefs();
+- return MenuNotificationEntry(notification_to_show->GetNotificationCommandId(),
+- notification_to_show->GetNotificationString());
++ return MenuNotificationEntry{notification_to_show->GetNotificationCommandId(),
++ notification_to_show->GetNotificationString()};
+ }
+
+ absl::optional<ResultMap>
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc 2023-12-03 17:31:25.749420208 +0100
+@@ -55,12 +55,12 @@ std::vector<EmbeddedPermissionPromptAskV
+ EmbeddedPermissionPromptAskView::GetButtonsConfiguration() const {
+ std::vector<ButtonConfiguration> buttons;
+ if (base::FeatureList::IsEnabled(permissions::features::kOneTimePermission)) {
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW_THIS_TIME),
+- ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal);
++ ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal};
+ }
+- buttons.emplace_back(l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW),
+- ButtonType::kAllow, ui::ButtonStyle::kTonal);
++ buttons.emplace_back() = {l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW),
++ ButtonType::kAllow, ui::ButtonStyle::kTonal};
+ return buttons;
+ }
+
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h 2023-12-03 17:31:25.750420227 +0100
+@@ -86,6 +86,7 @@ class EmbeddedPermissionPromptBaseView :
+ struct RequestLineConfiguration {
+ const raw_ptr<const gfx::VectorIcon> icon;
+ std::u16string message;
++ RequestLineConfiguration(auto i, auto m) : icon(i), message(m) { }
+ };
+
+ struct ButtonConfiguration {
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc 2023-12-03 17:31:25.750420227 +0100
+@@ -48,8 +48,8 @@ EmbeddedPermissionPromptPolicyView::GetR
+ std::vector<EmbeddedPermissionPromptPolicyView::ButtonConfiguration>
+ EmbeddedPermissionPromptPolicyView::GetButtonsConfiguration() const {
+ std::vector<ButtonConfiguration> buttons;
+- buttons.emplace_back(l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_OK_LABEL),
+- ButtonType::kPolicyOK, ui::ButtonStyle::kTonal);
++ buttons.emplace_back() = {l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_OK_LABEL),
++ ButtonType::kPolicyOK, ui::ButtonStyle::kTonal};
+ return buttons;
+ }
+
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_denied_view.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_denied_view.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_denied_view.cc.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_denied_view.cc 2023-12-03 17:31:25.756420342 +0100
+@@ -63,18 +63,18 @@ EmbeddedPermissionPromptPreviouslyDenied
+ std::vector<EmbeddedPermissionPromptPreviouslyDeniedView::ButtonConfiguration>
+ EmbeddedPermissionPromptPreviouslyDeniedView::GetButtonsConfiguration() const {
+ std::vector<ButtonConfiguration> buttons;
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_CONTINUE_NOT_ALLOWING),
+- ButtonType::kContinueNotAllowing, ui::ButtonStyle::kTonal);
++ ButtonType::kContinueNotAllowing, ui::ButtonStyle::kTonal};
+
+ if (base::FeatureList::IsEnabled(permissions::features::kOneTimePermission)) {
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW_THIS_TIME),
+- ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal);
++ ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal};
+ } else {
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW_THIS_TIME),
+- ButtonType::kAllow, ui::ButtonStyle::kTonal);
++ ButtonType::kAllow, ui::ButtonStyle::kTonal};
+ }
+ return buttons;
+ }
+diff -up chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc.no_matching_constructor chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc
+--- chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc.no_matching_constructor 2023-11-29 22:39:53.000000000 +0100
++++ chromium-120.0.6099.56/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc 2023-12-03 17:31:25.750420227 +0100
+@@ -57,13 +57,13 @@ EmbeddedPermissionPromptPreviouslyGrante
+ std::vector<EmbeddedPermissionPromptPreviouslyGrantedView::ButtonConfiguration>
+ EmbeddedPermissionPromptPreviouslyGrantedView::GetButtonsConfiguration() const {
+ std::vector<ButtonConfiguration> buttons;
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_CONTINUE_ALLOWING),
+- ButtonType::kContinueAllowing, ui::ButtonStyle::kTonal);
++ ButtonType::kContinueAllowing, ui::ButtonStyle::kTonal};
+
+- buttons.emplace_back(
++ buttons.emplace_back() = {
+ l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_STOP_ALLOWING),
+- ButtonType::kStopAllowing, ui::ButtonStyle::kTonal);
++ ButtonType::kStopAllowing, ui::ButtonStyle::kTonal};
+ return buttons;
+ }
+
+diff -up chromium-120.0.6099.56/chrome/test/chromedriver/capabilities.cc.no_matching_constructor chromium-120.0.6099.56/chrome/test/chromedriver/capabilities.cc
+--- chromium-120.0.6099.56/chrome/test/chromedriver/capabilities.cc.no_matching_constructor 2023-11-29 22:39:54.000000000 +0100
++++ chromium-120.0.6099.56/chrome/test/chromedriver/capabilities.cc 2023-12-03 17:31:25.750420227 +0100
+@@ -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);
+diff -up chromium-120.0.6099.56/components/autofill/core/browser/contact_info_sync_util.cc.no_matching_constructor chromium-120.0.6099.56/components/autofill/core/browser/contact_info_sync_util.cc
+--- chromium-120.0.6099.56/components/autofill/core/browser/contact_info_sync_util.cc.no_matching_constructor 2023-11-29 22:39:57.000000000 +0100
++++ chromium-120.0.6099.56/components/autofill/core/browser/contact_info_sync_util.cc 2023-12-03 17:31:25.750420227 +0100
+@@ -197,9 +197,9 @@ class ContactInfoProfileSetter {
+ CHECK(observations.empty());
+ for (const sync_pb::ContactInfoSpecifics::Observation& proto_observation :
+ metadata.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())};
+ }
+ }
+ }
+diff -up chromium-120.0.6099.56/components/autofill/core/browser/webdata/autofill_table.cc.no_matching_constructor chromium-120.0.6099.56/components/autofill/core/browser/webdata/autofill_table.cc
+--- chromium-120.0.6099.56/components/autofill/core/browser/webdata/autofill_table.cc.no_matching_constructor 2023-11-29 22:39:57.000000000 +0100
++++ chromium-120.0.6099.56/components/autofill/core/browser/webdata/autofill_table.cc 2023-12-03 17:31:25.751420246 +0100
+@@ -1763,10 +1763,10 @@ std::unique_ptr<AutofillProfile> Autofil
+ }
+
+ base::span<const uint8_t> observations_data = s.ColumnBlob(3);
+- field_type_values.emplace_back(
++ field_type_values.emplace_back() = {
+ type, s.ColumnString16(1), s.ColumnInt(2),
+ std::vector<uint8_t>(observations_data.begin(),
+- observations_data.end()));
++ observations_data.end())};
+
+ if (type == ADDRESS_HOME_COUNTRY) {
+ country_code = base::UTF16ToUTF8(s.ColumnString16(1));
+diff -up chromium-120.0.6099.56/components/password_manager/core/browser/password_manager.cc.no_matching_constructor chromium-120.0.6099.56/components/password_manager/core/browser/password_manager.cc
+--- chromium-120.0.6099.56/components/password_manager/core/browser/password_manager.cc.no_matching_constructor 2023-11-29 22:39:58.000000000 +0100
++++ chromium-120.0.6099.56/components/password_manager/core/browser/password_manager.cc 2023-12-03 17:31:25.751420246 +0100
+@@ -630,7 +630,7 @@ void PasswordManager::OnUserModifiedNonP
+ // |driver| might be empty on iOS or in tests.
+ int driver_id = driver ? driver->GetId() : 0;
+ possible_usernames_.Put(
+- PossibleUsernameFieldIdentifier(driver_id, renderer_id),
++ PossibleUsernameFieldIdentifier{driver_id, renderer_id},
+ PossibleUsernameData(GetSignonRealm(driver->GetLastCommittedURL()),
+ renderer_id, value, base::Time::Now(), driver_id,
+ autocomplete_attribute_has_username, is_likely_otp));
+diff -up chromium-120.0.6099.56/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.no_matching_constructor chromium-120.0.6099.56/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
+--- chromium-120.0.6099.56/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.no_matching_constructor 2023-11-29 22:40:01.000000000 +0100
++++ chromium-120.0.6099.56/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc 2023-12-03 17:31:25.751420246 +0100
+@@ -1567,7 +1567,7 @@ void SkiaOutputSurfaceImplOnGpu::CopyOut
+
+ // Issue readbacks from the surfaces:
+ for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) {
+- SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height());
++ SkISize size{plane_surfaces[i]->width(), plane_surfaces[i]->height()};
+ SkImageInfo dst_info = SkImageInfo::Make(
+ size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType,
+ kUnpremul_SkAlphaType);
+diff -up chromium-120.0.6099.56/content/browser/download/save_package.cc.no_matching_constructor chromium-120.0.6099.56/content/browser/download/save_package.cc
+--- chromium-120.0.6099.56/content/browser/download/save_package.cc.no_matching_constructor 2023-11-29 22:40:01.000000000 +0100
++++ chromium-120.0.6099.56/content/browser/download/save_package.cc 2023-12-03 17:31:25.752420265 +0100
+@@ -767,8 +767,8 @@ void SavePackage::Finish() {
+ if (download_) {
+ std::vector<download::DownloadSaveItemData::ItemInfo> files;
+ for (auto& item : saved_success_items_) {
+- files.emplace_back(item.second->full_path(), item.second->url(),
+- item.second->referrer().url);
++ files.emplace_back() = {item.second->full_path(), item.second->url(),
++ item.second->referrer().url};
+ }
+ download::DownloadSaveItemData::AttachItemData(download_, std::move(files));
+ }
+diff -up chromium-120.0.6099.56/content/browser/interest_group/interest_group_storage.cc.no_matching_constructor chromium-120.0.6099.56/content/browser/interest_group/interest_group_storage.cc
+--- chromium-120.0.6099.56/content/browser/interest_group/interest_group_storage.cc.no_matching_constructor 2023-11-29 22:40:01.000000000 +0100
++++ chromium-120.0.6099.56/content/browser/interest_group/interest_group_storage.cc 2023-12-03 17:31:25.752420265 +0100
+@@ -3002,10 +3002,10 @@ DoGetKAnonymityData(sql::Database& db,
+
+ std::vector<StorageInterestGroup::KAnonymityData> k_anon_data;
+ while (interest_group_kanon_query.Step()) {
+- k_anon_data.emplace_back(
++ k_anon_data.emplace_back() = {
+ /*key=*/interest_group_kanon_query.ColumnString(0),
+ /*is_k_anonymous=*/interest_group_kanon_query.ColumnBool(1),
+- /*last_updated=*/interest_group_kanon_query.ColumnTime(2));
++ /*last_updated=*/interest_group_kanon_query.ColumnTime(2)};
+ }
+ if (!interest_group_kanon_query.Succeeded()) {
+ return absl::nullopt;
+diff -up chromium-120.0.6099.56/content/browser/renderer_host/render_frame_host_impl.cc.no_matching_constructor chromium-120.0.6099.56/content/browser/renderer_host/render_frame_host_impl.cc
+--- chromium-120.0.6099.56/content/browser/renderer_host/render_frame_host_impl.cc.no_matching_constructor 2023-11-29 22:40:01.000000000 +0100
++++ chromium-120.0.6099.56/content/browser/renderer_host/render_frame_host_impl.cc 2023-12-03 20:49:28.059042672 +0100
+@@ -8685,7 +8685,7 @@ void RenderFrameHostImpl::SendFencedFram
+ for (const blink::FencedFrame::ReportingDestination& destination :
+ destinations) {
+ SendFencedFrameReportingBeaconInternal(
+- DestinationEnumEvent(event_type, event_data), destination,
++ DestinationEnumEvent{event_type, event_data}, destination,
+ /*from_renderer=*/true, attribution_reporting_runtime_features);
+ }
+ }
+@@ -8720,7 +8720,7 @@ void RenderFrameHostImpl::SendFencedFram
+ }
+
+ SendFencedFrameReportingBeaconInternal(
+- DestinationURLEvent(destination_url),
++ DestinationURLEvent{destination_url},
+ blink::FencedFrame::ReportingDestination::kBuyer,
+ /*from_renderer=*/true, attribution_reporting_runtime_features);
+ }
+@@ -8820,7 +8820,7 @@ void RenderFrameHostImpl::MaybeSendFence
+ data = info->data;
+ }
+ initiator_rfh->SendFencedFrameReportingBeaconInternal(
+- AutomaticBeaconEvent(event_type, data), destination,
++ AutomaticBeaconEvent{event_type, data}, destination,
+ /*from_renderer=*/false, attribution_reporting_features,
+ navigation_request.GetNavigationId());
+ }
+@@ -8832,7 +8832,7 @@ void RenderFrameHostImpl::MaybeSendFence
+ for (blink::FencedFrame::ReportingDestination destination :
+ info->destinations) {
+ initiator_rfh->SendFencedFrameReportingBeaconInternal(
+- AutomaticBeaconEvent(event_type, info->data), destination,
++ AutomaticBeaconEvent{event_type, info->data}, destination,
+ /*from_renderer=*/false, info->attribution_reporting_runtime_features,
+ navigation_request.GetNavigationId());
+ }
+diff -up chromium-120.0.6099.56/net/dns/host_resolver_cache.cc.no_matching_constructor chromium-120.0.6099.56/net/dns/host_resolver_cache.cc
+--- chromium-120.0.6099.56/net/dns/host_resolver_cache.cc.no_matching_constructor 2023-11-29 22:40:07.000000000 +0100
++++ chromium-120.0.6099.56/net/dns/host_resolver_cache.cc 2023-12-03 17:31:25.754420303 +0100
+@@ -368,7 +368,7 @@ void HostResolverCache::Set(
+
+ std::string domain_name = result->domain_name();
+ entries_.emplace(
+- Key(std::move(domain_name), network_anonymization_key),
++ Key{std::move(domain_name), network_anonymization_key},
+ Entry(std::move(result), source, secure, staleness_generation));
+
+ if (entries_.size() > max_entries_) {
+diff -up chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/font_palette.h.no_matching_constructor chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/font_palette.h
+--- chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/font_palette.h.no_matching_constructor 2023-11-29 22:40:12.000000000 +0100
++++ chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/font_palette.h 2023-12-03 17:31:25.754420303 +0100
+@@ -96,7 +96,7 @@ class PLATFORM_EXPORT FontPalette : publ
+ Color::ColorSpace color_interpolation_space,
+ absl::optional<Color::HueInterpolationMethod> hue_interpolation_method) {
+ return base::AdoptRef(new FontPalette(
+- start, end, NonNormalizedPercentages(start_percentage, end_percentage),
++ start, end, NonNormalizedPercentages{start_percentage, end_percentage},
+ normalized_percentage, alpha_multiplier, color_interpolation_space,
+ hue_interpolation_method));
+ }
+@@ -170,7 +170,7 @@ class PLATFORM_EXPORT FontPalette : publ
+ double normalized_percentage) {
+ double end_percentage = normalized_percentage * 100.0;
+ double start_percentage = 100.0 - end_percentage;
+- return NonNormalizedPercentages(start_percentage, end_percentage);
++ return NonNormalizedPercentages{start_percentage, end_percentage};
+ }
+
+ double GetAlphaMultiplier() const {
+diff -up chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.no_matching_constructor chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/palette_interpolation.cc
+--- chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.no_matching_constructor 2023-11-29 22:40:12.000000000 +0100
++++ chromium-120.0.6099.56/third_party/blink/renderer/platform/fonts/palette_interpolation.cc 2023-12-03 17:31:25.755420323 +0100
+@@ -31,7 +31,7 @@ Vector<FontPalette::FontPaletteOverride>
+ color_interpolation_space, hue_interpolation_method, start_color,
+ end_color, percentage, alpha_multiplier);
+
+- FontPalette::FontPaletteOverride result_color_record(i, result_color);
++ FontPalette::FontPaletteOverride result_color_record{static_cast<int>(i), result_color};
+ result_color_records.push_back(result_color_record);
+ }
+ return result_color_records;
+diff -up chromium-120.0.6099.56/third_party/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp.no_matching_constructor chromium-120.0.6099.56/third_party/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp
+--- chromium-120.0.6099.56/third_party/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp.no_matching_constructor 2023-11-29 22:41:46.000000000 +0100
++++ chromium-120.0.6099.56/third_party/pdfium/core/fpdfapi/render/cpdf_renderstatus.cpp 2023-12-03 17:31:25.756420342 +0100
+@@ -491,7 +491,7 @@ void CPDF_RenderStatus::ProcessClipPath(
+ } else {
+ m_pDevice->SetClip_PathFill(
+ *pPath, &mtObj2Device,
+- CFX_FillRenderOptions(ClipPath.GetClipType(i)));
++ CFX_FillRenderOptions{ClipPath.GetClipType(i)});
+ }
+ }
+
+diff -up chromium-120.0.6099.56/ui/base/wayland/color_manager_util.h.no_matching_constructor chromium-120.0.6099.56/ui/base/wayland/color_manager_util.h
+--- chromium-120.0.6099.56/ui/base/wayland/color_manager_util.h.no_matching_constructor 2023-11-29 22:40:44.000000000 +0100
++++ chromium-120.0.6099.56/ui/base/wayland/color_manager_util.h 2023-12-03 17:31:25.755420323 +0100
+@@ -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,68 +107,68 @@ 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_SRGB_HDR,
+- TransferVersion(gfx::ColorSpace::TransferID::SRGB_HDR,
+- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)},
++ TransferVersion{gfx::ColorSpace::TransferID::SRGB_HDR,
++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION}},
+ {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
+@@ -177,18 +177,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
+@@ -197,70 +197,70 @@ 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_HDR,
+- TransferFnVersion(
++ TransferFnVersion{
+ SkNamedTransferFnExt::kSRGB,
+- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)},
++ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION}},
+ {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,
+@@ -283,4 +283,4 @@ zcr_color_manager_v1_eotf_names ToColorM
+
+ } // namespace ui::wayland
+
+-#endif // UI_BASE_WAYLAND_COLOR_MANAGER_UTIL_H_
+\ Kein Zeilenumbruch am Dateiende.
++#endif // UI_BASE_WAYLAND_COLOR_MANAGER_UTIL_H_
+diff -up chromium-120.0.6099.56/ui/gtk/gtk_ui.cc.no_matching_constructor chromium-120.0.6099.56/ui/gtk/gtk_ui.cc
+--- chromium-120.0.6099.56/ui/gtk/gtk_ui.cc.no_matching_constructor 2023-11-29 22:40:44.000000000 +0100
++++ chromium-120.0.6099.56/ui/gtk/gtk_ui.cc 2023-12-03 17:31:25.756420342 +0100
+@@ -1013,11 +1013,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;
+ }
diff --git a/srcpkgs/electron28/files/patches/chromium-120-split-threshold-for-reg-with-hint.patch b/srcpkgs/electron28/files/patches/chromium-120-split-threshold-for-reg-with-hint.patch
new file mode 100644
index 0000000000000..e80ed715aaf29
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-split-threshold-for-reg-with-hint.patch
@@ -0,0 +1,28 @@
+diff -up chromium-120.0.6099.35/build/config/compiler/BUILD.gn.than chromium-120.0.6099.35/build/config/compiler/BUILD.gn
+--- chromium-120.0.6099.35/build/config/compiler/BUILD.gn.than 2023-11-26 17:02:25.647022746 +0100
++++ chromium-120.0.6099.35/build/config/compiler/BUILD.gn 2023-11-26 17:15:58.025585358 +0100
+@@ -616,24 +616,6 @@ config("compiler") {
+ }
+ }
+
+- # TODO(crbug.com/1488374): This causes binary size growth and potentially
+- # other problems.
+- # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
+- if (default_toolchain != "//build/toolchain/cros:target" &&
+- !llvm_android_mainline) {
+- cflags += [
+- "-mllvm",
+- "-split-threshold-for-reg-with-hint=0",
+- ]
+- if (use_thin_lto && is_a_target_toolchain) {
+- if (is_win) {
+- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
+- } else {
+- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
+- }
+- }
+- }
+-
+ # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+ if (is_win) {
+ cflags += [ "/clang:-ffp-contract=off" ]
diff --git a/srcpkgs/electron28/files/patches/chromium-120-typename.patch b/srcpkgs/electron28/files/patches/chromium-120-typename.patch
new file mode 100644
index 0000000000000..9a2d878b12b54
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-typename.patch
@@ -0,0 +1,205 @@
+--- chromium-120.0.6099.56/base/containers/map_util.h.me 2023-12-02 19:00:19.696801563 +0100
++++ chromium-120.0.6099.56/base/containers/map_util.h 2023-12-02 19:00:47.049337547 +0100
+@@ -42,7 +42,7 @@
+ template <typename Map,
+ typename Key,
+ typename MappedElementType =
+- std::pointer_traits<internal::MappedType<Map>>::element_type>
++ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
+ constexpr const MappedElementType* FindPtrOrNull(const Map& map,
+ const Key& key) {
+ auto it = map.find(key);
+@@ -58,7 +58,7 @@
+ template <typename Map,
+ typename Key,
+ typename MappedElementType =
+- std::pointer_traits<internal::MappedType<Map>>::element_type>
++ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
+ constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) {
+ auto it = map.find(key);
+ return it != map.end() ? std::to_address(it->second) : nullptr;
+diff -up chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc
+--- chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me 2023-06-17 14:50:56.342591702 +0200
++++ chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-06-17 14:57:48.024377375 +0200
+@@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item)
+ // Helper to get an iterator to the last element in the cache. The cache
+ // must not be empty.
+ template <typename Item>
+-SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
++typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
+ CHECK(!cache.empty());
+ auto it = cache.end();
+ return std::prev(it);
+@@ -967,9 +967,9 @@ bool DownloadBubbleUpdateService::CacheM
+ }
+
+ template <typename Id, typename Item>
+-SortedItems<Item>::iterator
++typename SortedItems<Item>::iterator
+ DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter(
+- SortedItems<Item>::iterator iter,
++ typename SortedItems<Item>::iterator iter,
+ SortedItems<Item>& cache,
+ IterMap<Id, Item>& iter_map) {
+ CHECK(iter != cache.end());
+diff -up chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h
+--- chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me 2023-06-18 21:52:53.515625237 +0200
++++ chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h 2023-06-18 21:53:06.881881293 +0200
+@@ -189,7 +189,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_);
+diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
+--- chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me 2023-06-19 10:03:32.319218678 +0200
++++ chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2023-06-19 10:04:12.023942232 +0200
+@@ -169,7 +169,7 @@ class HTMLFastPathParser {
+ using Span = base::span<const Char>;
+ using USpan = base::span<const UChar>;
+ // 32 matches that used by HTMLToken::Attribute.
+- typedef std::conditional<std::is_same_v<Char, UChar>,
++ typedef typename std::conditional<std::is_same_v<Char, UChar>,
+ UCharLiteralBuffer<32>,
+ LCharLiteralBuffer<32>>::type LiteralBufferType;
+ typedef UCharLiteralBuffer<32> UCharLiteralBufferType;
+diff -up chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h
+--- chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me 2023-08-02 16:18:30.380108125 +0200
++++ chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h 2023-08-02 16:20:59.660024578 +0200
+@@ -127,10 +127,10 @@ class CONTENT_EXPORT WebUIBrowserInterfa
+ //
+ // TODO(crbug.com/1407936): Point to WebUIJsBridge documentation.
+ template <typename ControllerType>
+- JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
++ typename JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
+ using Traits = JsBridgeTraits<ControllerType>;
+- using Interface = Traits::Interface;
+- using JsBridgeBinderInitializer = Traits::BinderInitializer;
++ using Interface = typename Traits::Interface;
++ using JsBridgeBinderInitializer = typename Traits::BinderInitializer;
+
+ // WebUIController::GetType() requires an instantiated WebUIController
+ // (because it's a virtual method and can't be static). Here we only have
+diff -up chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
+--- chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me 2023-08-02 20:41:23.984729462 +0200
++++ chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h 2023-08-02 20:41:53.737583093 +0200
+@@ -270,8 +270,8 @@ class CORE_EXPORT ObjectPaintPropertiesS
+ NodeList& nodes,
+ NodeId node_id,
+ const ParentType& parent,
+- NodeType::State&& state,
+- const NodeType::AnimationState& animation_state =
++ typename NodeType::State&& state,
++ const typename NodeType::AnimationState& animation_state =
+ NodeType::AnimationState()) {
+ // First, check if we need to add a new node.
+ if (!nodes.HasField(node_id)) {
+diff -up chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h.me chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h
+--- chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h.me 2023-09-15 10:22:51.889698402 +0200
++++ chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h 2023-09-15 10:28:26.702716224 +0200
+@@ -234,7 +234,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_);
+@@ -389,7 +389,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_);
+
+@@ -406,7 +406,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_);
+@@ -466,7 +466,7 @@ class TFLiteModelExecutor : public Model
+ // Unloads the model if needed.
+ void BatchExecuteLoadedModelAndRunCallback(
+ BatchExecutionCallback callback_on_complete,
+- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
++ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+ ExecutionStatus execution_status) {
+ DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+diff -up chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc.me chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc
+--- chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc.me 2023-09-15 17:20:22.550657586 +0200
++++ chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc 2023-09-15 17:24:11.396716734 +0200
+@@ -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(
+diff -up chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h.me chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h
+--- chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h.me 2023-09-15 17:20:56.540460391 +0200
++++ chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h 2023-09-15 17:22:18.246237817 +0200
+@@ -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);
+diff -up chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h.me chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h
+--- chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h.me 2023-12-04 00:29:35.197209538 +0100
++++ chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h 2023-12-04 00:30:24.436233249 +0100
+@@ -220,7 +220,7 @@ class PairAsyncIterable {
+ private:
+ virtual IterationSource* CreateIterationSource(
+ ScriptState* script_state,
+- IterationSource::Kind kind,
++ typename IterationSource::Kind kind,
+ ExceptionState& exception_state) = 0;
+ };
+
+@@ -262,7 +262,7 @@ class ValueAsyncIterable {
+ private:
+ virtual IterationSource* CreateIterationSource(
+ ScriptState* script_state,
+- IterationSource::Kind kind,
++ typename IterationSource::Kind kind,
+ ExceptionState& exception_state) = 0;
+ };
+
diff --git a/srcpkgs/electron28/files/patches/chromium-120-workaround_clang_bug-structured_binding.patch b/srcpkgs/electron28/files/patches/chromium-120-workaround_clang_bug-structured_binding.patch
new file mode 100644
index 0000000000000..b06e29f29047a
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-120-workaround_clang_bug-structured_binding.patch
@@ -0,0 +1,51 @@
+diff -up chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc
+--- chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:37.000000000 +0200
++++ chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc 2023-06-17 16:53:20.216628557 +0200
+@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
+ void CdmPromiseAdapter::Clear(ClearReason reason) {
+ // Reject all outstanding promises.
+ DCHECK(thread_checker_.CalledOnValidThread());
+- for (auto& [promise_id, promise] : promises_) {
++ for (auto& [p_i, p_e] : promises_) {
++ auto& promise_id = p_i;
++ auto& promise = p_e;
+ TRACE_EVENT_NESTABLE_ASYNC_END1(
+ "media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
+ "status", "cleared");
+diff -up chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc
+--- chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me 2023-06-19 08:04:02.287072722 +0200
++++ chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc 2023-06-19 08:18:24.576814950 +0200
+@@ -1393,7 +1393,8 @@ void ServiceWorkerContextWrapper::MaybeP
+ return;
+ }
+
+- auto [document_url, key, callback] = std::move(*request);
++ auto [d_u, key, callback] = std::move(*request);
++ auto document_url = d_u;
+
+ DCHECK(document_url.is_valid());
+ TRACE_EVENT1("ServiceWorker",
+diff -up chromium-120.0.6099.56/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc.me chromium-120.0.6099.56/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
+--- chromium-120.0.6099.56/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc.me 2023-12-03 22:17:50.922083200 +0100
++++ chromium-120.0.6099.56/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc 2023-12-03 22:22:55.437484343 +0100
+@@ -3447,7 +3447,8 @@ void GridLayoutAlgorithm::PlaceGridItems
+ DCHECK(out_row_break_between);
+
+ const auto& container_space = ConstraintSpace();
+- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
++ const auto& [grid_items, l_d, tree_size] = sizing_tree.TreeRootData();
++ const auto& layout_data = l_d;
+
+ const auto* cached_layout_subtree = container_space.GetGridLayoutSubtree();
+ const auto container_writing_direction =
+@@ -3611,7 +3612,9 @@ void GridLayoutAlgorithm::PlaceGridItems
+
+ // TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true.
+ const auto& constraint_space = ConstraintSpace();
+- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
++ const auto& [g_i, l_d, tree_size] = sizing_tree.TreeRootData();
++ const auto& grid_items = g_i;
++ const auto& layout_data = l_d;
+
+ const auto* cached_layout_subtree = constraint_space.GetGridLayoutSubtree();
+ const auto container_writing_direction =
diff --git a/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch
new file mode 100644
index 0000000000000..e739b40a2733c
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch
@@ -0,0 +1,333 @@
+From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001
+From: Dale Curtis <dalecurtis@chromium.org>
+Date: Sat, 2 Apr 2022 05:13:53 +0000
+Subject: [PATCH] Roll src/third_party/ffmpeg/ 574c39cce..32b2d1d526 (1125
+ commits)
+
+https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/574c39cce323..32b2d1d526
+
+Created with:
+ roll-dep src/third_party/ffmpeg
+
+Fixed: 1293918
+Cq-Include-Trybots: luci.chromium.try:mac_chromium_asan_rel_ng,linux_chromium_asan_rel_ng,linux_chromium_chromeos_asan_rel_ng
+Change-Id: I41945d0f963e3d1f65940067bac22f63b68e37d2
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565647
+Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
+Reviewed-by: Dan Sanders <sandersd@chromium.org>
+Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#988253}
+---
+ .../clear_key_cdm/ffmpeg_cdm_audio_decoder.cc | 29 ++++++++++---------
+ media/ffmpeg/ffmpeg_common.cc | 11 +++----
+ media/filters/audio_file_reader.cc | 9 +++---
+ media/filters/audio_file_reader_unittest.cc | 6 ++--
+ .../filters/audio_video_metadata_extractor.cc | 11 +++++--
+ .../filters/ffmpeg_aac_bitstream_converter.cc | 7 +++--
+ ...ffmpeg_aac_bitstream_converter_unittest.cc | 2 +-
+ media/filters/ffmpeg_audio_decoder.cc | 13 +++++----
+ 8 files changed, 51 insertions(+), 37 deletions(-)
+
+diff --git a/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
+index e4fc3f460e2..9b1ad9f7675 100644
+--- a/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
++++ b/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
+@@ -74,7 +74,7 @@ void CdmAudioDecoderConfigToAVCodecContext(
+ codec_context->sample_fmt = AV_SAMPLE_FMT_NONE;
+ }
+
+- codec_context->channels = config.channel_count;
++ codec_context->ch_layout.nb_channels = config.channel_count;
+ codec_context->sample_rate = config.samples_per_second;
+
+ if (config.extra_data) {
+@@ -124,8 +124,8 @@ void CopySamples(cdm::AudioFormat cdm_format,
+ case cdm::kAudioFormatPlanarS16:
+ case cdm::kAudioFormatPlanarF32: {
+ const int decoded_size_per_channel =
+- decoded_audio_size / av_frame.channels;
+- for (int i = 0; i < av_frame.channels; ++i) {
++ decoded_audio_size / av_frame.ch_layout.nb_channels;
++ for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) {
+ memcpy(output_buffer, av_frame.extended_data[i],
+ decoded_size_per_channel);
+ output_buffer += decoded_size_per_channel;
+@@ -185,13 +185,14 @@ bool FFmpegCdmAudioDecoder::Initialize(
+ // Success!
+ decoding_loop_ = std::make_unique<FFmpegDecodingLoop>(codec_context_.get());
+ samples_per_second_ = config.samples_per_second;
+- bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8;
++ bytes_per_frame_ =
++ codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8;
+ output_timestamp_helper_ =
+ std::make_unique<AudioTimestampHelper>(config.samples_per_second);
+ is_initialized_ = true;
+
+ // Store initial values to guard against midstream configuration changes.
+- channels_ = codec_context_->channels;
++ channels_ = codec_context_->ch_layout.nb_channels;
+ av_sample_format_ = codec_context_->sample_fmt;
+
+ return true;
+@@ -291,17 +292,19 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
+ for (auto& frame : audio_frames) {
+ int decoded_audio_size = 0;
+ if (frame->sample_rate != samples_per_second_ ||
+- frame->channels != channels_ || frame->format != av_sample_format_) {
++ frame->ch_layout.nb_channels != channels_ ||
++ frame->format != av_sample_format_) {
+ DLOG(ERROR) << "Unsupported midstream configuration change!"
+ << " Sample Rate: " << frame->sample_rate << " vs "
+- << samples_per_second_ << ", Channels: " << frame->channels
+- << " vs " << channels_ << ", Sample Format: " << frame->format
+- << " vs " << av_sample_format_;
++ << samples_per_second_
++ << ", Channels: " << frame->ch_layout.nb_channels << " vs "
++ << channels_ << ", Sample Format: " << frame->format << " vs "
++ << av_sample_format_;
+ return cdm::kDecodeError;
+ }
+
+ decoded_audio_size = av_samples_get_buffer_size(
+- nullptr, codec_context_->channels, frame->nb_samples,
++ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
+ codec_context_->sample_fmt, 1);
+ if (!decoded_audio_size)
+ continue;
+@@ -320,9 +323,9 @@ bool FFmpegCdmAudioDecoder::OnNewFrame(
+ size_t* total_size,
+ std::vector<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>* audio_frames,
+ AVFrame* frame) {
+- *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels,
+- frame->nb_samples,
+- codec_context_->sample_fmt, 1);
++ *total_size += av_samples_get_buffer_size(
++ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
++ codec_context_->sample_fmt, 1);
+ audio_frames->emplace_back(av_frame_clone(frame));
+ return true;
+ }
+diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
+index 87ca8969626..76f03d6608e 100644
+--- a/media/ffmpeg/ffmpeg_common.cc
++++ b/media/ffmpeg/ffmpeg_common.cc
+@@ -345,10 +345,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
+ codec_context->sample_fmt, codec_context->codec_id);
+
+ ChannelLayout channel_layout =
+- codec_context->channels > 8
++ codec_context->ch_layout.nb_channels > 8
+ ? CHANNEL_LAYOUT_DISCRETE
+- : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout,
+- codec_context->channels);
++ : ChannelLayoutToChromeChannelLayout(
++ codec_context->ch_layout.u.mask,
++ codec_context->ch_layout.nb_channels);
+
+ int sample_rate = codec_context->sample_rate;
+ switch (codec) {
+@@ -401,7 +402,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
+ extra_data, encryption_scheme, seek_preroll,
+ codec_context->delay);
+ if (channel_layout == CHANNEL_LAYOUT_DISCRETE)
+- config->SetChannelsForDiscrete(codec_context->channels);
++ config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels);
+
+ #if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO)
+ // These are bitstream formats unknown to ffmpeg, so they don't have
+@@ -470,7 +471,7 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config,
+
+ // TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses
+ // said information to decode.
+- codec_context->channels = config.channels();
++ codec_context->ch_layout.nb_channels = config.channels();
+ codec_context->sample_rate = config.samples_per_second();
+
+ if (config.extra_data().empty()) {
+diff --git a/media/filters/audio_file_reader.cc b/media/filters/audio_file_reader.cc
+index 5f257bdfaa6..e1be5aa9a5b 100644
+--- a/media/filters/audio_file_reader.cc
++++ b/media/filters/audio_file_reader.cc
+@@ -113,14 +113,15 @@ bool AudioFileReader::OpenDecoder() {
+
+ // Verify the channel layout is supported by Chrome. Acts as a sanity check
+ // against invalid files. See http://crbug.com/171962
+- if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout,
+- codec_context_->channels) ==
++ if (ChannelLayoutToChromeChannelLayout(
++ codec_context_->ch_layout.u.mask,
++ codec_context_->ch_layout.nb_channels) ==
+ CHANNEL_LAYOUT_UNSUPPORTED) {
+ return false;
+ }
+
+ // Store initial values to guard against midstream configuration changes.
+- channels_ = codec_context_->channels;
++ channels_ = codec_context_->ch_layout.nb_channels;
+ audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id);
+ sample_rate_ = codec_context_->sample_rate;
+ av_sample_format_ = codec_context_->sample_fmt;
+@@ -223,7 +224,7 @@ bool AudioFileReader::OnNewFrame(
+ if (frames_read < 0)
+ return false;
+
+- const int channels = frame->channels;
++ const int channels = frame->ch_layout.nb_channels;
+ if (frame->sample_rate != sample_rate_ || channels != channels_ ||
+ frame->format != av_sample_format_) {
+ DLOG(ERROR) << "Unsupported midstream configuration change!"
+diff --git a/media/filters/audio_file_reader_unittest.cc b/media/filters/audio_file_reader_unittest.cc
+index 2aba7927a31..1f45a50cace 100644
+--- a/media/filters/audio_file_reader_unittest.cc
++++ b/media/filters/audio_file_reader_unittest.cc
+@@ -121,11 +121,11 @@ class AudioFileReaderTest : public testing::Test {
+ EXPECT_FALSE(reader_->Open());
+ }
+
+- void RunTestFailingDecode(const char* fn) {
++ void RunTestFailingDecode(const char* fn, int expect_read = 0) {
+ Initialize(fn);
+ EXPECT_TRUE(reader_->Open());
+ std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets;
+- EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0);
++ EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read);
+ }
+
+ void RunTestPartialDecode(const char* fn) {
+@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) {
+ }
+
+ TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) {
+- RunTestFailingDecode("midstream_config_change.mp3");
++ RunTestFailingDecode("midstream_config_change.mp3", 42624);
+ }
+ #endif
+
+diff --git a/media/filters/audio_video_metadata_extractor.cc b/media/filters/audio_video_metadata_extractor.cc
+index 185819eb936..69ff508c221 100644
+--- a/media/filters/audio_video_metadata_extractor.cc
++++ b/media/filters/audio_video_metadata_extractor.cc
+@@ -113,6 +113,15 @@ bool AudioVideoMetadataExtractor::Extract(DataSource* source,
+ 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);
+@@ -255,8 +264,6 @@ void AudioVideoMetadataExtractor::ExtractDictionary(AVDictionary* metadata,
+ 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_))
+diff --git a/media/filters/ffmpeg_aac_bitstream_converter.cc b/media/filters/ffmpeg_aac_bitstream_converter.cc
+index 6f231c85729..ca5e5fb927d 100644
+--- a/media/filters/ffmpeg_aac_bitstream_converter.cc
++++ b/media/filters/ffmpeg_aac_bitstream_converter.cc
+@@ -195,14 +195,15 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) {
+ if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id ||
+ audio_profile_ != stream_codec_parameters_->profile ||
+ sample_rate_index_ != sample_rate_index ||
+- channel_configuration_ != stream_codec_parameters_->channels ||
++ channel_configuration_ !=
++ stream_codec_parameters_->ch_layout.nb_channels ||
+ frame_length_ != header_plus_packet_size) {
+ header_generated_ =
+ GenerateAdtsHeader(stream_codec_parameters_->codec_id,
+ 0, // layer
+ stream_codec_parameters_->profile, sample_rate_index,
+ 0, // private stream
+- stream_codec_parameters_->channels,
++ stream_codec_parameters_->ch_layout.nb_channels,
+ 0, // originality
+ 0, // home
+ 0, // copyrighted_stream
+@@ -214,7 +215,7 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) {
+ codec_ = stream_codec_parameters_->codec_id;
+ audio_profile_ = stream_codec_parameters_->profile;
+ sample_rate_index_ = sample_rate_index;
+- channel_configuration_ = stream_codec_parameters_->channels;
++ channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels;
+ frame_length_ = header_plus_packet_size;
+ }
+
+diff --git a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
+index 1fd4c5ccd7d..f59bcd8fdaf 100644
+--- a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
++++ b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
+@@ -34,7 +34,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test {
+ memset(&test_parameters_, 0, sizeof(AVCodecParameters));
+ test_parameters_.codec_id = AV_CODEC_ID_AAC;
+ test_parameters_.profile = FF_PROFILE_AAC_MAIN;
+- test_parameters_.channels = 2;
++ test_parameters_.ch_layout.nb_channels = 2;
+ test_parameters_.extradata = extradata_header_;
+ test_parameters_.extradata_size = sizeof(extradata_header_);
+ }
+diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
+index 6a56c675f7d..4615fdeb3fb 100644
+--- a/media/filters/ffmpeg_audio_decoder.cc
++++ b/media/filters/ffmpeg_audio_decoder.cc
+@@ -28,7 +28,7 @@ namespace media {
+
+ // Return the number of channels from the data in |frame|.
+ static inline int DetermineChannels(AVFrame* frame) {
+- return frame->channels;
++ return frame->ch_layout.nb_channels;
+ }
+
+ // Called by FFmpeg's allocation routine to allocate a buffer. Uses
+@@ -231,7 +231,7 @@ bool FFmpegAudioDecoder::OnNewFrame(const DecoderBuffer& buffer,
+ // Translate unsupported into discrete layouts for discrete configurations;
+ // ffmpeg does not have a labeled discrete configuration internally.
+ ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout(
+- codec_context_->channel_layout, codec_context_->channels);
++ codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels);
+ if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
+ config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
+ channel_layout = CHANNEL_LAYOUT_DISCRETE;
+@@ -348,11 +348,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
+ // Success!
+ av_sample_format_ = codec_context_->sample_fmt;
+
+- if (codec_context_->channels != config.channels()) {
++ if (codec_context_->ch_layout.nb_channels != config.channels()) {
+ MEDIA_LOG(ERROR, media_log_)
+ << "Audio configuration specified " << config.channels()
+ << " channels, but FFmpeg thinks the file contains "
+- << codec_context_->channels << " channels";
++ << codec_context_->ch_layout.nb_channels << " channels";
+ ReleaseFFmpegResources();
+ state_ = DecoderState::kUninitialized;
+ return false;
+@@ -403,7 +403,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
+ if (frame->nb_samples <= 0)
+ return AVERROR(EINVAL);
+
+- if (s->channels != channels) {
++ if (s->ch_layout.nb_channels != channels) {
+ DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count.";
+ return AVERROR(EINVAL);
+ }
+@@ -436,7 +436,8 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
+ ChannelLayout channel_layout =
+ config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE
+ ? CHANNEL_LAYOUT_DISCRETE
+- : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels);
++ : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask,
++ s->ch_layout.nb_channels);
+
+ if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) {
+ DLOG(ERROR) << "Unsupported channel layout.";
diff --git a/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch.args b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch.args
new file mode 100644
index 0000000000000..8bbbbe9483632
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m102.patch.args
@@ -0,0 +1 @@
+-RNp1
diff --git a/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch
new file mode 100644
index 0000000000000..b2a113791734c
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch
@@ -0,0 +1,55 @@
+From ded379824f5de39357b6b1894578101aba5cdf05 Mon Sep 17 00:00:00 2001
+From: Eugene Zemtsov <eugene@chromium.org>
+Date: Fri, 29 Jul 2022 04:41:04 +0000
+Subject: [PATCH] Roll src/third_party/ffmpeg/ 880df5ede..b71ecd02b (279
+ commits)
+
+https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/880df5ede50a..b71ecd02b479
+
+$ git log 880df5ede..b71ecd02b --date=short --no-merges --format='%ad %ae %s'
+2022-07-27 eugene Roll for M106
+2022-07-25 andreas.rheinhardt avcodec/x86/pngdsp: Remove obsolete ff_add_bytes_l2_mmx()
+2022-07-22 andreas.rheinhardt avcodec/hevcdec: Output MD5-message in one piece
+2022-07-24 epirat07 configure: properly require libx264 if enabled
+2022-07-24 zane avformat/argo_cvg: expose loop/reverb/checksum via metadata
+(...)
+2022-05-03 leo.izen avcodec/libjxldec: properly tag output colorspace
+2022-06-25 ffmpeg avfilter/Makefile: always make colorspace.o
+2022-03-02 brad avutil/ppc/cpu: Use proper header for OpenBSD PPC CPU detection
+2022-06-24 jamrial avformat/http: include version.h
+2022-05-16 mbonda-at-nvidia.com AV1 VDPAU hwaccel Decode support
+
+Created with:
+ roll-dep src/third_party/ffmpeg
+
+ffmpeg usage fix:
+ Switch from AVFrame::pkt_duration to AVFrame::duration,
+ AVFrame::pkt_duration is deprecated
+
+Bug: 1344646
+Change-Id: Iaa3abf48ef81dae6d282bca8f0fa2a8dffeeba25
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3788638
+Reviewed-by: Will Cassella <cassew@chromium.org>
+Commit-Queue: Eugene Zemtsov <eugene@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#1029623}
+---
+ media/filters/audio_file_reader.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/media/filters/audio_file_reader.cc b/media/filters/audio_file_reader.cc
+index e1be5aa9a5b..951c003956f 100644
+--- a/media/filters/audio_file_reader.cc
++++ b/media/filters/audio_file_reader.cc
+@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame(
+ // silence from being output. In the case where we are also discarding some
+ // portion of the packet (as indicated by a negative pts), we further want to
+ // adjust the duration downward by however much exists before zero.
+- if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) {
++ if (audio_codec_ == AudioCodec::kAAC && frame->duration) {
+ const base::TimeDelta pkt_duration = ConvertFromTimeBase(
+ glue_->format_context()->streams[stream_index_]->time_base,
+- frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts));
++ frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
+ const base::TimeDelta frame_duration =
+ base::Seconds(frames_read / static_cast<double>(sample_rate_));
+
diff --git a/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch.args b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch.args
new file mode 100644
index 0000000000000..8bbbbe9483632
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-REVERT-roll-src-third_party-ffmpeg-m106.patch.args
@@ -0,0 +1 @@
+-RNp1
diff --git a/srcpkgs/electron28/files/patches/chromium-angle-wayland-include.patch b/srcpkgs/electron28/files/patches/chromium-angle-wayland-include.patch
new file mode 100644
index 0000000000000..65770b9439c59
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-angle-wayland-include.patch
@@ -0,0 +1,39 @@
+Patch-Source: https://github.com/archlinux/svntogit-packages/blob/a353833a5a731abfaa465b658f61894a516aa49b/trunk/angle-wayland-include-protocol.patch
+diff -upr third_party/angle.orig/BUILD.gn third_party/angle/BUILD.gn
+--- a/third_party/angle.orig/BUILD.gn 2022-08-17 19:38:11.000000000 +0000
++++ b/third_party/angle/BUILD.gn 2022-08-18 11:04:09.061751111 +0000
+@@ -489,6 +489,12 @@ config("angle_vulkan_wayland_config") {
+ if (angle_enable_vulkan && angle_use_wayland &&
+ defined(vulkan_wayland_include_dirs)) {
+ include_dirs = vulkan_wayland_include_dirs
++ } else if (angle_enable_vulkan && angle_use_wayland) {
++ include_dirs = [
++ "$wayland_gn_dir/src/src",
++ "$wayland_gn_dir/include/src",
++ "$wayland_gn_dir/include/protocol",
++ ]
+ }
+ }
+
+@@ -1073,6 +1079,7 @@ if (angle_use_wayland) {
+ include_dirs = [
+ "$wayland_dir/egl",
+ "$wayland_dir/src",
++ "$wayland_gn_dir/include/protocol",
+ ]
+ }
+
+diff -upr third_party/angle.orig/src/third_party/volk/BUILD.gn third_party/angle/src/third_party/volk/BUILD.gn
+--- a/third_party/angle.orig/src/third_party/volk/BUILD.gn 2022-08-17 19:38:12.000000000 +0000
++++ b/third_party/angle/src/third_party/volk/BUILD.gn 2022-08-18 11:04:36.499828006 +0000
+@@ -21,6 +21,9 @@ source_set("volk") {
+ configs += [ "$angle_root:angle_no_cfi_icall" ]
+ public_deps = [ "$angle_vulkan_headers_dir:vulkan_headers" ]
+ if (angle_use_wayland) {
+- include_dirs = [ "$wayland_dir/src" ]
++ include_dirs = [
++ "$wayland_dir/src",
++ "$wayland_gn_dir/include/protocol",
++ ]
+ }
+ }
diff --git a/srcpkgs/electron28/files/patches/chromium-b74d5e6b91ccdf8b2518ef733d75c04823979d18.patch b/srcpkgs/electron28/files/patches/chromium-b74d5e6b91ccdf8b2518ef733d75c04823979d18.patch
new file mode 100644
index 0000000000000..a6a7fa3ccc967
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-b74d5e6b91ccdf8b2518ef733d75c04823979d18.patch
@@ -0,0 +1,61 @@
+From b74d5e6b91ccdf8b2518ef733d75c04823979d18 Mon Sep 17 00:00:00 2001
+From: Lei Zhang <thestig@chromium.org>
+Date: Fri, 10 Nov 2023 17:51:39 +0000
+Subject: [PATCH] [PA] Use std::nullptr_t instead of nullptr_t
+
+nullptr_t is not part of C until C23, while std::nullptr_t is part of
+C++11. Meanwhile, the GN cflags_c value is set to C11.
+
+Bug: 957519,pdfium:2097
+Change-Id: Ib3db790ed1368e8f335c95561fe906780add745c
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5014522
+Reviewed-by: Benoit Lize <lizeb@chromium.org>
+Commit-Queue: Lei Zhang <thestig@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#1223002}
+---
+ .../partition_alloc_base/strings/safe_sprintf.h | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
+index a2f62ac934284b..2d62f65e011e5a 100644
+--- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
++++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
+@@ -5,10 +5,11 @@
+ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_SAFE_SPRINTF_H_
+ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_SAFE_SPRINTF_H_
+
+-#include <stddef.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+
++#include <cstddef>
++
+ #include "build/build_config.h"
+
+ #if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+@@ -178,18 +179,20 @@ struct Arg {
+ integer.width = sizeof(long long);
+ }
+
+- // nullptr_t would be ambiguous between char* and const char*; to get
++ // std::nullptr_t would be ambiguous between char* and const char*; to get
+ // consistent behavior with NULL, which prints with all three of %d, %p, and
+ // %s, treat it as an integer zero internally.
+ //
+ // Warning: don't just do Arg(NULL) here because in some libcs, NULL is an
+- // alias for nullptr!
+- Arg(nullptr_t p) : type(INT) {
++ // alias for std::nullptr!
++ //
++ // NOLINTNEXTLINE(runtime/explicit)
++ Arg(std::nullptr_t p) : type(INT) {
+ integer.i = 0;
+ // Internally, SafeSprintf expects to represent nulls as integers whose
+ // width is equal to sizeof(NULL), which is not necessarily equal to
+- // sizeof(nullptr_t) - eg, on Windows, NULL is defined to 0 (with size 4)
+- // while nullptr_t is of size 8.
++ // sizeof(std::nullptr_t) - eg, on Windows, NULL is defined to 0 (with size
++ // 4) while std::nullptr_t is of size 8.
+ integer.width = sizeof(NULL);
+ }
+
diff --git a/srcpkgs/electron28/files/patches/chromium-browser-size_t.patch b/srcpkgs/electron28/files/patches/chromium-browser-size_t.patch
new file mode 100644
index 0000000000000..36af0ec6c4a7f
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-browser-size_t.patch
@@ -0,0 +1,10 @@
+--- a/chrome/browser/search/background/ntp_backgrounds.h 2020-08-10 20:39:20.000000000 +0200
++++ b/chrome/browser/search/background/ntp_backgrounds.h 2020-09-04 13:48:22.640023256 +0200
+@@ -6,6 +6,7 @@
+ #define CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_
+
+ #include <array>
++#include <cstddef>
+
+ class GURL;
+
diff --git a/srcpkgs/electron28/files/patches/chromium-cross-build.patch b/srcpkgs/electron28/files/patches/chromium-cross-build.patch
new file mode 100644
index 0000000000000..53df490bac97a
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-cross-build.patch
@@ -0,0 +1,65 @@
+--- a/build/config/compiler/BUILD.gn.orig
++++ b/build/config/compiler/BUILD.gn
+@@ -55,6 +55,10 @@
+ }
+
+ declare_args() {
++ is_musl = false
++}
++
++declare_args() {
+ # 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
+@@ -917,8 +917,13 @@
+ } else if (current_cpu == "arm64") {
+ if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+ !(is_chromeos_lacros && is_chromeos_device)) {
+- cflags += [ "--target=aarch64-linux-gnu" ]
+- ldflags += [ "--target=aarch64-linux-gnu" ]
++ if (is_musl) {
++ cflags += [ "--target=aarch64-linux-musl" ]
++ ldflags += [ "--target=aarch64-linux-musl" ]
++ } else {
++ cflags += [ "--target=aarch64-linux-gnu" ]
++ ldflags += [ "--target=aarch64-linux-gnu" ]
++ }
+ }
+ if (is_android) {
+ # Outline atomics crash on Exynos 9810. http://crbug.com/1272795
+--- a/build/toolchain/linux/unbundle/BUILD.gn.orig
++++ b/build/toolchain/linux/unbundle/BUILD.gn
+@@ -39,3 +39,22 @@
+ current_os = host_os
+ }
+ }
++
++gcc_toolchain("v8_snapshot_cross") {
++ cc = getenv("BUILD_CC")
++ cxx = getenv("BUILD_CXX")
++ ar = getenv("BUILD_AR")
++ nm = getenv("BUILD_NM")
++ ld = cxx
++
++ extra_cflags = getenv("BUILD_CFLAGS")
++ extra_cppflags = getenv("BUILD_CPPFLAGS")
++ extra_cxxflags = getenv("BUILD_CXXFLAGS")
++ extra_ldflags = getenv("BUILD_LDFLAGS")
++
++ toolchain_args = {
++ current_cpu = host_cpu
++ current_os = host_os
++ v8_current_cpu = target_cpu
++ }
++}
+--- a/build/config/linux/pkg_config.gni.orig
++++ b/build/config/linux/pkg_config.gni
+@@ -91,7 +91,7 @@
+ assert(defined(invoker.packages),
+ "Variable |packages| must be defined to be a list in pkg_config.")
+ config(target_name) {
+- if (host_toolchain == current_toolchain) {
++ if (current_cpu != target_cpu) {
+ args = common_pkg_config_args + host_pkg_config_args + invoker.packages
+ } else {
+ args = common_pkg_config_args + pkg_config_args + invoker.packages
diff --git a/srcpkgs/electron28/files/patches/chromium-fc-cache-version.patch b/srcpkgs/electron28/files/patches/chromium-fc-cache-version.patch
new file mode 100644
index 0000000000000..3b768978a43d6
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fc-cache-version.patch
@@ -0,0 +1,13 @@
+instead of hardcoding the version, use the defined macro.
+--
+--- a/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
++++ b/third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc
+@@ -56,7 +56,7 @@
+ 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;
+ }
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-aarch64-musl-memory-tagging-macros.patch b/srcpkgs/electron28/files/patches/chromium-fix-aarch64-musl-memory-tagging-macros.patch
new file mode 100644
index 0000000000000..b3dd2c33f0f21
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-aarch64-musl-memory-tagging-macros.patch
@@ -0,0 +1,29 @@
+--- a/base/allocator/partition_allocator/src/partition_alloc/tagging.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/tagging.cc
+@@ -28,13 +28,25 @@
+ #endif
+ #endif
+
+-#ifndef HAS_PR_MTE_MACROS
++#ifndef PR_MTE_TCF_SHIFT
+ #define PR_MTE_TCF_SHIFT 1
++#endif
++#ifndef PR_MTE_TCF_NONE
+ #define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
++#endif
++#ifndef PR_MTE_TCF_SYNC
+ #define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
++#endif
++#ifndef PR_MTE_TCF_ASYNC
+ #define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
++#endif
++#ifndef PR_MTE_TCF_MASK
+ #define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
++#endif
++#ifndef PR_MTE_TAG_SHIFT
+ #define PR_MTE_TAG_SHIFT 3
++#endif
++#ifndef PR_MTE_TAG_MASK
+ #define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
+ #endif
+ #endif
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-argument_spec-isnan-isinf.patch b/srcpkgs/electron28/files/patches/chromium-fix-argument_spec-isnan-isinf.patch
new file mode 100644
index 0000000000000..837a0312dcbca
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-argument_spec-isnan-isinf.patch
@@ -0,0 +1,11 @@
+--- a/extensions/renderer/bindings/argument_spec.cc
++++ b/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 "base/check.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-constexpr-narrowing.patch b/srcpkgs/electron28/files/patches/chromium-fix-constexpr-narrowing.patch
new file mode 100644
index 0000000000000..570ca6e69a805
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-constexpr-narrowing.patch
@@ -0,0 +1,21 @@
+--- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc.orig
++++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
+@@ -3881,15 +3881,15 @@
+ 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;
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-dawn-platform.patch b/srcpkgs/electron28/files/patches/chromium-fix-dawn-platform.patch
new file mode 100644
index 0000000000000..93631294fc772
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-dawn-platform.patch
@@ -0,0 +1,62 @@
+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(-)
+
+diff --git a/third_party/dawn/src/dawn/common/Assert.cpp b/third_party/dawn/src/dawn/common/Assert.cpp
+index ecc92dfc..8ee91a90 100644
+--- a/third_party/dawn/src/dawn/common/Assert.cpp
++++ b/third_party/dawn/src/dawn/common/Assert.cpp
+@@ -31,9 +31,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"
+diff --git a/third_party/dawn/src/dawn/common/Platform.h b/third_party/dawn/src/dawn/common/Platform.h
+index 39d5eb41..2011367d 100644
+--- a/third_party/dawn/src/dawn/common/Platform.h
++++ b/third_party/dawn/src/dawn/common/Platform.h
+@@ -124,15 +124,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."
+@@ -149,7 +149,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");
+--
+2.34.1
+
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-libc-version-include.patch b/srcpkgs/electron28/files/patches/chromium-fix-libc-version-include.patch
new file mode 100644
index 0000000000000..d94dcf6deac56
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-libc-version-include.patch
@@ -0,0 +1,15 @@
+--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
++++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+@@ -61,8 +61,11 @@
+
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+-#if defined(__GLIBC__) && (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
++
++#if defined(__GLIBC__)
+ #include <gnu/libc-version.h>
++#endif
+
+ #include "base/linux_util.h"
+ #include "base/strings/string_split.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch b/srcpkgs/electron28/files/patches/chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch
new file mode 100644
index 0000000000000..b56717b9ce32e
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-missing-TEMP_FAILURE_RETRY-macro.patch
@@ -0,0 +1,21 @@
+This macro is defined in glibc, but not musl.
+
+--- a/sandbox/linux/suid/process_util.h.orig
++++ b/sandbox/linux/suid/process_util.h
+@@ -11,6 +11,16 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+
++// Some additional functions
++#if !defined(TEMP_FAILURE_RETRY)
++# define TEMP_FAILURE_RETRY(expression) \
++ (__extension__ \
++ ({ long int __result; \
++ do __result = (long int) (expression); \
++ while (__result == -1L && errno == EINTR); \
++ __result; }))
++#endif
++
+ // This adjusts /proc/process/oom_score_adj so the Linux OOM killer
+ // will prefer certain process types over others. The range for the
+ // adjustment is [-1000, 1000], with [0, 1000] being user accessible.
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-missing-cstdint-include-musl.patch b/srcpkgs/electron28/files/patches/chromium-fix-missing-cstdint-include-musl.patch
new file mode 100644
index 0000000000000..6ca2897f3dd29
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-missing-cstdint-include-musl.patch
@@ -0,0 +1,10 @@
+--- a/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
++++ b/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
+@@ -3,6 +3,7 @@
+
+ #include <stddef.h>
+
++#include <cstdint>
+ #include <functional>
+
+ #include "quiche/common/platform/api/quiche_export.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-musl-missing-unistd_h-include.patch b/srcpkgs/electron28/files/patches/chromium-fix-musl-missing-unistd_h-include.patch
new file mode 100644
index 0000000000000..e14d009a9e0ba
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-musl-missing-unistd_h-include.patch
@@ -0,0 +1,10 @@
+--- a/sandbox/linux/services/credentials.h
++++ b/sandbox/linux/services/credentials.h
+@@ -13,6 +13,7 @@
+
+ #include <string>
+ #include <vector>
++#include <unistd.h>
+
+ #include "sandbox/linux/system_headers/capability.h"
+ #include "sandbox/sandbox_export.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-perfetto-GetThreadName-musl.patch b/srcpkgs/electron28/files/patches/chromium-fix-perfetto-GetThreadName-musl.patch
new file mode 100644
index 0000000000000..4014d1ee5e691
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-fix-perfetto-GetThreadName-musl.patch
@@ -0,0 +1,22 @@
+--- a/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
++++ b/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
+@@ -30,7 +30,8 @@
+ #include <algorithm>
+ #endif
+
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
++ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__))
+ #include <sys/prctl.h>
+ #endif
+
+@@ -58,7 +59,8 @@
+
+ inline bool GetThreadName(std::string& out_result) {
+ char buf[16] = {};
+-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
++#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
++ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__))
+ if (prctl(PR_GET_NAME, buf) != 0)
+ return false;
+ #else
diff --git a/srcpkgs/electron28/files/patches/chromium-fix-swiftshader-llvm-musl-config.patch b/srcpkgs/electron28/files/patches/chromium-fix-swiftshader-llvm-musl-config.patch
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/srcpkgs/electron28/files/patches/chromium-i686-vaapi-fpermissive.patch b/srcpkgs/electron28/files/patches/chromium-i686-vaapi-fpermissive.patch
new file mode 100644
index 0000000000000..77c0b58c94e11
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-i686-vaapi-fpermissive.patch
@@ -0,0 +1,23 @@
+--- a/media/gpu/vaapi/BUILD.gn.orig
++++ b/media/gpu/vaapi/BUILD.gn
+@@ -14,6 +14,12 @@
+ 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" ]
+@@ -90,6 +96,7 @@
+ configs += [
+ "//build/config/linux/libva",
+ "//third_party/libvpx:libvpx_config",
++ ":vaapi_permissive",
+ ]
+
+ deps = [
diff --git a/srcpkgs/electron28/files/patches/chromium-libc_malloc.patch b/srcpkgs/electron28/files/patches/chromium-libc_malloc.patch
new file mode 100644
index 0000000000000..414f28765d69c
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-libc_malloc.patch
@@ -0,0 +1,34 @@
+--- a/base/process/memory_linux.cc
++++ b/base/process/memory_linux.cc
+@@ -18,6 +18,13 @@
+ #include "base/threading/thread_restrictions.h"
+ #include "build/build_config.h"
+
++#if defined(LIBC_GLIBC)
++extern "C" {
++extern void *__libc_malloc(size_t size);
++extern void *__libc_free(void *ptr);
++}
++#endif
++
+ namespace base {
+
+ namespace {
+@@ -111,7 +118,7 @@
+ #elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC)
+ *result = malloc(size);
+ #elif defined(LIBC_GLIBC)
+- *result = __libc_malloc(size);
++ *result = ::__libc_malloc(size);
+ #endif
+ return *result != nullptr;
+ }
+@@ -122,7 +129,7 @@
+ #elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC)
+ free(ptr);
+ #elif defined(LIBC_GLIBC)
+- __libc_free(ptr);
++ ::__libc_free(ptr);
+ #endif
+ }
+
diff --git a/srcpkgs/electron28/files/patches/chromium-musl-no-execinfo.patch b/srcpkgs/electron28/files/patches/chromium-musl-no-execinfo.patch
new file mode 100644
index 0000000000000..7407f1b9db38a
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-musl-no-execinfo.patch
@@ -0,0 +1,85 @@
+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/v8/src/codegen/external-reference-table.cc
++++ b/v8/src/codegen/external-reference-table.cc
+@@ -11,7 +11,9 @@
+
+ #if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
+ #define SYMBOLIZE_FUNCTION
++#if defined(__GLIBC__)
+ #include <execinfo.h>
++#endif
+
+ #include <vector>
+
+@@ -96,7 +98,7 @@
+ }
+
+ 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/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
++++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
+@@ -17,7 +17,11 @@
+ #define ENABLE_CRASH_OVERRIDES 0
+
+ /* Define to 1 if you have the `backtrace' function. */
++#ifdef __GLIBC__
+ #define HAVE_BACKTRACE 1
++#else
++#define HAVE_BACKTRACE 0
++#endif
+
+ /* Define to 1 if you have the <CrashReporterClient.h> header file. */
+ /* #undef HAVE_CRASHREPORTERCLIENT_H */
+@@ -58,7 +62,11 @@
+ #define HAVE_ERRNO_H 1
+
+ /* Define to 1 if you have the <execinfo.h> header file. */
++#ifdef __GLIBC__
+ #define HAVE_EXECINFO_H 1
++#else
++#define HAVE_EXECINFO_H 0
++#endif
+
+ /* Define to 1 if you have the <fcntl.h> header file. */
+ #define HAVE_FCNTL_H 1
+--- a/base/debug/stack_trace.cc
++++ b/base/debug/stack_trace.cc
+@@ -251,7 +253,9 @@
+ }
+
+ void StackTrace::OutputToStream(std::ostream* os) const {
++#if defined(__GLIBC__) && !defined(_AIX)
+ OutputToStreamWithPrefix(os, nullptr);
++#endif
+ }
+
+ std::string StackTrace::ToString() const {
+@@ -281,7 +281,7 @@
+ }
+ 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/base/debug/stack_trace_unittest.cc
++++ b/base/debug/stack_trace_unittest.cc
+@@ -33,7 +33,7 @@
+ typedef testing::Test StackTraceTest;
+ #endif
+
+-#if !defined(__UCLIBC__) && !defined(_AIX)
++#if !defined(__UCLIBC__) && !defined(_AIX) && defined(__GLIBC__)
+ // StackTrace::OutputToStream() is not implemented under uclibc, nor AIX.
+ // See https://crbug.com/706728
+
diff --git a/srcpkgs/electron28/files/patches/chromium-musl-no-mallinfo.patch b/srcpkgs/electron28/files/patches/chromium-musl-no-mallinfo.patch
new file mode 100644
index 0000000000000..a58ee08a435a0
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-musl-no-mallinfo.patch
@@ -0,0 +1,125 @@
+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/base/trace_event/malloc_dump_provider.cc
++++ b/base/trace_event/malloc_dump_provider.cc
+@@ -185,7 +185,6 @@
+ #define MALLINFO2_FOUND_IN_LIBC
+ struct mallinfo2 info = mallinfo2();
+ #endif
+-#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #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);
+ }
++#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ }
+ #endif
+
+@@ -339,7 +340,7 @@
+ &allocated_objects_count);
+ #elif BUILDFLAG(IS_FUCHSIA)
+ // TODO(fuchsia): Port, see https://crbug.com/706592.
+-#else
++#elif defined(__GLIBC__)
+ ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
+ &allocated_objects_size, &allocated_objects_count);
+ #endif
+--- a/base/process/process_metrics_posix.cc
++++ b/base/process/process_metrics_posix.cc
+@@ -105,7 +105,7 @@
+
+ #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,7 +123,7 @@
+ }
+
+ } // namespace
+-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
++#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) ||
+ // BUILDFLAG(IS_ANDROID)
+
+ size_t ProcessMetrics::GetMallocUsage() {
+@@ -131,9 +131,9 @@
+ 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
+--- ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc.orig
++++ ./third_party/tflite/src/tensorflow/lite/profiling/memory_info.cc
+@@ -35,7 +35,7 @@
+
+ MemoryUsage GetMemoryUsage() {
+ MemoryUsage result;
+-#ifdef __linux__
++#if defined(__linux__) && defined(__GLIBC__)
+ rusage res;
+ if (getrusage(RUSAGE_SELF, &res) == 0) {
+ result.max_rss_kb = res.ru_maxrss;
+--- ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc
++++ ./third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc.orig
+@@ -86,11 +86,11 @@
+ }
+
+ size_t Process::GetMallocUsage() {
+-#if defined(HAVE_MALLINFO2)
++#if defined(HAVE_MALLINFO2) && defined(__GLIBC__)
+ struct mallinfo2 mi;
+ mi = ::mallinfo2();
+ return mi.uordblks;
+-#elif defined(HAVE_MALLINFO)
++#elif defined(HAVE_MALLINFO) && defined(__GLIBC__)
+ struct mallinfo mi;
+ mi = ::mallinfo();
+ return mi.uordblks;
+
+--- ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h.orig 2019-09-30 13:03:42.556880537 -0400
++++ ./third_party/swiftshader/third_party/llvm-10.0/configs/linux/include/llvm/Config/config.h 2019-09-30 13:07:27.989821227 -0400
+@@ -122,7 +122,9 @@
+ /* #undef HAVE_MALLCTL */
+
+ /* Define to 1 if you have the `mallinfo' function. */
++#if defined(__GLIBC__)
+ #define HAVE_MALLINFO 1
++#endif
+
+ /* Define to 1 if you have the <malloc.h> header file. */
+ #define HAVE_MALLOC_H 1
+--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
+@@ -717,7 +717,7 @@
+
+ #endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID)
+
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if 0
+ SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW {
+ base::SimplePartitionStatsDumper allocator_dumper;
+ Allocator()->DumpStats("malloc", true, &allocator_dumper);
+--- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
+@@ -24,7 +24,7 @@
+ #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
+
+ // Platforms on which we override weak libc symbols.
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS)
+
+ NOINLINE void FreeForTest(void* data) {
+ free(data);
diff --git a/srcpkgs/electron28/files/patches/chromium-musl-partition-atfork.patch b/srcpkgs/electron28/files/patches/chromium-musl-partition-atfork.patch
new file mode 100644
index 0000000000000..35d810055fbb5
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-musl-partition-atfork.patch
@@ -0,0 +1,11 @@
+--- a/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
++++ b/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
+@@ -239,7 +239,7 @@
+ if (!g_global_init_called.compare_exchange_strong(expected, true))
+ 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.
diff --git a/srcpkgs/electron28/files/patches/chromium-musl-v8-monotonic-pthread-cont_timedwait.patch b/srcpkgs/electron28/files/patches/chromium-musl-v8-monotonic-pthread-cont_timedwait.patch
new file mode 100644
index 0000000000000..56a4ad1c807e5
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-musl-v8-monotonic-pthread-cont_timedwait.patch
@@ -0,0 +1,24 @@
+Use monotonic clock for pthread_cond_timedwait with musl too.
+
+diff --git a/v8/src/base/platform/condition-variable.cc b/v8/src/base/platform/condition-variable.cc
+index 5ea7083..c13027e 100644
+--- a/v8/src/base/platform/condition-variable.cc
++++ b/v8/src/base/platform/condition-variable.cc
+@@ -16,7 +16,7 @@ namespace base {
+
+ ConditionVariable::ConditionVariable() {
+ #if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
+- (V8_OS_LINUX && V8_LIBC_GLIBC))
++ V8_OS_LINUX)
+ // On Free/Net/OpenBSD and Linux with glibc we can change the time
+ // source for pthread_cond_timedwait() to use the monotonic clock.
+ pthread_condattr_t attr;
+@@ -92,7 +92,7 @@ bool ConditionVariable::WaitFor(Mutex* mutex, const TimeDelta& rel_time) {
+ &native_handle_, &mutex->native_handle(), &ts);
+ #else
+ #if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
+- (V8_OS_LINUX && V8_LIBC_GLIBC))
++ V8_OS_LINUX)
+ // On Free/Net/OpenBSD and Linux with glibc we can change the time
+ // source for pthread_cond_timedwait() to use the monotonic clock.
+ result = clock_gettime(CLOCK_MONOTONIC, &ts);
diff --git a/srcpkgs/electron28/files/patches/chromium-no-getcontext.patch b/srcpkgs/electron28/files/patches/chromium-no-getcontext.patch
new file mode 100644
index 0000000000000..f9bc2e02d2456
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-no-getcontext.patch
@@ -0,0 +1,27 @@
+--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 09:59:55.554536646 +0100
++++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 10:01:16.818238035 +0100
+@@ -477,7 +477,9 @@ bool ExceptionHandler::SimulateSignalDel
+ siginfo.si_code = SI_USER;
+ siginfo.si_pid = getpid();
+ ucontext_t context;
++#if defined(__GLIBC__)
+ getcontext(&context);
++#endif
+ return HandleSignal(sig, &siginfo, &context);
+ }
+
+@@ -647,9 +649,14 @@ bool ExceptionHandler::WriteMinidump() {
+ sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
+
+ CrashContext context;
++
++#if defined(__GLIBC__)
+ int getcontext_result = getcontext(&context.context);
+ if (getcontext_result)
+ return false;
++#else
++ return false;
++#endif
+
+ #if defined(__i386__)
+ // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved
diff --git a/srcpkgs/electron28/files/patches/chromium-old-clang.patch b/srcpkgs/electron28/files/patches/chromium-old-clang.patch
new file mode 100644
index 0000000000000..b773d09fbd7df
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-old-clang.patch
@@ -0,0 +1,11 @@
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -1288,7 +1288,7 @@
+ } 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) {
diff --git a/srcpkgs/electron28/files/patches/chromium-perfetto-libstdc++.patch b/srcpkgs/electron28/files/patches/chromium-perfetto-libstdc++.patch
new file mode 100644
index 0000000000000..31ff9d95bb52a
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-perfetto-libstdc++.patch
@@ -0,0 +1,20 @@
+--- a/third_party/perfetto/src/trace_processor/perfetto_sql/engine/created_function.cc
++++ b/third_party/perfetto/src/trace_processor/perfetto_sql/engine/created_function.cc
+@@ -107,7 +107,7 @@
+ // the destructors run correctly for non-trivial members of the
+ // union.
+ using Data =
+- std::variant<int64_t, double, OwnedString, OwnedBytes, nullptr_t>;
++ std::variant<int64_t, double, OwnedString, OwnedBytes, std::nullptr_t>;
+
+ StoredSqlValue(SqlValue value) {
+ switch (value.type) {
+@@ -132,7 +132,7 @@
+ }
+
+ SqlValue AsSqlValue() {
+- if (std::holds_alternative<nullptr_t>(data)) {
++ if (std::holds_alternative<std::nullptr_t>(data)) {
+ return SqlValue();
+ } else if (std::holds_alternative<int64_t>(data)) {
+ return SqlValue::Long(std::get<int64_t>(data));
diff --git a/srcpkgs/electron28/files/patches/chromium-reenable-linux-i686-builds.patch b/srcpkgs/electron28/files/patches/chromium-reenable-linux-i686-builds.patch
new file mode 100644
index 0000000000000..b18718e436496
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-reenable-linux-i686-builds.patch
@@ -0,0 +1,19 @@
+--- a/BUILD.gn.orig
++++ b/BUILD.gn
+@@ -1616,16 +1616,6 @@
+ }
+ }
+
+-# 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
+
diff --git a/srcpkgs/electron28/files/patches/chromium-remove-sys-cdefs-includes.patch b/srcpkgs/electron28/files/patches/chromium-remove-sys-cdefs-includes.patch
new file mode 100644
index 0000000000000..00344073f4613
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-remove-sys-cdefs-includes.patch
@@ -0,0 +1,39 @@
+--- a/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
++++ b/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
+@@ -17,8 +17,6 @@
+
+ #include_next <sys/ptrace.h>
+
+-#include <sys/cdefs.h>
+-
+ // https://sourceware.org/bugzilla/show_bug.cgi?id=22433
+ #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \
+ defined(__GLIBC__)
+--- a/third_party/libsync/src/include/sync/sync.h
++++ b/third_party/libsync/src/include/sync/sync.h
+@@ -19,12 +19,13 @@
+ #ifndef __SYS_CORE_SYNC_H
+ #define __SYS_CORE_SYNC_H
+
+-#include <sys/cdefs.h>
+ #include <stdint.h>
+
+ #include <linux/types.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ struct sync_legacy_merge_data {
+ int32_t fd2;
+@@ -158,6 +159,8 @@
+ struct sync_pt_info *itr);
+ void sync_fence_info_free(struct sync_fence_info_data *info);
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* __SYS_CORE_SYNC_H */
diff --git a/srcpkgs/electron28/files/patches/chromium-revert-drop-of-system-java.patch b/srcpkgs/electron28/files/patches/chromium-revert-drop-of-system-java.patch
new file mode 100644
index 0000000000000..117a50f8e4f63
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-revert-drop-of-system-java.patch
@@ -0,0 +1,15 @@
+This was dropped for some reason in 6951c37cecd05979b232a39e5c10e6346a0f74ef
+--- a/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
++++ b/third_party/closure_compiler/compiler.py 2021-05-20 04:17:53.000000000 +0200
+@@ -13,8 +13,9 @@
+
+
+ _CURRENT_DIR = os.path.join(os.path.dirname(__file__))
+-_JAVA_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
+-assert os.path.isfile(_JAVA_PATH), "java only allowed in android builds"
++_JAVA_BIN = "java"
++_JDK_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
++_JAVA_PATH = _JDK_PATH if os.path.isfile(_JDK_PATH) else _JAVA_BIN
+
+ class Compiler(object):
+ """Runs the Closure compiler on given source files to typecheck them
diff --git a/srcpkgs/electron28/files/patches/chromium-sandbox-membarrier.patch b/srcpkgs/electron28/files/patches/chromium-sandbox-membarrier.patch
new file mode 100644
index 0000000000000..55ef2516194a2
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-sandbox-membarrier.patch
@@ -0,0 +1,10 @@
+--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
++++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+@@ -370,6 +370,7 @@
+ switch (sysno) {
+ case __NR_exit:
+ case __NR_exit_group:
++ case __NR_membarrier:
+ case __NR_wait4:
+ case __NR_waitid:
+ #if defined(__i386__)
diff --git a/srcpkgs/electron28/files/patches/chromium-sndio.patch b/srcpkgs/electron28/files/patches/chromium-sndio.patch
new file mode 100644
index 0000000000000..077ceaa8acbce
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-sndio.patch
@@ -0,0 +1,877 @@
+diff -Naur chromium-83.0.4103.97.orig/media/BUILD.gn chromium-83.0.4103.97/media/BUILD.gn
+--- a/media/BUILD.gn 2020-06-03 20:40:26.000000000 +0200
++++ b/media/BUILD.gn 2021-06-13 17:32:28.510395975 +0200
+@@ -65,6 +65,9 @@
+ defines += [ "DLOPEN_PULSEAUDIO" ]
+ }
+ }
++ if (use_sndio) {
++ defines += [ "USE_SNDIO" ]
++ }
+ if (use_cras) {
+ defines += [ "USE_CRAS" ]
+ }
+diff -Naur chromium-83.0.4103.97.orig/media/audio/BUILD.gn chromium-83.0.4103.97/media/audio/BUILD.gn
+--- a/media/audio/BUILD.gn 2020-06-03 20:39:37.000000000 +0200
++++ b/media/audio/BUILD.gn 2020-06-13 17:32:28.511395969 +0200
+@@ -236,6 +236,17 @@
+ 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 += [
+diff -Naur chromium-83.0.4103.97.orig/media/audio/linux/audio_manager_linux.cc chromium-83.0.4103.97/media/audio/linux/audio_manager_linux.cc
+--- a/media/audio/linux/audio_manager_linux.cc 2020-06-03 20:39:37.000000000 +0200
++++ b/media/audio/linux/audio_manager_linux.cc 2020-06-13 18:09:43.623333167 +0200
+@@ -19,6 +19,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 {
+
+ std::unique_ptr<media::AudioManager> CreateAudioManager(
+@@ -39,6 +45,16 @@
+ audio_log_factory);
+ }
+
++#if defined(USE_SNDIO)
++ struct sio_hdl *hdl = sio_open(SIO_DEVANY, SIO_PLAY, 0);
++ if (hdl != NULL) {
++ sio_close(hdl);
++ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax + 1);
++ return std::make_unique<AudioManagerSndio>(std::move(audio_thread),
++ audio_log_factory);
++ }
++#endif
++
+ #if defined(USE_CRAS)
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseCras)) {
+ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kCras, kAudioIOMax + 1);
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/audio_manager_sndio.cc chromium-83.0.4103.97/media/audio/sndio/audio_manager_sndio.cc
+--- a/media/audio/sndio/audio_manager_sndio.cc 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/audio_manager_sndio.cc 2020-06-13 17:32:28.511395969 +0200
+@@ -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
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/audio_manager_sndio.h chromium-83.0.4103.97/media/audio/sndio/audio_manager_sndio.h
+--- a/media/audio/sndio/audio_manager_sndio.h 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/audio_manager_sndio.h 2020-06-13 17:32:28.511395969 +0200
+@@ -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_
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_input.cc chromium-83.0.4103.97/media/audio/sndio/sndio_input.cc
+--- a/media/audio/sndio/sndio_input.cc 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/sndio_input.cc 2020-06-13 17:32:28.511395969 +0200
+@@ -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
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_input.h chromium-83.0.4103.97/media/audio/sndio/sndio_input.h
+--- a/media/audio/sndio/sndio_input.h 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/sndio_input.h 2020-06-13 17:32:28.511395969 +0200
+@@ -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_
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_output.cc chromium-83.0.4103.97/media/audio/sndio/sndio_output.cc
+--- a/media/audio/sndio/sndio_output.cc 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/sndio_output.cc 2020-06-13 17:32:28.511395969 +0200
+@@ -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
+diff -Naur chromium-83.0.4103.97.orig/media/audio/sndio/sndio_output.h chromium-83.0.4103.97/media/audio/sndio/sndio_output.h
+--- a/media/audio/sndio/sndio_output.h 1970-01-01 01:00:00.000000000 +0100
++++ b/media/audio/sndio/sndio_output.h 2020-06-13 17:32:28.511395969 +0200
+@@ -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_
+diff -Naur chromium-83.0.4103.97.orig/media/media_options.gni chromium-83.0.4103.97/media/media_options.gni
+--- a/media/media_options.gni
++++ b/media/media_options.gni
+@@ -158,6 +158,9 @@
+ # 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.
+ #
diff --git a/srcpkgs/electron28/files/patches/chromium-system-nodejs.patch b/srcpkgs/electron28/files/patches/chromium-system-nodejs.patch
new file mode 100644
index 0000000000000..83e8b93b9fcff
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-system-nodejs.patch
@@ -0,0 +1,20 @@
+--- a/third_party/node/node.py
++++ b/third_party/node/node.py
+@@ -13,11 +13,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):
diff --git a/srcpkgs/electron28/files/patches/chromium-systypes.patch b/srcpkgs/electron28/files/patches/chromium-systypes.patch
new file mode 100644
index 0000000000000..1ccebbd2f2b31
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-systypes.patch
@@ -0,0 +1,11 @@
+--- a/base/third_party/symbolize/symbolize.h
++++ b/base/third_party/symbolize/symbolize.h
+@@ -58,6 +58,8 @@
+ #include "config.h"
+ #include "glog/logging.h"
+
++#include <sys/types.h>
++
+ #ifdef HAVE_SYMBOLIZE
+
+ #if defined(__ELF__) // defined by gcc
diff --git a/srcpkgs/electron28/files/patches/chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch b/srcpkgs/electron28/files/patches/chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch
new file mode 100644
index 0000000000000..dae1adde0bc66
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-unbundle-ffmpeg-av_stream_get_first_dts.patch
@@ -0,0 +1,12 @@
+diff --git a/build/linux/unbundle/ffmpeg.gn b/build/linux/unbundle/ffmpeg.gn
+index 16e20744706..6a079b32221 100644
+--- a/build/linux/unbundle/ffmpeg.gn
++++ b/build/linux/unbundle/ffmpeg.gn
+@@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") {
+ "libavformat",
+ "libavutil",
+ ]
++ defines = [ "av_stream_get_first_dts(stream)=stream->first_dts" ]
+ }
+
+ buildflag_header("ffmpeg_features") {
diff --git a/srcpkgs/electron28/files/patches/chromium-unbundled-cross-toolchain.patch b/srcpkgs/electron28/files/patches/chromium-unbundled-cross-toolchain.patch
new file mode 100644
index 0000000000000..c3f2294ac4b2c
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-unbundled-cross-toolchain.patch
@@ -0,0 +1,12 @@
+--- a/build/toolchain/linux/unbundle/BUILD.gn.orig
++++ b/build/toolchain/linux/unbundle/BUILD.gn
+@@ -35,7 +35,7 @@
+ extra_ldflags = getenv("BUILD_LDFLAGS")
+
+ toolchain_args = {
+- current_cpu = current_cpu
+- current_os = current_os
++ current_cpu = host_cpu
++ current_os = host_os
+ }
+ }
diff --git a/srcpkgs/electron28/files/patches/chromium-webauthn-variant.patch b/srcpkgs/electron28/files/patches/chromium-webauthn-variant.patch
new file mode 100644
index 0000000000000..2ee02f5e5fe1b
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-webauthn-variant.patch
@@ -0,0 +1,14 @@
+Patch-Source: https://github.com/archlinux/svntogit-packages/blob/79b774aedeaecd4d31b2adb84e3e4b901dc980aa/trunk/webauthn-variant.patch
+--
+diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.h b/chrome/browser/webauthn/authenticator_request_dialog_model.h
+index f4992a74bd6..45cabe39974 100644
+--- a/chrome/browser/webauthn/authenticator_request_dialog_model.h
++++ b/chrome/browser/webauthn/authenticator_request_dialog_model.h
+@@ -7,6 +7,7 @@
+
+ #include <memory>
+ #include <string>
++#include <variant>
+ #include <vector>
+
+ #include "base/containers/span.h"
diff --git a/srcpkgs/electron28/files/patches/chromium-webrtc-size_t.patch b/srcpkgs/electron28/files/patches/chromium-webrtc-size_t.patch
new file mode 100644
index 0000000000000..dd46fe14cd2b1
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/chromium-webrtc-size_t.patch
@@ -0,0 +1,10 @@
+--- a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-08-10 20:42:29.000000000 +0200
++++ b/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h 2020-09-04 12:47:07.014833633 +0200
+@@ -12,6 +12,7 @@
+ #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
+
+ #include <array>
++#include <cstddef>
+
+ namespace webrtc {
+
diff --git a/srcpkgs/electron28/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch b/srcpkgs/electron28/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch
new file mode 100644
index 0000000000000..4258b65ecc36f
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/electron-Add-a-script-to-list-patch-targets.patch.patch
@@ -0,0 +1,42 @@
+From ff4122f236b70c272c746d0c336cdbd588d78cd1 Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Thu, 12 Dec 2019 16:12:18 -0500
+Subject: [PATCH] Add a script to list patch targets
+
+---
+ script/list_patch_targets.py | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+ create mode 100755 script/list_patch_targets.py
+
+diff --git a/script/list_patch_targets.py b/script/list_patch_targets.py
+new file mode 100755
+index 000000000..55173bac9
+--- /dev/null
++++ b/script/list_patch_targets.py
+@@ -0,0 +1,23 @@
++#!/usr/bin/env python
++
++import argparse
++import json
++
++
++def parse_args():
++ parser = argparse.ArgumentParser(description='Apply Electron patches')
++ parser.add_argument('config', nargs='+',
++ type=argparse.FileType('r'),
++ help='patches\' config(s) in the JSON format')
++ return parser.parse_args()
++
++
++def main():
++ configs = parse_args().config
++ for config_json in configs:
++ for patch_dir, repo in json.load(config_json).items():
++ print(repo)
++
++
++if __name__ == '__main__':
++ main()
+--
+2.23.0
+
diff --git a/srcpkgs/electron28/files/patches/electron-Build-fixes.patch.patch b/srcpkgs/electron28/files/patches/electron-Build-fixes.patch.patch
new file mode 100644
index 0000000000000..a98ee020d34ab
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/electron-Build-fixes.patch.patch
@@ -0,0 +1,12 @@
+diff --git a/build/npm.gni b/build/npm.gni
+index a1987d095..fb33a14c3 100644
+--- a/build/npm.gni
++++ b/build/npm.gni
+@@ -35,7 +35,6 @@ template("npm_action") {
+ if (!defined(deps)) {
+ deps = []
+ }
+- deps += [ ":npm_pre_flight_" + target_name ]
+
+ script = "//electron/build/npm-run.py"
+ args = [
diff --git a/srcpkgs/electron28/files/patches/electron-exclude-content-test-patches.patch b/srcpkgs/electron28/files/patches/electron-exclude-content-test-patches.patch
new file mode 100644
index 0000000000000..049ff4bdd040e
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/electron-exclude-content-test-patches.patch
@@ -0,0 +1,10 @@
+--- a/script/apply_all_patches.py 2023-05-03 15:27:52.000000000 +0200
++++ - 2023-05-04 23:12:01.430619050 +0200
+@@ -14,6 +14,7 @@
+ if os.path.exists(repo):
+ git.import_patches(repo=repo, patch_data=patch_from_dir(patch_dir),
+ threeway=threeway is not None,
++ exclude=['third_party/blink/tools/**', 'test/mjsunit/**', 'content/test/**', 'test/cctest/**', 'test/unittests/**', 'third_party/blink/web_tests/**', '.gitignore'],
+ committer_name="Electron Scripts", committer_email="scripts@electron")
+
+
diff --git a/srcpkgs/electron28/files/patches/electron-no-need-for-husky.patch b/srcpkgs/electron28/files/patches/electron-no-need-for-husky.patch
new file mode 100644
index 0000000000000..0b074254c43ca
--- /dev/null
+++ b/srcpkgs/electron28/files/patches/electron-no-need-for-husky.patch
@@ -0,0 +1,10 @@
+--- a/package.json 2022-07-06 17:31:50.000000000 +0200
++++ - 2022-07-08 23:04:43.654812957 +0200
+@@ -98,7 +98,6 @@
+ "precommit": "lint-staged",
+ "preinstall": "node -e 'process.exit(0)'",
+ "prepack": "check-for-leaks",
+- "prepare": "husky install",
+ "repl": "node ./script/start.js --interactive",
+ "start": "node ./script/start.js",
+ "test": "node ./script/spec-runner.js",
diff --git a/srcpkgs/electron28/template b/srcpkgs/electron28/template
new file mode 100644
index 0000000000000..c91a14b012ea2
--- /dev/null
+++ b/srcpkgs/electron28/template
@@ -0,0 +1,477 @@
+# Template file for 'electron28'
+pkgname=electron28
+version=28.2.2
+revision=1
+_nodever=18.18.2
+_chromiumver=120.0.6099.272
+archs="x86_64* aarch64*"
+create_wrksrc=yes
+build_wrksrc="src"
+hostmakedepends="$(vopt_if clang "clang lld llvm15") pkg-config perl
+ gperf bison ninja nodejs hwids which git yarn openjdk jq python3.11
+ libepoxy-devel libevent-devel libglib-devel"
+makedepends="libpng-devel gtk+3-devel nss-devel pciutils-devel
+ libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
+ libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel
+ libXScrnSaver-devel alsa-lib-devel snappy-devel libdrm-devel
+ libxml2-devel libxslt-devel $(vopt_if pulseaudio pulseaudio-devel) libexif-devel
+ libXcursor-devel libflac-devel speex-devel libmtp-devel libwebp-devel
+ libjpeg-turbo-devel libevent-devel json-c-devel minizip-devel jsoncpp-devel
+ zlib-devel libcap-devel libXdamage-devel fontconfig-devel freetype-devel opus-devel libffi-devel
+ $(vopt_if sndio sndio-devel) ffmpeg-devel libva-devel libuv-devel c-ares-devel libnotify-devel
+ $(vopt_if pipewire pipewire-devel) wayland-devel libcurl-devel libxshmfence-devel"
+short_desc="Cross platform application framework based on web technologies"
+maintainer="John <me@johnnynator.dev>"
+license="BSD-3-Clause"
+homepage="https://electronjs.org"
+distfiles="https://github.com/electron/electron/archive/v$version.tar.gz>electron-${version}.tar.gz
+ https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$_chromiumver.tar.xz
+ https://github.com/nodejs/node/archive/v$_nodever.tar.gz>node-$_nodever.tar.gz"
+checksum="7a20c98125eb1afde63be09235e2dcf148b21e4eca6ce06a9b9e73d5c6ec8d1f
+ 0cf2eec144bccb4ca668ca3b65517647a058225991b1d2543cb4626fb421cba7
+ b1c20070ec2cfc930572e8d3c3f1de4be8bc7e2259956031db00709b7775a0da"
+
+if [ "$XBPS_LIBC" = musl ]; then
+ hostmakedepends+=" musl-legacy-compat"
+fi
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ makedepends+=" musl-legacy-compat"
+fi
+
+no_generic_pkgconfig_link=yes
+lib32disabled=yes
+
+build_options="clang libcxx debug vaapi pulseaudio sndio pipewire"
+build_options_default="clang libcxx vaapi pulseaudio pipewire"
+desc_option_clang="Use clang to build"
+desc_option_libcxx="Use bundled libc++"
+desc_option_debug="Build with debug symbols"
+desc_option_pipewire="Enable support for screen sharing for WebRTC via PipeWire"
+
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" libX11-devel libxcb-devel pciutils-devel libXext-devel libglvnd-devel
+ libjpeg-turbo-devel libXi-devel nss-devel libpng-devel libwebp-devel
+ libxml2-devel $(vopt_if pulseaudio pulseaudio-devel) libxslt-devel libxkbcommon-devel
+ $(vopt_if pipewire pipewire-devel) ffmpeg-devel opus-devel pango-devel libva-devel
+ libcurl-devel snappy-devel libXrandr-devel libXcomposite-devel cups-devel
+ mit-krb5-devel alsa-lib-devel libXdamage-devel libepoxy-devel libevdev-devel
+ libavif-devel libaom-devel libdav1d-devel libflac-devel
+ libdrm-devel libgbm-devel"
+fi
+
+if [ ! "$XBPS_WORDSIZE" = "$XBPS_TARGET_WORDSIZE" ]; then
+ broken="chromium (v8) can only be cross compiled if word size matches"
+fi
+
+if [ "$CROSS_BUILD" ]; then
+ case "${XBPS_TARGET_MACHINE}" in
+ #aarch64*) ;;
+ *) nocross="chromium can not be cross compiled for this architecture" ;;
+ esac
+fi
+
+_buildtype=Release
+
+_setup_clang() {
+ export CC=clang
+ export CXX=clang++
+ export AR=llvm-ar
+ export NM=llvm-nm
+ export CFLAGS="-Wno-unknown-warning-option -fdebug-prefix-map=$wrksrc=."
+ export CXXFLAGS="-Wno-unknown-warning-option -fdebug-prefix-map=$wrksrc=."
+ export LDFLAGS=""
+ export BUILD_CC=clang
+ export BUILD_CXX=clang++
+ export BUILD_AR=llvm-ar
+ export BUILD_NM=llvm-nm
+ export BUILD_CFLAGS="-Wno-unknown-warning-option"
+ export BUILD_CXXFLAGS="-Wno-unknown-warning-option"
+ if [[ -n "$CROSS_BUILD" ]]; then
+ CFLAGS+=" --sysroot=${XBPS_CROSS_BASE}"
+ CXXFLAGS+=" --sysroot=${XBPS_CROSS_BASE}"
+ LDFLAGS+=" --sysroot=${XBPS_CROSS_BASE}"
+ if [[ -z "$build_option_libcxx" ]]; then
+ local gcc_version=$(gcc -dumpversion)
+ local clang_version=$(clang -dumpversion)
+ CFLAGS+=" --gcc-toolchain=/usr"
+ CFLAGS+=" -nostdinc"
+ CFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include"
+ CFLAGS+=" -isystem /usr/lib/clang/${clang_version}/include"
+ CXXFLAGS+=" --gcc-toolchain=/usr"
+ CXXFLAGS+=" -nostdinc++"
+ CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}"
+ CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}/${XBPS_CROSS_TRIPLET}"
+ CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include/c++/${gcc_version%.*}/backward"
+ CXXFLAGS+=" -nostdinc"
+ CXXFLAGS+=" -isystem ${XBPS_CROSS_BASE}/usr/include"
+ CXXFLAGS+=" -isystem /usr/lib/clang/${clang_version}/include"
+ LDFLAGS+=" --gcc-toolchain=/usr"
+ fi
+ fi
+}
+
+_setup_toolchain() {
+ if [ "$build_option_clang" ]; then
+ _setup_clang
+ fi
+}
+
+_apply_patch() {
+ local args="$1" pname="$(basename $2)"
+
+ if [ ! -f ".${pname}_done" ]; then
+ if [ -f "${2}.args" ]; then
+ args=$(<"${2}.args")
+ fi
+ msg_normal "$pkgver: patching: ${pname}.\n"
+ patch -N $args -i $2
+ touch .${pname}_done
+ fi
+}
+
+_git_am() {
+ local pname="$(basename $1)"
+
+ if [ ! -f ".${pname}_done" ]; then
+ msg_normal "$pkgver: patching: ${pname}.\n"
+ git -c 'user.name=Electron build' -c 'user.email=electron@ebuild' \
+ am --exclude "third_party/blink/tools/**" \
+ --exclude "test/mjsunit/**" --exclude "content/test/**" \
+ --exclude "test/cctest/**" --exclude "test/unittests/**" \
+ --exclude "third_party/blink/web_tests/**" \
+ --exclude "chrome/test/**" \
+ $1
+ touch .${pname}_done
+ fi
+}
+
+
+_get_chromium_arch() {
+ case "$1" in
+ x86_64*) echo x64 ;;
+ i686*) echo x86 ;;
+ arm*) echo arm ;;
+ aarch64*) echo arm64 ;;
+ ppc64*) echo ppc64 ;;
+ ppc*) echo ppc ;;
+ mipsel*) echo mipsel ;;
+ mips*) echo mips ;;
+ *) msg_error "$pkgver: cannot be compiled for ${XBPS_TARGET_MACHINE}.\n" ;;
+ esac
+}
+
+post_extract() {
+ mv chromium-${_chromiumver} src
+ mkdir -p src/third_party/
+ mv node-$_nodever src/third_party/electron_node
+ mv electron-${version} src/electron
+}
+
+_git_init() {
+ repopath="$1"
+ cd "$wrksrc"/"$repopath"
+ git init -q
+ git config "gc.auto" 0
+ if [ "$repopath" != "src" ]; then
+ echo "/${repopath#src/}" >> "$wrksrc/$build_wrksrc/.gitignore"
+ fi
+ git add .
+ git -c 'user.name=Electron build' -c 'user.email=electron@ebuild' \
+ commit -q -m "." || true
+
+}
+
+post_patch() {
+ cd $wrksrc
+ for x in $FILESDIR/patches/*.patch; do
+ case "${x##*/}" in
+ electron*.patch)
+ cd src/electron
+ _apply_patch -p1 "$x"
+ cd "$wrksrc";;
+ esac
+ done
+
+ # Sigh, electron uses git am...
+ if [ ! -f ".electron_patches_done" ]; then
+ mv src/electron/patches/config.json config.json.old
+ jq 'del(."src/electron/patches/Mantle", ."src/electron/patches/ReactiveObjC",
+ ."src/electron/patches/squirrel.mac", ."src/electron/patches/nan")' \
+ config.json.old > src/electron/patches/config.json
+
+ python3.11 src/electron/script/list_patch_targets.py src/electron/patches/config.json | while read -r repopath; do
+ _git_init $repopath
+ done
+ _git_init src/electron
+ cd $wrksrc
+
+ for x in $FILESDIR/chromium-upstream-patches/*.patch; do
+ [ -f $x ] || continue
+ cd src
+ _git_am "$x"
+ cd "$wrksrc"
+ done
+
+ python3.11 src/electron/script/apply_all_patches.py src/electron/patches/config.json
+ touch .electron_patches_done
+ fi
+
+ for x in $FILESDIR/patches/*; do
+ case "${x##*/}" in
+ chromium*.patch)
+ cd src
+ _apply_patch -p1 "$x"
+ cd "$wrksrc";;
+ esac
+ done
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ for x in $FILESDIR/musl-patches/*; do
+ case "${x##*/}" in
+ chromium*.patch)
+ cd src
+ _apply_patch -p1 "$x"
+ cd "$wrksrc";;
+ electron*.patch)
+ cd src/electron
+ _apply_patch -p1 "$x"
+ cd "$wrksrc";;
+ esac
+ done
+ fi
+ if [ "$build_option_sndio" ]; then
+ mkdir -p ${wrksrc}/${build_wrksrc}/media/audio/{sndio,openbsd}
+ cp ${FILESDIR}/sndio-files/sndio_*put.* \
+ ${wrksrc}/${build_wrksrc}/media/audio/sndio
+ cp ${FILESDIR}/sndio-files/audio_manager_openbsd.* \
+ ${wrksrc}/${build_wrksrc}/media/audio/openbsd
+ for f in "${FILESDIR}"/sndio-patches/*.patch; do
+ cd src
+ _apply_patch -p0 "$f"
+ cd "$wrksrc"
+ done
+ fi
+ vsed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+ src/tools/generate_shim_headers/generate_shim_headers.py
+}
+
+pre_configure() {
+ ln -sf "/usr/bin/python3.11" "${XBPS_WRAPPERDIR}/python3"
+ cd "$wrksrc/$build_wrksrc"
+
+ # https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
+ touch chrome/test/data/webui/i18n_process_css_test.html
+ # Use the file at run time instead of effectively compiling it in
+ sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
+ -i services/device/public/cpp/usb/BUILD.gn
+
+ vsed -e 's|python3.10|python3.11|g' -i third_party/electron_node/configure
+ vsed -e "s|(3, 10)|(3, 11)|" -i third_party/electron_node/configure
+
+ mkdir -p third_party/node/linux/node-linux-x64/bin
+ ln -sf /usr/bin/node third_party/node/linux/node-linux-x64/bin/
+ rm -f third_party/devtools-frontend/src/third_party/esbuild/esbuild
+
+ # compile gn early, so it can be used to generate gni stuff
+ msg_normal "Bootstrapping GN\n"
+ CC="clang" CXX="${CXX_FOR_BUILD:-$CXX}" LD="${LD_FOR_BUILD:-$LD}" \
+ CFLAGS="${CFLAGS_FOR_BUILD:-$CFLAGS} -Wno-error=redundant-move" \
+ CXXFLAGS="${CXXFLAGS_FOR_BUILD:-$CXXFLAGS} -Wno-error=redundant-move" \
+ LDFLAGS="${XBPS_LDFLAGS}" \
+ python3.11 tools/gn/bootstrap/bootstrap.py -s -v --skip-generate-buildfiles
+
+ # reusable system library settings
+ local use_system="
+ ffmpeg
+ flac
+ fontconfig
+ freetype
+ libdrm
+ libevent
+ libjpeg
+ libpng
+ libwebp
+ libxml
+ libxslt
+ opus
+ snappy
+ "
+ for _lib in $use_system libjpeg_turbo; do
+ msg_normal "Removing buildscripts for system provided $_lib\n"
+ find -type f -path "*third_party/$_lib/*" \
+ \! -path "*third_party/$_lib/chromium/*" \
+ \! -path "*third_party/$_lib/google/*" \
+ \! -path './base/third_party/icu/*' \
+ \! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
+ \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
+ -delete
+ done
+
+
+ msg_normal "Replacing gn files\n"
+ python3.11 build/linux/unbundle/replace_gn_files.py \
+ --system-libraries $use_system
+ third_party/libaddressinput/chromium/tools/update-strings.py
+
+ # Satisfy some scripts that use git describe to figure out the electron version
+ cd ${wrksrc}/src/electron
+ git tag -f "v${version}"
+}
+
+do_configure() {
+ local target_arch="$(_get_chromium_arch ${XBPS_TARGET_MACHINE})"
+ local host_arch="$(_get_chromium_arch ${XBPS_MACHINE})"
+ local conf=()
+ cd third_party/electron_node
+ if [ "$CROSS_BUILD" ]; then
+ conf_args=" --dest-cpu=${target_arch} --cross-compiling"
+ fi
+ ./configure --prefix=/usr \
+ --shared-zlib \
+ --shared-libuv \
+ --shared-openssl \
+ --shared-cares \
+ --openssl-use-def-ca-store \
+ --without-npm \
+ --without-dtrace \
+ --without-bundled-v8 \
+ ${conf_args}
+
+ cd "$wrksrc/$build_wrksrc"/electron
+ yarn install --frozen-lockfile
+ cd "$wrksrc/$build_wrksrc"
+
+ conf+=(
+ 'import("//electron/build/args/release.gn")'
+ "override_electron_version=\"${version}\""
+ )
+ conf+=(
+ 'enable_nacl=false'
+ 'enable_rust=false'
+
+ 'use_sysroot=false'
+
+ 'host_pkg_config="/usr/bin/pkg-config"'
+
+ "is_clang=$(vopt_if clang true false)"
+ "use_lld=$(vopt_if clang true false)"
+ 'clang_use_chrome_plugins=false'
+ 'clang_base_path="/usr"'
+
+ "gold_path=\"${XBPS_CROSS_BASE}/usr/bin/ld.gold\""
+ "use_custom_libcxx=$(vopt_if libcxx true false)" # https://github.com/llvm/llvm-project/issues/61705
+ 'use_gold=false'
+
+ 'rust_sysroot_absolute="/usr"'
+
+ # is_debug makes the build a debug build, changes some things.
+ # might be useful for real debugging vs just debug symbols.
+ "is_debug=false"
+ "blink_symbol_level=$(vopt_if debug 1 0)"
+ "symbol_level=$(vopt_if debug 1 0)"
+
+ 'icu_use_data_file=true'
+
+ 'enable_widevine=false'
+ 'enable_hangout_services_extension=true'
+
+ 'use_system_harfbuzz=false'
+ 'use_system_libffi=true'
+
+ 'use_qt=false'
+
+ 'use_cups=true'
+
+ "use_vaapi=$(vopt_if vaapi true false)"
+
+ "use_pulseaudio=$(vopt_if pulseaudio true false)"
+ "link_pulseaudio=$(vopt_if pulseaudio true false)"
+
+ "rtc_use_pipewire=$(vopt_if pipewire true false)"
+
+ "use_sndio=$(vopt_if sndio true false)"
+
+ # Always support proprietary codecs.
+ # Enable H.264 support in bundled ffmpeg.
+ 'proprietary_codecs=true'
+ 'ffmpeg_branding="Chrome"'
+
+ # Make sure that -Werror doesn't get added to CFLAGS by the build system.
+ # Depending on GCC version the warnings are different and we don't want
+ # the build to fail because of that.
+ 'treat_warnings_as_errors=false'
+ 'fatal_linker_warnings=false'
+
+ # Save space by removing DLOG and DCHECK messages (about 6% reduction).
+ # 'logging_like_official_build=true'
+ 'disable_fieldtrial_testing_config=true'
+
+ 'is_official_build=true'
+
+ # segfaults with llvm-12.0.1
+ 'is_cfi=false'
+ 'use_thin_lto=false'
+ 'use_cfi_icall=false'
+ 'chrome_pgo_phase=0'
+ )
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ conf+=( 'is_musl=true' )
+ fi
+
+ if [ "$CROSS_BUILD" ]; then
+ conf+=(
+ 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'host_toolchain="//build/toolchain/linux/unbundle:host"'
+ 'v8_snapshot_toolchain="//build/toolchain/linux/unbundle:v8_snapshot_cross"'
+ )
+ else
+ conf+=(
+ 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'host_toolchain="//build/toolchain/linux/unbundle:default"'
+ )
+ fi
+
+ conf+=(
+ "target_cpu=\"$target_arch\""
+ "host_cpu=\"$host_arch\""
+ )
+
+ _setup_toolchain
+ msg_normal "Configuring build\n"
+ out/Release/gn gen out/$_buildtype --args="${conf[*]}"
+}
+
+do_build() {
+ _setup_toolchain
+ msg_normal "Ninja turtles GO!\n"
+ ninja ${makejobs} -C out/$_buildtype node_gypi_headers node_version_header electron_dist_zip
+ cp -vf out/Release/gen/node_headers/include/node/config.gypi third_party/electron_node/config.gypi
+}
+
+do_install() {
+ vmkdir /usr/lib/$pkgname
+ vmkdir /usr/include/$pkgname
+ bsdtar -xf out/$_buildtype/dist.zip -C "$DESTDIR/usr/lib/$pkgname"
+
+ (
+ cd third_party/electron_node
+ HEADERS_ONLY=1 python3.11 ./tools/install.py install "$pkgdir" "${DESTDIR}/usr/include/${pkgname}/node_headers"
+ )
+ vlicense ${wrksrc}/src/LICENSE chromium.LICENSE
+ vlicense ${wrksrc}/src/electron/LICENSE electron.LICENSE
+ vlicense ${wrksrc}/src/third_party/electron_node/LICENSE node.LICENSE
+
+ vmkdir /usr/bin
+ ln -s ../lib/$pkgname/electron "$DESTDIR"/usr/bin/$pkgname
+}
+
+electron28-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ }
+}
diff --git a/srcpkgs/electron28/update b/srcpkgs/electron28/update
new file mode 100644
index 0000000000000..3af8e58b53580
--- /dev/null
+++ b/srcpkgs/electron28/update
@@ -0,0 +1,2 @@
+site=https://www.electronjs.org/releases/stable?version=${version%%.*}
+pattern='tag/v\K[\d\.]+(?=")'
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: New package: electron28-28.2.2
2024-02-13 9:21 [PR PATCH] New package: electron28-28.2.2 Johnnynator
2024-02-13 9:25 ` [PR PATCH] [Updated] " Johnnynator
@ 2024-05-14 1:46 ` github-actions
2024-05-15 11:32 ` Damienhaver
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: github-actions @ 2024-05-14 1:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/48690#issuecomment-2109122766
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: New package: electron28-28.2.2
2024-02-13 9:21 [PR PATCH] New package: electron28-28.2.2 Johnnynator
2024-02-13 9:25 ` [PR PATCH] [Updated] " Johnnynator
2024-05-14 1:46 ` github-actions
@ 2024-05-15 11:32 ` Damienhaver
2024-08-14 1:52 ` github-actions
2024-08-28 1:54 ` [PR PATCH] [Closed]: " github-actions
4 siblings, 0 replies; 6+ messages in thread
From: Damienhaver @ 2024-05-15 11:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
New comment by Damienhaver on void-packages repository
https://github.com/void-linux/void-packages/pull/48690#issuecomment-2112287351
Comment:
Does this build? I tried to boild this from source, but it failed when building the blink engine, I accidentally cleaned xbps, so I can't get the error without rebuilding.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: New package: electron28-28.2.2
2024-02-13 9:21 [PR PATCH] New package: electron28-28.2.2 Johnnynator
` (2 preceding siblings ...)
2024-05-15 11:32 ` Damienhaver
@ 2024-08-14 1:52 ` github-actions
2024-08-28 1:54 ` [PR PATCH] [Closed]: " github-actions
4 siblings, 0 replies; 6+ messages in thread
From: github-actions @ 2024-08-14 1:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/48690#issuecomment-2287682616
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PR PATCH] [Closed]: New package: electron28-28.2.2
2024-02-13 9:21 [PR PATCH] New package: electron28-28.2.2 Johnnynator
` (3 preceding siblings ...)
2024-08-14 1:52 ` github-actions
@ 2024-08-28 1:54 ` github-actions
4 siblings, 0 replies; 6+ messages in thread
From: github-actions @ 2024-08-28 1:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]
There's a closed pull request on the void-packages repository
New package: electron28-28.2.2
https://github.com/void-linux/void-packages/pull/48690
Description:
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, `x86_64,` `x86_64-musl`
<!--
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
[ci skip]
closes #48338
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-08-28 1:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 9:21 [PR PATCH] New package: electron28-28.2.2 Johnnynator
2024-02-13 9:25 ` [PR PATCH] [Updated] " Johnnynator
2024-05-14 1:46 ` github-actions
2024-05-15 11:32 ` Damienhaver
2024-08-14 1:52 ` github-actions
2024-08-28 1:54 ` [PR PATCH] [Closed]: " github-actions
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).