diff --git a/ANNOTATE_CONTIGUOUS_CONTAINER-Wodr.patch b/ANNOTATE_CONTIGUOUS_CONTAINER-Wodr.patch new file mode 100644 index 0000000..b2039c5 --- /dev/null +++ b/ANNOTATE_CONTIGUOUS_CONTAINER-Wodr.patch @@ -0,0 +1,229 @@ +This collides with an abseil macro causing ODR miscompiles + +diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/heap/collection_support/heap_vector_backing.h src/third_party/blink/renderer/platform/heap/collection_support/heap_vector_backing.h +--- src.old/third_party/blink/renderer/platform/heap/collection_support/heap_vector_backing.h 2025-08-15 17:32:29.517405064 +0200 ++++ src/third_party/blink/renderer/platform/heap/collection_support/heap_vector_backing.h 2025-08-17 14:47:13.834152160 +0200 +@@ -100,9 +100,9 @@ HeapVectorBacking::~HeapVecto + const size_t length = object_size / sizeof(T); + using ByteBuffer = uint8_t*; + ByteBuffer payload = reinterpret_cast(this); +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + ANNOTATE_CHANGE_SIZE(payload, length * sizeof(T), 0, length * sizeof(T)); +-#endif // ANNOTATE_CONTIGUOUS_CONTAINER ++#endif // WTF_ANNOTATE_CONTIGUOUS_CONTAINER + // HeapVectorBacking calls finalizers for unused slots and expects them to be + // no-ops. + if (std::is_polymorphic::value) { +@@ -176,11 +176,11 @@ struct TraceInCollectionTrait::GetSize( + *reinterpret_cast(self)) / + sizeof(T); +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + // As commented above, HeapVectorBacking can trace unused slots (which are + // already zeroed out). + ANNOTATE_CHANGE_SIZE(array, length, 0, length); +-#endif // ANNOTATE_CONTIGUOUS_CONTAINER ++#endif // WTF_ANNOTATE_CONTIGUOUS_CONTAINER + if constexpr (IsTraceable::value) { + for (unsigned i = 0; i < length; ++i) { + if (!std::is_polymorphic_v || +diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/heap/test/heap_test.cc src/third_party/blink/renderer/platform/heap/test/heap_test.cc +--- src.old/third_party/blink/renderer/platform/heap/test/heap_test.cc 2025-08-15 17:32:29.517405064 +0200 ++++ src/third_party/blink/renderer/platform/heap/test/heap_test.cc 2025-08-17 14:47:13.834152160 +0200 +@@ -854,7 +854,7 @@ TEST_F(HeapTest, HeapVectorShrinkInlineC + // Vector inline buffers are disabled; that constraint should be attempted + // removed, but until that time, disable testing handling of capacities + // of inline buffers. +-#if !defined(ANNOTATE_CONTIGUOUS_CONTAINER) ++#if !defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER) + // Shrinking switches the buffer from the external one to the inline one. + vector1.Shrink(kInlineCapacity - 1); + vector1.shrink_to_fit(); +@@ -2446,7 +2446,7 @@ class InlinedVectorObjectWithVtableWrapp + + // TODO(Oilpan): when Vector.h's contiguous container support no longer disables + // Vector<>s with inline capacity, enable this test. +-#if !defined(ANNOTATE_CONTIGUOUS_CONTAINER) ++#if !defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER) + TEST_F(HeapTest, VectorDestructorsWithVtable) { + ClearOutOldGarbage(); + InlinedVectorObjectWithVtable::destructor_calls_ = 0; +diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/sparse_vector_test.cc src/third_party/blink/renderer/platform/sparse_vector_test.cc +--- src.old/third_party/blink/renderer/platform/sparse_vector_test.cc 2025-08-15 17:32:29.549405057 +0200 ++++ src/third_party/blink/renderer/platform/sparse_vector_test.cc 2025-08-17 14:47:13.846152160 +0200 +@@ -240,9 +240,9 @@ TEST(SparseVectorPtrTest, SettingToNullp + EXPECT_FALSE(sparse_vector.HasField(FieldId::kFoo)); + } + +-// WTF::Vector always uses 0 inline capacity when ANNOTATE_CONTIGUOUS_CONTAINER ++// WTF::Vector always uses 0 inline capacity when WTF_ANNOTATE_CONTIGUOUS_CONTAINER + // is defined. +-#ifndef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifndef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + TEST(SparseVectorInlineCapacityTest, Basic) { + SparseVector sparse_vector; + EXPECT_EQ(16u, sparse_vector.capacity()); +diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/wtf/container_annotations.h src/third_party/blink/renderer/platform/wtf/container_annotations.h +--- src.old/third_party/blink/renderer/platform/wtf/container_annotations.h 2025-08-15 17:32:29.573405052 +0200 ++++ src/third_party/blink/renderer/platform/wtf/container_annotations.h 2025-08-17 14:47:13.842152160 +0200 +@@ -18,7 +18,7 @@ + // documentation: + // https://github.com/llvm-mirror/compiler-rt/blob/master/include/sanitizer/common_interface_defs.h#L154 + +-#define ANNOTATE_CONTIGUOUS_CONTAINER ++#define WTF_ANNOTATE_CONTIGUOUS_CONTAINER + + #define ANNOTATE_NEW_BUFFER(buffer, capacity, newSize) \ + if (buffer) { \ +diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/wtf/size_assertions.cc src/third_party/blink/renderer/platform/wtf/size_assertions.cc +--- src.old/third_party/blink/renderer/platform/wtf/size_assertions.cc 2025-08-15 17:32:29.577405052 +0200 ++++ src/third_party/blink/renderer/platform/wtf/size_assertions.cc 2025-08-17 14:47:13.838152160 +0200 +@@ -61,7 +61,7 @@ struct SameSizeAsVectorWithInlineCapacit + template + struct SameSizeAsVectorWithInlineCapacity { + SameSizeAsVectorWithInlineCapacity base_capacity; +-#if !defined(ANNOTATE_CONTIGUOUS_CONTAINER) ++#if !defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER) + T inline_buffer[inlineCapacity]; + #endif + }; +diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/wtf/vector.h src/third_party/blink/renderer/platform/wtf/vector.h +--- src.old/third_party/blink/renderer/platform/wtf/vector.h 2025-08-15 17:32:29.581405051 +0200 ++++ src/third_party/blink/renderer/platform/wtf/vector.h 2025-08-17 14:47:13.842152160 +0200 +@@ -59,7 +59,7 @@ + + // For ASAN builds, disable inline buffers completely as they cause various + // issues. +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + #define INLINE_CAPACITY 0 + #else + #define INLINE_CAPACITY InlineCapacity +@@ -471,7 +471,7 @@ class VectorBufferBase { + } + + void CheckUnusedSlots(const T* from, const T* to) { +-#if DCHECK_IS_ON() && !defined(ANNOTATE_CONTIGUOUS_CONTAINER) ++#if DCHECK_IS_ON() && !defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER) + if constexpr (NeedsToClearUnusedSlots()) { + const unsigned char* unused_area = + reinterpret_cast(from); +@@ -606,7 +606,7 @@ class VectorBuffer : pr + DCHECK(buffer_); + DCHECK_LT(new_capacity, capacity()); + size_t size_to_allocate = AllocationSize(new_capacity); +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + ANNOTATE_DELETE_BUFFER(buffer_, capacity_, size_); + #endif + bool succeeded = false; +@@ -615,7 +615,7 @@ class VectorBuffer : pr + capacity_ = static_cast(size_to_allocate / sizeof(T)); + succeeded = true; + } +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + MARKING_AWARE_ANNOTATE_NEW_BUFFER(Allocator, buffer_, capacity_, size_); + #endif + return succeeded; +@@ -740,7 +740,7 @@ class VectorBuffer : protected VectorBuf + DCHECK_NE(buffer_, InlineBuffer()); + size_t new_size = AllocationSize(new_capacity); + bool succeeded = false; +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + ANNOTATE_DELETE_BUFFER(buffer_, capacity_, size_); + #endif + if (Allocator::ShrinkVectorBacking(buffer_, AllocationSize(capacity()), +@@ -748,7 +748,7 @@ class VectorBuffer : protected VectorBuf + capacity_ = static_cast(new_size / sizeof(T)); + succeeded = true; + } +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + MARKING_AWARE_ANNOTATE_NEW_BUFFER(Allocator, buffer_, capacity_, size_); + #endif + return succeeded; +@@ -2145,7 +2145,7 @@ void Vector 0) { +@@ -2160,7 +2160,7 @@ void Vector + ALWAYS_INLINE void Vector::UncheckedAppend( + U&& val) { +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + // Vectors in ASAN builds don't have InlineCapacity. + push_back(std::forward(val)); + #else +@@ -2460,10 +2460,10 @@ void TraceInlinedBuffer(VisitorDispatche + const T* buffer_begin, + size_t capacity) { + const T* buffer_end = buffer_begin + capacity; +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + // Vector can trace unused slots (which are already zeroed out). + ANNOTATE_CHANGE_SIZE(buffer_begin, capacity, 0, capacity); +-#endif // ANNOTATE_CONTIGUOUS_CONTAINER ++#endif // WTF_ANNOTATE_CONTIGUOUS_CONTAINER + for (const T* buffer_entry = buffer_begin; buffer_entry != buffer_end; + buffer_entry++) { + Allocator::template Trace>(visitor, *buffer_entry); +@@ -2542,7 +2542,7 @@ void Vector vector_a; + vector_a.push_back(10); +@@ -415,7 +415,7 @@ TEST(VectorTest, ContainerAnnotations) { + volatile int* int_pointer_b3 = vector_b.data(); + EXPECT_DEATH((void)int_pointer_b3[2], "container-overflow"); + } +-#endif // defined(ANNOTATE_CONTIGUOUS_CONTAINER) ++#endif // defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER) + + class Comparable {}; + bool operator==(const Comparable& a, const Comparable& b) { +--- src/third_party/blink/renderer/core/html/parser/literal_buffer.h.orig 2025-08-15 17:32:29.197405123 +0200 ++++ src/third_party/blink/renderer/core/html/parser/literal_buffer.h 2025-08-17 16:56:06.586499195 +0200 +@@ -22,7 +22,7 @@ + + // For ASAN builds, disable inline buffers completely as they cause various + // issues. +-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER ++#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER + #define BUFFER_INLINE_CAPACITY 0 + #else + #define BUFFER_INLINE_CAPACITY kInlineSize diff --git a/CVE-2024-30260-undici-clear-proxy-authorization.patch b/CVE-2024-30260-undici-clear-proxy-authorization.patch deleted file mode 100644 index a626702..0000000 --- a/CVE-2024-30260-undici-clear-proxy-authorization.patch +++ /dev/null @@ -1,25 +0,0 @@ -Manual backport of https://github.com/nodejs/undici/commit/6805746680d27a5369d7fb67bc05f95a28247d75 - ---- src/third_party/electron_node/deps/undici/src/lib/handler/RedirectHandler.js.old 2024-04-04 09:55:39.696980900 +0000 -+++ src/third_party/electron_node/deps/undici/src/lib/handler/RedirectHandler.js 2024-04-09 16:52:37.888616200 +0000 -@@ -188,7 +188,8 @@ function shouldRemoveHeader (header, rem - (header.length === 4 && header.toString().toLowerCase() === 'host') || - (removeContent && header.toString().toLowerCase().indexOf('content-') === 0) || - (unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') || -- (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie') -+ (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie') || -+ (unknownOrigin && header.length === 19 && header.toString().toLowerCase() === 'proxy-authorization') - ) - } - ---- src/third_party/electron_node/deps/undici/undici.js.old 2024-04-04 10:02:38.059765300 +0000 -+++ src/third_party/electron_node/deps/undici/undici.js 2024-04-09 16:51:15.754041100 +0000 -@@ -7902,7 +7902,7 @@ var require_RedirectHandler = __commonJS - } - __name(parseLocation, "parseLocation"); - function shouldRemoveHeader(header, removeContent, unknownOrigin) { -- return header.length === 4 && header.toString().toLowerCase() === "host" || removeContent && header.toString().toLowerCase().indexOf("content-") === 0 || unknownOrigin && header.length === 13 && header.toString().toLowerCase() === "authorization" || unknownOrigin && header.length === 6 && header.toString().toLowerCase() === "cookie"; -+ return header.length === 4 && header.toString().toLowerCase() === "host" || removeContent && header.toString().toLowerCase().indexOf("content-") === 0 || unknownOrigin && header.length === 13 && header.toString().toLowerCase() === "authorization" || unknownOrigin && header.length === 6 && header.toString().toLowerCase() === "cookie" || unknownOrigin && header.length === 19 && header.toString().toLowerCase() === "proxy-authorization" - } - __name(shouldRemoveHeader, "shouldRemoveHeader"); - function cleanRequestHeaders(headers, removeContent, unknownOrigin) { diff --git a/CVE-2024-30261-undici-fetch-integrity.patch b/CVE-2024-30261-undici-fetch-integrity.patch deleted file mode 100644 index f26faa2..0000000 --- a/CVE-2024-30261-undici-fetch-integrity.patch +++ /dev/null @@ -1,136 +0,0 @@ -Port https://github.com/nodejs/undici/commit/d542b8c to apply to amalgamated undici code in nodejs (the original copy in deps/undici/src is not used and i'm not bothering with patching it) - -These chunks were manually cherry-picked from upstream nodejs commit https://github.com/nodejs/node/commit/60d24938 to match the undici changes. - - ---- a/third_party/electron_node/deps/undici/undici.js -+++ b/third_party/electron_node/deps/undici/undici.js -@@ -992,9 +992,12 @@ var require_util2 = __commonJS({ - var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util(); - var assert = require("assert"); - var { isUint8Array } = require("util/types"); -+ var supportedHashes = []; - var crypto; - try { - crypto = require("crypto"); -+ const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; -+ supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); - } catch { - } - function responseURL(response) { -@@ -1277,46 +1280,38 @@ var require_util2 = __commonJS({ - if (parsedMetadata.length === 0) { - return true; - } -- const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo)); -- const strongest = list[0].algo; -- const metadata = list.filter((item) => item.algo === strongest); -+ const strongest = getStrongestMetadata(parsedMetadata); -+ const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); - for (const item of metadata) { - const algorithm = item.algo; -- let expectedValue = item.hash; -- if (expectedValue.endsWith("==")) { -- expectedValue = expectedValue.slice(0, -2); -- } -+ const expectedValue = item.hash; - let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64"); -- if (actualValue.endsWith("==")) { -- actualValue = actualValue.slice(0, -2); -- } -- if (actualValue === expectedValue) { -- return true; -- } -- let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest("base64url"); -- if (actualBase64URL.endsWith("==")) { -- actualBase64URL = actualBase64URL.slice(0, -2); -+ if (actualValue[actualValue.length - 1] === "=") { -+ if (actualValue[actualValue.length - 2] === "=") { -+ actualValue = actualValue.slice(0, -2); -+ } else { -+ actualValue = actualValue.slice(0, -1); -+ } - } -- if (actualBase64URL === expectedValue) { -+ if (compareBase64Mixed(actualValue, expectedValue)) { - return true; - } - } - return false; - } - __name(bytesMatch, "bytesMatch"); -- var parseHashWithOptions = /((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i; -+ var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; - function parseMetadata(metadata) { - const result = []; - let empty = true; -- const supportedHashes = crypto.getHashes(); - for (const token of metadata.split(" ")) { - empty = false; - const parsedToken = parseHashWithOptions.exec(token); -- if (parsedToken === null || parsedToken.groups === void 0) { -+ if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) { - continue; - } -- const algorithm = parsedToken.groups.algo; -- if (supportedHashes.includes(algorithm.toLowerCase())) { -+ const algorithm = parsedToken.groups.algo.toLowerCase(); -+ if (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups); - } - } -@@ -1326,6 +1321,54 @@ var require_util2 = __commonJS({ - return result; - } - __name(parseMetadata, "parseMetadata"); -+ function getStrongestMetadata(metadataList) { -+ let algorithm = metadataList[0].algo; -+ if (algorithm[3] === "5") { -+ return algorithm; -+ } -+ for (let i = 1; i < metadataList.length; ++i) { -+ const metadata = metadataList[i]; -+ if (metadata.algo[3] === "5") { -+ algorithm = "sha512"; -+ break; -+ } else if (algorithm[3] === "3") { -+ continue; -+ } else if (metadata.algo[3] === "3") { -+ algorithm = "sha384"; -+ } -+ } -+ return algorithm; -+ } -+ __name(getStrongestMetadata, "getStrongestMetadata"); -+ function filterMetadataListByAlgorithm(metadataList, algorithm) { -+ if (metadataList.length === 1) { -+ return metadataList; -+ } -+ let pos = 0; -+ for (let i = 0; i < metadataList.length; ++i) { -+ if (metadataList[i].algo === algorithm) { -+ metadataList[pos++] = metadataList[i]; -+ } -+ } -+ metadataList.length = pos; -+ return metadataList; -+ } -+ __name(filterMetadataListByAlgorithm, "filterMetadataListByAlgorithm"); -+ function compareBase64Mixed(actualValue, expectedValue) { -+ if (actualValue.length !== expectedValue.length) { -+ return false; -+ } -+ for (let i = 0; i < actualValue.length; ++i) { -+ if (actualValue[i] !== expectedValue[i]) { -+ if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") { -+ continue; -+ } -+ return false; -+ } -+ } -+ return true; -+ } -+ __name(compareBase64Mixed, "compareBase64Mixed"); - function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) { - } - __name(tryUpgradeRequestToAPotentiallyTrustworthyURL, "tryUpgradeRequestToAPotentiallyTrustworthyURL"); diff --git a/Cr122-ffmpeg-new-channel-layout.patch b/Cr122-ffmpeg-new-channel-layout.patch index da6bebf..b7dc4d8 100644 --- a/Cr122-ffmpeg-new-channel-layout.patch +++ b/Cr122-ffmpeg-new-channel-layout.patch @@ -178,7 +178,7 @@ index 3c97e4a6cf4c7..a55e4ab51d5b3 100644 - smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance); - } - -- // TODO(https://crbug.com/1446302): Consider rejecting metadata that +- // TODO(crbug.com/40268540): Consider rejecting metadata that - // does not specify all values. - if (mdcv->has_primaries || mdcv->has_luminance) { - hdr_metadata.smpte_st_2086 = smpte_st_2086; @@ -221,7 +221,7 @@ index 3c97e4a6cf4c7..a55e4ab51d5b3 100644 + smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance); + } + -+ // TODO(https://crbug.com/1446302): Consider rejecting metadata that ++ // TODO(crbug.com/40268540): Consider rejecting metadata that + // does not specify all values. + if (mdcv->has_primaries || mdcv->has_luminance) { + hdr_metadata.smpte_st_2086 = smpte_st_2086; @@ -271,7 +271,7 @@ index 3c97e4a6cf4c7..a55e4ab51d5b3 100644 - // Treat dolby vision contents as dolby vision codec only if the - // device support clear DV decoding, otherwise use the original - // HEVC or AVC codec and profile. -- if (media::IsSupportedVideoType(type)) { +- if (media::IsDecoderSupportedVideoType(type)) { - codec = type.codec; - profile = type.profile; - } @@ -307,7 +307,7 @@ index 3c97e4a6cf4c7..a55e4ab51d5b3 100644 + // Treat dolby vision contents as dolby vision codec only if the + // device support clear DV decoding, otherwise use the original + // HEVC or AVC codec and profile. -+ if (media::IsSupportedVideoType(type)) { ++ if (media::IsDecoderSupportedVideoType(type)) { + codec = type.codec; + profile = type.profile; + } diff --git a/electron.desktop b/Electron.desktop similarity index 85% rename from electron.desktop rename to Electron.desktop index d95c629..bc41f16 100644 --- a/electron.desktop +++ b/Electron.desktop @@ -6,3 +6,4 @@ Exec=electron %u Categories=Development;GTK; NoDisplay=true StartupNotify=true +StartupWMClass=electron diff --git a/InternalAllocator-too-many-initializers.patch b/InternalAllocator-too-many-initializers.patch deleted file mode 100644 index 2893ad3..0000000 --- a/InternalAllocator-too-many-initializers.patch +++ /dev/null @@ -1,55 +0,0 @@ -From ee6e6d3e45af1f7210e144a17f14fb21a7e86588 Mon Sep 17 00:00:00 2001 -From: mikt -Date: Tue, 30 Jan 2024 03:09:24 +0000 -Subject: [PATCH] [PA] Fix InternalAllocator for GCC builds - -Internal Allocator has a few missing member functions, that are required -as a part of named requirement Allocator. -https://en.cppreference.com/w/cpp/named_req/Allocator - -It broke builds on GCC, so adding these to fix. -https://crrev.com/c/5196856/comments/0c4bbfd9_6433016b - -Change-Id: Ifce5f3e47c94c7bb1e298ac4cd7d0d1e4c6de59c -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5231905 -Commit-Queue: Mikihito Matsuura -Reviewed-by: Kalvin Lee -Reviewed-by: Takashi Sakamoto -Cr-Commit-Position: refs/heads/main@{#1253709} ---- - .../internal_allocator_forward.h | 21 +++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -diff --git a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h -index 45fec29f8cc93..b31a145ff6e99 100644 ---- a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h -+++ b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h -@@ -27,11 +27,24 @@ PartitionRoot& InternalAllocatorRoot(); - template - class InternalAllocator { - public: -- // Member types required by allocator completeness requirements. - using value_type = T; -- using size_type = std::size_t; -- using difference_type = std::ptrdiff_t; -- using propagate_on_container_move_assignment = std::true_type; -+ using is_always_equal = std::true_type; -+ -+ InternalAllocator() = default; -+ -+ template -+ InternalAllocator(const InternalAllocator&) {} // NOLINT -+ -+ template -+ InternalAllocator& operator=(const InternalAllocator&) { -+ return *this; -+ } -+ -+ template -+ bool operator==(const InternalAllocator&) { -+ // InternalAllocator can free allocations made by InternalAllocator. -+ return true; -+ } - - value_type* allocate(std::size_t count); - diff --git a/RenderFrameHostImpl-use-after-free.patch b/RenderFrameHostImpl-use-after-free.patch index d1cf3a2..008e520 100644 --- a/RenderFrameHostImpl-use-after-free.patch +++ b/RenderFrameHostImpl-use-after-free.patch @@ -1,17 +1,17 @@ ---- src/content/browser/renderer_host/render_frame_host_impl.cc.orig 2023-02-08 21:38:09.974003318 +0100 -+++ src/content/browser/renderer_host/render_frame_host_impl.cc 2023-02-13 14:13:50.217792624 +0100 -@@ -5,6 +5,7 @@ +--- src/content/browser/renderer_host/render_frame_host_impl.cc.orig 2024-12-08 18:45:24.018025513 +0100 ++++ src/content/browser/renderer_host/render_frame_host_impl.cc 2024-12-20 14:29:00.900380913 +0100 +@@ -8,6 +8,7 @@ #include #include #include +#include #include + #include #include - #include -@@ -1876,7 +1877,12 @@ +@@ -2276,7 +2277,12 @@ RenderFrameHostImpl::~RenderFrameHostImp + // completes. Among other things, this ensures that any `SafeRef`s from // `DocumentService` and `RenderFrameHostUserData` subclasses are still valid // when their destructors run. - document_associated_data_->RemoveAllServices(); - document_associated_data_.reset(); + // HACK: Using .reset() here works on MSVC and LLVM libc++ because the std::optional + // is still valid while the destructor runs. This does not work on GNU libstdc++ @@ -22,3 +22,14 @@ // If this was the last active frame in the SiteInstanceGroup, the // DecrementActiveFrameCount call will trigger the deletion of the +@@ -14482,7 +14488,9 @@ bool RenderFrameHostImpl::DidCommitNavig + // RenderFrameHost commits before the navigation commits. This happens + // when the current RenderFrameHost crashes before navigating to a new + // URL. +- document_associated_data_.emplace(*this, ++ // bsc#1227307 — same root cause as above ++ document_associated_data_->~DocumentAssociatedData(); ++ new(&document_associated_data_) std::optional(std::in_place, *this, + navigation_request->GetDocumentToken()); + } else { + // Cross-RenderFrameHost navigations that commit into a speculative diff --git a/_constraints b/_constraints index 7f55cc1..c8fa6a9 100644 --- a/_constraints +++ b/_constraints @@ -15,7 +15,7 @@ - 24 + 30 @@ -31,16 +31,4 @@ 8 - - - aarch64 - armv7l - armv6l - - - - asimdrdm - - - diff --git a/absl_strings-missing-headers.patch b/absl_strings-missing-headers.patch new file mode 100644 index 0000000..543cd28 --- /dev/null +++ b/absl_strings-missing-headers.patch @@ -0,0 +1,40 @@ +--- src/build/linux/unbundle/absl_strings.gn.orig 2025-04-12 17:15:17.061420294 +0200 ++++ src/build/linux/unbundle/absl_strings.gn 2025-04-15 20:16:58.452941199 +0200 +@@ -5,6 +5,10 @@ pkg_config("system_absl_cord") { + packages = [ "absl_cord" ] + } + ++pkg_config("system_absl_has_ostream_operator") { ++ packages = [ "absl_has_ostream_operator" ] ++} ++ + pkg_config("system_absl_strings") { + packages = [ "absl_strings" ] + } +@@ -35,6 +39,9 @@ shim_headers("strings_shim") { + "ascii.h", + "charconv.h", + "escaping.h", ++ "has_absl_stringify.h", ++ "internal/damerau_levenshtein_distance.h", ++ "internal/string_constant.h", + "match.h", + "numbers.h", + "str_cat.h", +@@ -74,8 +81,15 @@ source_set("string_view") { + public_configs = [ ":system_absl_string_view" ] + } + ++shim_headers("has_ostream_operator_shim") { ++ root_path = "." ++ prefix = "absl/strings/" ++ headers = [ "has_ostream_operator.h" ] ++} ++ + source_set("has_ostream_operator") { +- # Dummy — unavailable with abseil 202308 and chromium 122 does not use it ++ deps = [ ":has_ostream_operator_shim" ] ++ public_configs = [ ":system_absl_has_ostream_operator" ] + } + + source_set("ascii_test") { diff --git a/angle-BlobCache-Success.patch b/angle-BlobCache-Success.patch new file mode 100644 index 0000000..c971278 --- /dev/null +++ b/angle-BlobCache-Success.patch @@ -0,0 +1,14 @@ +--- src/third_party/angle/src/common/vulkan/vk_headers.h.orig 2025-08-15 17:33:15.429396781 +0200 ++++ src/third_party/angle/src/common/vulkan/vk_headers.h 2025-08-15 21:50:06.831979165 +0200 +@@ -16,6 +16,11 @@ + # include + #endif + ++// braindead change https://chromium-review.googlesource.com/c/angle/angle/+/5273491 ++#undef Success ++#undef None ++#undef Always ++ + #if !defined(ANGLE_SHARED_LIBVULKAN) + + namespace rx diff --git a/angle-SPV_BINARY_TO_TEXT_OPTION_NESTED_INDENT.patch b/angle-SPV_BINARY_TO_TEXT_OPTION_NESTED_INDENT.patch new file mode 100644 index 0000000..7d7fda2 --- /dev/null +++ b/angle-SPV_BINARY_TO_TEXT_OPTION_NESTED_INDENT.patch @@ -0,0 +1,62 @@ +From 397eb7c81ee996027470b2453b787e4947cdc8c0 Mon Sep 17 00:00:00 2001 +From: Shahbaz Youssefi +Date: Sat, 29 Jun 2024 00:22:42 -0400 +Subject: [PATCH] Vulkan: Easier to read SPIR-V disassembly + +Bug: angleproject:349994211 +Change-Id: I9d8da4a9fa336e1f5ecdfa39c33959ecebb2c6ea +Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5667081 +Auto-Submit: Shahbaz Youssefi +Reviewed-by: Amirali Abdolrashidi +Commit-Queue: Shahbaz Youssefi +--- + samples/shader_translator/shader_translator.cpp | 4 +++- + src/common/spirv/angle_spirv_utils.cpp | 4 +++- + src/compiler/translator/spirv/OutputSPIRV.cpp | 4 +++- + 3 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/samples/shader_translator/shader_translator.cpp b/samples/shader_translator/shader_translator.cpp +index 64f4df372f0..3d6aa709ce1 100644 +--- a/third_party/angle/samples/shader_translator/shader_translator.cpp ++++ b/third_party/angle/samples/shader_translator/shader_translator.cpp +@@ -928,7 +928,9 @@ static void PrintSpirv(const sh::BinaryBlob &blob) + spvtools::SpirvTools spirvTools(SPV_ENV_VULKAN_1_1); + + std::string readableSpirv; +- spirvTools.Disassemble(blob, &readableSpirv, 0); ++ spirvTools.Disassemble(blob, &readableSpirv, ++ SPV_BINARY_TO_TEXT_OPTION_COMMENT | SPV_BINARY_TO_TEXT_OPTION_INDENT | ++ SPV_BINARY_TO_TEXT_OPTION_NESTED_INDENT); + + puts(readableSpirv.c_str()); + #endif +diff --git a/src/common/spirv/angle_spirv_utils.cpp b/src/common/spirv/angle_spirv_utils.cpp +index 5082b3c7341..fc83582eb48 100644 +--- a/third_party/angle/src/common/spirv/angle_spirv_utils.cpp ++++ b/third_party/angle/src/common/spirv/angle_spirv_utils.cpp +@@ -62,7 +62,9 @@ void Print(const Blob &blob) + { + spvtools::SpirvTools spirvTools(GetEnv(blob)); + std::string readableSpirv; +- spirvTools.Disassemble(blob, &readableSpirv, 0); ++ spirvTools.Disassemble(blob, &readableSpirv, ++ SPV_BINARY_TO_TEXT_OPTION_COMMENT | SPV_BINARY_TO_TEXT_OPTION_INDENT | ++ SPV_BINARY_TO_TEXT_OPTION_NESTED_INDENT); + INFO() << "Disassembled SPIR-V:\n" << readableSpirv.c_str(); + } + +diff --git a/src/compiler/translator/spirv/OutputSPIRV.cpp b/src/compiler/translator/spirv/OutputSPIRV.cpp +index ad5c12e07fe..1ed6b264622 100644 +--- a/third_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp ++++ b/third_party/angle/src/compiler/translator/spirv/OutputSPIRV.cpp +@@ -6550,7 +6550,9 @@ spirv::Blob OutputSPIRVTraverser::getSpirv() + spvtools::SpirvTools spirvTools(mCompileOptions.emitSPIRV14 ? SPV_ENV_VULKAN_1_1_SPIRV_1_4 + : SPV_ENV_VULKAN_1_1); + std::string readableSpirv; +- spirvTools.Disassemble(result, &readableSpirv, 0); ++ spirvTools.Disassemble(result, &readableSpirv, ++ SPV_BINARY_TO_TEXT_OPTION_COMMENT | SPV_BINARY_TO_TEXT_OPTION_INDENT | ++ SPV_BINARY_TO_TEXT_OPTION_NESTED_INDENT); + fprintf(stderr, "%s\n", readableSpirv.c_str()); + #endif // ANGLE_DEBUG_SPIRV_GENERATION + diff --git a/angle-system-xxhash.patch b/angle-system-xxhash.patch index 1fea676..17bda4b 100644 --- a/angle-system-xxhash.patch +++ b/angle-system-xxhash.patch @@ -11,8 +11,8 @@ "src/common/base", - "src/common/third_party/xxhash", ] + libs = [] if (is_android) { - libs = [ "log" ] @@ -431,18 +432,12 @@ } } diff --git a/aom-vpx-no-thread-wrapper.patch b/aom-vpx-no-thread-wrapper.patch index 3d5c583..b8f594e 100644 --- a/aom-vpx-no-thread-wrapper.patch +++ b/aom-vpx-no-thread-wrapper.patch @@ -2,7 +2,7 @@ Remove this code which is disabled (media/base/media_switches.cc) and depends on --- src/media/base/libaom_thread_wrapper.cc.old 2024-04-02 09:53:17.097624400 +0000 +++ src/media/base/libaom_thread_wrapper.cc 2024-04-08 17:15:53.578155000 +0000 -@@ -5,16 +5,8 @@ +@@ -5,17 +5,8 @@ #include "base/logging.h" #include "media/base/codec_worker_impl.h" #include "media/base/libvpx_thread_wrapper.h" @@ -13,15 +13,16 @@ Remove this code which is disabled (media/base/media_switches.cc) and depends on -void InitLibAomThreadWrapper() { - const AVxWorkerInterface interface = - CodecWorkerImpl::GetCodecWorkerInterface(); +- AVxWorkerStatus, AVX_WORKER_STATUS_NOT_OK, +- AVX_WORKER_STATUS_OK, +- AVX_WORKER_STATUS_WORKING>::GetCodecWorkerInterface(); - CHECK(aom_set_worker_interface(&interface)); -} } // namespace media --- src/media/base/libvpx_thread_wrapper.cc.old 2024-04-02 09:53:17.097624400 +0000 +++ src/media/base/libvpx_thread_wrapper.cc 2024-04-08 17:15:46.565471400 +0000 -@@ -5,17 +5,8 @@ +@@ -5,18 +5,8 @@ #include "media/base/libvpx_thread_wrapper.h" #include "media/base/codec_worker_impl.h" @@ -32,8 +33,9 @@ Remove this code which is disabled (media/base/media_switches.cc) and depends on -void InitLibVpxThreadWrapper() { - const VPxWorkerInterface interface = - CodecWorkerImpl::GetCodecWorkerInterface(); +- VPxWorkerStatus, VPX_WORKER_STATUS_NOT_OK, +- VPX_WORKER_STATUS_OK, +- VPX_WORKER_STATUS_WORKING>::GetCodecWorkerInterface(); - - CHECK(vpx_set_worker_interface(&interface)); -} diff --git a/ax_platform_node_id-fpermissive.patch b/ax_platform_node_id-fpermissive.patch new file mode 100644 index 0000000..3b4fbb4 --- /dev/null +++ b/ax_platform_node_id-fpermissive.patch @@ -0,0 +1,12 @@ +--- src/ui/accessibility/platform/ax_platform_node_id.h.orig 2025-04-16 14:36:44.316067879 +0200 ++++ src/ui/accessibility/platform/ax_platform_node_id.h 2025-04-17 12:14:07.150992641 +0200 +@@ -55,9 +55,7 @@ class AXPlatformNodeId + + } // namespace ui + +-namespace std { + template <> + struct std::hash + : std::hash> {}; +-} // namespace std + #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_ID_H_ diff --git a/base-system-nspr.patch b/base-system-nspr.patch index 743dfd4..1e0335e 100644 --- a/base-system-nspr.patch +++ b/base-system-nspr.patch @@ -8,9 +8,9 @@ +#include #include "base/time/time_override.h" #include "build/build_config.h" - #include "third_party/abseil-cpp/absl/types/optional.h" ---- a/base/BUILD.gn 2022-06-30 13:13:20.315537859 +0200 -+++ b/base/BUILD.gn 2022-06-30 13:25:39.947410797 +0200 + +--- src/base/BUILD.gn.orig 2025-04-11 12:12:20.504331178 +0200 ++++ src/base/BUILD.gn 2025-04-11 20:49:30.979616277 +0200 @@ -1,3 +1,8 @@ +import("//build/config/linux/pkg_config.gni") + @@ -20,19 +20,19 @@ # Copyright 2013 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -@@ -826,8 +831,6 @@ - "third_party/cityhash_v103/src/city_v103.cc", - "third_party/cityhash_v103/src/city_v103.h", - "third_party/icu/icu_utf.h", +@@ -797,8 +802,6 @@ component("base") { + "task/updateable_sequenced_task_runner.h", + "test/scoped_logging_settings.h", + "test/spin_wait.h", - "third_party/nspr/prtime.cc", - "third_party/nspr/prtime.h", - "third_party/superfasthash/superfasthash.c", "thread_annotations.h", "threading/hang_watcher.cc", -@@ -1414,6 +1417,7 @@ + "threading/hang_watcher.h", +@@ -1014,6 +1017,7 @@ component("base") { + "//build/config/compiler:prevent_unsafe_narrowing", "//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wglobal_constructors", - "//electron/build/config:mas_build", + ":system_nspr", ] diff --git a/blink-shape_result-highway.patch b/blink-shape_result-highway.patch new file mode 100644 index 0000000..7e2ab22 --- /dev/null +++ b/blink-shape_result-highway.patch @@ -0,0 +1,16 @@ +--- src/third_party/blink/renderer/platform/fonts/shaping/shape_result.h.orig 2025-04-23 20:35:41.224982139 +0200 ++++ src/third_party/blink/renderer/platform/fonts/shaping/shape_result.h 2025-04-23 21:44:29.556139260 +0200 +@@ -54,9 +54,13 @@ + #include "ui/gfx/geometry/rect_f.h" + #include "ui/gfx/geometry/vector2d_f.h" + ++#include ++ + #if defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM64) ++#if HWY_MAJOR > 1 || (HWY_MAJOR == 1 && HWY_MINOR >= 1) + #define USE_SIMD_FOR_COMPUTING_GLYPH_BOUNDS 1 + #endif ++#endif + + struct hb_buffer_t; + diff --git a/boringssl-internal-addc-cxx.patch b/boringssl-internal-addc-cxx.patch deleted file mode 100644 index 0b6871e..0000000 --- a/boringssl-internal-addc-cxx.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- webrtc-6261b/third_party/boringssl/src/crypto/internal.h.orig 2024-03-13 22:27:36.595241500 +0000 -+++ webrtc-6261b/third_party/boringssl/src/crypto/internal.h 2024-03-14 19:45:48.047485200 +0000 -@@ -1146,11 +1146,28 @@ static inline uint64_t CRYPTO_rotr_u64(u - // bit. |carry| must be zero or one. - #if OPENSSL_HAS_BUILTIN(__builtin_addc) - -+#ifdef __cplusplus -+extern "C++" { -+static constexpr unsigned CRYPTO_GENERIC_ADDC(unsigned x, unsigned y, -+ unsigned carry, unsigned *out_carry){ -+ return __builtin_addc(x, y, carry, out_carry); -+} -+static constexpr unsigned long CRYPTO_GENERIC_ADDC(unsigned long x, unsigned long y, -+ unsigned long carry, unsigned long *out_carry){ -+ return __builtin_addcl(x, y, carry, out_carry); -+} -+static constexpr unsigned long long CRYPTO_GENERIC_ADDC(unsigned long long x, unsigned long long y, -+ unsigned long long carry, unsigned long long *out_carry){ -+ return __builtin_addcll(x, y, carry, out_carry); -+} -+} -+#else - #define CRYPTO_GENERIC_ADDC(x, y, carry, out_carry) \ - (_Generic((x), \ - unsigned: __builtin_addc, \ - unsigned long: __builtin_addcl, \ - unsigned long long: __builtin_addcll))((x), (y), (carry), (out_carry)) -+#endif - - static inline uint32_t CRYPTO_addc_u32(uint32_t x, uint32_t y, uint32_t carry, - uint32_t *out_carry) { -@@ -1198,11 +1215,28 @@ static inline uint64_t CRYPTO_addc_u64(u - // bit. |borrow| must be zero or one. - #if OPENSSL_HAS_BUILTIN(__builtin_subc) - -+#ifdef __cplusplus -+extern "C++" { -+static constexpr unsigned CRYPTO_GENERIC_SUBC(unsigned x, unsigned y, -+ unsigned borrow, unsigned *out_borrow){ -+ return __builtin_subc(x, y, borrow, out_borrow); -+} -+static constexpr unsigned long CRYPTO_GENERIC_SUBC(unsigned long x, unsigned long y, -+ unsigned long borrow, unsigned long *out_borrow){ -+ return __builtin_subcl(x, y, borrow, out_borrow); -+} -+static constexpr unsigned long long CRYPTO_GENERIC_SUBC(unsigned long long x, unsigned long long y, -+ unsigned long long borrow, unsigned long long *out_borrow){ -+ return __builtin_subcll(x, y, borrow, out_borrow); -+} -+} -+#else - #define CRYPTO_GENERIC_SUBC(x, y, borrow, out_borrow) \ - (_Generic((x), \ - unsigned: __builtin_subc, \ - unsigned long: __builtin_subcl, \ - unsigned long long: __builtin_subcll))((x), (y), (borrow), (out_borrow)) -+#endif - - static inline uint32_t CRYPTO_subc_u32(uint32_t x, uint32_t y, uint32_t borrow, - uint32_t *out_borrow) { diff --git a/brotli-remove-shared-dictionary.patch b/brotli-remove-shared-dictionary.patch index 5d1cdf8..bfd9ee7 100644 --- a/brotli-remove-shared-dictionary.patch +++ b/brotli-remove-shared-dictionary.patch @@ -2,28 +2,28 @@ Partially revert https://github.com/chromium/chromium/commit/c1dc375391403442935 and disable dependent code. This removes `brs` from Accept-Encoding list. This feature does not build with brotli < 1.1 ---- src/net/filter/brotli_source_stream.cc.orig 2023-10-12 17:25:42.094020700 +0200 -+++ src/net/filter/brotli_source_stream.cc 2023-10-12 22:43:53.790708700 +0200 -@@ -13,7 +11,6 @@ - #include "base/metrics/histogram_macros.h" +--- src/net/filter/brotli_source_stream.cc.orig 2025-08-21 17:44:48.616409315 +0200 ++++ src/net/filter/brotli_source_stream.cc 2025-08-22 18:23:03.535047458 +0200 +@@ -18,7 +18,6 @@ #include "net/base/io_buffer.h" + #include "net/filter/source_stream_type.h" #include "third_party/brotli/include/brotli/decode.h" -#include "third_party/brotli/include/brotli/shared_dictionary.h" namespace net { -@@ -25,21 +22,11 @@ const char kBrotli[] = "BROTLI"; +@@ -30,21 +29,11 @@ const char kBrotli[] = "BROTLI"; // Brotli format specification: http://www.ietf.org/id/draft-alakuijala-brotli. class BrotliSourceStream : public FilterSourceStream { public: - explicit BrotliSourceStream(std::unique_ptr upstream, - scoped_refptr dictionary = nullptr, - size_t dictionary_size = 0u) -- : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)), +- : FilterSourceStream(SourceStreamType::kBrotli, std::move(upstream)), - dictionary_(std::move(dictionary)), - dictionary_size_(dictionary_size) { + explicit BrotliSourceStream(std::unique_ptr upstream) -+ : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)) { ++ : FilterSourceStream(SourceStreamType::kBrotli, std::move(upstream)) { brotli_state_ = BrotliDecoderCreateInstance(AllocateMemory, FreeMemory, this); CHECK(brotli_state_); @@ -36,17 +36,17 @@ This feature does not build with brotli < 1.1 } BrotliSourceStream(const BrotliSourceStream&) = delete; -@@ -176,9 +163,6 @@ class BrotliSourceStream : public Filter +@@ -180,9 +169,6 @@ class BrotliSourceStream : public Filter free(&array[-1]); } - const scoped_refptr dictionary_; - const size_t dictionary_size_; - - raw_ptr brotli_state_; + raw_ptr brotli_state_; DecodingStatus decoding_status_ = DecodingStatus::DECODING_IN_PROGRESS; -@@ -200,8 +184,7 @@ std::unique_ptr Crea +@@ -204,8 +190,7 @@ std::unique_ptr Crea std::unique_ptr previous, scoped_refptr dictionary, size_t dictionary_size) { @@ -64,7 +64,7 @@ This feature does not build with brotli < 1.1 "CompressionDictionaryTransportBackend", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); - const base::FeatureParam::Option - kCompressionDictionaryTransportBackendVersionOptions[] = { - {CompressionDictionaryTransportBackendVersion::kV1, "v1"}, + + // When both this feature and the kCompressionDictionaryTransportBackend feature + // are enabled, the following will happen: diff --git a/browser_process_impl-fix-safe_browsing_mode-0.patch b/browser_process_impl-fix-safe_browsing_mode-0.patch new file mode 100644 index 0000000..a8e99aa --- /dev/null +++ b/browser_process_impl-fix-safe_browsing_mode-0.patch @@ -0,0 +1,45 @@ +--- src/electron/shell/browser/browser_process_impl.h.orig 2025-04-16 14:34:09.211257279 +0200 ++++ src/electron/shell/browser/browser_process_impl.h 2025-04-18 21:20:48.780761049 +0200 +@@ -16,6 +16,7 @@ + #include "chrome/browser/browser_process.h" + #include "components/embedder_support/origin_trials/origin_trials_settings_storage.h" + #include "components/prefs/value_map_pref_store.h" ++#include "components/safe_browsing/buildflags.h" + #include "printing/buildflags/buildflags.h" + #include "services/network/public/cpp/network_quality_tracker.h" + #include "services/network/public/cpp/shared_url_loader_factory.h" +@@ -104,7 +105,9 @@ class BrowserProcessImpl : public Browse + DownloadRequestLimiter* download_request_limiter() override; + BackgroundModeManager* background_mode_manager() override; + StatusTray* status_tray() override; ++#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) + safe_browsing::SafeBrowsingService* safe_browsing_service() override; ++#endif + subresource_filter::RulesetService* subresource_filter_ruleset_service() + override; + component_updater::ComponentUpdateService* component_updater() override; +--- src/electron/BUILD.gn.orig 2025-04-16 14:34:09.140868383 +0200 ++++ src/electron/BUILD.gn 2025-04-18 21:29:07.278572174 +0200 +@@ -465,6 +465,7 @@ source_set("electron_lib") { + "//components/os_crypt/sync", + "//components/pref_registry", + "//components/prefs", ++ "//components/safe_browsing:buildflags", + "//components/security_state/content", + "//components/upload_list", + "//components/user_prefs", +--- src/electron/shell/browser/browser_process_impl.cc.orig 2025-04-16 14:34:09.211257279 +0200 ++++ src/electron/shell/browser/browser_process_impl.cc 2025-04-18 21:32:53.957517063 +0200 +@@ -257,10 +257,12 @@ StatusTray* BrowserProcessImpl::status_t + return nullptr; + } + ++#if BUILDFLAG(SAFE_BROWSING_AVAILABLE) + safe_browsing::SafeBrowsingService* + BrowserProcessImpl::safe_browsing_service() { + return nullptr; + } ++#endif + + subresource_filter::RulesetService* + BrowserProcessImpl::subresource_filter_ruleset_service() { diff --git a/bsc1224178-font-gc.patch b/bsc1224178-font-gc.patch new file mode 100644 index 0000000..7bd1b1a --- /dev/null +++ b/bsc1224178-font-gc.patch @@ -0,0 +1,422 @@ +Example stack trace for this crash: +#0 0x000055f451cdf761 in partition_alloc::PartitionRoot::FreeNoHooksImmediate(void*, partition_alloc::internal::SlotSpanMetadata<(partition_alloc::internal::MetadataKind)1>*, unsigned long)::{lambda()#1}::operator()() const (__closure=, + __closure=) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1531 +#1 partition_alloc::PartitionRoot::FreeNoHooksImmediate (this=, object=, slot_span=, slot_start=, this=, object=, slot_span=, slot_start=) + at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1531 +#2 partition_alloc::PartitionRoot::FreeInline<(partition_alloc::internal::FreeFlags)2> (this=, object=, this=, object=) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1513 +#3 partition_alloc::PartitionRoot::FreeInlineInUnknownRoot<(partition_alloc::internal::FreeFlags)2> (object=0x316400f16770) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1432 +#4 allocator_shim::internal::PartitionFreeInternal<(partition_alloc::internal::FreeFlags)2> (object=0x316400f16770, context=0x0) at ../../base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc:407 +#5 allocator_shim::internal::PartitionFree (object=0x316400f16770, context=0x0) at ../../base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc:411 +#6 0x000055f44ef26567 in std::__cxx11::basic_string, std::allocator >::_M_assign (this=0x316401a361c8, __str="/usr/share/fonts/truetype/NimbusSans-Regular.otf") at /usr/include/c++/14/bits/basic_string.tcc:289 +#7 0x000055f4563f3d34 in std::__cxx11::basic_string, std::allocator >::assign (this=, __str=...) at /usr/include/c++/14/bits/basic_string.h:1619 +#8 std::__cxx11::basic_string, std::allocator >::operator= (this=, __str=...) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:141021183 +#9 blink::FontFaceCreationParams::operator= () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:141021183 +#10 blink::FontCacheKey::operator=(blink::FontCacheKey const&) [clone .isra.0] () at ../../third_party/blink/renderer/platform/fonts/font_cache_key.h:55 +#11 0x000055f4564c44d9 in WTF::HashMapTranslator, WTF::HashMapValueTraits, WTF::HashTraits > > >::Store >, blink::FontCacheKey&, blink::FontPlatformData const*&> () at ../../third_party/blink/renderer/platform/wtf/hash_map.h:340 +#12 WTF::HashTable >, WTF::KeyValuePairExtractor, WTF::HashMapValueTraits, WTF::HashTraits > >, WTF::HashTraits, blink::HeapAllocator>::insert, WTF::HashMapValueTraits, WTF::HashTraits > > >, blink::FontCacheKey&, blink::FontPlatformData const*&>(blink::FontCacheKey&, blink::FontPlatformData const*&) [clone .isra.0] () at ../../third_party/blink/renderer/platform/wtf/hash_table.h:1291 +#13 0x000055f4543111b1 in WTF::HashMap, WTF::HashTraits, WTF::HashTraits >, blink::HeapAllocator>::InlineAdd () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:141870345 +#14 WTF::HashMap, WTF::HashTraits, WTF::HashTraits >, blink::HeapAllocator>::insert () at ../../third_party/blink/renderer/platform/wtf/hash_map.h:475 +#15 blink::FontPlatformDataCache::GetOrCreateFontPlatformData (this=this@entry=0x316400141880, font_cache=font_cache@entry=0x316400141850, font_description=..., creation_params=..., alternate_font_name=alternate_font_name@entry=0) + at ../../third_party/blink/renderer/platform/fonts/font_platform_data_cache.cc:68 +#16 0x000055f454311a0a in blink::FontCache::GetFontPlatformData (this=0x316400141850, font_description=..., creation_params=..., alternate_font_name=0) at ../../third_party/blink/renderer/platform/fonts/font_cache.cc:164 +#17 0x000055f4564bbc7d in blink::FontCache::PlatformFallbackFontForCharacter () at ../../third_party/blink/renderer/platform/fonts/linux/font_cache_linux.cc:143 +#18 0x000055f4564bcc2b in blink::FontCache::FallbackFontForCharacter(blink::FontDescription const&, int, blink::SimpleFontData const*, blink::FontFallbackPriority) [clone .isra.0] () at ../../third_party/blink/renderer/platform/fonts/font_cache.cc:251 +#19 0x000055f45443653f in blink::FontFallbackIterator::UniqueSystemFontForHintList () at ../../third_party/blink/renderer/platform/fonts/font_fallback_iterator.cc:303 +#20 blink::FontFallbackIterator::Next (this=0x7ffefa904bf0, hint_list=...) at ../../third_party/blink/renderer/platform/fonts/font_fallback_iterator.cc:152 +#21 0x000055f45431a4b6 in blink::HarfBuzzShaper::ShapeSegment (this=, range_data=, segment=..., result=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158192637 +#22 0x000055f453953f86 in blink::HarfBuzzShaper::Shape () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:145662151 +#23 Reshape (this=0x7ffefa9050d0, start_item=..., font=..., start_offset=, end_offset=end_offset@entry=43) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:145662155 +#24 0x000055f4539542f0 in ShapeWithoutCache (this=this@entry=0x7ffefa9050d0, start_item=..., font=..., end_offset=end_offset@entry=43) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:145662155 +#25 0x000055f4539b5ab9 in operator() () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:147940603 +#26 Shape () at ../../third_party/blink/renderer/core/layout/inline/inline_node.cc:177 +#27 blink::InlineNode::ShapeText (this=this@entry=0x7ffefa9057a8, data=data@entry=0x316403e7e958, previous_text=previous_text@entry=0x0, previous_items=previous_items@entry=0x0, override_font=override_font@entry=0x0) + at ../../third_party/blink/renderer/core/layout/inline/inline_node.cc:1512 +#28 0x000055f4539b9692 in blink::InlineNode::ShapeTextIncludingFirstLine () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:147941159 +#29 blink::InlineNode::PrepareLayout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:145662744 +#30 blink::InlineNode::PrepareLayoutIfNeeded (this=) at ../../third_party/blink/renderer/core/layout/inline/inline_node.cc:598 +#31 0x000055f45400a06d in blink::InlineNode::EnsureData () at ../../third_party/blink/renderer/core/layout/inline/inline_node.cc:978 +#32 blink::InlineNode::IsBlockLevel () at ../../third_party/blink/renderer/core/layout/inline/inline_node.h:102 +#33 blink::BlockNode::FirstChild (this=this@entry=0x7ffefa905860) at ../../third_party/blink/renderer/core/layout/block_node.cc:1121 +#34 0x000055f45400a200 in blink::BlockNode::IsInlineFormattingContextRoot (this=0x7ffefa905860, first_child_out=0x7ffefa905830) at ../../third_party/blink/renderer/core/layout/block_node.cc:1466 +#35 0x000055f45423975b in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa905860) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:546 +#36 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#37 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#38 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#39 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#40 0x000055f454237e4f in LayoutBlockChild () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324341 +#41 LayoutInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:129 +#42 LayoutInflow () at gen/third_party/blink/public/mojom/frame/frame.mojom.cc:44270740 +#43 blink::BlockLayoutAlgorithm::HandleInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:2139 +#44 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa9063b0, inline_child_layout_context=) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:993 +#45 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa9063b0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#46 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#47 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#48 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#49 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#50 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector*, blink::HeapVector, 0u>*, bool) [clone .constprop.0] () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1253 +#51 0x000055f45402e6c6 in blink::FlexLayoutAlgorithm::LayoutInternal () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1043 +#52 blink::FlexLayoutAlgorithm::Layout (this=this@entry=0x7ffefa9070e0) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883768 +#53 0x000055f454032076 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#54 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#55 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#56 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#57 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector*, blink::HeapVector, 0u>*, bool) [clone .constprop.0] () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1253 +#58 0x000055f45402e6c6 in blink::FlexLayoutAlgorithm::LayoutInternal () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1043 +#59 blink::FlexLayoutAlgorithm::Layout (this=this@entry=0x7ffefa9081a0) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883768 +#60 0x000055f454032076 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#61 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#62 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#63 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#64 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector*, blink::HeapVector, 0u>*, bool) [clone .constprop.0] () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1253 +#65 0x000055f45402e6c6 in blink::FlexLayoutAlgorithm::LayoutInternal () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1043 +#66 blink::FlexLayoutAlgorithm::Layout (this=this@entry=0x7ffefa909260) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883768 +#67 0x000055f454032076 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#68 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#69 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#70 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#71 0x000055f454230b9a in LayoutBlockChild () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:114 +#72 blink::BlockLayoutAlgorithm::LayoutNewFormattingContext (this=this@entry=0x7ffefa90a330, child=..., child_break_token=child_break_token@entry=0x0, child_data=..., origin_offset=..., abort_if_cleared=false, out_child_bfc_offset=0x7ffefa90a19c, + out_resolved_margins=0x7ffefa90a1d0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1953 +#73 0x000055f454237063 in blink::BlockLayoutAlgorithm::HandleNewFormattingContext () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324366 +#74 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90a330, inline_child_layout_context=) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:988 +#75 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90a330) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#76 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#77 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#78 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#79 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#80 0x000055f4540d6105 in blink::OutOfFlowLayoutPart::GenerateFragment () at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:2546 +#81 blink::OutOfFlowLayoutPart::Layout (this=this@entry=0x7ffefa90b1b0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) + at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917333 +#82 0x000055f4540e5174 in blink::OutOfFlowLayoutPart::LayoutOOFNode (this=this@entry=0x7ffefa90b1b0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, + is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917453 +#83 0x000055f4540e5b85 in blink::OutOfFlowLayoutPart::LayoutCandidates (this=this@entry=0x7ffefa90b1b0, candidates=candidates@entry=0x7ffefa90b110) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:1111 +#84 0x000055f4540f2b9e in blink::OutOfFlowLayoutPart::Run (this=0x7ffefa90b1b0) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:523 +#85 0x000055f45423444d in blink::BoxFragmentBuilder::HandleOofsAndSpecialDescendants (this=this@entry=0x7ffefa90b550) at ../../third_party/blink/renderer/core/layout/box_fragment_builder.cc:547 +#86 0x000055f4542367d0 in blink::BlockLayoutAlgorithm::FinishLayout () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1357 +#87 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90b540, inline_child_layout_context=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:156517574 +#88 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90b540) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#89 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#90 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#91 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#92 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#93 0x000055f454230b9a in LayoutBlockChild () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:114 +#94 blink::BlockLayoutAlgorithm::LayoutNewFormattingContext (this=this@entry=0x7ffefa90c280, child=..., child_break_token=child_break_token@entry=0x0, child_data=..., origin_offset=..., abort_if_cleared=false, out_child_bfc_offset=0x7ffefa90c0ec, + out_resolved_margins=0x7ffefa90c120) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1953 +#95 0x000055f454237063 in blink::BlockLayoutAlgorithm::HandleNewFormattingContext () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324366 +#96 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90c280, inline_child_layout_context=) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:988 +#97 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90c280) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#98 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#99 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#100 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#101 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#102 0x000055f454230b9a in LayoutBlockChild () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:114 +#103 blink::BlockLayoutAlgorithm::LayoutNewFormattingContext (this=this@entry=0x7ffefa90cfc0, child=..., child_break_token=child_break_token@entry=0x0, child_data=..., origin_offset=..., abort_if_cleared=false, out_child_bfc_offset=0x7ffefa90ce2c, + out_resolved_margins=0x7ffefa90ce60) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1953 +#104 0x000055f454237063 in blink::BlockLayoutAlgorithm::HandleNewFormattingContext () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324366 +#105 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90cfc0, inline_child_layout_context=) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:988 +#106 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90cfc0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#107 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#108 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#109 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#110 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#111 0x000055f454237e4f in LayoutBlockChild () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324341 +#112 LayoutInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:129 +#113 LayoutInflow () at gen/third_party/blink/public/mojom/frame/frame.mojom.cc:44270740 +#114 blink::BlockLayoutAlgorithm::HandleInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:2139 +#115 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90db10, inline_child_layout_context=) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:993 +#116 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90db10) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#117 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#118 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#119 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#120 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#121 0x000055f454237e4f in LayoutBlockChild () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324341 +#122 LayoutInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:129 +#123 LayoutInflow () at gen/third_party/blink/public/mojom/frame/frame.mojom.cc:44270740 +#124 blink::BlockLayoutAlgorithm::HandleInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:2139 +#125 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90e660, inline_child_layout_context=) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:993 +#126 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90e660) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#127 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#128 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#129 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#130 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#131 0x000055f454237e4f in LayoutBlockChild () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324341 +#132 LayoutInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:129 +#133 LayoutInflow () at gen/third_party/blink/public/mojom/frame/frame.mojom.cc:44270740 +#134 blink::BlockLayoutAlgorithm::HandleInflow () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:2139 +#135 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90f1b0, inline_child_layout_context=) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:993 +#136 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa90f1b0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#137 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#138 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#139 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#140 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#141 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector*, blink::HeapVector, 0u>*, bool) [clone .constprop.0] () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1253 +#142 0x000055f45402e6c6 in blink::FlexLayoutAlgorithm::LayoutInternal () at ../../third_party/blink/renderer/core/layout/flex/flex_layout_algorithm.cc:1043 +#143 blink::FlexLayoutAlgorithm::Layout (this=this@entry=0x7ffefa90fee0) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883768 +#144 0x000055f454032076 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#145 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#146 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#147 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#148 0x000055f454230b9a in LayoutBlockChild () at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:114 +#149 blink::BlockLayoutAlgorithm::LayoutNewFormattingContext (this=this@entry=0x7ffefa910fb0, child=..., child_break_token=child_break_token@entry=0x0, child_data=..., origin_offset=..., abort_if_cleared=false, out_child_bfc_offset=0x7ffefa910e1c, + out_resolved_margins=0x7ffefa910e50) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:1953 +#150 0x000055f454237063 in blink::BlockLayoutAlgorithm::HandleNewFormattingContext () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:142324366 +#151 blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa910fb0, inline_child_layout_context=) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:988 +#152 0x000055f4542397a2 in blink::BlockLayoutAlgorithm::Layout (this=0x7ffefa910fb0) at ../../third_party/blink/renderer/core/layout/block_layout_algorithm.cc:549 +#153 0x000055f45400cb43 in operator() () at ../../third_party/blink/renderer/core/layout/block_node.cc:214 +#154 CreateAlgorithmAndRun >(const blink::LayoutAlgorithmParams &, const struct {...} &) (params=..., callback=...) + at ../../third_party/blink/renderer/core/layout/block_node.cc:120 +#155 0x000055f45401ae3e in LayoutWithAlgorithm () at ../../third_party/blink/renderer/core/layout/block_node.cc:212 +#156 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/layout/block_node.cc:523 +#157 0x000055f4540d6105 in blink::OutOfFlowLayoutPart::GenerateFragment () at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:2546 +#158 blink::OutOfFlowLayoutPart::Layout (this=this@entry=0x7ffefa911e30, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) + at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917333 +#159 0x000055f4540e5174 in blink::OutOfFlowLayoutPart::LayoutOOFNode (this=this@entry=0x7ffefa911e30, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, + is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917453 +#160 0x000055f4540e5b85 in blink::OutOfFlowLayoutPart::LayoutCandidates (this=this@entry=0x7ffefa911e30, candidates=candidates@entry=0x7ffefa911d90) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:1111 +#161 0x000055f4540f2b9e in blink::OutOfFlowLayoutPart::Run (this=0x7ffefa911e30) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:523 +#162 0x000055f45423444d in blink::BoxFragmentBuilder::HandleOofsAndSpecialDescendants (this=0x7ffefa9121e0) at ../../third_party/blink/renderer/core/layout/box_fragment_builder.cc:547 +#163 0x000055f4540f3540 in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:302 +#164 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#165 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#166 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#167 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#168 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#169 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#170 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#171 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#172 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#173 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#174 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#175 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#176 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#177 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#178 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#179 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#180 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#181 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#182 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#183 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#184 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#185 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#186 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#187 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#188 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#189 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#190 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#191 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#192 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#193 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#194 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#195 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#196 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#197 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#198 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#199 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#200 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#201 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#202 0x000055f4540d6105 in blink::OutOfFlowLayoutPart::GenerateFragment () at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:2546 +#203 blink::OutOfFlowLayoutPart::Layout (this=this@entry=0x7ffefa9154f0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) + at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917333 +#204 0x000055f4540e5174 in blink::OutOfFlowLayoutPart::LayoutOOFNode (this=this@entry=0x7ffefa9154f0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, + is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917453 +#205 0x000055f4540e5b85 in blink::OutOfFlowLayoutPart::LayoutCandidates (this=this@entry=0x7ffefa9154f0, candidates=candidates@entry=0x7ffefa915450) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:1111 +#206 0x000055f4540f2b9e in blink::OutOfFlowLayoutPart::Run (this=0x7ffefa9154f0) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:523 +#207 0x000055f45423444d in blink::BoxFragmentBuilder::HandleOofsAndSpecialDescendants (this=0x7ffefa9158a0) at ../../third_party/blink/renderer/core/layout/box_fragment_builder.cc:547 +#208 0x000055f4540f3540 in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:302 +#209 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#210 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#211 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#212 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#213 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#214 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#215 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#216 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#217 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#218 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#219 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#220 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#221 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#222 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#223 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#224 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#225 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#226 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#227 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#228 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#229 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#230 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#231 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#232 0x000055f4540d6105 in blink::OutOfFlowLayoutPart::GenerateFragment () at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:2546 +#233 blink::OutOfFlowLayoutPart::Layout (this=this@entry=0x7ffefa9179b0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) + at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917333 +#234 0x000055f4540e5174 in blink::OutOfFlowLayoutPart::LayoutOOFNode (this=this@entry=0x7ffefa9179b0, oof_node_to_layout=..., fragmentainer_constraint_space=fragmentainer_constraint_space@entry=0x0, + is_last_fragmentainer_so_far=is_last_fragmentainer_so_far@entry=false) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:158917453 +#235 0x000055f4540e5b85 in blink::OutOfFlowLayoutPart::LayoutCandidates (this=this@entry=0x7ffefa9179b0, candidates=candidates@entry=0x7ffefa917910) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:1111 +#236 0x000055f4540f2b9e in blink::OutOfFlowLayoutPart::Run (this=0x7ffefa9179b0) at ../../third_party/blink/renderer/core/layout/out_of_flow_layout_part.cc:523 +#237 0x000055f45423444d in blink::BoxFragmentBuilder::HandleOofsAndSpecialDescendants (this=0x7ffefa917d60) at ../../third_party/blink/renderer/core/layout/box_fragment_builder.cc:547 +#238 0x000055f4540f3540 in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:302 +#239 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#240 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#241 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#242 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#243 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#244 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#245 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#246 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#247 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#248 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#249 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#250 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#251 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#252 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#253 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#254 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#255 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#256 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#257 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#258 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#259 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#260 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#261 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#262 0x000055f4540f303c in blink::BlockNode::SimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:653 +#263 blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/layout/simplified_layout_algorithm.cc:237 +#264 0x000055f45401a28a in blink::SimplifiedLayoutAlgorithm::Layout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:157234584 +#265 blink::BlockNode::RunSimplifiedLayout () at ../../third_party/blink/renderer/core/layout/block_node.cc:1705 +#266 blink::BlockNode::Layout (this=, constraint_space=..., break_token=, early_break=, column_spanner_path=) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:146883682 +#267 0x000055f4537e965e in blink::LayoutBox::LayoutSubtreeRoot () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:143013582 +#268 blink::LayoutBox::LayoutSubtreeRoot () at gen/third_party/blink/renderer/core/html_names.cc:85762220 +#269 blink::LocalFrameView::LayoutFromRootObject () at ../../third_party/blink/renderer/core/frame/local_frame_view.cc:666 +#270 blink::LocalFrameView::LayoutFromRootObject () at gen/third_party/blink/renderer/core/html_names.cc:85758991 +#271 blink::LocalFrameView::PerformLayout (this=this@entry=0x316400158c00) at ../../third_party/blink/renderer/core/frame/local_frame_view.cc:761 +#272 0x000055f4537eb0bb in blink::LocalFrameView::UpdateLayout () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:143013984 +#273 blink::LocalFrameView::UpdateStyleAndLayoutInternal (this=this@entry=0x316400158c00) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:143013762 +#274 0x000055f4537ecb9b in blink::LocalFrameView::UpdateStyleAndLayout (this=0x316400158c00) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:143671655 +#275 0x000055f4544b9cd2 in blink::Document::UpdateStyleAndLayout (this=0x3164001e2530, reason=26) at ../../third_party/blink/renderer/core/dom/document.cc:2784 +#276 0x000055f455fc4492 in blink::FrameSelection::ComputeAbsoluteBounds(gfx::Rect&, gfx::Rect&) const [clone .constprop.0] () at ../../third_party/blink/renderer/core/editing/frame_selection.cc:656 +#277 0x000055f453827206 in blink::WebFrameWidgetImpl::CalculateSelectionBounds (this=this@entry=0x316400156138, anchor_root_frame=..., focus_root_frame=..., bounding_box_in_root_frame=bounding_box_in_root_frame@entry=0x7ffefa91a820) + at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:132558908 +#278 0x000055f4538296b2 in blink::WebFrameWidgetImpl::GetSelectionBoundsInWindow (this=0x316400156138, focus=0x4140017b980, anchor=0x4140017b990, bounding_box=0x4140017b9a0, focus_dir=0x7ffefa91a8d0, anchor_dir=0x7ffefa91a8c8, is_anchor_first=0x7ffefa91a8c7) + at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:78747162 +#279 0x000055f454433e25 in blink::WidgetBase::UpdateSelectionBounds (this=this@entry=0x4140017b800) at ../../third_party/blink/renderer/platform/widget/widget_base.cc:1468 +#280 0x000055f454433f8f in blink::WidgetBase::WillBeginMainFrame (this=0x4140017b800) at ../../third_party/blink/renderer/platform/widget/widget_base.cc:967 +#281 0x000055f4529a093c in cc::LayerTreeHost::WillBeginMainFrame (this=0x414000ed500) at ../../cc/trees/layer_tree_host.cc:354 +#282 0x000055f452a2f399 in cc::ProxyMain::BeginMainFrame (this=, begin_main_frame_state=std::unique_ptr = {...}) at ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h:1002 +#283 0x000055f452a8b781 in base::internal::DecayedFunctorTraits >), base::WeakPtr&&, std::unique_ptr >&&>::Invoke >), base::WeakPtr const&, std::unique_ptr > > (method=, receiver_ptr=...) at /usr/include/c++/14/bits/unique_ptr.h:191 +#284 base::internal::InvokeHelper >), base::WeakPtr&&, std::unique_ptr >&&>, void, 0ul, 1ul>::MakeItSo >), std::tuple, std::unique_ptr > >>(void (cc::ProxyMain::*&&)(std::unique_ptr >), std::tuple, std::unique_ptr > >&&) ( + functor=@0x41400589d30: (void (cc::ProxyMain::*)(cc::ProxyMain * const, std::unique_ptr >)) 0x55f452a2ef80 >)>, bound=...) at ../../base/functional/bind_internal.h:954 +#285 base::internal::Invoker >), base::WeakPtr&&, std::unique_ptr >&&>, base::internal::BindState >), base::WeakPtr, std::unique_ptr > >, void ()>::RunImpl >), std::tuple, std::unique_ptr > >, 0ul, 1ul>(void (cc::ProxyMain::*&&)(std::unique_ptr >), std::tuple, std::unique_ptr > >&&, std::integer_sequence) ( + functor=@0x41400589d30: (void (cc::ProxyMain::*)(cc::ProxyMain * const, std::unique_ptr >)) 0x55f452a2ef80 >)>, bound=...) at ../../base/functional/bind_internal.h:1067 +#286 base::internal::Invoker >), base::WeakPtr&&, std::unique_ptr >&&>, base::internal::BindState >), base::WeakPtr, std::unique_ptr > >, void ()>::RunOnce(base::internal::BindStateBase*) (base=0x41400589d10) at ../../base/functional/bind_internal.h:980 +#287 0x000055f4565b518d in base::OnceCallback::Run() && (this=0x41400018678) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:200122192 +#288 base::TaskAnnotator::RunTaskImpl(base::PendingTask&) [clone .isra.0] (pending_task=..., this=) at ../../base/task/common/task_annotator.cc:203 +#289 0x000055f451ca3130 in base::TaskAnnotator::RunTask > (this=0x4140004c200, event_name=..., pending_task=...) + at ../../base/task/common/task_annotator.h:90 +#290 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl (this=, continuation_lazy_now=0x7ffefa91af40) at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:470 +#291 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork (this=) at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:332 +#292 0x000055f451ca5027 in base::MessagePumpDefault::Run (this=0x414000040c0, delegate=0x4140004c0f8) at ../../base/message_loop/message_pump_default.cc:40 +#293 0x000055f451ca14e9 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run (this=0x4140004c000, application_tasks_allowed=true, timeout=...) at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:640 +#294 0x000055f451ca18b2 in base::RunLoop::Run (this=0x7ffefa91b550, location=...) at ../../base/run_loop.cc:134 +#295 base::RunLoop::Run (this=, location=...) at ../../base/run_loop.cc:106 +#296 0x000055f4535391b5 in content::RendererMain (parameters=...) at ../../content/renderer/renderer_main.cc:361 +#297 0x000055f44f2d48af in content::RunZygote (delegate=delegate@entry=0x7ffefa91c040) at /usr/include/c++/14/bits/unique_ptr.h:191 +#298 0x000055f44f2d8b18 in content::RunOtherNamedProcessTypeMain (process_type="zygote", main_function_params=..., delegate=0x7ffefa91c040) at ../../content/app/content_main_runner_impl.cc:807 +#299 content::ContentMainRunnerImpl::Run (this=) at ../../content/app/content_main_runner_impl.cc:1167 +#300 0x000055f44eeb846c in content::RunContentProcess (params=..., content_main_runner=0x4100006d880) at ../../content/app/content_main.cc:354 +#301 content::ContentMain (params=...) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:166189489 +#302 main (argc=argc@entry=2, argv=argv@entry=0x7ffefa91c5d8) at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:166189474 +#303 0x00007ffa48c2a2ae in __libc_start_call_main (main=main@entry=0x55f44eeb80a0 , argc=argc@entry=2, argv=argv@entry=0x7ffefa91c5d8) at ../sysdeps/nptl/libc_start_call_main.h:58 +#304 0x00007ffa48c2a379 in __libc_start_main_impl (main=0x55f44eeb80a0 , argc=2, argv=0x7ffefa91c5d8, init=, fini=, rtld_fini=, stack_end=0x7ffefa91c5c8) at ../csu/libc-start.c:360 +#305 0x000055f44eee5b45 in _start () at ../sysdeps/x86_64/start.S:115 + +From 3c55b5cb524b2f304a623bd0ddd8321f8fa2e37e Mon Sep 17 00:00:00 2001 +From: Martin Negyokru +Date: Thu, 19 Sep 2024 16:55:22 +0200 +Subject: Fix UAF in FontCache + +Fixes a rare crash related to font caching. +Upstream issue: https://issues.chromium.org/issues/342778288 +Its been only fixed for ASAN builds for some reason. + +This change backports the fix: https://crrev.com/c/5629253 +and extends the ASAN guards with IS_QTWEBENGINE. + +Change-Id: I0fb7348ef97882fed199d1432b3a2543804e8de5 +Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/592190 +Reviewed-by: Peter Varga +--- + .../renderer/platform/fonts/font_face_creation_params.h | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/chromium/third_party/blink/renderer/platform/fonts/font_face_creation_params.h b/chromium/third_party/blink/renderer/platform/fonts/font_face_creation_params.h +index 8f0aa2f1c14..9d4c07637fc 100644 +--- a/third_party/blink/renderer/platform/fonts/font_face_creation_params.h ++++ b/third_party/blink/renderer/platform/fonts/font_face_creation_params.h +@@ -38,6 +38,8 @@ + #include "third_party/blink/renderer/platform/wtf/text/case_folding_hash.h" + #include "third_party/blink/renderer/platform/wtf/text/string_hasher.h" + ++#include ++ + namespace blink { + + enum FontFaceCreationType { +@@ -79,7 +81,7 @@ class FontFaceCreationParams { + } + const std::string& Filename() const { + DCHECK_EQ(creation_type_, kCreateFontByFciIdAndTtcIndex); +-#if defined(ADDRESS_SANITIZER) ++#if 1 + DCHECK(filename_.has_value()); + return *filename_; + #else +@@ -126,7 +128,7 @@ class FontFaceCreationParams { + AtomicString family_; + + void SetFilename(std::string& filename) { +-#if defined(ADDRESS_SANITIZER) ++#if 1 + *filename_ = filename; + #else + filename_ = filename; +@@ -134,7 +136,7 @@ class FontFaceCreationParams { + } + + bool FilenameEqual(const FontFaceCreationParams& other) const { +-#if defined(ADDRESS_SANITIZER) ++#if 1 + if (!filename_.has_value() || !other.filename_.has_value()) { + return filename_.has_value() == other.filename_.has_value(); + } +@@ -145,14 +147,14 @@ class FontFaceCreationParams { + } + + bool HasFilename() const { +-#if defined(ADDRESS_SANITIZER) ++#if 1 + return filename_.has_value(); + #else + return true; + #endif + } + +-#if defined(ADDRESS_SANITIZER) ++#if 1 + // We put the `std::string` behind an optional as ASAN counter checks require + // that we properly call constructors and destructors for all strings. This is + // not the case when `FontFaceCreationParams` is used in `WTF::HashMap` as key +-- +cgit v1.2.3 + diff --git a/build-without-extensions.patch b/build-without-extensions.patch index 75bbb6a..8439877 100644 --- a/build-without-extensions.patch +++ b/build-without-extensions.patch @@ -1,31 +1,60 @@ -Work around this linker error: - -[ 9463s] /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: obj/electron/chromium_src/chrome/extension_navigation_ui_data.o: warning: relocation against `_ZN10extensions12WebViewGuest4TypeE' in read-only section `.text' -[ 9463s] /usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: obj/electron/chromium_src/chrome/extension_navigation_ui_data.o: in function `guest_view::GuestView::AsDerivedGuest(guest_view::GuestViewBase*)': -[ 9463s] /home/abuild/rpmbuild/BUILD/src/out/Release/../../components/guest_view/browser/guest_view.h:67:(.text+0xdd): undefined reference to `extensions::WebViewGuest::Type' - -This is not upstreamable as the problem is due to Electron changes to chromium, and is in dead code that would be removed in LTO builds. - ---- src/extensions/browser/guest_view/web_view/web_view_guest.cc.old 2023-09-28 10:14:03.660044621 +0200 -+++ src/extensions/browser/guest_view/web_view/web_view_guest.cc 2023-09-29 08:05:41.827245244 +0200 -@@ -285,9 +285,6 @@ std::string WebViewGuest::GetPartitionID - } - - // static --const char WebViewGuest::Type[] = "webview"; -- --// static - int WebViewGuest::GetOrGenerateRulesRegistryID(int embedder_process_id, - int webview_instance_id) { - bool is_web_view = embedder_process_id && webview_instance_id; ---- src/extensions/browser/guest_view/web_view/web_view_guest.h.old 2023-09-28 10:14:03.660044621 +0200 -+++ src/extensions/browser/guest_view/web_view/web_view_guest.h 2023-09-29 08:06:13.200529820 +0200 -@@ -49,7 +49,7 @@ class WebViewGuest : public guest_view:: - int embedder_process_id, - int view_instance_id); - -- static const char Type[]; -+ constexpr static const char Type[] = "webview"; - - // Returns the WebView partition ID associated with the render process - // represented by |render_process_host|, if any. Otherwise, an empty string is +--- src/extensions/common/BUILD.gn.orig 2025-05-22 20:15:08.686176429 +0200 ++++ src/extensions/common/BUILD.gn 2025-05-24 11:58:30.839954172 +0200 +@@ -243,10 +243,6 @@ static_library("common") { + "api/commands/commands_handler.h", + "api/declarative/declarative_constants.cc", + "api/declarative/declarative_constants.h", +- "api/declarative/declarative_manifest_data.cc", +- "api/declarative/declarative_manifest_data.h", +- "api/declarative/declarative_manifest_handler.cc", +- "api/declarative/declarative_manifest_handler.h", + "api/declarative_net_request/constants.cc", + "api/declarative_net_request/constants.h", + "api/declarative_net_request/dnr_manifest_data.cc", +@@ -266,8 +262,6 @@ static_library("common") { + "api/printer_provider/usb_printer_manifest_data.h", + "api/printer_provider/usb_printer_manifest_handler.cc", + "api/printer_provider/usb_printer_manifest_handler.h", +- "api/scripts_internal/script_serialization.cc", +- "api/scripts_internal/script_serialization.h", + "api/sockets/sockets_manifest_data.cc", + "api/sockets/sockets_manifest_data.h", + "api/sockets/sockets_manifest_handler.cc", +@@ -378,8 +372,6 @@ static_library("common") { + "manifest_handlers/background_info.h", + "manifest_handlers/content_capabilities_handler.cc", + "manifest_handlers/content_capabilities_handler.h", +- "manifest_handlers/content_scripts_handler.cc", +- "manifest_handlers/content_scripts_handler.h", + "manifest_handlers/cross_origin_isolation_info.cc", + "manifest_handlers/cross_origin_isolation_info.h", + "manifest_handlers/csp_info.cc", +@@ -390,10 +382,6 @@ static_library("common") { + "manifest_handlers/extension_action_handler.h", + "manifest_handlers/externally_connectable.cc", + "manifest_handlers/externally_connectable.h", +- "manifest_handlers/file_handler_info.cc", +- "manifest_handlers/file_handler_info.h", +- "manifest_handlers/icon_variants_handler.cc", +- "manifest_handlers/icon_variants_handler.h", + "manifest_handlers/icons_handler.cc", + "manifest_handlers/icons_handler.h", + "manifest_handlers/incognito_info.cc", +@@ -422,8 +410,6 @@ static_library("common") { + "manifest_handlers/trial_tokens_handler.h", + "manifest_handlers/web_accessible_resources_info.cc", + "manifest_handlers/web_accessible_resources_info.h", +- "manifest_handlers/web_file_handlers_info.cc", +- "manifest_handlers/web_file_handlers_info.h", + "manifest_handlers/webview_info.cc", + "manifest_handlers/webview_info.h", + "manifest_url_handlers.cc", +@@ -481,8 +467,6 @@ static_library("common") { + "user_scripts_availability.h", + "utils/base_string.cc", + "utils/base_string.h", +- "utils/content_script_utils.cc", +- "utils/content_script_utils.h", + "utils/extension_types_utils.cc", + "utils/extension_types_utils.h", + "utils/extension_utils.cc", diff --git a/build-without-guest-view.patch b/build-without-guest-view.patch new file mode 100644 index 0000000..1758ca1 --- /dev/null +++ b/build-without-guest-view.patch @@ -0,0 +1,28 @@ +--- src/components/permissions/permission_context_base.cc.orig 2025-05-22 20:15:04.346176805 +0200 ++++ src/components/permissions/permission_context_base.cc 2025-05-24 13:09:21.758872333 +0200 +@@ -26,6 +26,7 @@ + #include "components/content_settings/core/common/content_settings_pattern.h" + #include "components/content_settings/core/common/content_settings_types.h" + #include "components/content_settings/core/common/features.h" ++#include "components/guest_view/buildflags/buildflags.h" + #include "components/permissions/features.h" + #include "components/permissions/permission_context_base.h" + #include "components/permissions/permission_decision_auto_blocker.h" +@@ -46,7 +47,7 @@ + #include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom.h" + #include "url/gurl.h" + +-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) ++#if BUILDFLAG(ENABLE_GUEST_VIEW) + #include "components/guest_view/browser/guest_view_base.h" + #endif + +@@ -316,7 +317,7 @@ content::PermissionResult PermissionCont + } + } + +-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) ++#if BUILDFLAG(ENABLE_GUEST_VIEW) + guest_view::GuestViewBase* guest = + guest_view::GuestViewBase::FromRenderFrameHost(render_frame_host); + if (guest) { diff --git a/build-without-mesage-center.patch b/build-without-mesage-center.patch new file mode 100644 index 0000000..6daa1ae --- /dev/null +++ b/build-without-mesage-center.patch @@ -0,0 +1,10 @@ +--- src/components/global_media_controls/BUILD.gn 2025-04-16 14:36:27.043179983 +0200 ++++ /var/tmp/build-root/openSUSE_Tumbleweed-x86_64/home/abuild/rpmbuild/BUILD/nodejs-electron-35.1.5-build/src/components/global_media_controls/BUILD.gn 2025-04-18 14:41:32.341441955 +0200 +@@ -48,7 +48,6 @@ component("global_media_controls") { + } + + public_deps = [ +- "//components/media_message_center", + "//services/media_session/public/cpp", + "//services/media_session/public/mojom", + "//ui/views", diff --git a/bundled-minizip.patch b/bundled-minizip.patch deleted file mode 100644 index 5fca49d..0000000 --- a/bundled-minizip.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- src/build/linux/unbundle/zlib.gn.orig 2024-02-21 20:06:19.015040200 +0000 -+++ src/build/linux/unbundle/zlib.gn 2024-02-23 18:40:02.635135600 +0000 -@@ -23,21 +23,27 @@ source_set("zlib") { - public_configs = [ ":system_zlib" ] - } - --shim_headers("minizip_shim") { -- root_path = "contrib" -- headers = [ -- "minizip/crypt.h", -- "minizip/ioapi.h", -- "minizip/iowin32.h", -- "minizip/mztools.h", -- "minizip/unzip.h", -- "minizip/zip.h", -+static_library("minizip") { -+ include_dirs = [ -+ ".", -+ "//third_party/zlib", - ] --} - --source_set("minizip") { -- deps = [ ":minizip_shim" ] -- libs = [ "minizip" ] -+ sources = [ -+ "contrib/minizip/ioapi.c", -+ "contrib/minizip/ioapi.h", -+ "contrib/minizip/unzip.c", -+ "contrib/minizip/unzip.h", -+ "contrib/minizip/zip.c", -+ "contrib/minizip/zip.h", -+ ] -+ -+ deps = [ ":zlib" ] -+ -+ configs -= [ "//build/config/compiler:chromium_code" ] -+ configs += [ "//build/config/compiler:no_chromium_code" ] -+ -+ public_configs = [ ":zlib_config" ] - } - - static_library("zip") { diff --git a/chromium-102-compiler.patch b/chromium-102-compiler.patch index 232e310..2261f4e 100644 --- a/chromium-102-compiler.patch +++ b/chromium-102-compiler.patch @@ -4,6 +4,7 @@ SUSE: Disable the following: and global CFLAGS go at the end of the commandline * Submodel options (-march and friends). Upstream notoriously forces SSE3 despite the code not requiring it. * note that cpu options for ARM are currently left in, as they do not seem to do harm and V8 needs to know the exact target anyway +* libstdc++ assertions. Enabling them or not should in general be the distro's decision. Electron does not run untrusted code (unlike browsers) and as such does not really benefit from security paranoia. * Debuginfo format. Upstream seems to force something that is not recognized by rpmbuild. * per-target debuginfo level is left in as it is still useful (-g2 everywhere does not work) * Emitting code for the PIC model. It is needed in case of shared libraries, but results in a larger executable (and Electron is already enormous) @@ -20,11 +21,9 @@ Subject: [PATCH] Disable various compiler configs build/config/compiler/BUILD.gn | 114 +++++---------------------------- 1 file changed, 17 insertions(+), 97 deletions(-) -diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index d40843b..b92f03b 100644 ---- a/build/config/compiler/BUILD.gn -+++ b/build/config/compiler/BUILD.gn -@@ -274,9 +274,7 @@ +--- src/build/config/compiler/BUILD.gn.orig 2025-07-19 11:32:29.581980058 +0200 ++++ src/build/config/compiler/BUILD.gn 2025-07-19 16:12:37.505818698 +0200 +@@ -310,9 +310,7 @@ config("compiler") { configs += [ # See the definitions below. @@ -33,8 +32,24 @@ index d40843b..b92f03b 100644 - ":compiler_cpu_abi", ":compiler_codegen", ":compiler_deterministic", - ] -@@ -305,7 +303,12 @@ + ":clang_warning_suppression", +@@ -338,7 +336,6 @@ config("compiler") { + # See: https://gcc.gnu.org/PR97913 + # TODO(mpdenton): remove is_clang once GCC bug is fixed. + if ((!is_nacl || is_nacl_saigo) && !is_ubsan && is_clang) { +- cflags += [ "-fno-delete-null-pointer-checks" ] + } + + # Make signed overflow and pointer overflowdefined to wrap. +@@ -348,7 +345,6 @@ config("compiler") { + if (is_win) { + cflags += [ "/clang:-fno-strict-overflow" ] + } else { +- cflags += [ "-fno-strict-overflow" ] + } + } + +@@ -364,7 +360,12 @@ config("compiler") { if (!is_win) { # Common POSIX compiler flags setup. # -------------------------------- @@ -48,7 +63,7 @@ index d40843b..b92f03b 100644 # Stack protection. ShadowCallStack and Stack protector address the same # problems. Therefore, we only enable one or the other. Clang advertises SCS as -@@ -432,10 +435,6 @@ +@@ -500,10 +501,6 @@ config("compiler") { # Linux/Android/Fuchsia common flags setup. # --------------------------------- if (is_linux || is_chromeos || is_android || is_fuchsia) { @@ -59,63 +74,19 @@ index d40843b..b92f03b 100644 if (!is_clang) { # Use pipes for communicating between sub-processes. Faster. -@@ -527,55 +527,6 @@ - ldflags += [ "-Wl,-z,keep-text-section-prefix" ] +@@ -1148,11 +1145,6 @@ config("libcxx_hardening") { + defines = [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ] } -- if (is_clang && !is_nacl && current_os != "zos") { -- cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] -- if (save_reproducers_on_lld_crash && use_lld) { -- ldflags += [ -- "-fcrash-diagnostics=all", -- "-fcrash-diagnostics-dir=" + clang_diagnostic_dir, -- ] -- } -- -- # TODO(hans): Remove this once Clang generates better optimized debug info -- # by default. https://crbug.com/765793 -- cflags += [ -- "-mllvm", -- "-instcombine-lower-dbg-declare=0", -- ] -- if (!is_debug && use_thin_lto && is_a_target_toolchain) { -- if (is_win) { -- ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ] -- } else { -- ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ] -- } -- } -- -- # 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" ] -- } else { -- cflags += [ "-ffp-contract=off" ] -- } +- # Enable libstdc++ hardening lightweight assertions. Those have a low +- # performance penalty but are considered a bare minimum for security. +- if (use_safe_libstdcxx) { +- defines += [ "_GLIBCXX_ASSERTIONS=1" ] - } -- - # C11/C++11 compiler flags setup. - # --------------------------- - if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || -@@ -862,7 +837,8 @@ + } + + # The BUILDCONFIG file sets this config on targets by default, which means when +@@ -1218,7 +1210,8 @@ config("thinlto_optimize_max") { # without using everything that "compiler" brings in. Options that # tweak code generation for a particular CPU do not belong here! # See "compiler_codegen", below. @@ -125,77 +96,30 @@ index d40843b..b92f03b 100644 cflags = [] ldflags = [] defines = [] -@@ -1227,46 +1203,6 @@ - } - } - -- # Makes builds independent of absolute file path. -- if (is_clang && strip_absolute_paths_from_debug_symbols) { -- # If debug option is given, clang includes $cwd in debug info by default. -- # For such build, this flag generates reproducible obj files even we use -- # different build directory like "out/feature_a" and "out/feature_b" if -- # we build same files with same compile flag. -- # Other paths are already given in relative, no need to normalize them. -- if (is_nacl) { -- # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here. -- cflags += [ -- "-Xclang", -- "-fdebug-compilation-dir", -- "-Xclang", -- ".", -- ] -- } else { -- # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir= -- # and -fcoverage-compilation-dir=. -- cflags += [ "-ffile-compilation-dir=." ] -- swiftflags += [ "-file-compilation-dir=." ] -- } -- if (!is_win) { -- # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) -- asmflags = [ "-Wa,-fdebug-compilation-dir,." ] -- } -- -- if (is_win && use_lld) { -- if (symbol_level == 2 || (is_clang && using_sanitizer)) { -- # Absolutize source file paths for PDB. Pass the real build directory -- # if the pdb contains source-level debug information and if linker -- # reproducibility is not critical. -- ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ] -- } else { -- # Use a fake fixed base directory for paths in the pdb to make the pdb -- # output fully deterministic and independent of the build directory. -- ldflags += [ "/PDBSourcePath:o:\fake\prefix" ] -- } -- } -- } -- - # Tells the compiler not to use absolute paths when passing the default - # paths to the tools it invokes. We don't want this because we don't - # really need it and it can mess up the goma cache entries. -@@ -1400,7 +1337,8 @@ - # Collects all warning flags that are used by default. This is used as a - # subconfig of both chromium_code and no_chromium_code. This way these +@@ -1994,7 +1987,8 @@ config("tot_warnings") { + # Collects all warning flags that are used by default. This is used as a + # subconfig of both chromium_code and no_chromium_code. This way these # flags are guaranteed to appear on the compile command line after -Wall. -config("default_warnings") { +config("default_warnings") { } +config("xdefault_warnings") { cflags = [] - cflags_c = [] cflags_cc = [] -@@ -1597,11 +1535,7 @@ + ldflags = [] +@@ -2262,11 +2256,7 @@ config("chromium_code") { defines = [ "_HAS_NODISCARD" ] } } else { - cflags = [ "-Wall" ] -+ cflags = [] - if (is_clang) { - # Enable extra warnings for chromium_code when we control the compiler. - cflags += [ "-Wextra" ] - } ++ cflags = [] # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. -@@ -1618,24 +1552,6 @@ +@@ -2275,24 +2265,6 @@ config("chromium_code") { "__STDC_FORMAT_MACROS", ] @@ -220,15 +144,15 @@ index d40843b..b92f03b 100644 if (is_apple) { cflags_objc = [ "-Wimplicit-retain-self" ] cflags_objcc = [ "-Wimplicit-retain-self" ] -@@ -1841,7 +1841,6 @@ +@@ -2451,7 +2423,6 @@ config("no_rtti") { + # to heap-allocated memory are passed over shared library boundaries. config("export_dynamic") { - # TODO(crbug.com/1052397): Revisit after target_os flip is completed. - if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) { + if (is_linux || export_libcxxabi_from_executables) { - ldflags = [ "-rdynamic" ] } } -@@ -1887,7 +1811,8 @@ +@@ -2550,7 +2521,8 @@ config("wexit_time_destructors") { # gcc 4.9 and earlier had no way of suppressing this warning without # suppressing the rest of them. Here we centralize the identification of # the gcc 4.9 toolchains. @@ -238,7 +162,7 @@ index d40843b..b92f03b 100644 cflags = [] if (is_clang) { cflags += [ "-Wno-incompatible-pointer-types" ] -@@ -1990,7 +1915,8 @@ +@@ -2667,7 +2639,8 @@ if (is_win) { common_optimize_on_cflags += [ "-fno-math-errno" ] } @@ -248,17 +172,17 @@ index d40843b..b92f03b 100644 if (!is_win) { if (enable_frame_pointers) { cflags = [ "-fno-omit-frame-pointer" ] -@@ -2017,7 +1943,8 @@ - } - - # Default "optimization on" config. +@@ -2708,7 +2681,8 @@ config("default_stack_frames") { + # [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000 + # [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000 + # [2]: https://crrev.com/c/5447532 -config("optimize") { +config("optimize") { } +config("xoptimize") { if (is_win) { - if (chrome_pgo_phase != 2) { - # Favor size over speed, /O1 must be before the common flags. -@@ -2055,7 +1982,8 @@ + # clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for + # consistency with the other platforms. +@@ -2757,7 +2731,8 @@ config("optimize") { } # Turn off optimizations. @@ -268,19 +192,19 @@ index d40843b..b92f03b 100644 if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2095,7 +2023,8 @@ - # Turns up the optimization level. On Windows, this implies whole program - # optimization and link-time code generation which is very expensive and should - # be used sparingly. +@@ -2792,7 +2767,8 @@ config("no_optimize") { + # Turns up the optimization level. Used to explicitly enable -O2 instead of + # -Os for select targets on platforms that use optimize_for_size. No-op + # elsewhere. -config("optimize_max") { +config("optimize_max") { } +config("xoptimize_max") { if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2128,7 +2057,8 @@ +@@ -2825,7 +2801,8 @@ config("optimize_max") { # - # TODO(crbug.com/621335) - rework how all of these configs are related + # TODO(crbug.com/41259697) - rework how all of these configs are related # so that we don't need this disclaimer. -config("optimize_speed") { +config("optimize_speed") { } @@ -288,7 +212,7 @@ index d40843b..b92f03b 100644 if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2154,7 +2084,8 @@ +@@ -2854,7 +2831,8 @@ config("optimize_speed") { } } @@ -298,7 +222,7 @@ index d40843b..b92f03b 100644 cflags = [ "-O1" ] + common_optimize_on_cflags rustflags = [ "-Copt-level=1" ] ldflags = common_optimize_on_ldflags -@@ -2273,7 +2204,8 @@ +@@ -2985,7 +2963,8 @@ config("win_pdbaltpath") { } # Full symbols. @@ -306,9 +230,9 @@ index d40843b..b92f03b 100644 +config("symbols") { cflags = ["-g2"] } +config("xsymbols") { rustflags = [] + configs = [] if (is_win) { - if (is_clang) { -@@ -2398,7 +2330,8 @@ +@@ -3159,7 +3138,8 @@ config("symbols") { # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. @@ -318,7 +242,7 @@ index d40843b..b92f03b 100644 rustflags = [] if (is_win) { # Functions, files, and line tables only. -@@ -2470,7 +2403,8 @@ +@@ -3244,7 +3224,8 @@ config("minimal_symbols") { # This configuration contains function names only. That is, the compiler is # told to not generate debug information and the linker then just puts function # names in the final debug information. diff --git a/chromium-122-BookmarkNode-missing-operator.patch b/chromium-122-BookmarkNode-missing-operator.patch deleted file mode 100644 index 5f7cbdf..0000000 --- a/chromium-122-BookmarkNode-missing-operator.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 04866680f4f9a8475ae3795ad6ed59649ba478d7 -Author: Jose Dapena Paz -Date: Tue Jan 23 12:04:05 2024 +0000 - - libstdc++: fix static assertion in NodeUuidEquality - - libstdc++ equality checks in static assertion that it is possible to - compare for equality base::Uuid to BookmarkNode*. This was a missing - operator in NodeUuidEquality that this changeset adds. - - Bug: 957519 - Change-Id: Icc9809cb43d321f0b3e3394ef27ab55672aec5e7 - Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5227686 - Reviewed-by: Mikel Astiz - Commit-Queue: José Dapena Paz - Cr-Commit-Position: refs/heads/main@{#1250753} - -diff --git a/components/bookmarks/browser/uuid_index.h b/components/bookmarks/browser/uuid_index.h -index 77cb1a1a54dd9..639d6fefcd831 100644 ---- a/components/bookmarks/browser/uuid_index.h -+++ b/components/bookmarks/browser/uuid_index.h -@@ -23,6 +23,10 @@ class NodeUuidEquality { - bool operator()(const BookmarkNode* n1, const base::Uuid& uuid2) const { - return n1->uuid() == uuid2; - } -+ -+ bool operator()(const base::Uuid& uuid1, const BookmarkNode* n2) const { -+ return uuid1 == n2->uuid(); -+ } - }; - - // Used to hash BookmarkNode instances by UUID. diff --git a/chromium-122-abseil-shims.patch b/chromium-122-abseil-shims.patch deleted file mode 100644 index 832b222..0000000 --- a/chromium-122-abseil-shims.patch +++ /dev/null @@ -1,408 +0,0 @@ -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_base.gn src/build/linux/unbundle/absl_base.gn ---- src/build/linux/unbundle.old/absl_base.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_base.gn 2024-04-07 17:46:37.658214100 +0000 -@@ -13,6 +13,14 @@ pkg_config("system_absl_core_headers") { - packages = [ "absl_core_headers" ] - } - -+pkg_config("system_absl_nullability") { -+ packages = [ "absl_nullability" ] -+} -+ -+pkg_config("system_absl_prefetch") { -+ packages = [ "absl_prefetch" ] -+} -+ - shim_headers("base_shim") { - root_path = "." - prefix = "absl/base/" -@@ -60,8 +68,41 @@ source_set("core_headers") { - public_configs = [ ":system_absl_core_headers" ] - } - --source_set("config_test") { -+shim_headers("nullability_shim") { -+ root_path = "." -+ prefix = "absl/base/" -+ headers = [ -+ "nullability.h", -+ ] -+} -+ -+source_set("nullability") { -+ deps = [ ":nullability_shim" ] -+ public_configs = [ ":system_absl_nullability" ] - } - -+shim_headers("prefetch_shim") { -+ root_path = "." -+ prefix = "absl/base/" -+ headers = [ -+ "prefetch.h", -+ ] -+} -+ -+source_set("prefetch") { -+ deps = [ ":prefetch_shim" ] -+ public_configs = [ ":system_absl_prefetch" ] -+} -+ -+source_set("no_destructor") { -+ # Dummy — unavailable with abseil 202308 aand chromium 122 does not use it -+} -+ -+source_set("config_test") { -+} -+source_set("no_destructor_test") { -+} -+source_set("nullability_test") { -+} - source_set("prefetch_test") { - } -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_container.gn src/build/linux/unbundle/absl_container.gn ---- src/build/linux/unbundle.old/absl_container.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_container.gn 2024-04-07 17:12:25.979311400 +0000 -@@ -111,9 +111,19 @@ source_set("node_hash_set") { - - source_set("common_policy_traits_test") { - } -+source_set("fixed_array_test") { -+} -+source_set("flat_hash_map_test") { -+} -+source_set("flat_hash_set_test") { -+} - source_set("inlined_vector_test") { - } - source_set("node_slot_policy_test") { - } -+source_set("raw_hash_set_allocator_test") { -+} -+source_set("raw_hash_set_test") { -+} - source_set("sample_element_size_test") { - } -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_crc.gn src/build/linux/unbundle/absl_crc.gn ---- src/build/linux/unbundle.old/absl_crc.gn 1970-01-01 00:00:00.000000000 +0000 -+++ src/build/linux/unbundle/absl_crc.gn 2024-04-07 17:29:23.349823700 +0000 -@@ -0,0 +1,4 @@ -+source_set("crc32c_test") {} -+source_set("crc_cord_state_test") {} -+source_set("crc_memcpy_test") {} -+source_set("non_temporal_memcpy_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_debugging.gn src/build/linux/unbundle/absl_debugging.gn ---- src/build/linux/unbundle.old/absl_debugging.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_debugging.gn 2024-04-07 17:12:54.682550100 +0000 -@@ -45,3 +45,6 @@ source_set("symbolize") { - deps = [ ":symbolize_shim" ] - public_configs = [ ":system_absl_symbolize" ] - } -+ -+source_set("stacktrace_test") { -+} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_flags.gn src/build/linux/unbundle/absl_flags.gn ---- src/build/linux/unbundle.old/absl_flags.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_flags.gn 2024-04-07 17:14:21.789944600 +0000 -@@ -48,3 +48,5 @@ source_set("usage") { - deps = [ ":usage_shim" ] - public_configs = [ ":system_absl_flags_usage" ] - } -+ -+source_set("flag_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_functional.gn src/build/linux/unbundle/absl_functional.gn ---- src/build/linux/unbundle.old/absl_functional.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_functional.gn 2024-04-07 17:14:18.081948700 +0000 -@@ -46,4 +46,10 @@ source_set("function_ref") { - public_configs = [ ":system_absl_function_ref" ] - } - -+source_set("overload") { -+ # Dummy — unavailable with abseil 202308 aand chromium 122 does not use it -+} -+ - source_set("any_invocable_test") {} -+source_set("function_ref_test") {} -+source_set("overload_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_hash.gn src/build/linux/unbundle/absl_hash.gn ---- src/build/linux/unbundle.old/absl_hash.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_hash.gn 2024-04-07 17:19:44.496916100 +0000 -@@ -16,6 +16,8 @@ source_set("hash") { - public_configs = [ ":system_absl_hash" ] - } - -+source_set("hash_instantiated_test") { -+} - source_set("hash_test") { - } - source_set("low_level_hash_test") { -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_log.gn src/build/linux/unbundle/absl_log.gn ---- src/build/linux/unbundle.old/absl_log.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_log.gn 2024-04-07 17:45:56.568886800 +0000 -@@ -1,3 +1,67 @@ -+import("//build/config/linux/pkg_config.gni") -+import("//build/shim_headers.gni") -+ -+pkg_config("system_absl_absl_check") { -+ packages = [ "absl_absl_check" ] -+} -+ -+pkg_config("system_absl_absl_log") { -+ packages = [ "absl_absl_log" ] -+} -+ -+pkg_config("system_absl_die_if_null") { -+ packages = [ "absl_die_if_null" ] -+} -+ -+pkg_config("system_absl_log") { -+ packages = [ "absl_log" ] -+} -+shim_headers("absl_check_shim") { -+ root_path = "." -+ prefix = "absl/log/" -+ headers = [ "absl_check.h" ] -+} -+ -+source_set("absl_check") { -+ deps = [ ":absl_check_shim" ] -+ public_configs = [ ":system_absl_absl_check" ] -+} -+ -+shim_headers("absl_log_shim") { -+ root_path = "." -+ prefix = "absl/log/" -+ headers = [ "absl_log.h" ] -+} -+ -+source_set("absl_log") { -+ deps = [ ":absl_log_shim" ] -+ public_configs = [ ":system_absl_absl_log" ] -+} -+ -+shim_headers("die_if_null_shim") { -+ root_path = "." -+ prefix = "absl/log/" -+ headers = [ "die_if_null.h" ] -+} -+ -+source_set("die_if_null") { -+ deps = [ ":die_if_null_shim" ] -+ public_configs = [ ":system_absl_die_if_null" ] -+} -+ -+shim_headers("log_shim") { -+ root_path = "." -+ prefix = "absl/log/" -+ headers = [ "log.h" ] -+} -+ -+source_set("log") { -+ deps = [ ":log_shim" ] -+ public_configs = [ ":system_absl_log" ] -+} -+ -+source_set("absl_check_test") {} -+source_set("absl_log_basic_test") {} - source_set("basic_log_test") {} - source_set("check_test") {} - source_set("die_if_null_test") {} -@@ -11,3 +75,4 @@ source_set("log_sink_test") {} - source_set("log_streamer_test") {} - source_set("scoped_mock_log_test") {} - source_set("stripping_test") {} -+source_set("vlog_is_on_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_log_internal.gn src/build/linux/unbundle/absl_log_internal.gn ---- src/build/linux/unbundle.old/absl_log_internal.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_log_internal.gn 2024-04-07 17:19:34.195045600 +0000 -@@ -1 +1,2 @@ -+source_set("fnmatch_test") {} - source_set("stderr_log_sink_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_numeric.gn src/build/linux/unbundle/absl_numeric.gn ---- src/build/linux/unbundle.old/absl_numeric.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_numeric.gn 2024-04-07 17:20:05.380981000 +0000 -@@ -30,3 +30,5 @@ source_set("int128") { - deps = [ ":int128_shim" ] - public_configs = [ ":system_absl_int128" ] - } -+ -+source_set("int128_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_random.gn src/build/linux/unbundle/absl_random.gn ---- src/build/linux/unbundle.old/absl_random.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_random.gn 2024-04-07 17:36:36.041139000 +0000 -@@ -1,6 +1,48 @@ - import("//build/config/linux/pkg_config.gni") - import("//build/shim_headers.gni") - -+pkg_config("system_absl_random_bit_gen_ref") { -+ packages = [ "absl_random_bit_gen_ref" ] -+} -+ -+shim_headers("bit_gen_ref_shim") { -+ root_path = "." -+ prefix = "absl/random/" -+ headers = [ "bit_gen_ref.h" ] -+} -+ -+source_set("bit_gen_ref") { -+ deps = [ ":bit_gen_ref_shim" ] -+ public_configs = [ ":system_absl_random_bit_gen_ref" ] -+} -+ -+pkg_config("system_absl_random_distributions") { -+ packages = [ "absl_random_distributions" ] -+} -+ -+shim_headers("distributions_shim") { -+ root_path = "." -+ prefix = "absl/random/" -+ headers = [ -+ "bernoulli_distribution.h", -+ "beta_distribution.h", -+ "discrete_distribution.h", -+ "distributions.h", -+ "exponential_distribution.h", -+ "gaussian_distribution.h", -+ "log_uniform_int_distribution.h", -+ "poisson_distribution.h", -+ "uniform_int_distribution.h", -+ "uniform_real_distribution.h", -+ "zipf_distribution.h", -+ ] -+} -+ -+source_set("distributions") { -+ deps = [ ":distributions_shim" ] -+ public_configs = [ ":system_absl_random_distributions" ] -+} -+ - pkg_config("system_absl_random_random") { - packages = [ "absl_random_random" ] - } -@@ -15,3 +57,4 @@ source_set("random") { - deps = [ ":random_shim" ] - public_configs = [ ":system_absl_random_random" ] - } -+ -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_status.gn src/build/linux/unbundle/absl_status.gn ---- src/build/linux/unbundle.old/absl_status.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_status.gn 2024-04-07 17:20:21.398873800 +0000 -@@ -34,5 +34,7 @@ source_set("statusor") { - public_configs = [ ":system_absl_statusor" ] - } - -+source_set("status_test") { -+} - source_set("statusor_test") { - } -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_strings.gn src/build/linux/unbundle/absl_strings.gn ---- src/build/linux/unbundle.old/absl_strings.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_strings.gn 2024-04-07 17:52:10.775957800 +0000 -@@ -9,6 +9,10 @@ pkg_config("system_absl_strings") { - packages = [ "absl_strings" ] - } - -+pkg_config("system_absl_string_view") { -+ packages = [ "absl_string_view" ] -+} -+ - pkg_config("system_absl_str_format") { - packages = [ "absl_str_format" ] - } -@@ -59,8 +63,27 @@ source_set("str_format") { - public_configs = [ ":system_absl_str_format" ] - } - -+shim_headers("string_view_shim") { -+ root_path = "." -+ prefix = "absl/strings/" -+ headers = [ "string_view.h" ] -+} -+ -+source_set("string_view") { -+ deps = [ ":string_view_shim" ] -+ public_configs = [ ":system_absl_string_view" ] -+} -+ -+source_set("has_ostream_operator") { -+ # Dummy — unavailable with abseil 202308 aand chromium 122 does not use it -+} -+ - source_set("ascii_test") { - } -+source_set("char_formatting_test") { -+} -+source_set("charset_test") { -+} - source_set("cord_buffer_test") { - } - source_set("cord_data_edge_test") { -@@ -85,8 +108,30 @@ source_set("cordz_update_scope_test") { - } - source_set("cordz_update_tracker_test") { - } -+source_set("damerau_levenshtein_distance_test") { -+} -+source_set("has_absl_stringify_test") { -+} -+source_set("has_ostream_operator_test") { -+} - source_set("match_test") { - } -+source_set("str_format_arg_test") { -+} -+source_set("str_format_bind_test") { -+} -+source_set("str_format_checker_test") { -+} -+source_set("str_format_convert_test") { -+} -+source_set("str_format_extension_test") { -+} -+source_set("str_format_output_test") { -+} -+source_set("str_format_parser_test") { -+} -+source_set("str_format_test") { -+} - source_set("str_replace_test") { - } - source_set("string_view_test") { -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_synchronization.gn src/build/linux/unbundle/absl_synchronization.gn ---- src/build/linux/unbundle.old/absl_synchronization.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_synchronization.gn 2024-04-07 17:26:28.412783500 +0000 -@@ -20,3 +20,6 @@ source_set("synchronization") { - deps = [ ":synchronization_shim" ] - public_configs = [ ":system_absl_synchronization" ] - } -+ -+source_set("kernel_timeout_internal_test") {} -+source_set("waiter_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_time.gn src/build/linux/unbundle/absl_time.gn ---- src/build/linux/unbundle.old/absl_time.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_time.gn 2024-04-07 17:26:42.305628700 +0000 -@@ -19,3 +19,5 @@ source_set("time") { - deps = [ ":time_shim" ] - public_configs = [ ":system_absl_time" ] - } -+ -+source_set("time_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/absl_utility.gn src/build/linux/unbundle/absl_utility.gn ---- src/build/linux/unbundle.old/absl_utility.gn 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/absl_utility.gn 2024-04-07 17:26:54.834405600 +0000 -@@ -15,3 +15,5 @@ source_set("utility") { - deps = [ ":utility_shim" ] - public_configs = [ ":system_absl_utility" ] - } -+ -+source_set("if_constexpr_test") {} -diff '--color=auto' -uprN src/build/linux/unbundle.old/replace_gn_files.py src/build/linux/unbundle/replace_gn_files.py ---- src/build/linux/unbundle.old/replace_gn_files.py 2024-04-02 09:53:10.734295000 +0000 -+++ src/build/linux/unbundle/replace_gn_files.py 2024-04-07 17:29:53.274515100 +0000 -@@ -20,6 +20,7 @@ REPLACEMENTS = { - 'absl_base': 'third_party/abseil-cpp/absl/base/BUILD.gn', - 'absl_cleanup': 'third_party/abseil-cpp/absl/cleanup/BUILD.gn', - 'absl_container': 'third_party/abseil-cpp/absl/container/BUILD.gn', -+ 'absl_crc': 'third_party/abseil-cpp/absl/crc/BUILD.gn', - 'absl_debugging': 'third_party/abseil-cpp/absl/debugging/BUILD.gn', - 'absl_flags': 'third_party/abseil-cpp/absl/flags/BUILD.gn', - 'absl_functional': 'third_party/abseil-cpp/absl/functional/BUILD.gn', diff --git a/chromium-122-avoid-SFINAE-TypeConverter.patch b/chromium-122-avoid-SFINAE-TypeConverter.patch deleted file mode 100644 index a747117..0000000 --- a/chromium-122-avoid-SFINAE-TypeConverter.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff --git a/base/types/to_address.h.new b/base/types/to_address.h.new -new file mode 100644 -index 0000000..ac71b01 ---- /dev/null -+++ b/base/types/to_address.h -@@ -0,0 +1,40 @@ -+// Copyright 2024 The Chromium Authors -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef BASE_TYPES_TO_ADDRESS_H_ -+#define BASE_TYPES_TO_ADDRESS_H_ -+ -+#include -+#include -+ -+// SFINAE-compatible wrapper for `std::to_address()`. -+// -+// The standard does not require `std::to_address()` to be SFINAE-compatible -+// when code attempts instantiation with non-pointer-like types, and libstdc++'s -+// implementation hard errors. For the sake of templated code that wants simple, -+// unified handling, Chromium instead uses this wrapper, which provides that -+// guarantee. This allows code to use "`to_address()` would be valid here" as a -+// constraint to detect pointer-like types. -+namespace base { -+ -+// Note that calling `std::to_address()` with a function pointer renders the -+// program ill-formed. -+template -+ requires(!std::is_function_v) -+constexpr T* to_address(T* p) noexcept { -+ return p; -+} -+ -+// These constraints cover the cases where `std::to_address()`'s fancy pointer -+// overload is well-specified. -+template -+ requires requires(const P& p) { std::pointer_traits

::to_address(p); } || -+ requires(const P& p) { p.operator->(); } -+constexpr auto to_address(const P& p) noexcept { -+ return std::to_address(p); -+} -+ -+} // namespace base -+ -+#endif // BASE_TYPES_TO_ADDRESS_H_ -diff --git a/mojo/public/cpp/bindings/type_converter.h b/mojo/public/cpp/bindings/type_converter.h.new -index 2eddbb0..317245f 100644 ---- a/mojo/public/cpp/bindings/type_converter.h -+++ b/mojo/public/cpp/bindings/type_converter.h -@@ -11,6 +11,8 @@ - #include - #include - -+#include "base/types/to_address.h" -+ - namespace mojo { - - // NOTE: When possible, please consider using StructTraits / UnionTraits / -@@ -99,16 +99,16 @@ - - template - requires requires(const U& obj) { -- not std::is_pointer_v; -- { mojo::ConvertTo(std::to_address(obj)) } -> std::same_as; -+ !std::is_pointer_v; -+ { mojo::ConvertTo(base::to_address(obj)) } -> std::same_as; - } - inline T ConvertTo(const U& obj) { -- return mojo::ConvertTo(std::to_address(obj)); -+ return mojo::ConvertTo(base::to_address(obj)); - } - - template - requires requires(const U& obj) { -- not std::is_pointer_v; -+ !std::is_pointer_v; - TypeConverter::Convert(obj); - } - inline T ConvertTo(const U& obj) { diff --git a/chromium-123-qrcode.patch b/chromium-123-qrcode.patch new file mode 100644 index 0000000..2e0228a --- /dev/null +++ b/chromium-123-qrcode.patch @@ -0,0 +1,68 @@ +--- a/components/qr_code_generator/BUILD.gn ++++ b/components/qr_code_generator/BUILD.gn +@@ -38,24 +38,11 @@ + "qr_code_generator.h", + ] + deps = [ +- ":qr_code_generator_ffi_glue", + "//base", + ] + public_deps = [ + ":error", + "//base", +- ] +-} +- +-rust_static_library("qr_code_generator_ffi_glue") { +- allow_unsafe = true # Needed for FFI that underpins the `cxx` crate. +- crate_root = "qr_code_generator_ffi_glue.rs" +- sources = [ "qr_code_generator_ffi_glue.rs" ] +- cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ] +- visibility = [ ":qr_code_generator" ] +- deps = [ +- ":error", +- "//third_party/rust/qr_code/v2:lib", + ] + } + +--- a/components/qr_code_generator/qr_code_generator.cc ++++ b/components/qr_code_generator/qr_code_generator.cc +@@ -8,9 +8,7 @@ + #include + + #include "base/check_op.h" +-#include "base/containers/span_rust.h" + #include "base/numerics/safe_conversions.h" +-#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h" + + namespace qr_code_generator { + +@@ -22,27 +20,7 @@ + base::expected GenerateCode( + base::span in, + std::optional min_version) { +- rust::Slice rs_in = base::SpanToRustSlice(in); +- +- // `min_version` might come from a fuzzer and therefore we use a lenient +- // `saturated_cast` instead of a `checked_cast`. +- int16_t rs_min_version = +- base::saturated_cast(min_version.value_or(0)); +- +- std::vector result_pixels; +- size_t result_width = 0; +- Error result_error = Error::kUnknownError; +- bool result_is_success = generate_qr_code_using_rust( +- rs_in, rs_min_version, result_pixels, result_width, result_error); +- +- if (!result_is_success) { +- return base::unexpected(result_error); +- } +- GeneratedCode code; +- code.data = std::move(result_pixels); +- code.qr_size = base::checked_cast(result_width); +- CHECK_EQ(code.data.size(), static_cast(code.qr_size * code.qr_size)); +- return code; ++ return base::unexpected(Error::kUnknownError); + } + + } // namespace qr_code_generator diff --git a/chromium-125-cloud_authenticator.patch b/chromium-125-cloud_authenticator.patch new file mode 100644 index 0000000..5cd467f --- /dev/null +++ b/chromium-125-cloud_authenticator.patch @@ -0,0 +1,9 @@ +--- a/chrome/browser/webauthn/BUILD.gn ++++ b/chrome/browser/webauthn/BUILD.gn +@@ -26,6 +26,5 @@ + "//url", + ] + +- data_deps = [ "//third_party/cloud_authenticator/test/local_service:cloud_authenticator_test_service" ] + } + } diff --git a/chromium-127-cargo_crate.patch b/chromium-127-cargo_crate.patch new file mode 100644 index 0000000..b2298b2 --- /dev/null +++ b/chromium-127-cargo_crate.patch @@ -0,0 +1,12 @@ +--- a/build/rust/cargo_crate.gni ++++ b/build/rust/cargo_crate.gni +@@ -5,6 +5,8 @@ + import("//build/rust/rust_executable.gni") + import("//build/rust/rust_macro.gni") + import("//build/rust/rust_static_library.gni") ++ ++rust_sysroot="" + + # This template allows for building Cargo crates within gn. + # + diff --git a/chromium-127-crabby.patch b/chromium-127-crabby.patch new file mode 100644 index 0000000..4455037 --- /dev/null +++ b/chromium-127-crabby.patch @@ -0,0 +1,54 @@ +--- a/third_party/blink/renderer/platform/image-decoders/BUILD.gn ++++ b/third_party/blink/renderer/platform/image-decoders/BUILD.gn +@@ -77,14 +77,6 @@ + "//ui/gfx/geometry:geometry_skia", + ] + +- if (enable_av1_decoder) { +- sources += [ +- "avif/crabbyavif_image_decoder.cc", +- "avif/crabbyavif_image_decoder.h", +- ] +- +- deps += [ "//third_party/crabbyavif" ] +- } + + if (enable_rust_png) { + sources += [ +--- a/third_party/blink/renderer/platform/image-decoders/image_decoder.cc ++++ b/third_party/blink/renderer/platform/image-decoders/image_decoder.cc +@@ -51,9 +51,6 @@ + #include "ui/gfx/geometry/size.h" + #include "ui/gfx/geometry/size_conversions.h" + +-#if BUILDFLAG(ENABLE_AV1_DECODER) +-#include "third_party/blink/renderer/platform/image-decoders/avif/crabbyavif_image_decoder.h" +-#endif + + namespace blink { + +@@ -196,11 +193,6 @@ + if (MatchesBMPSignature(contents)) { + return "image/bmp"; + } +-#if BUILDFLAG(ENABLE_AV1_DECODER) +- if (CrabbyAVIFImageDecoder::MatchesAVIFSignature(fast_reader)) { +- return "image/avif"; +- } +-#endif + + return String(); + } +@@ -305,12 +297,6 @@ + } else if (mime_type == "image/bmp" || mime_type == "image/x-xbitmap") { + decoder = std::make_unique(alpha_option, color_behavior, + max_decoded_bytes); +-#if BUILDFLAG(ENABLE_AV1_DECODER) +- } else if (mime_type == "image/avif") { +- decoder = std::make_unique( +- alpha_option, high_bit_depth_decoding_option, color_behavior, aux_image, +- max_decoded_bytes, animation_option); +-#endif + } + + if (decoder) { diff --git a/chromium-129-disable-H.264-video-parser-during-demuxing.patch b/chromium-129-disable-H.264-video-parser-during-demuxing.patch new file mode 100644 index 0000000..a1b787e --- /dev/null +++ b/chromium-129-disable-H.264-video-parser-during-demuxing.patch @@ -0,0 +1,12 @@ +diff -up chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc.me chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc +--- chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc.me 2025-02-05 13:28:17.782881439 +0100 ++++ chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc 2025-02-05 13:33:15.256928027 +0100 +@@ -111,7 +111,7 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol + + // We don't allow H.264 parsing during demuxing since we have our own parser + // and the ffmpeg one increases memory usage unnecessarily. +- format_context_->flags |= AVFMT_FLAG_NOH264PARSE; ++ // format_context_->flags |= AVFMT_FLAG_NOH264PARSE; + + // Ensures format parsing errors will bail out. From an audit on 11/2017, all + // instances were real failures. Solves bugs like http://crbug.com/710791. diff --git a/chromium-130-fontations.patch b/chromium-130-fontations.patch new file mode 100644 index 0000000..a0af593 --- /dev/null +++ b/chromium-130-fontations.patch @@ -0,0 +1,216 @@ +--- a/skia/BUILD.gn ++++ b/skia/BUILD.gn +@@ -8,7 +8,6 @@ import("//build/config/features.gni") + import("//build/config/freetype/freetype.gni") + import("//build/config/rust.gni") + import("//build/config/sanitizers/sanitizers.gni") +-import("//build/rust/rust_static_library.gni") + import("//gpu/vulkan/features.gni") + import("//skia/skia.gni") + import("//testing/libfuzzer/fuzzer_test.gni") +@@ -37,27 +36,6 @@ buildflag_header("buildflags") { + ] + } + +-source_set("path_bridge") { +- sources = skia_fontations_path_bridge_sources +-} +- +-rust_static_library("bridge_rust_side") { +- allow_unsafe = true +- crate_root = skia_fontations_bridge_root +- sources = skia_ports_fontations_bridge_rust_side_sources +- cxx_bindings = [ skia_fontations_bridge_root ] +- deps = [ +- ":path_bridge", +- "//third_party/rust/font_types/v0_8:lib", +- "//third_party/rust/read_fonts/v0_27:lib", +- "//third_party/rust/skrifa/v0_29:lib", +- ] +- configs -= [ "//build/config/compiler:chromium_code" ] +- configs += [ +- ":skia_config", +- "//build/config/compiler:no_chromium_code", +- ] +-} + + # External-facing config for dependent code. + config("skia_config") { +@@ -190,7 +168,6 @@ config("skia_library_config") { + if (use_blink && enable_freetype) { + defines += [ + "SK_TYPEFACE_FACTORY_FREETYPE", +- "SK_TYPEFACE_FACTORY_FONTATIONS", + "SK_FONTMGR_FREETYPE_EMPTY_AVAILABLE", + ] + } +@@ -428,14 +405,6 @@ component("skia") { + public += skia_ports_fontmgr_empty_public + } + sources += skia_ports_typeface_proxy_sources +- sources += skia_ports_typeface_fontations_sources +- sources += skia_ports_fontmgr_fontations_sources +- +- # Fontations Rust/C++ bridge interfaces. +- deps += [ +- ":bridge_rust_side", +- ":path_bridge", +- ] + } + + if (is_win) { +@@ -730,13 +699,7 @@ skia_source_set("skia_core_and_effects") + # skia_core_and_effects rather than the other way around. + public_deps = [ "//third_party/dawn/include/dawn:cpp_headers" ] + } +- if (use_blink) { +- # Fontations Rust/C++ bridge interfaces, needed by SkTypeface. +- deps += [ +- ":bridge_rust_side", +- ":path_bridge", +- ] +- } ++ + visibility = [ ":skia" ] + } + +--- a/skia/ext/font_utils.cc ++++ b/skia/ext/font_utils.cc +@@ -69,13 +69,7 @@ static sk_sp fontmgr_factory( + return SkFontMgr_New_CoreText(nullptr); + #elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) + sk_sp fci(SkFontConfigInterface::RefGlobal()); +- if (base::FeatureList::IsEnabled(skia::kFontationsLinuxSystemFonts)) { +- return fci ? SkFontMgr_New_FCI(std::move(fci), +- SkFontScanner_Make_Fontations()) +- : nullptr; +- } else { +- return fci ? SkFontMgr_New_FCI(std::move(fci)) : nullptr; +- } ++ return fci ? SkFontMgr_New_FCI(std::move(fci)) : nullptr; + #elif BUILDFLAG(IS_FUCHSIA) + fuchsia::fonts::ProviderSyncPtr provider; + base::ComponentContextForProcess()->svc()->Connect(provider.NewRequest()); +--- a/third_party/blink/renderer/platform/fonts/skia/sktypeface_factory.cc ++++ b/third_party/blink/renderer/platform/fonts/skia/sktypeface_factory.cc +@@ -29,11 +29,7 @@ sk_sp SkTypeface_Factory::Fr + font_identity.fID = config_id; + font_identity.fTTCIndex = ttc_index; + +- if (base::FeatureList::IsEnabled(skia::kFontationsLinuxSystemFonts)) { +- return fci->makeTypeface(font_identity, SkFontMgr_New_Fontations_Empty()); +- } else { + return fci->makeTypeface(font_identity, skia::DefaultFontMgr()); +- } + #else + NOTREACHED(); + #endif +@@ -46,12 +42,7 @@ sk_sp SkTypeface_Factory::Fr + #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) && \ + !BUILDFLAG(IS_APPLE) + +- if (base::FeatureList::IsEnabled(skia::kFontationsLinuxSystemFonts)) { +- return SkFontMgr_New_Fontations_Empty()->makeFromFile(filename.c_str(), +- ttc_index); +- } else { + return skia::DefaultFontMgr()->makeFromFile(filename.c_str(), ttc_index); +- } + #else + NOTREACHED(); + #endif +--- a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc ++++ b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc +@@ -12,7 +12,6 @@ + #include "third_party/blink/renderer/platform/fonts/opentype/font_format_check.h" + #include "third_party/freetype_buildflags.h" + #include "third_party/skia/include/core/SkTypeface.h" +-#include "third_party/skia/include/ports/SkTypeface_fontations.h" + + #if BUILDFLAG(IS_WIN) + #include "third_party/blink/renderer/platform/fonts/win/dwrite_font_format_support.h" +@@ -38,11 +37,7 @@ bool IsWin() { + } + + bool IsFreeTypeSystemRasterizer() { +-#if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_APPLE) + return true; +-#else +- return false; +-#endif + } + + sk_sp MakeTypefaceDefaultFontMgr(sk_sp data) { +@@ -50,13 +45,7 @@ sk_sp MakeTypefaceDefaultFon + return FontCache::Get().FontManager()->makeFromData(data, 0); + #endif + +-#if BUILDFLAG(IS_APPLE) + return skia::DefaultFontMgr()->makeFromData(data, 0); +-#endif +- +-#if !(BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE)) +- return SkTypeface_Make_Fontations(data, SkFontArguments()); +-#endif + } + + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) +@@ -65,10 +54,6 @@ sk_sp MakeTypefaceFallback(s + } + #endif + +-sk_sp MakeTypefaceFontations(sk_sp data) { +- return SkTypeface_Make_Fontations(data, SkFontArguments()); +-} +- + sk_sp MakeVariationsTypeface( + sk_sp data, + const WebFontTypefaceFactory::FontInstantiator& instantiator) { +@@ -88,9 +73,6 @@ sk_sp MakeSbixTypeface( + const WebFontTypefaceFactory::FontInstantiator& instantiator) { + // If we're on a OS with FreeType as backend, or on Windows, where we used to + // use FreeType for SBIX, switch to Fontations for SBIX. +- if (IsFreeTypeSystemRasterizer() || IsWin()) { +- return instantiator.make_fontations(data); +- } + + // Remaining case, on Mac, CoreText can handle creating SBIX fonts. + return instantiator.make_system(data); +@@ -99,29 +81,21 @@ sk_sp MakeSbixTypeface( + sk_sp MakeColrV0Typeface( + sk_sp data, + const WebFontTypefaceFactory::FontInstantiator& instantiator) { +- if (IsWin()) { + // On Windows Skia's DirectWrite + // backend handles COLRv0. + return instantiator.make_system(data); +- } +- return instantiator.make_fontations(data); + } + + sk_sp MakeColrV0VariationsTypeface( + sk_sp data, + const WebFontTypefaceFactory::FontInstantiator& instantiator) { +-#if BUILDFLAG(IS_WIN) +- if (DWriteVersionSupportsVariations()) { + return instantiator.make_system(data); +- } +-#endif +- return instantiator.make_fontations(data); + } + + sk_sp MakeFontationsFallbackPreferred( + sk_sp data, + const WebFontTypefaceFactory::FontInstantiator& instantiator) { +- return instantiator.make_fontations(data); ++ return instantiator.make_system(data); + } + + } // namespace +@@ -131,7 +105,6 @@ bool WebFontTypefaceFactory::CreateTypef + const FontFormatCheck format_check(data); + const FontInstantiator instantiator = { + MakeTypefaceDefaultFontMgr, +- MakeTypefaceFontations, + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) + MakeTypefaceFallback, + #endif diff --git a/chromium-132-no-rust.patch b/chromium-132-no-rust.patch new file mode 100644 index 0000000..9d165fe --- /dev/null +++ b/chromium-132-no-rust.patch @@ -0,0 +1,331 @@ +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -27,7 +27,6 @@ import("//extensions/buildflags/buildfla + import("//gpu/vulkan/features.gni") + import("//media/gpu/args.gni") + import("//media/media_options.gni") +-import("//mojo/public/rust/rust.gni") + import("//pdf/features.gni") + import("//ppapi/buildflags/buildflags.gni") + import("//printing/buildflags/buildflags.gni") +@@ -885,17 +884,10 @@ group("all_rust") { + + deps = [ + ":rust_build_tests", +- "//base:base_unittests", # There is rust stuff in here. +- "//third_party/cloud_authenticator/processor", + ] + +- # TODO(https://crbug.com/405379314): This fails to build on some iOS ASAN +- # builders. +- if (!is_ios || !is_asan) { +- deps += [ "//testing/rust_gtest_interop:rust_gtest_interop_unittests" ] +- } + +- if (enable_rust_mojo) { ++ if (false) { + deps += [ + "//mojo/public/rust:mojo_rust", + "//mojo/public/rust:mojo_rust_integration_unittests", +--- a/base/BUILD.gn ++++ b/base/BUILD.gn +@@ -36,8 +36,6 @@ import("//build/config/sanitizers/saniti + import("//build/config/sysroot.gni") + import("//build/config/ui.gni") + import("//build/nocompile.gni") +-import("//build/rust/rust_bindgen.gni") +-import("//build/rust/rust_static_library.gni") + import("//build/util/process_version.gni") + import("//build_overrides/build.gni") + import("//testing/libfuzzer/fuzzer_test.gni") +@@ -1053,11 +1051,6 @@ component("base") { + # Used by metrics/crc32, except on NaCl builds. + deps += [ "//third_party/zlib" ] + +- # NaCl does not support Rust. +- deps += [ +- ":rust_logger", +- "//third_party/rust/serde_json_lenient/v0_2/wrapper", +- ] + } + + # `raw_ptr` cannot be made a component due to CRT symbol issues. +@@ -1093,7 +1086,7 @@ component("base") { + "//third_party/abseil-cpp:absl", + ] + +- if (!is_nacl) { ++ if (is_nacl) { + sources += [ + "containers/span_rust.h", + "strings/string_view_rust.h", +@@ -1598,8 +1591,6 @@ component("base") { + "files/scoped_temp_file.h", + "json/json_file_value_serializer.cc", + "json/json_file_value_serializer.h", +- "logging/rust_log_integration.cc", +- "logging/rust_log_integration.h", + "memory/discardable_memory.cc", + "memory/discardable_memory.h", + "memory/discardable_memory_allocator.cc", +@@ -2542,62 +2533,6 @@ component("base") { + } + } + +-rust_bindgen("logging_log_severity_bindgen") { +- # TODO(danakj): Maybe combine all base bindgen targets, or all base/logging +- # ones even) into a single GN target? But the GN rule needs to handle multiple +- # headers then. +- header = "logging/log_severity.h" +- cpp = true +- visibility = [ ":*" ] +- +- # Transitive generated header dependency. +- deps = [ ":debugging_buildflags" ] +-} +- +-rust_static_library("rust_logger") { +- allow_unsafe = true # Unsafe needed for FFI. +- deps = [ +- ":logging_log_severity_bindgen", +- ":tracing_buildflags", +- "//build:chromeos_buildflags", +- "//third_party/rust/log/v0_4:lib", +- +- # Needed because of circular dependency: base depends on this target and by +- # extension the cxx-generated C++ code, but the cxx-generated code includes +- # base headers and calls base code. This seems to generally not cause +- # issues, except for partition_alloc which applies configs when depended on. +- # +- # This allows the generated C++ code to transitively include partition alloc +- # headers without issue. +- # +- # TODO(collinbaker): determine how to handle these cxx bindings-induced +- # circular dependencies more robustly. +- "//base/allocator/partition_allocator:raw_ptr", +- +- # Needed because logging/rust_logger.rs contains: +- # include!("base/logging/rust_log_integration.h"); +- # rust_log_integration.h ends up transitively #including +- # debug/debugging_buildflags.h, which is a generated header that needs to +- # be written first. +- # +- # Technically it would be more correct to depend on :base, which is the +- # target for rust_log_integration.h, but that's not possible due to circular +- # dependencies. +- # +- # Note if this is removed the build may still work by accident because +- # debug/debugging_buildflags.h still ends up being generated through a +- # dependency chain via :logging_log_severity_bindgen. But we should not +- # rely on that. +- # +- # See also https://crbug.com/406267472. +- ":debugging_buildflags", +- ] +- visibility = [ ":base" ] +- sources = [ "logging/rust_logger.rs" ] +- crate_root = "logging/rust_logger.rs" +- +- cxx_bindings = [ "logging/rust_logger.rs" ] +-} + + if (is_linux || is_chromeos) { + # Split out as a separate target for two reasons: +@@ -3736,7 +3671,7 @@ test("base_unittests") { + sources += [ "location_unittest.cc" ] + } + +- if (!is_nacl) { ++ if (is_nacl) { + sources += [ + "containers/span_rust_unittest.cc", + "strings/string_piece_rust_unittest.cc", +@@ -3791,7 +3726,7 @@ test("base_unittests") { + deps += [ "allocator/partition_allocator/src/partition_alloc:unittests" ] + } + +- if (!is_nacl) { ++ if (is_nacl) { + deps += [ "//build/rust:cxx_cppdeps" ] + } + +--- a/base/json/json_reader.cc ++++ b/base/json/json_reader.cc +@@ -13,7 +13,7 @@ + #include "base/strings/string_number_conversions.h" + #include "build/build_config.h" + +-#if BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) + #include "base/json/json_parser.h" + #else + #include "base/strings/string_view_rust.h" +@@ -23,7 +23,7 @@ + + // TODO(crbug.com/40811643): Move the C++ parser into components/nacl to just + // run in-process there. Don't compile base::JSONReader on NaCL at all. +-#if !BUILDFLAG(IS_NACL) ++#if BUILDFLAG(IS_NACL) + + namespace { + const char kSecurityJsonParsingTime[] = "Security.JSONParser.ParsingTime"; +@@ -144,7 +144,7 @@ std::string JSONReader::Error::ToString( + std::optional JSONReader::Read(std::string_view json, + int options, + size_t max_depth) { +-#if BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) + internal::JSONParser parser(options, max_depth); + return parser.Parse(json); + #else // BUILDFLAG(IS_NACL) +@@ -185,7 +185,7 @@ std::optional JSONReader::R + JSONReader::Result JSONReader::ReadAndReturnValueWithError( + std::string_view json, + int options) { +-#if BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) + internal::JSONParser parser(options); + auto value = parser.Parse(json); + if (!value) { +--- a/base/logging.cc ++++ b/base/logging.cc +@@ -117,7 +117,7 @@ typedef FILE* FileHandle; + #include "base/fuchsia/scoped_fx_logger.h" + #endif + +-#if !BUILDFLAG(IS_NACL) ++#if BUILDFLAG(IS_NACL) + #include "base/logging/rust_logger.rs.h" + #endif + +@@ -529,7 +529,7 @@ bool BaseInitLoggingImpl(const LoggingSe + } + #endif + +-#if !BUILDFLAG(IS_NACL) ++#if BUILDFLAG(IS_NACL) + // Connects Rust logging with the //base logging functionality. + internal::init_rust_log_crate(); + #endif +--- a/base/test/BUILD.gn ++++ b/base/test/BUILD.gn +@@ -6,7 +6,6 @@ import("//build/compiled_action.gni") + import("//build/config/features.gni") + import("//build/config/nacl/config.gni") + import("//build/config/ui.gni") +-import("//build/rust/rust_static_library.gni") + import("//build_overrides/build.gni") + import("//third_party/protobuf/proto_library.gni") + +@@ -38,16 +37,6 @@ static_library("test_config") { + ] + } + +-rust_static_library("test_rust_logger_consumer") { +- allow_unsafe = true # Unsafe needed for FFI +- testonly = true +- deps = [ "//third_party/rust/log/v0_4:lib" ] +- sources = [ "logging/test_rust_logger_consumer.rs" ] +- +- crate_root = "logging/test_rust_logger_consumer.rs" +- +- cxx_bindings = [ "logging/test_rust_logger_consumer.rs" ] +-} + + static_library("test_support") { + testonly = true +@@ -192,7 +181,6 @@ static_library("test_support") { + + public_deps = [ + ":test_config", +- ":test_rust_logger_consumer", + "//base", + "//base:base_static", + "//base:i18n", +--- a/services/on_device_model/ml/BUILD.gn ++++ b/services/on_device_model/ml/BUILD.gn +@@ -71,7 +71,6 @@ if (use_blink || (is_ios && build_with_i + ] + if (enable_constraints) { + defines += [ "ENABLE_ON_DEVICE_CONSTRAINTS" ] +- deps += [ "//third_party/rust/llguidance/v0_7:lib" ] + } + if (use_blink) { + deps += [ "//gpu/config" ] +--- a/services/on_device_model/ml/chrome_ml.cc ++++ b/services/on_device_model/ml/chrome_ml.cc +@@ -24,7 +24,6 @@ + #include "third_party/dawn/include/dawn/dawn_proc.h" + #include "third_party/dawn/include/dawn/native/DawnNative.h" + #include "third_party/dawn/include/dawn/webgpu_cpp.h" +-#include "third_party/rust/chromium_crates_io/vendor/llguidance-v0_7/llguidance.h" + + #if !BUILDFLAG(IS_IOS) + #include "gpu/config/gpu_info_collector.h" +--- a/third_party/blink/common/BUILD.gn ++++ b/third_party/blink/common/BUILD.gn +@@ -311,7 +311,6 @@ source_set("common") { + "//services/metrics/public/mojom:mojom", + "//services/network/public/cpp:cpp", + "//services/network/public/mojom:mojom_permissions_policy", +- "//third_party/blink/common/rust_crash", + "//third_party/blink/public/common:buildflags", + "//third_party/re2", + "//ui/base:base", +--- a/third_party/blink/common/chrome_debug_urls.cc ++++ b/third_party/blink/common/chrome_debug_urls.cc +@@ -11,7 +11,6 @@ + #include "base/threading/platform_thread.h" + #include "build/build_config.h" + #include "third_party/blink/common/crash_helpers.h" +-#include "third_party/blink/common/rust_crash/src/lib.rs.h" + #include "url/gurl.h" + + #if BUILDFLAG(IS_WIN) +@@ -117,7 +116,7 @@ NOINLINE void MaybeTriggerAsanError(cons + // Ensure that ASAN works even in Rust code. + LOG(ERROR) << "Intentionally causing ASAN heap overflow in Rust" + << " because user navigated to " << url.spec(); +- crash_in_rust_with_overflow(); ++ //crash_in_rust_with_overflow(); + } + } + #endif // ADDRESS_SANITIZER +@@ -137,7 +136,7 @@ void HandleChromeDebugURL(const GURL& ur + } else if (url == kChromeUICrashRustURL) { + // Cause a typical crash in Rust code, so we can test that call stack + // collection and symbol mangling work across the language boundary. +- crash_in_rust(); ++ //crash_in_rust(); + } else if (url == kChromeUIDumpURL) { + // This URL will only correctly create a crash dump file if content is + // hosted in a process that has correctly called +--- a/third_party/breakpad/BUILD.gn ++++ b/third_party/breakpad/BUILD.gn +@@ -494,12 +494,7 @@ if (is_mac) { + # For breakpad/src/common/stabs_reader.h. + defines = [ "HAVE_MACH_O_NLIST_H" ] + +- # Rust demangle support. +- deps = [ "//third_party/rust/rustc_demangle_capi/v0_1:lib" ] +- defines += [ "HAVE_RUSTC_DEMANGLE" ] +- include_dirs += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-v0_1/include" ] +- sources += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-v0_1/include/rustc_demangle.h" ] +- } ++ } + test("breakpad_unittests") { + sources = [ "breakpad/src/common/module_unittest.cc" ] + deps = [ +@@ -742,12 +737,6 @@ if (is_linux || is_chromeos || is_androi + + include_dirs = [ "breakpad/src" ] + +- # Rust demangle support. +- deps = [ "//third_party/rust/rustc_demangle_capi/v0_1:lib" ] +- defines += [ "HAVE_RUSTC_DEMANGLE" ] +- include_dirs += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-v0_1/include" ] +- sources += [ "//third_party/rust/chromium_crates_io/vendor/rustc-demangle-capi-v0_1/include/rustc_demangle.h" ] +- + libs = [ "z" ] + } + } else if (current_toolchain == default_toolchain) { diff --git a/chromium-93-ffmpeg-4.4.patch b/chromium-93-ffmpeg-4.4.patch index 3ff625c..78a584b 100644 --- a/chromium-93-ffmpeg-4.4.patch +++ b/chromium-93-ffmpeg-4.4.patch @@ -21,40 +21,32 @@ Signed-off-by: Marek Behún media/filters/ffmpeg_demuxer.cc | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) -Index: electron-17.1.2/media/filters/audio_decoder_unittest.cc +Index: chromium-126.0.6478.8/media/filters/ffmpeg_demuxer.cc =================================================================== ---- electron-17.1.2.orig/media/filters/audio_decoder_unittest.cc 2022-03-11 08:49:30.740949416 +0100 -+++ electron-17.1.2/media/filters/audio_decoder_unittest.cc 2022-03-11 09:17:36.916088893 +0100 -@@ -102,7 +102,11 @@ void SetDiscardPadding(AVPacket* packet, - } +--- chromium-126.0.6478.8.orig/media/filters/ffmpeg_demuxer.cc ++++ chromium-126.0.6478.8/media/filters/ffmpeg_demuxer.cc +@@ -343,11 +343,19 @@ + } - // If the timestamp is positive, try to use FFmpeg's discard data. + base::span GetSideData(const AVPacket* packet) { +#if LIBAVUTIL_VERSION_MAJOR < 57 -+ int skip_samples_size = 0; ++ int side_data_size = 0; +#else - size_t skip_samples_size = 0; + size_t side_data_size = 0; +#endif - const uint32_t* skip_samples_ptr = - reinterpret_cast(av_packet_get_side_data( - packet, AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size)); -Index: chromium-118.0.5993.18/media/filters/ffmpeg_demuxer.cc -=================================================================== ---- chromium-118.0.5993.18.orig/media/filters/ffmpeg_demuxer.cc -+++ chromium-118.0.5993.18/media/filters/ffmpeg_demuxer.cc -@@ -398,7 +398,11 @@ void FFmpegDemuxerStream::EnqueuePacket( - - scoped_refptr buffer; + uint8_t* side_data = av_packet_get_side_data( + packet, AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size); +#if LIBAVUTIL_VERSION_MAJOR < 57 -+ int side_data_size = 0; ++ return base::span(side_data, base::checked_cast(side_data_size)); +#else - size_t side_data_size = 0; + return base::span(side_data, side_data_size); +#endif - uint8_t* side_data = av_packet_get_side_data( - packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size); + } -@@ -461,7 +465,11 @@ void FFmpegDemuxerStream::EnqueuePacket( - packet->size - data_offset); + void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { +@@ -474,7 +482,11 @@ + base::HeapArray::CopiedFrom(side_data); } +#if LIBAVUTIL_VERSION_MAJOR < 57 diff --git a/chromium-94-ffmpeg-roll.patch b/chromium-94-ffmpeg-roll.patch deleted file mode 100644 index 7878a01..0000000 --- a/chromium-94-ffmpeg-roll.patch +++ /dev/null @@ -1,12 +0,0 @@ -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/chromium-98-EnumTable-crash.patch b/chromium-98-EnumTable-crash.patch deleted file mode 100644 index 9c377b7..0000000 --- a/chromium-98-EnumTable-crash.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h -index 842553a..89de703 100644 ---- a/components/media_router/common/providers/cast/channel/enum_table.h -+++ b/components/media_router/common/providers/cast/channel/enum_table.h -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - - #include "base/check_op.h" - #include "base/notreached.h" -@@ -187,7 +188,6 @@ class - inline constexpr GenericEnumTableEntry(int32_t value); - inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str); - -- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete; - GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete; - - private: -@@ -253,7 +253,6 @@ class EnumTable { - constexpr Entry(E value, base::StringPiece str) - : GenericEnumTableEntry(static_cast(value), str) {} - -- Entry(const Entry&) = delete; - Entry& operator=(const Entry&) = delete; - }; - -@@ -312,15 +311,14 @@ class EnumTable { - if (is_sorted_) { - const std::size_t index = static_cast(value); - if (ANALYZER_ASSUME_TRUE(index < data_.size())) { -- const auto& entry = data_.begin()[index]; -+ const auto& entry = data_[index]; - if (ANALYZER_ASSUME_TRUE(entry.has_str())) - return entry.str(); - } - return absl::nullopt; - } - return GenericEnumTableEntry::FindByValue( -- reinterpret_cast(data_.begin()), -- data_.size(), static_cast(value)); -+ &data_[0], data_.size(), static_cast(value)); - } - - // This overload of GetString is designed for cases where the argument is a -@@ -348,8 +346,7 @@ class EnumTable { - // enum value directly. - absl::optional GetEnum(base::StringPiece str) const { - auto* entry = GenericEnumTableEntry::FindByString( -- reinterpret_cast(data_.begin()), -- data_.size(), str); -+ &data_[0], data_.size(), str); - return entry ? static_cast(entry->value) : absl::optional(); - } - -@@ -364,7 +361,7 @@ class EnumTable { - // Align the data on a cache line boundary. - alignas(64) - #endif -- std::initializer_list data_; -+ const std::vector data_; - bool is_sorted_; - - constexpr EnumTable(std::initializer_list data, bool is_sorted) -@@ -376,8 +373,8 @@ class EnumTable { - - for (std::size_t i = 0; i < data.size(); i++) { - for (std::size_t j = i + 1; j < data.size(); j++) { -- const Entry& ei = data.begin()[i]; -- const Entry& ej = data.begin()[j]; -+ const Entry& ei = data[i]; -+ const Entry& ej = data[j]; - DCHECK(ei.value != ej.value) - << "Found duplicate enum values at indices " << i << " and " << j; - DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str())) diff --git a/chromium-gcc11.patch b/chromium-gcc11.patch deleted file mode 100644 index 0711ead..0000000 --- a/chromium-gcc11.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc -=================================================================== ---- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-07 17:28:24.814737660 +0100 -+++ electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -14,6 +14,7 @@ - * See the License for the specific language governing permissions and - * limitations under the License. - */ -+#include - #include "src/trace_processor/db/column.h" - - #include "perfetto/base/logging.h" -Index: electron-17.1.0/ui/gtk/gtk_key_bindings_handler.cc -=================================================================== ---- electron-17.1.0.orig/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-07 17:20:31.788817015 +0100 -+++ electron-17.1.0/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -2,6 +2,7 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include - #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" - - #include "base/observer_list.h" -Index: electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc -=================================================================== ---- electron-17.1.0.orig/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-07 17:20:33.308823187 +0100 -+++ electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-09 08:25:10.346569313 +0100 -@@ -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 -+ - #include "components/bookmarks/browser/base_bookmark_model_observer.h" - - namespace bookmarks { diff --git a/chromium-remove-bundled-roboto-font.patch b/chromium-remove-bundled-roboto-font.patch index 5e32653..90335e6 100644 --- a/chromium-remove-bundled-roboto-font.patch +++ b/chromium-remove-bundled-roboto-font.patch @@ -20,7 +20,7 @@ This font is already available in opensuse and can be installed systemwide - } public_deps = [ - "cr_elements:build_grdp", + "cr_components/commerce:build_grdp", 'roboto.css' -> 'roboto.css.new' --- a/ui/webui/resources/css/roboto.css 2022-06-15 15:58:23.846426661 +0200 +++ b/ui/webui/resources/css/roboto.css 2022-06-21 15:53:08.931243442 +0200 diff --git a/chromium-vaapi.patch b/chromium-vaapi.patch deleted file mode 100644 index cdacde4..0000000 --- a/chromium-vaapi.patch +++ /dev/null @@ -1,75 +0,0 @@ -Index: electron-17.1.0/chrome/browser/about_flags.cc -=================================================================== ---- electron-17.1.0.orig/chrome/browser/about_flags.cc 2022-03-07 17:20:30.424811477 +0100 -+++ electron-17.1.0/chrome/browser/about_flags.cc 2022-03-09 08:25:19.662417046 +0100 -@@ -3822,12 +3822,12 @@ const FeatureEntry kFeatureEntries[] = { - #endif - #endif // BUILDFLAG(IS_ANDROID) - #endif // ENABLE_VR --#if BUILDFLAG(IS_CHROMEOS_ASH) -+#if BUILDFLAG(IS_CHROMEOS_ASH) || (defined(OS_LINUX) && !defined(OS_ANDROID)) - {"disable-accelerated-mjpeg-decode", - flag_descriptions::kAcceleratedMjpegDecodeName, -- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS, -+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux, - SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)}, --#endif // BUILDFLAG(IS_CHROMEOS_ASH) -+#endif // BUILDFLAG(IS_CHROMEOS_ASH) || (defined(OS_LINUX) && !defined(OS_ANDROID)) - {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName, - flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)}, -Index: electron-17.1.0/chrome/browser/flag_descriptions.cc -=================================================================== ---- electron-17.1.0.orig/chrome/browser/flag_descriptions.cc 2022-03-07 17:20:30.960813654 +0100 -+++ electron-17.1.0/chrome/browser/flag_descriptions.cc 2022-03-09 08:25:19.662417046 +0100 -@@ -4031,12 +4031,24 @@ const char kUseAngleGL[] = "OpenGL"; - - #if BUILDFLAG(IS_CHROMEOS_ASH) - -+#endif -+ -+// Chrome OS and Linux -------------------------------------------------------- -+ -+#if BUILDFLAG(IS_CHROMEOS_ASH) || (defined(OS_LINUX) && !defined(OS_ANDROID)) -+ - const char kAcceleratedMjpegDecodeName[] = - "Hardware-accelerated mjpeg decode for captured frame"; - const char kAcceleratedMjpegDecodeDescription[] = - "Enable hardware-accelerated mjpeg decode for captured frame where " - "available."; - -+#endif -+ -+// Chrome OS ------------------------------------------------------------------ -+ -+#if BUILDFLAG(IS_CHROMEOS_ASH) -+ - const char kAdaptiveChargingForTestingName[] = - "Show adaptive charging notifications for testing"; - const char kAdaptiveChargingForTestingDescription[] = -Index: electron-17.1.0/chrome/browser/flag_descriptions.h -=================================================================== ---- electron-17.1.0.orig/chrome/browser/flag_descriptions.h 2022-03-07 17:20:30.960813654 +0100 -+++ electron-17.1.0/chrome/browser/flag_descriptions.h 2022-03-09 08:25:19.666416981 +0100 -@@ -2305,9 +2305,21 @@ extern const char kUseAngleGL[]; - - #if BUILDFLAG(IS_CHROMEOS_ASH) - -+#endif -+ -+// Chrome OS and Linux -------------------------------------------------------- -+ -+#if BUILDFLAG(IS_CHROMEOS_ASH) || (defined(OS_LINUX) && !defined(OS_ANDROID)) -+ - extern const char kAcceleratedMjpegDecodeName[]; - extern const char kAcceleratedMjpegDecodeDescription[]; - -+#endif -+ -+#if BUILDFLAG(IS_CHROMEOS_ASH) -+ -+// Chrome OS ------------------------------------------------------------------ -+ - extern const char kAdaptiveChargingName[]; - extern const char kAdaptiveChargingDescription[]; - diff --git a/common.gypi-compiler.patch b/common.gypi-compiler.patch index aed8805..0b16167 100644 --- a/common.gypi-compiler.patch +++ b/common.gypi-compiler.patch @@ -1,9 +1,9 @@ ---- src/third_party/electron_node/common.gypi.orig 2024-05-09 09:30:23.202414200 +0000 -+++ src/third_party/electron_node/common.gypi 2024-05-10 17:53:01.801592000 +0000 -@@ -428,10 +428,15 @@ +--- src/third_party/electron_node/common.gypi.orig 2025-07-19 11:44:59.181882205 +0200 ++++ src/third_party/electron_node/common.gypi 2025-07-19 16:21:44.297731896 +0200 +@@ -534,15 +534,19 @@ 'ldflags': [ '-pthread' ], }], - [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', { + [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi openharmony"', { - 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], + # Add some useful flags which need to be specified on all modules anyway. + # `-fpic -fno-semantic-interposition` is the best relocation model for code that will live in a dlopened library @@ -11,14 +11,19 @@ + # `-fvisibility=hidden` is something we're adding to fix downstream overzealous exports. + # The electron headers annotate their visibility correctly, but many third-party code does not which leads to bloated builds. + 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-fpic', '-fno-semantic-interposition', '-fvisibility=hidden' ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ], + 'cflags_cc': [ + '-fno-rtti', + '-fno-exceptions', +- '-fno-strict-aliasing', + '-std=gnu++20', + ], 'defines': [ '__STDC_FORMAT_MACROS' ], - 'ldflags': [ '-rdynamic' ], -+ #'ldflags': [ '-rdynamic' ], this is totally bogus — we are building a plugin, not a plugin host ++ #'ldflags': [ '-rdynamic' ], this is totally bogus — we are building a plugin, not a plugin host 'target_conditions': [ # The 1990s toolchain on SmartOS can't handle thin archives. ['_type=="static_library" and OS=="solaris"', { -@@ -608,29 +613,7 @@ +@@ -720,29 +724,7 @@ '-Wl,--export-dynamic', ], }], diff --git a/common.gypi-remove-fno-omit-frame-pointer.patch b/common.gypi-remove-fno-omit-frame-pointer.patch index ffc063c..98b60cd 100644 --- a/common.gypi-remove-fno-omit-frame-pointer.patch +++ b/common.gypi-remove-fno-omit-frame-pointer.patch @@ -14,6 +14,6 @@ since we compile everything with -fasynchronous-unwind-tables anyway. - # frames otherwise, even with --call-graph dwarf. - 'cflags': [ '-fno-omit-frame-pointer' ], - }], - ['OS=="linux"', { + ['OS=="linux" or OS=="openharmony"', { 'conditions': [ ['enable_pgo_generate=="true"', { diff --git a/cr130-abseil-remove-unused-deps.patch b/cr130-abseil-remove-unused-deps.patch new file mode 100644 index 0000000..61b3a07 --- /dev/null +++ b/cr130-abseil-remove-unused-deps.patch @@ -0,0 +1,97 @@ +--- src/third_party/abseil-cpp/BUILD.gn.orig 2025-07-19 11:32:36.617980004 +0200 ++++ src/third_party/abseil-cpp/BUILD.gn 2025-08-15 17:20:46.305540851 +0200 +@@ -62,7 +62,6 @@ group("absl_component_deps") { + "//third_party/abseil-cpp/absl/base", + "//third_party/abseil-cpp/absl/base:config", + "//third_party/abseil-cpp/absl/base:core_headers", +- "//third_party/abseil-cpp/absl/base:fast_type_id", + "//third_party/abseil-cpp/absl/base:log_severity", + "//third_party/abseil-cpp/absl/base:no_destructor", + "//third_party/abseil-cpp/absl/base:nullability", +@@ -85,13 +84,9 @@ group("absl_component_deps") { + "//third_party/abseil-cpp/absl/hash", + "//third_party/abseil-cpp/absl/log:absl_check", + "//third_party/abseil-cpp/absl/log:absl_log", +- "//third_party/abseil-cpp/absl/log:absl_vlog_is_on", + "//third_party/abseil-cpp/absl/log:die_if_null", + "//third_party/abseil-cpp/absl/log:globals", + "//third_party/abseil-cpp/absl/log:initialize", +- "//third_party/abseil-cpp/absl/log:log_entry", +- "//third_party/abseil-cpp/absl/log:log_sink", +- "//third_party/abseil-cpp/absl/log:log_sink_registry", + "//third_party/abseil-cpp/absl/memory", + "//third_party/abseil-cpp/absl/meta:type_traits", + "//third_party/abseil-cpp/absl/numeric:bits", +@@ -102,7 +97,6 @@ group("absl_component_deps") { + "//third_party/abseil-cpp/absl/status", + "//third_party/abseil-cpp/absl/status:statusor", + "//third_party/abseil-cpp/absl/strings", +- "//third_party/abseil-cpp/absl/strings:charset", + "//third_party/abseil-cpp/absl/strings:cord", + "//third_party/abseil-cpp/absl/strings:has_ostream_operator", + "//third_party/abseil-cpp/absl/strings:str_format", +@@ -125,7 +119,6 @@ group("absl_component_deps") { + "//third_party/abseil-cpp/absl/base:raw_logging_internal", + + # absl internal utilities used by protobuf. +- "//third_party/abseil-cpp/absl/container:layout", + ] + + if (is_component_build) { +@@ -295,8 +288,6 @@ if (absl_build_tests) { + "absl/container:flat_hash_set_test", + "absl/container:hash_function_defaults_test", + "absl/container:inlined_vector_test", +- "absl/container:node_hash_map_test", +- "absl/container:node_hash_set_test", + "absl/container:node_slot_policy_test", + "absl/container:raw_hash_set_allocator_test", + "absl/container:raw_hash_set_resize_impl_test", +@@ -305,11 +296,8 @@ if (absl_build_tests) { + "absl/crc:crc_cord_state_test", + "absl/crc:crc_memcpy_test", + "absl/crc:non_temporal_memcpy_test", +- "absl/debugging:bounded_utf8_length_sequence_test", +- "absl/debugging:decode_rust_punycode_test", + "absl/debugging:demangle_rust_test", + "absl/debugging:stacktrace_test", +- "absl/debugging:utf8_for_code_point_test", + "absl/flags:flag_test", + "absl/functional:any_invocable_test", + "absl/functional:function_ref_test", +@@ -333,7 +321,6 @@ if (absl_build_tests) { + "absl/log:vlog_is_on_test", + "absl/log/internal:fnmatch_test", + "absl/log/internal:stderr_log_sink_test", +- "absl/log/internal:structured_proto_test", + "absl/memory:memory_test", + "absl/meta:type_traits_test", + "absl/numeric:int128_test", +@@ -341,7 +328,6 @@ if (absl_build_tests) { + "absl/profiling:periodic_sampler_test", + "absl/random:distributions_test", + "absl/random:mock_distributions_test", +- "absl/random/internal:nonsecure_base_test", + "absl/status:status_matchers_test", + "absl/status:status_test", + "absl/status:statusor_test", +@@ -367,7 +353,6 @@ if (absl_build_tests) { + "absl/strings:has_absl_stringify_test", + "absl/strings:has_ostream_operator_test", + "absl/strings:match_test", +- "absl/strings:str_cat_test", + "absl/strings:str_format_arg_test", + "absl/strings:str_format_bind_test", + "absl/strings:str_format_checker_test", +@@ -378,11 +363,7 @@ if (absl_build_tests) { + "absl/strings:str_format_test", + "absl/strings:str_replace_test", + "absl/strings:string_view_test", +- "absl/synchronization:barrier_test", +- "absl/synchronization:graphcycles_test", + "absl/synchronization:kernel_timeout_internal_test", +- "absl/synchronization:mutex_test", +- "absl/synchronization:per_thread_sem_test", + "absl/synchronization:waiter_test", + "absl/time:time_test", + "absl/types:span_test", diff --git a/cr130-absl-base.patch b/cr130-absl-base.patch new file mode 100644 index 0000000..ce4f984 --- /dev/null +++ b/cr130-absl-base.patch @@ -0,0 +1,99 @@ +--- src/build/linux/unbundle/absl_base.gn.orig 2025-01-02 10:33:14.819582911 +0100 ++++ src/build/linux/unbundle/absl_base.gn 2025-01-02 12:14:46.875133605 +0100 +@@ -13,6 +13,14 @@ pkg_config("system_absl_core_headers") { + packages = [ "absl_core_headers" ] + } + ++pkg_config("system_absl_dynamic_annotations") { ++ packages = [ "absl_dynamic_annotations" ] ++} ++ ++pkg_config("system_absl_log_severity") { ++ packages = [ "absl_log_severity" ] ++} ++ + pkg_config("system_absl_nullability") { + packages = [ "absl_nullability" ] + } +@@ -21,13 +29,16 @@ pkg_config("system_absl_prefetch") { + packages = [ "absl_prefetch" ] + } + ++pkg_config("system_absl_raw_logging_internal") { ++ packages = [ "absl_raw_logging_internal" ] ++} ++ + shim_headers("base_shim") { + root_path = "." + prefix = "absl/base/" + headers = [ + "call_once.h", + "casts.h", +- "dynamic_annotations.h", + ] + } + +@@ -69,6 +80,28 @@ source_set("core_headers") { + public_configs = [ ":system_absl_core_headers" ] + } + ++shim_headers("dynamic_annotations_shim") { ++ root_path = "." ++ prefix = "absl/base/" ++ headers = [ "dynamic_annotations.h" ] ++} ++ ++source_set("dynamic_annotations") { ++ deps = [ ":dynamic_annotations_shim" ] ++ public_configs = [ ":system_absl_dynamic_annotations" ] ++} ++ ++shim_headers("log_severity_shim") { ++ root_path = "." ++ prefix = "absl/base/" ++ headers = [ "log_severity.h" ] ++} ++ ++source_set("log_severity") { ++ deps = [ ":log_severity_shim" ] ++ public_configs = [ ":system_absl_log_severity" ] ++} ++ + shim_headers("nullability_shim") { + root_path = "." + prefix = "absl/base/" +@@ -91,6 +124,17 @@ source_set("prefetch") { + public_configs = [ ":system_absl_prefetch" ] + } + ++shim_headers("raw_logging_internal_shim") { ++ root_path = "." ++ prefix = "absl/base/" ++ headers = [ "internal/raw_logging.h" ] ++} ++ ++source_set("raw_logging_internal") { ++ deps = [ ":raw_logging_internal_shim" ] ++ public_configs = [ ":system_absl_raw_logging_internal" ] ++} ++ + source_set("no_destructor") { + # Dummy — unavailable with abseil 202308 and chromium 122 does not use it + } +@@ -99,7 +143,15 @@ source_set("config_test") { + } + source_set("no_destructor_test") { + } ++source_set("nullability_default_nonnull_test") { ++} + source_set("nullability_test") { + } ++source_set("poison_test") { ++} + source_set("prefetch_test") { + } ++source_set("tracing_internal_strong_test") { ++} ++source_set("tracing_internal_weak_test") { ++} +\ Brak znaku nowej linii na końcu pliku diff --git a/crashpad-use-system-abseil.patch b/crashpad-use-system-abseil.patch deleted file mode 100644 index 65b08b1..0000000 --- a/crashpad-use-system-abseil.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/components/crash/core/app/crashpad.cc -+++ b/components/crash/core/app/crashpad.cc -@@ -28,8 +28,8 @@ - #include "build/chromeos_buildflags.h" - #include "components/crash/core/app/crash_reporter_client.h" - #include "components/crash/core/common/crash_key.h" --#include "third_party/abseil-cpp/absl/base/internal/raw_logging.h" --#include "third_party/abseil-cpp/absl/types/optional.h" -+#include -+#include - #include "third_party/crashpad/crashpad/client/annotation.h" - #include "third_party/crashpad/crashpad/client/annotation_list.h" - #include "third_party/crashpad/crashpad/client/crash_report_database.h" -@@ -49,6 +49,9 @@ - #include "components/crash/core/app/crash_export_thunks.h" - #endif - -+#if ABSL_LTS_RELEASE_VERSION < 20230000 -+#define raw_log_internal raw_logging_internal -+#endif - namespace crash_reporter { - - namespace { diff --git a/create_tarball.sh b/create_tarball.sh index 50be806..cb116d3 100644 --- a/create_tarball.sh +++ b/create_tarball.sh @@ -69,7 +69,7 @@ EOF export DEPOT_TOOLS_UPDATE=0 echo ">>>>>> Downloading electron-${ELECTRON_PKGVERSION}" -gclient sync -v --jobs $(nproc) --nohooks --no-history --shallow --revision=v"${ELECTRON_PKGVERSION}" +gclient sync -v --jobs 15 --nohooks --no-history --shallow --revision=v"${ELECTRON_PKGVERSION}" if [ $? -ne 0 ]; then echo "ERROR: gclient sync failed" cleanup_and_exit 1 @@ -139,12 +139,20 @@ python3 src/tools/download_optimization_profile.py \ # Needed to get typescript compiler echo ">>>>>> Download and unpack webui-node-modules tarball for third_party/node" python3 src/third_party/depot_tools/download_from_google_storage.py \ - --no_resume --extract --no_auth --bucket chromium-nodejs \ + --no_resume --no_auth --bucket chromium-nodejs \ -s src/third_party/node/node_modules.tar.gz.sha1 if [ $? -ne 0 ]; then echo "ERROR: download_from_google_storage failed" cleanup_and_exit 1 fi +mkdir -pv src/third_party/node/node_modules +pushd src/third_party/node/node_modules +tar -xvvf ../node_modules.tar.gz +if [ $? -ne 0 ]; then + echo "ERROR: tar extract failed" + cleanup_and_exit 1 +fi +popd # we don't need the orig tarball rm -v src/third_party/node/node_modules.tar.gz @@ -166,11 +174,9 @@ echo ">>>>>> Remove bundled libs" keeplibs=( base/third_party/cityhash #Derived code, not vendored dependency. base/third_party/cityhash_v103 #Derived code, not vendored dep - base/third_party/dynamic_annotations #Derived code, not vendored dependency. base/third_party/icu #Derived code, not vendored dependency. base/third_party/superfasthash #Not a shared library. base/third_party/symbolize #Derived code, not vendored dependency. - base/third_party/valgrind #Copy of a private header. base/third_party/xdg_user_dirs #Derived code, not vendored dependency. chrome/third_party/mozilla_security_manager #Derived code, not vendored dependency. net/third_party/mozilla_security_manager #Derived code, not vendored dependency. @@ -180,7 +186,6 @@ keeplibs=( third_party/abseil-cpp #Leap and fc36 too old. third_party/angle # ANGLE is an integral part of chrome and is not available as a shared library. third_party/angle/src/third_party/ceval #not in any distro - third_party/angle/src/third_party/volk #replacement vulkan loader. Drop it when Leap has new enough libvulkan third_party/blink #Integral part of chrome third_party/boringssl #Factory has an ancient version, but upstream seems to have gave up on making it a shared library third_party/boringssl/src/third_party/fiat #Not in any distro @@ -213,32 +218,29 @@ keeplibs=( third_party/devtools-frontend #Javascript code, integral part of chrome third_party/devtools-frontend/src/front_end/third_party #various javascript code compiled into chrome, see README.md third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt + third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs - third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n # javascript third_party/devtools-frontend/src/third_party/i18n #javascript - third_party/devtools-frontend/src/third_party/typescript #Chromium added code - third_party/distributed_point_functions #not in any distro third_party/dom_distiller_js #javascript #third_party/eigen3 #Used only by tflite which is not used in electron third_party/electron_node #Integral part of electron third_party/emoji-segmenter #not available as a shared library + third_party/fast_float #Header-only library thus we're not debundling it rn. third_party/fdlibm #derived code, not vendored dep + third_party/fp16 #Fedora 41 has it (but an old version?) Not in openSUSE. Header-only library thus we're not debundling it rn. third_party/hunspell #heavily forked version third_party/inspector_protocol #integral part of chrome third_party/ipcz #not in any distro - third_party/jstemplate #javascript third_party/khronos #Modified to add ANGLE definitions third_party/leveldatabase #use of private headers - third_party/libaom #15.5 is too old + third_party/libaom #15.6 too old third_party/libaom/source/libaom/third_party/fastfeat third_party/libaom/source/libaom/third_party/SVT-AV1 third_party/libaom/source/libaom/third_party/vector third_party/libaom/source/libaom/third_party/x86inc - third_party/libavif #bleeding-edge nightly. try unbundling again when 1.1 gets released third_party/libgav1 #Usage of private headers (ObuFrameHeader from utils/types.h) third_party/libsrtp #Needs to be built against boringssl, not openssl third_party/libsync #not yet in any distro - third_party/libudev #Headers for a optional delay-loaded dependency third_party/liburlpattern #Derived code, not vendored dep. third_party/libva_protected_content #ChromeOS header not available separately. needed for build. third_party/libvpx #15.5/FC37 too old @@ -269,36 +271,37 @@ keeplibs=( #third_party/pdfium/third_party/skia_shared #Skia is not available as a shared library yet. third_party/perfetto #Seems not to be available as a shared library, despite the presence of a `debian` directory. third_party/perfetto/protos/third_party/chromium #derived code, not vendored dep + third_party/perfetto/protos/third_party/simpleperf #not available in any distro third_party/pffft #not in any distro, also heavily patched third_party/polymer #javascript third_party/protobuf #Heavily forked. Apparently was officially unbundlable back in the GYP days, and may be again in the future. + third_party/protobuf/third_party/utf8_range # Integral part of protobuf + third_party/rapidhash #Fork third_party/re2 # fedora too old third_party/rnnoise #use of private headers + third_party/search_engines_data #integral part of chromium (but should not be?). was under components/ before E35, see https://github.com/chromium/chromium/commit/b8a327a1aa0227cf96dbbe0ad55f1c2773b23c23 + third_party/simdutf #Not in Factory third_party/skia #integral part of chrome third_party/speech-dispatcher #Headers for a delay-loaded optional dependency + third_party/spirv-headers #15.6 too old third_party/sqlite #heavily forked version third_party/swiftshader #not available as a shared library third_party/swiftshader/third_party/astc-encoder #not in rawhide or factory. Debian has it (astc-encoder) third_party/swiftshader/third_party/llvm-subzero #heavily forked version of libLLVM for use in subzero third_party/swiftshader/third_party/marl #not on any distro - third_party/swiftshader/third_party/SPIRV-Headers #Leap too old - third_party/swiftshader/third_party/SPIRV-Tools #Leap too old third_party/swiftshader/third_party/subzero #integral part of swiftshader #third_party/tflite #Not used by electron, but chrome needs it. #third_party/tflite/src/third_party/eigen3 #third_party/tflite/src/third_party/fft2d - third_party/vulkan-deps/spirv-headers #15.5 too old - third_party/vulkan-deps/spirv-tools #15.5 too old - third_party/vulkan-deps/vulkan-headers #15.5 too old. CONSIDER UNBUNDLING when all distros have new enough vulkan sdk + third_party/vulkan-headers #15.6 too old third_party/vulkan_memory_allocator #not in Factory third_party/webgpu-cts #Javascript code. Needed even if you're building chrome without webgpu third_party/webrtc #Integral part of chrome third_party/webrtc/common_audio/third_party/ooura #derived code, not vendored dep third_party/webrtc/common_audio/third_party/spl_sqrt_floor #derived code, not vendored dep third_party/webrtc/modules/third_party/fft #derived code, not vendored dep - third_party/webrtc/modules/third_party/g711 #derived code, not vendored dep - third_party/webrtc/modules/third_party/g722 #derived code, not vendored dep - third_party/webrtc/rtc_base/third_party/base64 #derived code, not vendored dep + third_party/webrtc/modules/third_party/g711 #Fork. Original is from spandsp. Might be debundled if upstream ever accepts WebRTC's patches. + third_party/webrtc/modules/third_party/g722 #Fork. Original is from spandsp. third_party/webrtc/rtc_base/third_party/sigslot #derived code, not vendored dep third_party/webrtc_overrides #Integral part of chrome third_party/widevine #Integral part of chrome. Needed. @@ -308,14 +311,14 @@ keeplibs=( third_party/wayland-protocols/unstable #unknown origin. not in wayland-protocol-devel or elsewhere third_party/wuffs #not in any distro third_party/x11proto #derived code, not vendored dep - third_party/zlib/contrib/minizip #https://bugzilla.redhat.com/show_bug.cgi?id=2240599 https://github.com/zlib-ng/minizip-ng/issues/447 third_party/zlib/google #derived code, not vendored dep url/third_party/mozilla #derived code, not vendored dep - v8/src/third_party/siphash #derived code, not vendored dep - v8/src/third_party/utf8-decoder #derived code, not vendored dep - v8/src/third_party/valgrind #incompatible definition of VALGRIND_DISCARD_TRANSLATIONS v8/third_party/inspector_protocol #integral part of chrome + v8/third_party/rapidhash-v8 #derived code, not vendored dep + v8/third_party/siphash #derived code, not vendored dep + v8/third_party/utf8-decoder #derived code, not vendored dep v8/third_party/v8 #derived code, not vendored dep + v8/third_party/valgrind #incompatible definition of VALGRIND_DISCARD_TRANSLATIONS ) build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove if [ $? -ne 0 ]; then @@ -323,17 +326,27 @@ if [ $? -ne 0 ]; then cleanup_and_exit 1 fi # Now remove additional bundled/duplicate libraries in node/deps -rm -rf third_party/electron_node/deps/{googletest/{include,src},icu-small} #292MB and vendored +rm -rf third_party/electron_node/deps/{googletest/{include,src},icu-small,corepack} #292MB and vendored +#rm -rf third_party/electron_node/tools/gyp 15.6 has too old gyp, not unbundling for now. +rm -rf third_party/electron_node/tools/inspector_protocol/jinja2 find third_party/electron_node/deps/brotli -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete find third_party/electron_node/deps/cares -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete find third_party/electron_node/deps/nghttp2 -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +find third_party/electron_node/deps/ngtcp2 -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete find third_party/electron_node/deps/openssl -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +find third_party/electron_node/deps/simdutf -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +find third_party/electron_node/deps/sqlite -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete find third_party/electron_node/deps/v8 -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete -rm -rvf third_party/electron_node/deps/v8/tools +rm -rvf third_party/electron_node/deps/v8/{tools,include} ln -srv v8/tools -t third_party/electron_node/deps/v8/ +ln -srv v8/include -t third_party/electron_node/deps/v8/ find third_party/electron_node/deps/zlib -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +find third_party/electron_node/deps/zstd -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +# vendored system headers +rm -rf build/linux/debian*sysroot + #Some more chonkers rm -rf components/test/data #21MB rm -rf docs #30MB diff --git a/disable-FFmpegAllowLists.patch b/disable-FFmpegAllowLists.patch new file mode 100644 index 0000000..e04934a --- /dev/null +++ b/disable-FFmpegAllowLists.patch @@ -0,0 +1,11 @@ +--- src/media/ffmpeg/ffmpeg_common.cc.orig 2025-04-11 12:05:21.289638236 +0200 ++++ src/media/ffmpeg/ffmpeg_common.cc 2025-04-12 12:23:36.647784415 +0200 +@@ -76,7 +76,7 @@ const char* GetAllowedVideoDecoders() { + void ApplyCodecContextSecuritySettings(AVCodecContext* codec_context) { + // Future versions of ffmpeg may copy the allow list from the format + // context. +- if (!codec_context->codec_whitelist) { ++ if (false) { + // Note: FFmpeg will try to free this string, so we must duplicate it. + codec_context->codec_whitelist = + av_strdup(codec_context->codec_type == AVMEDIA_TYPE_AUDIO diff --git a/disable-avif-really.patch b/disable-avif-really.patch new file mode 100644 index 0000000..c8f2a38 --- /dev/null +++ b/disable-avif-really.patch @@ -0,0 +1,39 @@ +Cleanup after chromium-127-crabby.patch +Do not advertise AVIF support to allow for graceful degradation. + +diff '--color=auto' -urp src/content/common/content_constants_internal.cc src.new/content/common/content_constants_internal.cc +--- src/content/common/content_constants_internal.cc 2025-04-21 18:29:19.250307076 +0200 ++++ src.new/content/common/content_constants_internal.cc 2025-04-23 18:12:33.518743675 +0200 +@@ -11,7 +11,7 @@ namespace content { + // 20MiB + const size_t kMaxLengthOfDataURLString = 1024 * 1024 * 20; + +-#if BUILDFLAG(ENABLE_AV1_DECODER) ++#if 0 + const char kFrameAcceptHeaderValue[] = + "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif," + "image/webp,image/apng,*/*;q=0.8"; +diff '--color=auto' -urp src/third_party/blink/common/loader/network_utils.cc src.new/third_party/blink/common/loader/network_utils.cc +--- src/third_party/blink/common/loader/network_utils.cc 2025-04-21 18:29:25.994307178 +0200 ++++ src.new/third_party/blink/common/loader/network_utils.cc 2025-04-23 18:12:48.166740983 +0200 +@@ -34,7 +34,7 @@ bool AlwaysAccessNetwork( + } + + const char* ImageAcceptHeader() { +-#if BUILDFLAG(ENABLE_AV1_DECODER) ++#if 0 + return "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"; + #else + return "image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"; +diff '--color=auto' -urp src/third_party/blink/common/mime_util/mime_util.cc src.new/third_party/blink/common/mime_util/mime_util.cc +--- src/third_party/blink/common/mime_util/mime_util.cc 2025-04-21 18:29:26.002307178 +0200 ++++ src.new/third_party/blink/common/mime_util/mime_util.cc 2025-04-23 18:13:01.090738191 +0200 +@@ -41,7 +41,7 @@ constexpr auto kSupportedImageTypes = ba + "image/x-icon", // ico + "image/x-xbitmap", // xbm + "image/x-png", +-#if BUILDFLAG(ENABLE_AV1_DECODER) ++#if 0 + "image/avif", + #endif + }); diff --git a/disable-catapult.patch b/disable-catapult.patch index 1137a48..f30a6c5 100644 --- a/disable-catapult.patch +++ b/disable-catapult.patch @@ -144,21 +144,19 @@ author: Michael Gilbert ] data_deps = [ "//testing:test_scripts_shared" ] } ---- a/tools/gritsettings/resource_ids.spec -+++ b/tools/gritsettings/resource_ids.spec -@@ -755,12 +755,6 @@ - "content/test/web_ui_mojo_test_resources.grd": { - "includes": [7340], +--- src/tools/gritsettings/resource_ids.spec.orig 2025-04-11 12:29:49.277239656 +0200 ++++ src/tools/gritsettings/resource_ids.spec 2025-04-11 12:30:15.524243417 +0200 +@@ -1248,10 +1248,6 @@ + "META": {"sizes": {"includes": [20]}}, + "includes": [8280], }, -- -- # This file is generated during the build. - "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd": { - "META": {"sizes": {"includes": [20],}}, -- "includes": [7360], +- "includes": [8300], - }, - # END content/ section. - - # START "everything else" section. + "<(SHARED_INTERMEDIATE_DIR)/content/browser/webrtc/resources/resources.grd": { + "META": {"sizes": {"includes": [20],}}, + "includes": [8320], --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -2530,7 +2530,6 @@ source_set("browser") { @@ -166,24 +164,24 @@ author: Michael Gilbert "//components/vector_icons", "//components/webauthn/json", - "//content/browser/tracing:resources", + "//media/mojo/mojom:speech_recognition", + "//ui/base", ] - } - ---- a/chrome/chrome_paks.gni -+++ b/chrome/chrome_paks.gni -@@ -190,8 +190,6 @@ template("chrome_extra_paks") { +--- src/chrome/chrome_paks.gni.orig 2025-07-19 11:32:31.785979797 +0200 ++++ src/chrome/chrome_paks.gni 2025-07-19 16:32:46.337623073 +0200 +@@ -230,8 +230,6 @@ template("chrome_extra_paks") { + "$root_gen_dir/chrome/web_app_internals_resources.pak", "$root_gen_dir/chrome/webui_gallery_resources.pak", "$root_gen_dir/chrome/whats_new_resources.pak", - "$root_gen_dir/content/browser/devtools/devtools_resources.pak", - "$root_gen_dir/content/browser/tracing/tracing_resources.pak", - "$root_gen_dir/content/traces_internals_resources.pak", ] deps += [ - "//chrome/browser/resources:component_extension_resources", -@@ -199,7 +197,6 @@ template("chrome_extra_paks") { "//chrome/browser/resources:dev_ui_paks", +@@ -241,7 +239,6 @@ template("chrome_extra_paks") { + "//chrome/browser/resources/lens/shared:resources", "//chrome/browser/resources/search_engine_choice:resources", - "//content/browser/devtools:devtools_resources", + "//chrome/browser/resources/tabs/tab_group_home:resources", - "//content/browser/tracing:resources", ] if (is_chrome_branded) { @@ -315,17 +313,17 @@ author: Michael Gilbert "//third_party/perfetto/src/trace_processor:trace_processor_shell", ] data = [ ---- a/electron/electron_paks.gni -+++ b/electron/electron_paks.gni -@@ -57,7 +57,6 @@ - "$root_gen_dir/chrome/dev_ui_browser_resources.pak", +--- src/electron/build/electron_paks.gni.orig 2025-04-11 12:02:41.243100651 +0200 ++++ src/electron/build/electron_paks.gni 2025-04-11 12:28:19.897748625 +0200 +@@ -57,7 +57,6 @@ template("electron_extra_paks") { + "$root_gen_dir/chrome/common_resources.pak", "$root_gen_dir/components/components_resources.pak", "$root_gen_dir/content/browser/resources/media/media_internals_resources.pak", - "$root_gen_dir/content/browser/tracing/tracing_resources.pak", "$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak", "$root_gen_dir/content/content_resources.pak", "$root_gen_dir/content/gpu_resources.pak", -@@ -73,7 +72,6 @@ +@@ -76,7 +75,6 @@ template("electron_extra_paks") { "//content/browser/resources/gpu:resources", "//content/browser/resources/media:resources", "//content/browser/resources/process:resources", diff --git a/disable-devtools-tests.patch b/disable-devtools-tests.patch deleted file mode 100644 index 8c7f84c..0000000 --- a/disable-devtools-tests.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/third_party/devtools-frontend/src/BUILD.gn -+++ b/third_party/devtools-frontend/src/BUILD.gn -@@ -13,7 +13,6 @@ import("./third_party/blink/public/publi - - devtools_frontend_resources_deps = [ - "front_end", -- "test", - ] - - group("devtools_all_files") { diff --git a/disable-webspeech.patch b/disable-webspeech.patch index ef38f33..83434ce 100644 --- a/disable-webspeech.patch +++ b/disable-webspeech.patch @@ -22,11 +22,9 @@ Reviewed-by: Allan Sandfeld Jensen chromium/media/media_options.gni | 2 + 7 files changed, 52 insertions(+), 27 deletions(-) -diff --git a/chromium/content/browser/BUILD.gn b/chromium/content/browser/BUILD.gn -index 19b45dc1268..67dcd7752d0 100644 ---- a/content/browser/BUILD.gn -+++ b/content/browser/BUILD.gn -@@ -1909,11 +1909,6 @@ source_set("browser") { +--- src/content/browser/BUILD.gn.orig 2024-12-08 18:44:00.234689649 +0100 ++++ src/content/browser/BUILD.gn 2024-12-18 12:20:19.753578327 +0100 +@@ -2134,13 +2134,6 @@ source_set("browser") { "sms/user_consent_handler.h", "sms/webotp_service.cc", "sms/webotp_service.h", @@ -34,21 +32,19 @@ index 19b45dc1268..67dcd7752d0 100644 - "speech/speech_recognition_dispatcher_host.h", - "speech/speech_recognition_manager_impl.cc", - "speech/speech_recognition_manager_impl.h", +- "speech/speech_recognition_session.cc", +- "speech/speech_recognition_session.h", - "speech/speech_recognizer.h", "speech/speech_synthesis_impl.cc", "speech/speech_synthesis_impl.h", "speech/tts_controller_impl.cc", -@@ -2956,17 +2951,6 @@ source_set("browser") { +@@ -3340,13 +3333,6 @@ source_set("browser") { "service_worker/service_worker_usb_delegate_observer.cc", "service_worker/service_worker_usb_delegate_observer.h", - # Most speech code is non-Android. -- "speech/endpointer/endpointer.cc", -- "speech/endpointer/endpointer.h", -- "speech/endpointer/energy_endpointer.cc", -- "speech/endpointer/energy_endpointer.h", -- "speech/endpointer/energy_endpointer_params.cc", -- "speech/endpointer/energy_endpointer_params.h", +- "speech/network_speech_recognition_engine_impl.cc", +- "speech/network_speech_recognition_engine_impl.h", - "speech/speech_recognition_engine.cc", - "speech/speech_recognition_engine.h", - "speech/speech_recognizer_impl.cc", @@ -56,15 +52,18 @@ index 19b45dc1268..67dcd7752d0 100644 "tracing/tracing_ui.cc", "tracing/tracing_ui.h", -@@ -2995,7 +2975,6 @@ source_set("browser") { - ] - - deps += [ +@@ -3397,10 +3383,8 @@ source_set("browser") { + "//components/soda:constants", + "//components/soda:soda", + "//components/soda:utils", - "//components/speech:speech", "//components/vector_icons", "//components/webauthn/json", +- "//media/mojo/mojom:speech_recognition", + "//ui/base", ] -@@ -3108,6 +3083,37 @@ source_set("browser") { + } +@@ -3471,6 +3455,37 @@ source_set("browser") { deps += [ "//ui/compositor" ] } @@ -102,31 +101,29 @@ index 19b45dc1268..67dcd7752d0 100644 if ((is_linux || is_chromeos) && use_dbus) { deps += [ "//dbus" ] } -diff --git a/chromium/content/browser/browser_interface_binders.cc b/chromium/content/browser/browser_interface_binders.cc -index c5a6f0aea88..71d9bf41a71 100644 ---- a/content/browser/browser_interface_binders.cc -+++ b/content/browser/browser_interface_binders.cc -@@ -50,7 +50,9 @@ - #include "content/browser/renderer_host/render_frame_host_impl.h" +--- src/content/browser/browser_interface_binders.cc.orig 2025-07-19 11:32:34.193979827 +0200 ++++ src/content/browser/browser_interface_binders.cc 2025-07-20 14:51:05.789212478 +0200 +@@ -62,7 +62,9 @@ #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/service_worker/service_worker_host.h" + #include "content/browser/shared_storage/shared_storage_worklet_host.h" +#if BUILDFLAG(ENABLE_WEB_SPEECH) #include "content/browser/speech/speech_recognition_dispatcher_host.h" +#endif #include "content/browser/storage_access/storage_access_handle.h" #include "content/browser/tracing/trace_report/trace_report.mojom.h" #include "content/browser/tracing/trace_report/trace_report_internals_ui.h" -@@ -144,7 +146,9 @@ - #include "third_party/blink/public/mojom/sensor/web_sensor_provider.mojom.h" - #include "third_party/blink/public/mojom/sms/webotp_service.mojom.h" - #include "third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom.h" +@@ -101,7 +103,9 @@ + #include "media/mojo/mojom/media_metrics_provider.mojom.h" + #include "media/mojo/mojom/media_player.mojom.h" + #include "media/mojo/mojom/remoting.mojom.h" +#if BUILDFLAG(ENABLE_WEB_SPEECH) - #include "third_party/blink/public/mojom/speech/speech_recognizer.mojom.h" + #include "media/mojo/mojom/speech_recognizer.mojom.h" +#endif - #include "third_party/blink/public/mojom/speech/speech_synthesis.mojom.h" - #include "third_party/blink/public/mojom/storage_access/storage_access_handle.mojom.h" - #include "third_party/blink/public/mojom/usb/web_usb_service.mojom.h" -@@ -168,7 +172,9 @@ + #include "media/mojo/mojom/video_decode_perf_history.mojom.h" + #include "media/mojo/mojom/video_encoder_metrics_provider.mojom.h" + #include "media/mojo/mojom/webrtc_video_perf.mojom.h" +@@ -209,7 +213,9 @@ #else // BUILDFLAG(IS_ANDROID) #include "content/browser/direct_sockets/direct_sockets_service_impl.h" #include "media/mojo/mojom/renderer_extensions.mojom.h" @@ -135,21 +132,22 @@ index c5a6f0aea88..71d9bf41a71 100644 +#endif #include "third_party/blink/public/mojom/hid/hid.mojom.h" #include "third_party/blink/public/mojom/installedapp/installed_app_provider.mojom.h" - #include "third_party/blink/public/mojom/serial/serial.mojom.h" -@@ -830,10 +836,12 @@ void PopulateFrameBinders(RenderFrameHostImpl* host, mojo::BinderMap* map) { + #endif // BUILDFLAG(IS_ANDROID) +@@ -865,11 +871,13 @@ void PopulateFrameBinders(RenderFrameHos map->Add( base::BindRepeating(&BindSharedWorkerConnector, base::Unretained(host))); +#if BUILDFLAG(ENABLE_WEB_SPEECH) - map->Add( + map->Add( base::BindRepeating(&SpeechRecognitionDispatcherHost::Create, - host->GetProcess()->GetID(), host->GetRoutingID()), + host->GetProcess()->GetDeprecatedID(), + host->GetRoutingID()), GetIOThreadTaskRunner({})); +#endif map->Add(base::BindRepeating( &RenderFrameHostImpl::GetSpeechSynthesis, base::Unretained(host))); -@@ -1099,6 +1107,7 @@ void PopulateBinderMapWithContext( +@@ -1194,6 +1202,7 @@ void PopulateBinderMapWithContext( #if !BUILDFLAG(IS_ANDROID) map->Add( base::BindRepeating(&DirectSocketsServiceImpl::CreateForFrame)); @@ -157,7 +155,7 @@ index c5a6f0aea88..71d9bf41a71 100644 map->Add(base::BindRepeating( &EmptyBinderForFrame)); map->Add( -@@ -1110,6 +1119,7 @@ void PopulateBinderMapWithContext( +@@ -1205,6 +1214,7 @@ void PopulateBinderMapWithContext( map->Add(base::BindRepeating( &EmptyBinderForFrame)); #endif @@ -165,13 +163,11 @@ index c5a6f0aea88..71d9bf41a71 100644 #if BUILDFLAG(ENABLE_UNHANDLED_TAP) map->Add(base::BindRepeating( &EmptyBinderForFrame)); -diff --git a/chromium/content/browser/browser_main_loop.cc b/chromium/content/browser/browser_main_loop.cc -index aaa752bec61..b3a1ed50d20 100644 ---- a/content/browser/browser_main_loop.cc -+++ b/content/browser/browser_main_loop.cc -@@ -87,7 +87,9 @@ - #include "content/browser/screenlock_monitor/screenlock_monitor.h" +--- src/content/browser/browser_main_loop.cc.orig 2025-07-19 11:32:34.193979827 +0200 ++++ src/content/browser/browser_main_loop.cc 2025-07-20 14:51:05.789212478 +0200 +@@ -91,7 +91,9 @@ #include "content/browser/screenlock_monitor/screenlock_monitor_device_source.h" + #include "content/browser/service_host/utility_process_host.h" #include "content/browser/sms/sms_provider.h" +#if BUILDFLAG(ENABLE_WEB_SPEECH) #include "content/browser/speech/speech_recognition_manager_impl.h" @@ -179,7 +175,7 @@ index aaa752bec61..b3a1ed50d20 100644 #include "content/browser/speech/tts_controller_impl.h" #include "content/browser/startup_data_impl.h" #include "content/browser/startup_task_runner.h" -@@ -1114,12 +1116,14 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { +@@ -1162,12 +1164,14 @@ void BrowserMainLoop::ShutdownThreadsAnd midi_service_->Shutdown(); } @@ -194,7 +190,7 @@ index aaa752bec61..b3a1ed50d20 100644 TtsControllerImpl::GetInstance()->Shutdown(); -@@ -1364,13 +1368,14 @@ void BrowserMainLoop::PostCreateThreadsImpl() { +@@ -1405,13 +1409,14 @@ void BrowserMainLoop::PostCreateThreadsI media_stream_manager_ = std::make_unique(audio_system_.get()); } @@ -237,18 +233,16 @@ index 3a2e713ccc3..6af5afde20e 100644 {wrf::EnableScriptedSpeechSynthesis, switches::kDisableSpeechSynthesisAPI, false}, {wrf::EnableSharedWorker, switches::kDisableSharedWorkers, false}, -diff --git a/chromium/media/BUILD.gn b/chromium/media/BUILD.gn -index 01e0910666e..6ce78127e3f 100644 ---- a/media/BUILD.gn -+++ b/media/BUILD.gn -@@ -47,6 +47,7 @@ buildflag_header("media_buildflags") { - "ENABLE_PLATFORM_MPEG_H_AUDIO=$enable_platform_mpeg_h_audio", +--- src/media/BUILD.gn.orig 2025-07-19 11:32:35.633979930 +0200 ++++ src/media/BUILD.gn 2025-07-20 14:51:07.213212462 +0200 +@@ -61,6 +61,7 @@ buildflag_header("media_buildflags") { "ENABLE_MSE_MPEG2TS_STREAM_PARSER=$enable_mse_mpeg2ts_stream_parser", - "PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT=$platform_has_optional_hevc_support", + "PLATFORM_HAS_OPTIONAL_HEVC_DECODE_SUPPORT=$platform_has_optional_hevc_decode_support", + "PLATFORM_HAS_OPTIONAL_HEVC_ENCODE_SUPPORT=$platform_has_optional_hevc_encode_support", + "ENABLE_WEB_SPEECH=$enable_web_speech", "USE_ARC_PROTECTED_MEDIA=$use_arc_protected_media", - "USE_CHROMEOS_MEDIA_ACCELERATION=$use_vaapi||$use_v4l2_codec", "USE_CHROMEOS_PROTECTED_AV1=$use_chromeos_protected_av1", + "USE_CHROMEOS_PROTECTED_MEDIA=$use_chromeos_protected_media", diff --git a/chromium/media/media_options.gni b/chromium/media/media_options.gni index 5667cac61f3..48ea95a99a6 100644 --- a/media/media_options.gni @@ -266,9 +260,9 @@ index 5667cac61f3..48ea95a99a6 100644 cgit v1.2.1 ---- src/components/speech/BUILD.gn.old 2023-05-13 15:23:05.850506351 +0200 -+++ src/components/speech/BUILD.gn 2023-05-14 14:39:12.182694489 +0200 -@@ -4,12 +4,6 @@ +--- src/components/speech/BUILD.gn.orig 2024-12-08 18:34:57.021340049 +0100 ++++ src/components/speech/BUILD.gn 2024-12-18 12:18:14.187490208 +0100 +@@ -6,12 +6,6 @@ import("//build/config/features.gni") source_set("speech") { sources = [ @@ -281,11 +275,11 @@ cgit v1.2.1 "downstream_loader.cc", "downstream_loader.h", "downstream_loader_client.h", -@@ -24,7 +18,6 @@ +@@ -27,7 +21,6 @@ source_set("speech") { "//mojo/public/cpp/system", "//services/network/public/cpp", "//services/network/public/mojom", - "//third_party/flac", ] - } + if (!is_android) { diff --git a/distributed_point_functions-aes_128_fixed_key_hash-missing-StrCat.patch b/distributed_point_functions-aes_128_fixed_key_hash-missing-StrCat.patch deleted file mode 100644 index 2cc19bb..0000000 --- a/distributed_point_functions-aes_128_fixed_key_hash-missing-StrCat.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/third_party/distributed_point_functions/code/dpf/aes_128_fixed_key_hash.cc.old 2024-04-02 11:53:27.644284500 +0200 -+++ src/third_party/distributed_point_functions/code/dpf/aes_128_fixed_key_hash.cc 2024-04-02 22:24:29.350771600 +0200 -@@ -26,6 +26,7 @@ - #include "absl/numeric/int128.h" - #include "absl/status/status.h" - #include "absl/status/statusor.h" -+#include "absl/strings/str_cat.h" - #include "absl/types/span.h" - #include "openssl/err.h" - diff --git a/distributed_point_functions-evaluate_prg_hwy-signature.patch b/distributed_point_functions-evaluate_prg_hwy-signature.patch deleted file mode 100644 index 18303f6..0000000 --- a/distributed_point_functions-evaluate_prg_hwy-signature.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- src/third_party/distributed_point_functions/code/dpf/internal/evaluate_prg_hwy.cc.old 2024-04-02 11:53:27.644284500 +0200 -+++ src/third_party/distributed_point_functions/code/dpf/internal/evaluate_prg_hwy.cc 2024-04-02 22:35:43.377586600 +0200 -@@ -50,16 +50,18 @@ namespace hn = hwy::HWY_NAMESPACE; - #if HWY_TARGET == HWY_SCALAR - - absl::Status EvaluateSeedsHwy( -- int64_t num_seeds, int num_levels, const absl::uint128* seeds_in, -- const bool* control_bits_in, const absl::uint128* paths, -+ int64_t num_seeds, int num_levels, int num_correction_words, -+ const absl::uint128* seeds_in, const bool* control_bits_in, -+ const absl::uint128* paths, int paths_rightshift, - const absl::uint128* correction_seeds, const bool* correction_controls_left, - const bool* correction_controls_right, const Aes128FixedKeyHash& prg_left, - const Aes128FixedKeyHash& prg_right, absl::uint128* seeds_out, - bool* control_bits_out) { -- return EvaluateSeedsNoHwy(num_seeds, num_levels, seeds_in, control_bits_in, -- paths, correction_seeds, correction_controls_left, -- correction_controls_right, prg_left, prg_right, -- seeds_out, control_bits_out); -+ return EvaluateSeedsNoHwy( -+ num_seeds, num_levels, num_correction_words, seeds_in, control_bits_in, -+ paths, paths_rightshift, correction_seeds, correction_controls_left, -+ correction_controls_right, prg_left, prg_right, seeds_out, -+ control_bits_out); - } - - #else diff --git a/do-not-build-libvulkan.so.patch b/do-not-build-libvulkan.so.patch index 16f994c..fad66ec 100644 --- a/do-not-build-libvulkan.so.patch +++ b/do-not-build-libvulkan.so.patch @@ -3,20 +3,20 @@ Do not try to build a private copy of a DLL which is already available on every --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -1789,8 +1790,9 @@ - - deps = [ "//third_party/angle:libGLESv2" ] + deps = [ "//third_party/angle:libGLESv2" ] + } } -- if (!is_chromeos) { +- if (!is_chromeos && angle_shared_libvulkan) { + source_set("angle_libvulkan_symbols") {} + if (false) { extract_symbols("angle_libvulkan_symbols") { binary = "$root_out_dir/libvulkan.so.1" if (current_cpu == "x86") { ---- a/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn -+++ b/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn -@@ -99,7 +99,18 @@ - library_type = "static_library" +--- src/third_party/vulkan-loader/src/BUILD.gn.orig 2024-12-08 18:37:20.394677662 +0100 ++++ src/third_party/vulkan-loader/src/BUILD.gn 2024-12-18 13:15:54.021404544 +0100 +@@ -144,7 +144,18 @@ if (!is_android) { + } } - target(library_type, "libvulkan") { @@ -35,4 +35,3 @@ Do not try to build a private copy of a DLL which is already available on every sources = [ "loader/adapters.h", "loader/allocation.c", - diff --git a/electron-13-blink-gcc-ambiguous-nodestructor.patch b/electron-13-blink-gcc-ambiguous-nodestructor.patch deleted file mode 100644 index 3828e92..0000000 --- a/electron-13-blink-gcc-ambiguous-nodestructor.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: electron-16.0.6/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -=================================================================== ---- electron-16.0.6.orig/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc 2022-01-10 16:24:28.724461941 +0100 -+++ electron-16.0.6/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc 2022-01-13 16:04:50.310112542 +0100 -@@ -63,10 +63,10 @@ const int kUpdateBufferSizeFrequency = 3 - constexpr base::TimeDelta kSeekDelay = base::Milliseconds(20); - - std::vector* GetStreamingSchemes() { -- static base::NoDestructor> streaming_schemes({ -+ static base::NoDestructor> streaming_schemes{{ - url::kHttpsScheme, - url::kHttpScheme -- }); -+ }}; - return streaming_schemes.get(); - } - diff --git a/electron-13-fix-base-check-nomerge.patch b/electron-13-fix-base-check-nomerge.patch deleted file mode 100644 index 307d4ac..0000000 --- a/electron-13-fix-base-check-nomerge.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: electron-17.1.0/base/compiler_specific.h -=================================================================== ---- electron-17.1.0.orig/base/compiler_specific.h 2022-03-07 17:20:29.460807562 +0100 -+++ electron-17.1.0/base/compiler_specific.h 2022-03-09 08:28:51.902933750 +0100 -@@ -366,7 +366,8 @@ inline constexpr bool AnalyzerAssumeTrue - #endif // defined(__clang_analyzer__) - - // Use nomerge attribute to disable optimization of merging multiple same calls. --#if defined(__clang__) && HAS_ATTRIBUTE(nomerge) -+#if defined(__clang__) && (__clang_major__ >= 12) && \ -+ __has_attribute(nomerge) && !defined(OS_CHROMEOS) - #define NOMERGE [[clang::nomerge]] - #else - #define NOMERGE diff --git a/electron-13-fix-use-thin-lto.patch b/electron-13-fix-use-thin-lto.patch deleted file mode 100644 index f721cfd..0000000 --- a/electron-13-fix-use-thin-lto.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: electron-17.1.0/build/config/compiler/compiler.gni -=================================================================== ---- electron-17.1.0.orig/build/config/compiler/compiler.gni 2022-03-09 08:27:56.719840060 +0100 -+++ electron-17.1.0/build/config/compiler/compiler.gni 2022-03-09 13:07:58.709063960 +0100 -@@ -71,12 +71,7 @@ declare_args() { - # Disabled in iOS cronet builds since build step cronet_static_complete - # wants to build a .a file consumable by external clients, and they won't - # have the same LLVM revisions as us, making bitcode useless to them. -- use_thin_lto = -- is_cfi || (is_clang && is_official_build && chrome_pgo_phase != 1 && -- (is_linux || is_win || is_mac || -- (is_ios && use_lld && !is_cronet_build) || -- (is_android && target_os != "chromeos") || -- (is_chromeos && is_chromeos_device))) -+ use_thin_lto = false - - # If true, use Goma for ThinLTO code generation where applicable. - use_goma_thin_lto = false diff --git a/electron-16-std-vector-non-const.patch b/electron-16-std-vector-non-const.patch deleted file mode 100644 index 2bf0163..0000000 --- a/electron-16-std-vector-non-const.patch +++ /dev/null @@ -1,123 +0,0 @@ -Index: electron-17.1.0/chrome/browser/process_singleton.h -=================================================================== ---- electron-17.1.0.orig/chrome/browser/process_singleton.h 2022-03-07 17:39:06.993345117 +0100 -+++ electron-17.1.0/chrome/browser/process_singleton.h 2022-03-09 08:29:01.682773127 +0100 -@@ -102,7 +102,7 @@ class ProcessSingleton { - using NotificationCallback = - base::RepeatingCallback additional_data)>; -+ const std::vector additional_data)>; - - #if BUILDFLAG(IS_WIN) - ProcessSingleton(const std::string& program_name, -Index: electron-17.1.0/chrome/browser/process_singleton_posix.cc -=================================================================== ---- electron-17.1.0.orig/chrome/browser/process_singleton_posix.cc 2022-03-07 17:39:06.993345117 +0100 -+++ electron-17.1.0/chrome/browser/process_singleton_posix.cc 2022-03-09 08:29:01.682773127 +0100 -@@ -627,7 +627,7 @@ class ProcessSingleton::LinuxWatcher - // |reader| is for sending back ACK message. - void HandleMessage(const std::string& current_dir, - const std::vector& argv, -- const std::vector additional_data, -+ const std::vector additional_data, - SocketReader* reader); - - // Called when the ProcessSingleton that owns this class is about to be -@@ -684,7 +684,7 @@ void ProcessSingleton::LinuxWatcher::Sta - void ProcessSingleton::LinuxWatcher::HandleMessage( - const std::string& current_dir, - const std::vector& argv, -- const std::vector additional_data, -+ const std::vector additional_data, - SocketReader* reader) { - DCHECK(ui_task_runner_->BelongsToCurrentThread()); - DCHECK(reader); -@@ -774,7 +774,7 @@ void ProcessSingleton::LinuxWatcher::Soc - base::StringToSizeT(tokens[0], &num_args); - std::vector command_line(tokens.begin() + 1, tokens.begin() + 1 + num_args); - -- std::vector additional_data; -+ std::vector additional_data; - if (tokens.size() >= 3 + num_args) { - size_t additional_data_size; - base::StringToSizeT(tokens[1 + num_args], &additional_data_size); -@@ -783,7 +783,7 @@ void ProcessSingleton::LinuxWatcher::Soc - std::string(1, kTokenDelimiter)); - const uint8_t* additional_data_bits = - reinterpret_cast(remaining_args.c_str()); -- additional_data = std::vector( -+ additional_data = std::vector( - additional_data_bits, additional_data_bits + additional_data_size); - } - -Index: electron-17.1.0/chrome/browser/process_singleton_win.cc -=================================================================== ---- electron-17.1.0.orig/chrome/browser/process_singleton_win.cc 2022-03-07 17:39:06.993345117 +0100 -+++ electron-17.1.0/chrome/browser/process_singleton_win.cc 2022-03-09 08:29:01.682773127 +0100 -@@ -81,7 +81,7 @@ BOOL CALLBACK BrowserWindowEnumeration(H - bool ParseCommandLine(const COPYDATASTRUCT* cds, - base::CommandLine* parsed_command_line, - base::FilePath* current_directory, -- std::vector* parsed_additional_data) { -+ std::vector* parsed_additional_data) { - // We should have enough room for the shortest command (min_message_size) - // and also be a multiple of wchar_t bytes. The shortest command - // possible is L"START\0\0" (empty command line, current directory, -@@ -163,7 +163,7 @@ bool ParseCommandLine(const COPYDATASTRU - msg.substr(fourth_null + 1, fifth_null - fourth_null); - const uint8_t* additional_data_bytes = - reinterpret_cast(additional_data.c_str()); -- *parsed_additional_data = std::vector(additional_data_bytes, -+ *parsed_additional_data = std::vector(additional_data_bytes, - additional_data_bytes + additional_data_length); - - return true; -@@ -187,7 +187,7 @@ bool ProcessLaunchNotification( - - base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM); - base::FilePath current_directory; -- std::vector additional_data; -+ std::vector additional_data; - if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory, &additional_data)) { - *result = TRUE; - return true; -Index: electron-17.1.0/electron/shell/browser/api/electron_api_app.cc -=================================================================== ---- electron-17.1.0.orig/electron/shell/browser/api/electron_api_app.cc 2022-03-07 16:07:24.343397858 +0100 -+++ electron-17.1.0/electron/shell/browser/api/electron_api_app.cc 2022-03-09 08:29:01.682773127 +0100 -@@ -517,10 +517,10 @@ bool NotificationCallbackWrapper( - const base::RepeatingCallback< - void(const base::CommandLine& command_line, - const base::FilePath& current_directory, -- const std::vector additional_data)>& callback, -+ const std::vector additional_data)>& callback, - const base::CommandLine& cmd, - const base::FilePath& cwd, -- const std::vector additional_data) { -+ const std::vector additional_data) { - // Make sure the callback is called after app gets ready. - if (Browser::Get()->is_ready()) { - callback.Run(cmd, cwd, std::move(additional_data)); -@@ -1081,7 +1081,7 @@ std::string App::GetLocaleCountryCode() - - void App::OnSecondInstance(const base::CommandLine& cmd, - const base::FilePath& cwd, -- const std::vector additional_data) { -+ const std::vector additional_data) { - v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); - v8::HandleScope handle_scope(isolate); - v8::Local data_value = -Index: electron-17.1.0/electron/shell/browser/api/electron_api_app.h -=================================================================== ---- electron-17.1.0.orig/electron/shell/browser/api/electron_api_app.h 2022-03-07 16:07:24.343397858 +0100 -+++ electron-17.1.0/electron/shell/browser/api/electron_api_app.h 2022-03-09 08:29:01.682773127 +0100 -@@ -194,7 +194,7 @@ class App : public ElectronBrowserClient - std::string GetSystemLocale(gin_helper::ErrorThrower thrower) const; - void OnSecondInstance(const base::CommandLine& cmd, - const base::FilePath& cwd, -- const std::vector additional_data); -+ const std::vector additional_data); - bool HasSingleInstanceLock() const; - bool RequestSingleInstanceLock(gin::Arguments* args); - void ReleaseSingleInstanceLock(); diff --git a/electron-16-system-node-headers.patch b/electron-16-system-node-headers.patch index 80106bc..9502c4f 100644 --- a/electron-16-system-node-headers.patch +++ b/electron-16-system-node-headers.patch @@ -1,15 +1,15 @@ Index: electron-17.1.0/third_party/electron_node/common.gypi =================================================================== ---- electron-17.1.0.orig/third_party/electron_node/common.gypi 2022-03-07 17:39:13.557371769 +0100 -+++ electron-17.1.0/third_party/electron_node/common.gypi 2022-03-09 08:29:08.214665848 +0100 -@@ -405,6 +405,10 @@ - 'BUILDING_UV_SHARED=1', +--- src/third_party/electron_node/common.gypi.orig 2025-03-06 22:25:15.650295769 +0100 ++++ src/third_party/electron_node/common.gypi 2025-03-07 07:06:10.532421547 +0100 +@@ -486,6 +486,10 @@ + 'NOMINMAX', ], }], + [ 'OS in "linux"', { + 'cflags': [ '-I/usr/include/electron' ], + 'libraries': [ '-lz' ], + }], - [ 'OS in "linux freebsd openbsd solaris aix os400"', { + [ 'OS in "linux freebsd openbsd solaris aix os400 openharmony"', { 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], diff --git a/electron-16-webpack-fix-openssl-3.patch b/electron-16-webpack-fix-openssl-3.patch deleted file mode 100644 index c985d0b..0000000 --- a/electron-16-webpack-fix-openssl-3.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: electron-16.0.9/electron/build/webpack/webpack.config.base.js -=================================================================== ---- electron-16.0.9.orig/electron/build/webpack/webpack.config.base.js 2022-02-16 16:41:24.767092075 +0100 -+++ electron-16.0.9/electron/build/webpack/webpack.config.base.js 2022-02-17 11:10:51.379512377 +0100 -@@ -1,5 +1,12 @@ - const fs = require('node:fs'); - const path = require('node:path'); -+ -+// HACK: OpenSSL 3 does not support md4 any more, but webpack hardcodes it all -+// over the place: https://github.com/webpack/webpack/issues/13572 -+const crypto = require("crypto"); -+const crypto_orig_createHash = crypto.createHash; -+crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm); -+ - const webpack = require('webpack'); - const TerserPlugin = require('terser-webpack-plugin'); - const WrapperPlugin = require('wrapper-webpack-plugin'); diff --git a/electron-29.4.2.tar.zst b/electron-29.4.2.tar.zst deleted file mode 100644 index 69f8795..0000000 --- a/electron-29.4.2.tar.zst +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56fe6478254038ecc1060de6ca3cb1c5db3882b1c298d85b98b24974fb99cfeb -size 572715929 diff --git a/electron-37.10.0.tar.zst b/electron-37.10.0.tar.zst new file mode 100644 index 0000000..1b090d2 --- /dev/null +++ b/electron-37.10.0.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30ad663b798f0e403820b2862fe7d3fd9c34ce0b72b1091c251e7a04261755f2 +size 1070430959 diff --git a/electron-launcher.sh b/electron-launcher.sh index 16c5fcf..9a3562f 100644 --- a/electron-launcher.sh +++ b/electron-launcher.sh @@ -1,5 +1,9 @@ #!/bin/bash +>&2 echo 'This build of Electron is provided by openSUSE and contains various modifications.' +>&2 echo 'Please report problems at https://bugzilla.opensuse.org/enter_bug.cgi?classification=openSUSE and not to upstream bug trackers.' + + set -euo pipefail name=electron diff --git a/enable_stack_trace_line_numbers-symbol_level.patch b/enable_stack_trace_line_numbers-symbol_level.patch new file mode 100644 index 0000000..8e049e6 --- /dev/null +++ b/enable_stack_trace_line_numbers-symbol_level.patch @@ -0,0 +1,25 @@ +Reducing symbol_level is a kludge and should have no effect on generated code. + +--- src/base/BUILD.gn.orig 2024-12-08 18:43:52.881356091 +0100 ++++ src/base/BUILD.gn 2024-12-18 12:11:47.597615650 +0100 +@@ -2510,11 +2510,6 @@ buildflag_header("debugging_buildflags") + enable_commandline_sequence_checks = + (is_debug || dcheck_always_on) && !is_android + +- if (enable_stack_trace_line_numbers) { +- assert( +- symbol_level > 0, +- "symbol_level must be set to greater than 0 for source line numbers.") +- } + _enable_stack_trace_line_numbers = + !print_unsymbolized_stack_traces && enable_stack_trace_line_numbers + +--- src/build/config/logging.gni.orig 2024-12-08 18:34:51.748006561 +0100 ++++ src/build/config/logging.gni 2024-12-18 12:12:08.104531156 +0100 +@@ -20,5 +20,5 @@ declare_args() { + + # Enables the DWARF line number reader on Linux. This only has an effect if + # print_unsymbolized_stack_traces is false. +- enable_stack_trace_line_numbers = symbol_level > 0 ++ enable_stack_trace_line_numbers = true + } diff --git a/event_record-optional-initializer.patch b/event_record-optional-initializer.patch new file mode 100644 index 0000000..d7264f7 --- /dev/null +++ b/event_record-optional-initializer.patch @@ -0,0 +1,11 @@ +--- src/services/network/public/cpp/ad_auction/event_record.cc.orig 2025-08-15 17:32:28.601405234 +0200 ++++ src/services/network/public/cpp/ad_auction/event_record.cc 2025-08-16 10:18:19.106421517 +0200 +@@ -49,7 +49,7 @@ std::optional> + const auto it = dict.find("eligible-origins"); + if (it == dict.end()) { + // "eligible-origins" is optional, so just return an empty list. +- return {{}}; ++ return std::optional>(std::in_place); + } + const net::structured_headers::ParameterizedMember& parameterized_member = + it->second; diff --git a/fake_ssl_socket_client-Wlto-type-mismatch.patch b/fake_ssl_socket_client-Wlto-type-mismatch.patch deleted file mode 100644 index 55b0bbb..0000000 --- a/fake_ssl_socket_client-Wlto-type-mismatch.patch +++ /dev/null @@ -1,20 +0,0 @@ -Correct ODR violation due to ambiguous name. - -When this header is compiled by itself, `scoped_refptr` refers to the type declared in `base/memory/scoped_refptr.h`. -When `third_party/webrtc/api/scoped_refptr.h` is included before, the name changes to refer to `::webrtc::scoped_refptr` instead, -leading to mismatch across translation units. This is detected and reported by GCC. - ---- src/components/webrtc/fake_ssl_client_socket.h.old -+++ src/components/webrtc/fake_ssl_client_socket.h - -@@ -111,8 +111,8 @@ class FakeSSLClientSocket : public net:: - // The callback passed to Connect(). - net::CompletionOnceCallback user_connect_callback_; - -- scoped_refptr write_buf_; -- scoped_refptr read_buf_; -+ ::scoped_refptr write_buf_; -+ ::scoped_refptr read_buf_; - }; - - } // namespace webrtc diff --git a/ffmpeg-4-AV_PROFILE.patch b/ffmpeg-4-AV_PROFILE.patch new file mode 100644 index 0000000..7fb3811 --- /dev/null +++ b/ffmpeg-4-AV_PROFILE.patch @@ -0,0 +1,215 @@ +From 129f48501a7c3fa4236234f2fa0aee490a845b59 Mon Sep 17 00:00:00 2001 +From: Thomas Guilbert +Date: Fri, 2 May 2025 08:58:47 -0700 +Subject: [PATCH] Roll src/third_party/ffmpeg/ 01f23648c..dcdd0fa51 (552 + commits) + +This CL rolls ffmpeg for M138. + +This roll includes the removal of many deprecated APIs: some FF_* +macros were consolidated as equivalent AV_* macros under +libavcodec/def.h + +https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/01f23648c6b8..dcdd0fa51b65 + +$ git log 01f23648c..dcdd0fa51 --date=short --no-merges --format='%ad %ae %s' +2025-05-01 tguilbert Remove deprecated av_stream_get_side_data() +2025-05-01 tguilbert README.chromium file +2025-05-01 tguilbert GN Configuration +2025-04-29 jamrial avcodec/cbs_apv: don't return an error when reading empty buffers +2025-04-27 sw fate: Add test for APV 422-10 profile +(...) +2025-03-18 andreas.rheinhardt avcodec/Makefile: Only compile executor when VVC decoder is enabled +2025-03-18 andreas.rheinhardt avcodec/vvc/Makefile: Move VVC decoder->h2645data dep to lavc/Makefile +2025-03-17 ffmpeg ffbuild: use response files only if ar accepts them +2025-03-18 timo avcodec/tableprint_vlc: fix build with --enable-hardcoded-tables +2025-03-18 timo avcodec/Makefile: fix build of exr decoder in odd configs + +Created with: + roll-dep src/third_party/ffmpeg + +Bug: 415118707 +Change-Id: Iae943ce996031d5a6f7dbbd2915ad9cfabadf4d6 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6506529 +Reviewed-by: Dale Curtis +Commit-Queue: Dale Curtis +Auto-Submit: Thomas Guilbert +Cr-Commit-Position: refs/heads/main@{#1455010} +--- + DEPS | 2 +- + media/ffmpeg/ffmpeg_common.cc | 44 +++++++++---------- + .../filters/ffmpeg_aac_bitstream_converter.cc | 12 ++--- + ...ffmpeg_aac_bitstream_converter_unittest.cc | 6 +-- + third_party/ffmpeg | 2 +- + 5 files changed, 33 insertions(+), 33 deletions(-) + +diff --git a/DEPS b/DEPS +index b80ab0a6d81811..9b247c02d2a202 100644 +--- a/DEPS ++++ b/DEPS +@@ -515,7 +515,7 @@ vars = { + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling ffmpeg + # and whatever else without interference from each other. +- 'ffmpeg_revision': '01f23648c6b84de6c0f717fa4e1816f53b9ee72e', ++ 'ffmpeg_revision': 'dcdd0fa51b65a0b1688ff6b8f0cc81908f09ded2', + # Three lines of non-changing comments so that + # the commit queue can handle CLs rolling webpagereplay + # and whatever else without interference from each other. +diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc +index cfd0552ee31088..610be2d37b351f 100644 +--- a/media/ffmpeg/ffmpeg_common.cc ++++ b/media/ffmpeg/ffmpeg_common.cc +@@ -263,22 +263,22 @@ AVCodecID VideoCodecToCodecID(VideoCodec video_codec) { + static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) { + // Clear out the CONSTRAINED & INTRA flags which are strict subsets of the + // corresponding profiles with which they're used. +- profile &= ~FF_PROFILE_H264_CONSTRAINED; +- profile &= ~FF_PROFILE_H264_INTRA; ++ profile &= ~AV_PROFILE_H264_CONSTRAINED; ++ profile &= ~AV_PROFILE_H264_INTRA; + switch (profile) { +- case FF_PROFILE_H264_BASELINE: ++ case AV_PROFILE_H264_BASELINE: + return H264PROFILE_BASELINE; +- case FF_PROFILE_H264_MAIN: ++ case AV_PROFILE_H264_MAIN: + return H264PROFILE_MAIN; +- case FF_PROFILE_H264_EXTENDED: ++ case AV_PROFILE_H264_EXTENDED: + return H264PROFILE_EXTENDED; +- case FF_PROFILE_H264_HIGH: ++ case AV_PROFILE_H264_HIGH: + return H264PROFILE_HIGH; +- case FF_PROFILE_H264_HIGH_10: ++ case AV_PROFILE_H264_HIGH_10: + return H264PROFILE_HIGH10PROFILE; +- case FF_PROFILE_H264_HIGH_422: ++ case AV_PROFILE_H264_HIGH_422: + return H264PROFILE_HIGH422PROFILE; +- case FF_PROFILE_H264_HIGH_444_PREDICTIVE: ++ case AV_PROFILE_H264_HIGH_444_PREDICTIVE: + return H264PROFILE_HIGH444PREDICTIVEPROFILE; + default: + DVLOG(1) << "Unknown profile id: " << profile; +@@ -289,23 +289,23 @@ static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) { + static int VideoCodecProfileToProfileID(VideoCodecProfile profile) { + switch (profile) { + case H264PROFILE_BASELINE: +- return FF_PROFILE_H264_BASELINE; ++ return AV_PROFILE_H264_BASELINE; + case H264PROFILE_MAIN: +- return FF_PROFILE_H264_MAIN; ++ return AV_PROFILE_H264_MAIN; + case H264PROFILE_EXTENDED: +- return FF_PROFILE_H264_EXTENDED; ++ return AV_PROFILE_H264_EXTENDED; + case H264PROFILE_HIGH: +- return FF_PROFILE_H264_HIGH; ++ return AV_PROFILE_H264_HIGH; + case H264PROFILE_HIGH10PROFILE: +- return FF_PROFILE_H264_HIGH_10; ++ return AV_PROFILE_H264_HIGH_10; + case H264PROFILE_HIGH422PROFILE: +- return FF_PROFILE_H264_HIGH_422; ++ return AV_PROFILE_H264_HIGH_422; + case H264PROFILE_HIGH444PREDICTIVEPROFILE: +- return FF_PROFILE_H264_HIGH_444_PREDICTIVE; ++ return AV_PROFILE_H264_HIGH_444_PREDICTIVE; + default: + DVLOG(1) << "Unknown VideoCodecProfile: " << profile; + } +- return FF_PROFILE_UNKNOWN; ++ return AV_PROFILE_UNKNOWN; + } + + SampleFormat AVSampleFormatToSampleFormat(AVSampleFormat sample_format, +@@ -443,7 +443,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, + // TODO(dalecurtis): Just use the profile from the codec context if ffmpeg + // ever starts supporting xHE-AAC. + // FFmpeg provides the (defined_profile - 1) for AVCodecContext::profile +- if (codec_context->profile == FF_PROFILE_UNKNOWN || ++ if (codec_context->profile == AV_PROFILE_UNKNOWN || + codec_context->profile == mp4::AAC::kXHeAAcType - 1) { + // Errors aren't fatal here, so just drop any MediaLog messages. + NullMediaLog media_log; +@@ -661,16 +661,16 @@ bool AVStreamToVideoDecoderConfig(const AVStream* stream, + break; + case VideoCodec::kVP9: + switch (codec_context->profile) { +- case FF_PROFILE_VP9_0: ++ case AV_PROFILE_VP9_0: + profile = VP9PROFILE_PROFILE0; + break; +- case FF_PROFILE_VP9_1: ++ case AV_PROFILE_VP9_1: + profile = VP9PROFILE_PROFILE1; + break; +- case FF_PROFILE_VP9_2: ++ case AV_PROFILE_VP9_2: + profile = VP9PROFILE_PROFILE2; + break; +- case FF_PROFILE_VP9_3: ++ case AV_PROFILE_VP9_3: + profile = VP9PROFILE_PROFILE3; + break; + default: +diff --git a/media/filters/ffmpeg_aac_bitstream_converter.cc b/media/filters/ffmpeg_aac_bitstream_converter.cc +index 7fd37e90b7e475..c00ac262dabb19 100644 +--- a/media/filters/ffmpeg_aac_bitstream_converter.cc ++++ b/media/filters/ffmpeg_aac_bitstream_converter.cc +@@ -68,17 +68,17 @@ bool GenerateAdtsHeader(int codec, + hdr[1] |= 1; + + switch (audio_profile) { +- case FF_PROFILE_AAC_MAIN: ++ case AV_PROFILE_AAC_MAIN: + break; +- case FF_PROFILE_AAC_HE: +- case FF_PROFILE_AAC_HE_V2: +- case FF_PROFILE_AAC_LOW: ++ case AV_PROFILE_AAC_HE: ++ case AV_PROFILE_AAC_HE_V2: ++ case AV_PROFILE_AAC_LOW: + hdr[2] |= (1 << 6); + break; +- case FF_PROFILE_AAC_SSR: ++ case AV_PROFILE_AAC_SSR: + hdr[2] |= (2 << 6); + break; +- case FF_PROFILE_AAC_LTP: ++ case AV_PROFILE_AAC_LTP: + hdr[2] |= (3 << 6); + break; + default: +diff --git a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +index 0e56a6ea5b5cb4..2a6ccb8c910f6c 100644 +--- a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc ++++ b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc +@@ -41,7 +41,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test { + // Set up reasonable aac parameters + memset(&test_parameters_, 0, sizeof(AVCodecParameters)); + test_parameters_.codec_id = AV_CODEC_ID_AAC; +- test_parameters_.profile = FF_PROFILE_AAC_MAIN; ++ test_parameters_.profile = AV_PROFILE_AAC_MAIN; + test_parameters_.ch_layout.nb_channels = 2; + test_parameters_.extradata = extradata_header_; + test_parameters_.extradata_size = sizeof(extradata_header_); +@@ -131,7 +131,7 @@ TEST_F(FFmpegAACBitstreamConverterTest, Conversion_AudioProfileType) { + + EXPECT_EQ(profile, kAacMainProfile); + +- test_parameters_.profile = FF_PROFILE_AAC_HE; ++ test_parameters_.profile = AV_PROFILE_AAC_HE; + FFmpegAACBitstreamConverter converter_he(&test_parameters_); + + test_packet = ScopedAVPacket::Allocate(); +@@ -143,7 +143,7 @@ TEST_F(FFmpegAACBitstreamConverterTest, Conversion_AudioProfileType) { + + EXPECT_EQ(profile, kAacLowComplexityProfile); + +- test_parameters_.profile = FF_PROFILE_AAC_ELD; ++ test_parameters_.profile = AV_PROFILE_AAC_ELD; + FFmpegAACBitstreamConverter converter_eld(&test_parameters_); + + test_packet = ScopedAVPacket::Allocate(); diff --git a/ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch b/ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch new file mode 100644 index 0000000..201db0d --- /dev/null +++ b/ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch @@ -0,0 +1,119 @@ +From 62274859104bd828373ae406aa9309e610449ac5 Mon Sep 17 00:00:00 2001 +From: Ted Meyer +Date: Fri, 22 Mar 2024 19:56:55 +0000 +Subject: [PATCH] Replace deprecated use of AVCodecContext::reordered_opaque + +We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context +now to trigger timestamp propagation. + +Bug: 330573128 +Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308 +Commit-Queue: Ted (Chromium) Meyer +Reviewed-by: Dan Sanders +Cr-Commit-Position: refs/heads/main@{#1277051} +--- + media/filters/ffmpeg_video_decoder.cc | 17 +++++++++++++---- + media/filters/ffmpeg_video_decoder.h | 16 ++++++++++++++++ + 2 files changed, 29 insertions(+), 4 deletions(-) + +diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc +index bd75477feeabb7..8a658a58caac5b 100644 +--- a/media/filters/ffmpeg_video_decoder.cc ++++ b/media/filters/ffmpeg_video_decoder.cc +@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) { + } + + FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log) +- : media_log_(media_log) { ++ : media_log_(media_log), timestamp_map_(128) { + DVLOG(1) << __func__; + DETACH_FROM_SEQUENCE(sequence_checker_); + } +@@ -213,10 +213,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context, + frame->linesize[plane] = layout->planes()[plane].stride; + } + +- // This seems unsafe, given threaded decoding. However, `reordered_opaque` is +- // also going away upstream, so we need a whole new mechanism either way. +- frame->reordered_opaque = codec_context->reordered_opaque; +- + // This will be freed by `ReleaseVideoBufferImpl`. + auto* opaque = new OpaqueData(fb_priv, frame_pool_, data, allocation_size, + std::move(*layout)); +@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) { + DCHECK(packet->data); + DCHECK_GT(packet->size, 0); + +- // Let FFmpeg handle presentation timestamp reordering. +- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds(); ++ const int64_t timestamp = buffer.timestamp().InMicroseconds(); ++ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId(); ++ timestamp_map_.Put(std::make_pair(timestamp_id, timestamp)); ++ packet->opaque = reinterpret_cast(timestamp_id.GetUnsafeValue()); + } + FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket( + packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame, +@@ -423,7 +425,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) { + } + gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect); + +- const auto pts = base::Microseconds(frame->reordered_opaque); ++ const auto ts_id = TimestampId(reinterpret_cast(frame->opaque)); ++ const auto ts_lookup = timestamp_map_.Get(ts_id); ++ if (ts_lookup == timestamp_map_.end()) { ++ return false; ++ } ++ const auto pts = base::Microseconds(std::get<1>(*ts_lookup)); + auto video_frame = VideoFrame::WrapExternalDataWithLayout( + opaque->layout, visible_rect, natural_size, opaque->data, opaque->size, + pts); +@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config, + codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config); + codec_context_->thread_type = + FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME); ++ + codec_context_->opaque = this; + codec_context_->get_buffer2 = GetVideoBufferImpl; ++ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE; + + if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) { + // Note: FFmpeg will try to free this string, so we must duplicate it. +diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h +index d02cb89c3ddf7c..0a2de1c623ffff 100644 +--- a/media/filters/ffmpeg_video_decoder.h ++++ b/media/filters/ffmpeg_video_decoder.h +@@ -7,10 +7,12 @@ + + #include + ++#include "base/containers/lru_cache.h" + #include "base/functional/callback.h" + #include "base/memory/raw_ptr.h" + #include "base/memory/scoped_refptr.h" + #include "base/sequence_checker.h" ++#include "base/types/id_type.h" + #include "media/base/frame_buffer_pool.h" + #include "media/base/supported_video_decoder_config.h" + #include "media/base/video_decoder.h" +@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder { + // FFmpeg structures owned by this object. + std::unique_ptr codec_context_; + ++ // The gist here is that timestamps need to be 64 bits to store microsecond ++ // precision. A 32 bit integer would overflow at ~35 minutes at this level of ++ // precision. We can't cast the timestamp to the void ptr object used by the ++ // opaque field in ffmpeg then, because it would lose data on a 32 bit build. ++ // However, we don't actually have 2^31 timestamped frames in a single ++ // playback, so it's fine to use the 32 bit value as a key in a map which ++ // contains the actual timestamps. Additionally, we've in the past set 128 ++ // outstanding frames for re-ordering as a limit for cross-thread decoding ++ // tasks, so we'll do that here too with the LRU cache. ++ using TimestampId = base::IdType; ++ ++ TimestampId::Generator timestamp_id_generator_; ++ base::LRUCache timestamp_map_; ++ + VideoDecoderConfig config_; + + scoped_refptr frame_pool_; diff --git a/ffmpeg-new-channel-layout.patch b/ffmpeg-new-channel-layout.patch index 1a84446..78cd149 100644 --- a/ffmpeg-new-channel-layout.patch +++ b/ffmpeg-new-channel-layout.patch @@ -176,33 +176,6 @@ index 5f257bdfaa6..e1be5aa9a5b 100644 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> 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 @@ -263,19 +236,6 @@ index 6f231c85729..ca5e5fb927d 100644 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 @@ -298,20 +258,6 @@ index 6a56c675f7d..4615fdeb3fb 100644 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); diff --git a/file_dialog-missing-uint32_t.patch b/file_dialog-missing-uint32_t.patch new file mode 100644 index 0000000..9fd808d --- /dev/null +++ b/file_dialog-missing-uint32_t.patch @@ -0,0 +1,10 @@ +--- src/electron/shell/browser/ui/file_dialog.h.orig 2025-05-07 19:52:05.453848300 +0200 ++++ src/electron/shell/browser/ui/file_dialog.h 2025-05-07 22:41:30.703083100 +0200 +@@ -5,6 +5,7 @@ + #ifndef ELECTRON_SHELL_BROWSER_UI_FILE_DIALOG_H_ + #define ELECTRON_SHELL_BROWSER_UI_FILE_DIALOG_H_ + ++#include + #include + #include + #include diff --git a/fix-build-without-screen-ai.patch b/fix-build-without-screen-ai.patch new file mode 100644 index 0000000..9a22974 --- /dev/null +++ b/fix-build-without-screen-ai.patch @@ -0,0 +1,166 @@ +--- src/chrome/test/BUILD.gn.orig 2025-04-11 12:13:12.932314099 +0200 ++++ src/chrome/test/BUILD.gn 2025-04-12 13:00:11.499771987 +0200 +@@ -2079,9 +2079,6 @@ if (!is_android) { + "//chrome/browser/resource_coordinator:tab_manager_features", + "//chrome/browser/safe_browsing:advanced_protection", + "//chrome/browser/safe_browsing:verdict_cache_manager_factory", +- "//chrome/browser/screen_ai:screen_ai_install_state", +- "//chrome/browser/screen_ai:screen_ai_service_router_factory", +- "//chrome/browser/screen_ai/public:test_support", + "//chrome/browser/search", + "//chrome/browser/search_engines", + "//chrome/browser/segmentation_platform:test_utils", +@@ -2485,9 +2482,6 @@ if (!is_android) { + "//services/network/public/proto:sct_audit_report_proto", + "//services/preferences/public/cpp", + "//services/preferences/public/cpp/tracked", +- "//services/screen_ai:test_support", +- "//services/screen_ai/public/cpp:utilities", +- "//services/screen_ai/public/mojom", + "//services/service_manager/public/cpp", + "//services/strings", + "//services/test/echo/public/mojom", +@@ -8027,7 +8021,6 @@ test("unit_tests") { + # + # TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above? + deps += [ +- "../browser/screen_ai:screen_ai_install_state", + "//chrome/browser/apps:icon_standardizer", + "//chrome/browser/apps/app_service", + "//chrome/browser/apps/app_service:app_registry_cache_waiter", +@@ -8172,7 +8165,6 @@ test("unit_tests") { + "//components/webapps/browser", + "//services/metrics/public/cpp:ukm_builders", + "//services/network:test_support", +- "//services/screen_ai:test_support", + "//third_party/crashpad/crashpad/util", + "//third_party/libaddressinput", + "//third_party/lzma_sdk/google:unit_tests", +@@ -8445,7 +8437,6 @@ test("unit_tests") { + "//chrome/browser/push_notification", + "//chrome/browser/push_notification:test_support", + "//chrome/browser/push_notification/protos:proto", +- "//chrome/browser/screen_ai/public:test_support", + "//chrome/browser/sharesheet", + "//chrome/browser/smart_card:smart_card", + "//chrome/browser/task_manager:impl", +--- src/chrome/browser/BUILD.gn.orig 2025-04-11 12:13:12.927314100 +0200 ++++ src/chrome/browser/BUILD.gn 2025-04-12 13:12:42.819768051 +0200 +@@ -4228,10 +4228,6 @@ static_library("browser") { + "//chrome/browser/metrics/desktop_session_duration", + "//chrome/browser/new_tab_page/chrome_colors", + "//chrome/browser/policy:path_parser", +- "//chrome/browser/screen_ai:prefs", +- "//chrome/browser/screen_ai:screen_ai_install_state", +- "//chrome/browser/screen_ai:screen_ai_service_router_factory", +- "//chrome/browser/screen_ai/public:optical_character_recognizer", + "//chrome/browser/search/background", + "//chrome/browser/sharing_hub", + "//chrome/browser/smart_card", +@@ -4357,9 +4353,6 @@ static_library("browser") { + "//components/webauthn/core/browser", + "//components/webauthn/core/browser:passkey_model", + "//services/device/public/cpp/hid", +- "//services/screen_ai", +- "//services/screen_ai/public/cpp:utilities", +- "//services/screen_ai/public/mojom", + "//third_party/crashpad/crashpad/client:common", + "//third_party/zxcvbn-cpp", + "//ui/views", +--- src/chrome/renderer/BUILD.gn.orig 2024-12-08 18:34:54.671339980 +0100 ++++ src/chrome/renderer/BUILD.gn 2025-01-01 21:11:57.272282026 +0100 +@@ -408,7 +408,6 @@ static_library("renderer") { + "//components/crx_file", + "//components/trusted_vault", + "//services/screen_ai/buildflags", +- "//services/screen_ai/public/mojom", + "//services/strings", + "//third_party/re2:re2", + ] +--- src/chrome/utility/BUILD.gn.orig 2024-12-08 18:34:55.478006671 +0100 ++++ src/chrome/utility/BUILD.gn 2025-01-01 21:14:46.902339035 +0100 +@@ -67,7 +67,6 @@ static_library("utility") { + "//services/network:network_service", + "//services/passage_embeddings:passage_embeddings", + "//services/passage_embeddings/public/mojom", +- "//services/screen_ai/buildflags", + "//services/service_manager/public/cpp", + "//skia", + "//sql", +@@ -145,7 +144,6 @@ static_library("utility") { + "//components/autofill/core/common", + "//components/user_data_importer/common", + "//services/proxy_resolver:lib", +- "//services/screen_ai", + ] + } + +--- src/chrome/browser/screen_ai/BUILD.gn.orig 2024-12-08 18:34:53.871339956 +0100 ++++ src/chrome/browser/screen_ai/BUILD.gn 2025-01-01 21:17:11.015719404 +0100 +@@ -48,7 +48,6 @@ source_set("screen_ai_install_state") { + "//chrome/browser:browser_process", + "//components/prefs", + "//content/public/browser", +- "//services/screen_ai/public/cpp:utilities", + "//ui/accessibility:ax_base", + ] + +@@ -68,9 +67,6 @@ source_set("screen_ai_service_router_fac + "//components/keyed_service/core", + "//components/performance_manager:performance_manager", + "//content/public/browser", +- "//services/screen_ai/public/cpp:utilities", +- "//services/screen_ai/public/mojom:factory", +- "//services/screen_ai/public/mojom:mojom", + ] + + configs += [ "//build/config/compiler:wexit_time_destructors" ] +--- src/chrome/browser/screen_ai/public/BUILD.gn.orig 2024-12-08 18:34:53.871339956 +0100 ++++ src/chrome/browser/screen_ai/public/BUILD.gn 2025-01-01 21:18:43.609082510 +0100 +@@ -12,7 +12,6 @@ source_set("optical_character_recognizer + "//chrome/browser/profiles:profile", + "//chrome/browser/screen_ai:screen_ai_service_router_factory", + "//content/public/browser", +- "//services/screen_ai/public/mojom", + ] + + configs += [ "//build/config/compiler:wexit_time_destructors" ] +--- src/chrome/browser/profiles/BUILD.gn.orig 2025-04-11 12:05:17.028151748 +0200 ++++ src/chrome/browser/profiles/BUILD.gn 2025-04-12 13:17:59.379764245 +0200 +@@ -302,7 +302,6 @@ source_set("profiles_extra_parts_impl") + "//chrome/browser/feedback", + "//chrome/browser/hid", + "//chrome/browser/media/router/discovery/access_code:access_code_sink_service", +- "//chrome/browser/screen_ai:screen_ai_service_router_factory", + "//chrome/browser/search", + "//chrome/browser/search/background", + "//chrome/browser/search_engine_choice", +--- src/chrome/browser/prefs/BUILD.gn.orig 2025-04-11 12:05:17.010048233 +0200 ++++ src/chrome/browser/prefs/BUILD.gn 2025-04-12 13:20:41.959768617 +0200 +@@ -265,7 +265,6 @@ source_set("impl") { + } else { + deps += [ + "//chrome/browser/promos:utils", +- "//chrome/browser/screen_ai:prefs", + "//chrome/browser/search/background", + "//chrome/browser/search_engine_choice", + "//chrome/browser/search_engines", +--- src/chrome/browser/ui/BUILD.gn.orig 2025-04-11 12:05:17.331313863 +0200 ++++ src/chrome/browser/ui/BUILD.gn 2025-04-12 13:26:46.759762260 +0200 +@@ -1705,8 +1705,6 @@ static_library("ui") { + "//chrome/browser/regional_capabilities", + "//chrome/browser/safe_browsing", + "//chrome/browser/safe_browsing:advanced_protection", +- "//chrome/browser/screen_ai:screen_ai_install_state", +- "//chrome/browser/screen_ai:screen_ai_service_router_factory", + "//chrome/browser/smart_card:smart_card", + "//chrome/browser/tab_group_sync:utils", + "//chrome/browser/themes", +@@ -2376,7 +2374,6 @@ static_library("ui") { + "//chrome/browser/policy:onc", + "//chrome/browser/policy:system_features_disable_list", + "//chrome/browser/push_notification:push_notification", +- "//chrome/browser/screen_ai/public:optical_character_recognizer", + "//chrome/browser/ui/ash/accessibility", + "//chrome/browser/ui/ash/app_access", + "//chrome/browser/ui/ash/arc", diff --git a/fix-build-without-supervised-users.patch b/fix-build-without-supervised-users.patch new file mode 100644 index 0000000..bd2d9e5 --- /dev/null +++ b/fix-build-without-supervised-users.patch @@ -0,0 +1,60 @@ +--- src/chrome/test/BUILD.gn.orig 2024-09-12 13:54:44.642624995 +0200 ++++ src/chrome/test/BUILD.gn 2024-09-12 15:25:29.792388388 +0200 +@@ -56,7 +56,6 @@ import("//v8/gni/v8.gni") + + assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome") + assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome") +-assert(enable_supervised_users) + + if (is_android) { + import("//build/config/android/rules.gni") +--- src/chrome/common/BUILD.gn.orig 2024-12-08 18:34:54.604673311 +0100 ++++ src/chrome/common/BUILD.gn 2024-12-18 13:09:33.621395162 +0100 +@@ -22,7 +22,6 @@ import("//testing/libfuzzer/fuzzer_test. + import("//third_party/widevine/cdm/widevine.gni") + import("//tools/grit/grit_rule.gni") + +-assert(enable_supervised_users) + assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome") + + declare_args() { +--- src/chrome/renderer/BUILD.gn.orig 2024-09-12 13:46:51.849317526 +0200 ++++ src/chrome/renderer/BUILD.gn 2024-09-12 15:29:17.915843739 +0200 +@@ -18,7 +18,6 @@ import("//testing/libfuzzer/fuzzer_test. + import("//third_party/widevine/cdm/widevine.gni") + import("//tools/grit/grit_rule.gni") + +-assert(enable_supervised_users) + + grit("resources") { + source = "resources/renderer_resources.grd" +--- src/chrome/browser/BUILD.gn.orig 2024-09-12 13:54:44.639291662 +0200 ++++ src/chrome/browser/BUILD.gn 2024-09-12 15:30:42.759505691 +0200 +@@ -45,7 +45,6 @@ import("//third_party/widevine/cdm/widev + import("//tools/grit/grit_rule.gni") + import("//ui/base/ui_features.gni") + +-assert(enable_supervised_users) + + # //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which + # produces a conflict for the "grit" template so we have to only include one. +--- src/chrome/browser/ui/BUILD.gn.orig 2024-12-08 18:34:54.011339960 +0100 ++++ src/chrome/browser/ui/BUILD.gn 2024-12-18 13:09:34.948061857 +0100 +@@ -30,7 +30,6 @@ import("//third_party/protobuf/proto_lib + import("//ui/base/ui_features.gni") + import("//ui/views/features.gni") + +-assert(enable_supervised_users) + assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome") + + generate_allowlist_from_histograms_file("webui_name_variants") { +--- src/chrome/browser/extensions/BUILD.gn.orig 2025-04-11 12:05:16.772151640 +0200 ++++ src/chrome/browser/extensions/BUILD.gn 2025-04-11 20:28:31.291951121 +0200 +@@ -20,7 +20,6 @@ import("//testing/libfuzzer/fuzzer_test. + import("//third_party/protobuf/proto_library.gni") + + assert(enable_extensions_core) +-assert(enable_supervised_users) + assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome") + + source_set("extensions") { diff --git a/fix-system-highway.patch b/fix-system-highway.patch new file mode 100644 index 0000000..42f4f90 --- /dev/null +++ b/fix-system-highway.patch @@ -0,0 +1,8 @@ +--- src/build/linux/unbundle/highway.gn.orig 2025-04-11 12:05:15.714160237 +0200 ++++ src/build/linux/unbundle/highway.gn 2025-04-12 14:26:12.155738961 +0200 +@@ -18,3 +18,5 @@ source_set("libhwy") { + public_configs = [ ":libhwy_external_config" ] + public_deps = [ ":libhwy_shim" ] + } ++ ++source_set("highway_tests") {} diff --git a/fpic.patch b/fpic.patch index ce84826..a8f5665 100644 --- a/fpic.patch +++ b/fpic.patch @@ -45,18 +45,6 @@ Use -fpic for code which goes only in dlls (gives smaller code), ":spvtools_include_gen_dirs", ] -- cflags = [] -+ cflags = ["-fpic", "-fno-semantic-interposition"] -+ asmflags = ["-fpic", "-fno-semantic-interposition"] - if (is_clang) { - cflags += [ - "-Wno-implicit-fallthrough", ---- a/third_party/vulkan-deps/spirv-tools/src/BUILD.gn -+++ b/third_party/vulkan-deps/spirv-tools/src/BUILD.gn -@@ -356,7 +356,8 @@ - ":spvtools_include_gen_dirs", - ] - - cflags = [] + cflags = ["-fpic", "-fno-semantic-interposition"] + asmflags = ["-fpic", "-fno-semantic-interposition"] @@ -85,26 +73,26 @@ Use -fpic for code which goes only in dlls (gives smaller code), sources = [ "compression_utils_portable.cc", "compression_utils_portable.h", ---- src/ui/qt/BUILD.gn.old 2022-12-02 23:49:17.792117400 +0100 -+++ src/ui/qt/BUILD.gn 2022-12-04 14:32:48.407196100 +0100 -@@ -43,6 +43,8 @@ +--- src/ui/qt/BUILD.gn.orig 2025-07-19 11:32:45.537979340 +0200 ++++ src/ui/qt/BUILD.gn 2025-07-19 16:18:57.173759933 +0200 +@@ -39,6 +39,8 @@ source_set("qt_interface") { # target instead. public = [ "qt_interface.h" ] sources = [ "qt_interface.cc" ] + cflags = ["-fpic", "-fno-semantic-interposition"] + asmflags = ["-fpic", "-fno-semantic-interposition"] - } - template("qt_shim") { -@@ -76,6 +78,8 @@ + # Don't use libc++ modules as this depends on libstdc++. + use_libcxx_modules = false +@@ -102,6 +104,8 @@ template("qt_shim") { sources += get_target_outputs(":generate_moc" + invoker.qt_version) deps += [ ":generate_moc" + invoker.qt_version ] } + cflags = ["-fpic", "-fno-semantic-interposition"] + asmflags = ["-fpic", "-fno-semantic-interposition"] - } - } - qt_shim("qt5_shim") { + + # Don't depend on libcxx modules. This binary doesn't depend on the standard + # library in libcxx. Instead it depends on the libcxx in the sysroot, so --- src/third_party/abseil-cpp/BUILD.gn.old +++ src/third_party/abseil-cpp/BUILD.gn @@ -132,6 +132,8 @@ config("absl_define_config") { diff --git a/gn-logspam-breaks-install.patch b/gn-logspam-breaks-install.patch new file mode 100644 index 0000000..5734d5e --- /dev/null +++ b/gn-logspam-breaks-install.patch @@ -0,0 +1,21 @@ +Threatening downstream maintainers on stdout may be fun, but it breaks `gn desc` which we call in %install + +--- src/build/config/c++/c++.gni 2025-04-16 14:36:21.927410223 +0200 ++++ src/build/config/c++/c++.gni 2025-04-19 00:11:43.759874434 +0200 +@@ -110,16 +110,3 @@ assert(!(is_ios && libcxx_is_shared), + + # Chromium will require using its libc++ library implementation. Warn if the + # current configuration is not using it. +-if ((!use_custom_libcxx || !use_custom_libcxx_for_host) && +- # Standalone use of //build outside of Chromium can disable libc++. +- build_with_chromium && +- # Try to avoid spamming the console lots. It's not actually +- # toolchain-specific. +- current_toolchain == default_toolchain) { +- print("*********************************************************************") +- print("WARNING: Support for linking against a C++ standard library other ") +- print(" than the one in-tree (buildtools/third_party/libc++) is deprecated") +- print(" and support for this will end. We plan to remove this option in ") +- print(" M138.") +- print("*********************************************************************") +-} diff --git a/grid_sizing_tree-Wchanges-meaning.patch b/grid_sizing_tree-Wchanges-meaning.patch deleted file mode 100644 index 0a87dc1..0000000 --- a/grid_sizing_tree-Wchanges-meaning.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 05a74771fed5491740588ec7b39ba64a7b710013 Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Thu, 1 Feb 2024 17:34:38 +0000 -Subject: [PATCH] GCC: avoid clash between getter and type in - grid_sizing_tree.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Rename GridSubsizingTree::GridItems getter to GetGridItems to avoid -type clash. - -Bug: 819294 -Change-Id: I4112929d9f85dc4573002b429cc982d50085d3c9 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5224147 -Reviewed-by: Xianzhu Wang -Commit-Queue: Xianzhu Wang -Commit-Queue: José Dapena Paz -Cr-Commit-Position: refs/heads/main@{#1255116} ---- - .../core/layout/grid/grid_layout_algorithm.cc | 13 +++++++------ - .../renderer/core/layout/grid/grid_sizing_tree.h | 2 +- - 2 files changed, 8 insertions(+), 7 deletions(-) - -diff --git a/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h b/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h -index 45d55e2b36da4..2148ea9ea0657 100644 ---- a/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h -+++ b/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h -@@ -188,7 +188,7 @@ class GridSizingSubtree - /* subtree_root */ grid_tree_->LookupSubgridIndex(subgrid_data)); - } - -- GridItems& GridItems() const { -+ ::blink::GridItems& GridItems() const { - DCHECK(grid_tree_); - return grid_tree_->At(subtree_root_).grid_items; - } diff --git a/harfbuzz-replace-HbScopedPointer.patch b/harfbuzz-replace-HbScopedPointer.patch deleted file mode 100644 index a580e95..0000000 --- a/harfbuzz-replace-HbScopedPointer.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 5fcaeafcab5460ea65e4a7bdee6589002adf74d2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= -Date: Mon, 13 Feb 2023 13:26:16 +0000 -Subject: [PATCH] Use hb::unique_ptr instead of custom HbScopedPointer -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This was an earlier local RAII implementation that we no longer need now -that HarfBuzz provides helpers for this. - -Change-Id: Idc47ce2717c75556acb03e2ccccb50ec87ed3cca -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4239980 -Reviewed-by: Munira Tursunova -Commit-Queue: Dominik Röttsches -Cr-Commit-Position: refs/heads/main@{#1104453} ---- - .../platform/fonts/shaping/harfbuzz_shaper.cc | 39 ++++--------------- - 1 file changed, 7 insertions(+), 32 deletions(-) - -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc -index c165a1703395a..dc1377a90a9f7 100644 ---- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc -+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -194,33 +195,6 @@ struct ReshapeQueueItem { - : action_(action), start_index_(start), num_characters_(num) {} - }; - --template --class HarfBuzzScopedPtr { -- STACK_ALLOCATED(); -- -- public: -- typedef void (*DestroyFunction)(T*); -- -- HarfBuzzScopedPtr(T* ptr, DestroyFunction destroy) -- : ptr_(ptr), destroy_(destroy) { -- DCHECK(destroy_); -- } -- HarfBuzzScopedPtr(const HarfBuzzScopedPtr&) = delete; -- HarfBuzzScopedPtr& operator=(const HarfBuzzScopedPtr&) = delete; -- ~HarfBuzzScopedPtr() { -- if (ptr_) -- (*destroy_)(ptr_); -- } -- -- T* Get() const{ return ptr_; } -- operator T *() const {return ptr_;} -- void Set(T* ptr) { ptr_ = ptr; } -- -- private: -- T* ptr_; -- DestroyFunction destroy_; --}; -- - // - // Represents a context while shaping a range. - // -@@ -239,7 +214,7 @@ struct RangeContext { - text_direction(direction), - start(start), - end(end), -- buffer(hb_buffer_create(), hb_buffer_destroy), -+ buffer(hb_buffer_create()), - options(options) { - DCHECK_GE(end, start); - font_features.Initialize(font->GetFontDescription()); -@@ -249,7 +224,7 @@ struct RangeContext { - const TextDirection text_direction; - const unsigned start; - const unsigned end; -- const HarfBuzzScopedPtr buffer; -+ const hb::unique_ptr buffer; - FontFeatures font_features; - Deque reshape_queue; - const ShapeOptions options; -@@ -1032,7 +1007,7 @@ void HarfBuzzShaper::GetGlyphData(const - UScriptCode script, - bool is_horizontal, - GlyphDataList& glyphs) { -- HarfBuzzScopedPtr hb_buffer(hb_buffer_create(), hb_buffer_destroy); -+ hb::unique_ptr hb_buffer(hb_buffer_create()); - hb_buffer_set_language(hb_buffer, locale.HarfbuzzLanguage()); - hb_buffer_set_script(hb_buffer, ICUScriptToHBScript(script)); - hb_buffer_set_direction(hb_buffer, diff --git a/harfbuzz-replace-chromium-scoped-type.patch b/harfbuzz-replace-chromium-scoped-type.patch deleted file mode 100644 index f26d938..0000000 --- a/harfbuzz-replace-chromium-scoped-type.patch +++ /dev/null @@ -1,540 +0,0 @@ -From aa2ff2bee16776301bd840a4e18bdebdfb916822 Mon Sep 17 00:00:00 2001 -From: Munira Tursunova -Date: Tue, 04 Oct 2022 14:20:04 +0000 -Subject: [PATCH] Replacing Chromium scoped types with HarfBuzz custom types. - -Removed the Chromium side type HbScoped and move to the -HarfBuzz custom type. - -Bug: 1363228 -Change-Id: I9d390808953e2c36651533cbf5f4958beff2e14d -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3927859 -Reviewed-by: Dominik Röttsches -Reviewed-by: Rune Lillesveen -Reviewed-by: Calder Kitagawa -Commit-Queue: Munira Tursunova -Cr-Commit-Position: refs/heads/main@{#1054692} ---- - -diff --git a/components/paint_preview/common/BUILD.gn b/components/paint_preview/common/BUILD.gn -index 377dc92..c39757d 100644 ---- a/components/paint_preview/common/BUILD.gn -+++ b/components/paint_preview/common/BUILD.gn -@@ -37,7 +37,6 @@ - "//components/crash/core/common:crash_key_lib", - "//skia", - "//third_party:freetype_harfbuzz", -- "//third_party/harfbuzz-ng:hb_scoped_util", - "//ui/gfx/geometry", - "//url", - ] -diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc -index 8298861d5..147dfc3 100644 ---- a/components/paint_preview/common/subset_font.cc -+++ b/components/paint_preview/common/subset_font.cc -@@ -7,6 +7,7 @@ - // clang-format off - #include - #include -+#include - // clang-format on - - #include -@@ -17,7 +18,6 @@ - #include "base/numerics/safe_conversions.h" - #include "components/crash/core/common/crash_key.h" - #include "skia/ext/font_utils.h" --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - #include "third_party/skia/include/core/SkFontMgr.h" - #include "third_party/skia/include/core/SkStream.h" - #include "third_party/skia/include/core/SkTypeface.h" -@@ -45,11 +45,11 @@ - } - - // Converts SkData to a hb_blob_t. --HbScoped MakeBlob(sk_sp data) { -+hb::unique_ptr MakeBlob(sk_sp data) { - if (!data || - !base::IsValueInRangeForNumericType(data->size())) -- return nullptr; -- return HbScoped( -+ return hb::unique_ptr(nullptr); -+ return hb::unique_ptr( - hb_blob_create(static_cast(data->data()), - static_cast(data->size()), - HB_MEMORY_MODE_READONLY, nullptr, nullptr)); -@@ -72,8 +72,9 @@ - family_name.c_str()); - int ttc_index = 0; - sk_sp data = StreamToData(typeface->openStream(&ttc_index)); -- HbScoped face(hb_face_create(MakeBlob(data).get(), ttc_index)); -- HbScoped input(hb_subset_input_create_or_fail()); -+ hb::unique_ptr face( -+ hb_face_create(MakeBlob(data).get(), ttc_index)); -+ hb::unique_ptr input(hb_subset_input_create_or_fail()); - if (!face || !input) { - return nullptr; - } -@@ -102,14 +103,16 @@ - hb_set_add(skip_subset, HB_TAG('G', 'S', 'U', 'B')); - hb_set_add(skip_subset, HB_TAG('G', 'P', 'O', 'S')); - -- HbScoped subset_face(hb_subset_or_fail(face.get(), input.get())); -+ hb::unique_ptr subset_face( -+ hb_subset_or_fail(face.get(), input.get())); - if (!subset_face) { - return nullptr; - } - // Store the correct collection index for the subsetted font. - const int final_ttc_index = hb_face_get_index(subset_face.get()); - -- HbScoped subset_blob(hb_face_reference_blob(subset_face.get())); -+ hb::unique_ptr subset_blob( -+ hb_face_reference_blob(subset_face.get())); - if (!subset_blob) { - return nullptr; - } -diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index 88cef3c..ae88e5a 100644 ---- a/third_party/blink/renderer/platform/BUILD.gn -+++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1683,7 +1683,6 @@ - "//third_party/blink/renderer/platform/wtf", - "//third_party/ced", - "//third_party/emoji-segmenter", -- "//third_party/harfbuzz-ng:hb_scoped_util", - "//third_party/icu", - "//third_party/libyuv", - "//third_party/one_euro_filter", -diff --git a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc -index 7c7057b..d43668f1 100644 ---- a/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc -+++ b/third_party/blink/renderer/platform/fonts/opentype/font_format_check.cc -@@ -7,10 +7,10 @@ - // Include HarfBuzz to have a cross-platform way to retrieve table tags without - // having to rely on the platform being able to instantiate this font format. - #include -+#include - - #include "base/sys_byteorder.h" - #include "third_party/blink/renderer/platform/wtf/vector.h" --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - #include "third_party/skia/include/core/SkTypeface.h" - - namespace blink { -@@ -27,7 +27,8 @@ - const unsigned int kMinCOLRHeaderSize = 14; - if (table_tags.size() && table_tags.Contains(kCOLRTag) && - table_tags.Contains(HB_TAG('C', 'P', 'A', 'L'))) { -- HbScoped table_blob(hb_face_reference_table(face, kCOLRTag)); -+ hb::unique_ptr table_blob( -+ hb_face_reference_table(face, kCOLRTag)); - if (hb_blob_get_length(table_blob.get()) < kMinCOLRHeaderSize) - return FontFormatCheck::COLRVersion::kNoCOLR; - -@@ -51,11 +52,11 @@ - } // namespace - - FontFormatCheck::FontFormatCheck(sk_sp sk_data) { -- HbScoped font_blob( -+ hb::unique_ptr font_blob( - hb_blob_create(reinterpret_cast(sk_data->bytes()), - base::checked_cast(sk_data->size()), - HB_MEMORY_MODE_READONLY, nullptr, nullptr)); -- HbScoped face(hb_face_create(font_blob.get(), 0)); -+ hb::unique_ptr face(hb_face_create(font_blob.get(), 0)); - - unsigned table_count = 0; - table_count = hb_face_get_table_tags(face.get(), 0, nullptr, nullptr); -diff --git a/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc b/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc -index 5e6d1f2..73b984a 100644 ---- a/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc -+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.cc -@@ -5,10 +5,10 @@ - // clang-format off - #include - #include -+#include - // clang-format on - - #include "third_party/blink/renderer/platform/fonts/opentype/open_type_caps_support.h" --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - - namespace blink { - -@@ -146,9 +146,9 @@ - hb_face_t* const hb_face = - hb_font_get_face(harfbuzz_face_->GetScaledFont()); - -- HbScoped morx_blob( -+ hb::unique_ptr morx_blob( - hb_face_reference_table(hb_face, HB_TAG('m', 'o', 'r', 'x'))); -- HbScoped mort_blob( -+ hb::unique_ptr mort_blob( - hb_face_reference_table(hb_face, HB_TAG('m', 'o', 'r', 't'))); - - // TODO(crbug.com/911149): Use hb_aat_layout_has_substitution() for -diff --git a/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc b/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc -index 86c289c..98cbd7a 100644 ---- a/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc -+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_cpal_lookup.cc -@@ -6,11 +6,11 @@ - - #include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h" - #include "third_party/blink/renderer/platform/wtf/std_lib_extras.h" --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - #include "third_party/skia/include/core/SkStream.h" - - // clang-format off - #include -+#include - #include - // clang-format on - -@@ -28,7 +28,7 @@ - if (!typeface || !typeface->getTableSize(kCpalTag)) - return absl::nullopt; - -- HbScoped face(HbFaceFromSkTypeface(typeface)); -+ hb::unique_ptr face(HbFaceFromSkTypeface(typeface)); - - if (!face || !hb_ot_color_has_palettes(face.get())) - return absl::nullopt; -@@ -49,7 +49,7 @@ absl::optional OpenTypeCpalLoo - Vector OpenTypeCpalLookup::RetrieveColorRecords( - sk_sp typeface, - unsigned palette_index) { -- HbScoped face(HbFaceFromSkTypeface(typeface)); -+ hb::unique_ptr face(HbFaceFromSkTypeface(typeface)); - - if (!face) { - return Vector(); -diff --git a/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc b/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc -index ebab0fa8..4ecd886 100644 ---- a/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc -+++ b/third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.cc -@@ -4,12 +4,12 @@ - - #include "third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.h" - --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - #include "third_party/skia/include/core/SkStream.h" - #include "third_party/skia/include/core/SkTypeface.h" - - // clang-format off - #include -+#include - #include - // clang-format on - -@@ -23,11 +23,11 @@ - return output; - sk_sp sk_data = - SkData::MakeFromStream(stream.get(), stream->getLength()); -- HbScoped blob( -+ hb::unique_ptr blob( - hb_blob_create(reinterpret_cast(sk_data->bytes()), - base::checked_cast(sk_data->size()), - HB_MEMORY_MODE_READONLY, nullptr, nullptr)); -- HbScoped face(hb_face_create(blob.get(), 0)); -+ hb::unique_ptr face(hb_face_create(blob.get(), 0)); - unsigned axes_count = hb_ot_var_get_axis_count(face.get()); - std::unique_ptr axes = - std::make_unique(axes_count); -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc -index b4bb5a3..b6ee0a8f 100644 ---- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc -+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc -@@ -32,6 +32,7 @@ - - // clang-format off - #include -+#include - #include - // clang-format on - -@@ -52,7 +53,6 @@ - #include "third_party/blink/renderer/platform/wtf/hash_map.h" - #include "third_party/blink/renderer/platform/wtf/math_extras.h" - #include "third_party/blink/renderer/platform/wtf/text/character_names.h" --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - #include "third_party/skia/include/core/SkPaint.h" - #include "third_party/skia/include/core/SkPath.h" - #include "third_party/skia/include/core/SkPoint.h" -@@ -203,7 +203,7 @@ - const hb_codepoint_t kInvalidCodepoint = static_cast(-1); - hb_codepoint_t space = kInvalidCodepoint; - -- HbScoped glyphs(hb_set_create()); -+ hb::unique_ptr glyphs(hb_set_create()); - - // Check whether computing is needed and compute for gpos/gsub. - if (features & kKerning && -@@ -391,8 +391,8 @@ - } - - // TODO(yosin): We should move |CreateFace()| to "harfbuzz_font_cache.cc". --static HbScoped CreateFace(FontPlatformData* platform_data) { -- HbScoped face; -+static hb::unique_ptr CreateFace(FontPlatformData* platform_data) { -+ hb::unique_ptr face; - - sk_sp typeface = sk_ref_sp(platform_data->Typeface()); - CHECK(typeface); -@@ -402,8 +402,8 @@ - - // Fallback to table copies if there is no in-memory access. - if (!face) { -- face.reset(hb_face_create_for_tables(HarfBuzzSkiaGetTable, typeface.get(), -- nullptr)); -+ face = hb::unique_ptr(hb_face_create_for_tables( -+ HarfBuzzSkiaGetTable, typeface.get(), nullptr)); - } - - DCHECK(face); -@@ -415,7 +415,7 @@ - static scoped_refptr CreateHarfBuzzFontData( - hb_face_t* face, - SkTypeface* typeface) { -- HbScoped ot_font(hb_font_create(face)); -+ hb::unique_ptr ot_font(hb_font_create(face)); - hb_ot_font_set_funcs(ot_font.get()); - - int axis_count = typeface->getVariationDesignPosition(nullptr, 0); -@@ -445,7 +445,7 @@ - FontPlatformData* platform_data) { - const auto& result = font_map_.insert(platform_data->UniqueID(), nullptr); - if (result.is_new_entry) { -- HbScoped face = CreateFace(platform_data); -+ hb::unique_ptr face = CreateFace(platform_data); - result.stored_value->value = - CreateHarfBuzzFontData(face.get(), platform_data->Typeface()); - } -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h -index cbfb1c15..eb0dcb75 100644 ---- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h -+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h -@@ -38,9 +38,9 @@ - #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" - #include "third_party/blink/renderer/platform/wtf/ref_counted.h" - #include "third_party/blink/renderer/platform/wtf/text/character_names.h" --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - - #include -+#include - - namespace blink { - -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc -index 4561bc9..a2d2eb1d 100644 ---- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc -+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.cc -@@ -16,9 +16,8 @@ - } // namespace - - namespace blink { -- --HbScoped HbFaceFromSkTypeface(sk_sp typeface) { -- HbScoped return_face(nullptr); -+hb::unique_ptr HbFaceFromSkTypeface(sk_sp typeface) { -+ hb::unique_ptr return_face(nullptr); - int ttc_index = 0; - - // Have openStream() write the ttc index of this typeface within the stream to -@@ -28,7 +27,7 @@ - if (tf_stream && tf_stream->getMemoryBase()) { - const void* tf_memory = tf_stream->getMemoryBase(); - size_t tf_size = tf_stream->getLength(); -- HbScoped face_blob(hb_blob_create( -+ hb::unique_ptr face_blob(hb_blob_create( - reinterpret_cast(tf_memory), - base::checked_cast(tf_size), HB_MEMORY_MODE_READONLY, - tf_stream.release(), DeleteTypefaceStream)); -@@ -38,7 +37,8 @@ - // See https://github.com/harfbuzz/harfbuzz/issues/248 . - unsigned int num_hb_faces = hb_face_count(face_blob.get()); - if (0 < num_hb_faces && static_cast(ttc_index) < num_hb_faces) { -- return_face.reset(hb_face_create(face_blob.get(), ttc_index)); -+ return_face = -+ hb::unique_ptr(hb_face_create(face_blob.get(), ttc_index)); - } - } - return return_face; -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h -index 8817f06..f00d6f2 100644 ---- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h -+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face_from_typeface.h -@@ -8,9 +8,8 @@ - #include "third_party/blink/renderer/platform/platform_export.h" - #include "third_party/skia/include/core/SkTypeface.h" - --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" -- - #include -+#include - - namespace blink { - -@@ -25,7 +24,7 @@ - // from copying all font tables on Mac into newly allocated memory, causing a - // potentially quite large allocations (in the megabytes range). See the - // implementation of SkTypeface_Mac::onOpenStream. --PLATFORM_EXPORT HbScoped HbFaceFromSkTypeface( -+PLATFORM_EXPORT hb::unique_ptr HbFaceFromSkTypeface( - sk_sp typeface); - } // namespace blink - -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc -index 763f3a3..c50910df 100644 ---- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc -+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc -@@ -5,12 +5,11 @@ - #include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h" - #include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h" - #include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h" --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - - namespace blink { - - HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font) -- : hb_font_(HbScoped(font)), -+ : hb_font_(hb::unique_ptr(font)), - hb_font_data_(std::make_unique()) {} - - HbFontCacheEntry::~HbFontCacheEntry() = default; -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h -index 1b0accf..eaedd0b 100644 ---- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h -+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h -@@ -7,9 +7,9 @@ - - #include "third_party/blink/renderer/platform/fonts/font_metrics.h" - #include "third_party/blink/renderer/platform/fonts/unicode_range_set.h" --#include "third_party/harfbuzz-ng/utils/hb_scoped.h" - - #include -+#include - - #include - -@@ -39,7 +39,7 @@ class HbFontCacheEntry : public RefCount - private: - explicit HbFontCacheEntry(hb_font_t* font); - -- HbScoped hb_font_; -+ hb::unique_ptr hb_font_; - std::unique_ptr hb_font_data_; - }; - -diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h -index caf5d49..0d4b6f9 100644 ---- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h -+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h -@@ -5,6 +5,8 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_DATA_H_ - #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_DATA_H_ - -+#include -+ - #include "base/check_op.h" - #include "third_party/blink/renderer/platform/fonts/font_platform_data.h" - #include "third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h" -@@ -81,7 +83,7 @@ - return vertical_data_; - } - -- HbScoped unscaled_font_; -+ hb::unique_ptr unscaled_font_; - SkFont font_; - - // Capture these scaled fallback metrics from FontPlatformData so that a -diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn -index 522e164d..4b64e1b 100644 ---- a/third_party/harfbuzz-ng/BUILD.gn -+++ b/third_party/harfbuzz-ng/BUILD.gn -@@ -41,6 +41,7 @@ - "src/src/hb-blob.h", - "src/src/hb-buffer.h", - "src/src/hb-common.h", -+ "src/src/hb-cplusplus.hh", - "src/src/hb-deprecated.h", - "src/src/hb-face.h", - "src/src/hb-font.h", -@@ -409,11 +410,6 @@ - } - } - --source_set("hb_scoped_util") { -- sources = [ "utils/hb_scoped.h" ] -- deps = [ "//third_party:freetype_harfbuzz" ] --} -- - # Not all checkouts have a //base directory. - if (build_with_chromium) { - fuzzer_test("hb_shape_fuzzer") { -diff --git a/third_party/harfbuzz-ng/utils/hb_scoped.h b/third_party/harfbuzz-ng/utils/hb_scoped.h -deleted file mode 100644 -index 887f6b90..0000000 ---- a/third_party/harfbuzz-ng/utils/hb_scoped.h -+++ /dev/null -@@ -1,60 +0,0 @@ --// Copyright 2020 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 THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_ --#define THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_ -- --// clang-format off --#include --#include --// clang-format on -- --#include --#include -- --template --struct always_false : std::false_type {}; -- --template --struct HbSpecializedDeleter { -- inline void operator()(T* obj) { -- static_assert(always_false::value, -- "HbScoped is only allowed for HarfBuzz types that have a " -- "deleter specialization."); -- } --}; -- --// Defines a scoped pointer type HbScoped based on std::unique_ptr, using the --// corresponsing HarfBuzz destructors to commonly used public HarfBuzz types. --// The interface of HbScoped is the same as that of std::unique_ptr. --// --// void MyFunction() { --// HbScoped scoped_harfbuzz_blob( --// hb_blob_create(mydata, mylength)); --// --// DoSomethingWithBlob(scoped_harfbuzz_blob.get()); --// } --// --// When |scoped_harfbuzz_buffer| goes out of scope, hb_blob_destroy() is called --// for the hb_blob_t* created from hb_blob_create(). --template --using HbScoped = std::unique_ptr>; -- --#define SPECIALIZED_DELETER_FOR_HARFBUZZ_TYPE(TYPE, DESTRUCTOR) \ -- template <> \ -- struct HbSpecializedDeleter { \ -- inline void operator()(TYPE* obj) { DESTRUCTOR(obj); } \ -- }; -- --#define HB_TYPE_DESTRUCTOR_PAIRS_REPEAT(F) \ -- F(hb_blob_t, hb_blob_destroy) \ -- F(hb_buffer_t, hb_buffer_destroy) \ -- F(hb_face_t, hb_face_destroy) \ -- F(hb_font_t, hb_font_destroy) \ -- F(hb_set_t, hb_set_destroy) \ -- F(hb_subset_input_t, hb_subset_input_destroy) -- --HB_TYPE_DESTRUCTOR_PAIRS_REPEAT(SPECIALIZED_DELETER_FOR_HARFBUZZ_TYPE) -- --#endif // THIRD_PARTY_HARFBUZZ_NG_UTILS_HB_SCOPED_H_ diff --git a/hit_test_request-missing-optional.patch b/hit_test_request-missing-optional.patch deleted file mode 100644 index 50425ac..0000000 --- a/hit_test_request-missing-optional.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3a75d7f8dc3a08a38dd893031f8996b91a00764b Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Tue, 23 Jan 2024 17:55:15 +0000 -Subject: [PATCH] IWYU: usage of std::optional in hit_test_request.h requires - include - -Bug: 957519 -Change-Id: I1ec32af603720d13bfa4e22e20142459802284b4 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5227329 -Reviewed-by: Ian Kilpatrick -Commit-Queue: Ian Kilpatrick -Cr-Commit-Position: refs/heads/main@{#1250917} ---- - third_party/blink/renderer/core/layout/hit_test_request.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/third_party/blink/renderer/core/layout/hit_test_request.h b/third_party/blink/renderer/core/layout/hit_test_request.h -index c33144dc975b6..38968126fe520 100644 ---- a/third_party/blink/renderer/core/layout/hit_test_request.h -+++ b/third_party/blink/renderer/core/layout/hit_test_request.h -@@ -23,6 +23,8 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_HIT_TEST_REQUEST_H_ - #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_HIT_TEST_REQUEST_H_ - -+#include -+ - #include "base/functional/callback.h" - #include "third_party/blink/renderer/platform/heap/garbage_collected.h" - #include "third_party/blink/renderer/platform/heap/member.h" diff --git a/identity_request_account-incomplete-IdentityProviderData.patch b/identity_request_account-incomplete-IdentityProviderData.patch new file mode 100644 index 0000000..01398f8 --- /dev/null +++ b/identity_request_account-incomplete-IdentityProviderData.patch @@ -0,0 +1,227 @@ +--- src/content/public/browser/identity_request_dialog_controller.h.orig 2025-08-15 17:32:26.573405615 +0200 ++++ src/content/public/browser/identity_request_dialog_controller.h 2025-08-16 00:53:34.120821675 +0200 +@@ -14,7 +14,6 @@ + #include "base/memory/ref_counted.h" + #include "content/common/content_export.h" + #include "content/public/browser/identity_request_account.h" +-#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-forward.h" + #include "third_party/skia/include/core/SkColor.h" + #include "url/gurl.h" + #include "url/origin.h" +@@ -22,35 +21,6 @@ + namespace content { + class WebContents; + +-// A Java counterpart will be generated for this enum. +-// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content.webid +-// GENERATED_JAVA_CLASS_NAME_OVERRIDE: IdentityRequestDialogDisclosureField +-enum class IdentityRequestDialogDisclosureField { +- kName, +- kEmail, +- kPicture, +- kPhoneNumber, +- kUsername +-}; +- +-// The client metadata that will be used to display a FedCM dialog. This data is +-// extracted from the client metadata endpoint from the FedCM API, where +-// 'client' is essentially the relying party which invoked the API. +-struct CONTENT_EXPORT ClientMetadata { +- ClientMetadata(const GURL& terms_of_service_url, +- const GURL& privacy_policy_url, +- const GURL& brand_icon_url, +- const gfx::Image& brand_decoded_icon); +- ClientMetadata(const ClientMetadata& other); +- ~ClientMetadata(); +- +- GURL terms_of_service_url; +- GURL privacy_policy_url; +- GURL brand_icon_url; +- // This will be an empty image if the fetching never happened or if it failed. +- gfx::Image brand_decoded_icon; +-}; +- + // The information about an error that will be used to display a FedCM dialog. + // This data is extracted from the error object returned by the identity + // provider when the user attempts to login via the FedCM API and an error +@@ -60,70 +30,6 @@ struct CONTENT_EXPORT IdentityCredential + GURL url; + }; + +-// The metadata about the identity provider that will be used to display a FedCM +-// dialog. This data is extracted from the config file which is fetched when the +-// FedCM API is invoked. +-struct CONTENT_EXPORT IdentityProviderMetadata { +- IdentityProviderMetadata(); +- IdentityProviderMetadata(const IdentityProviderMetadata& other); +- ~IdentityProviderMetadata(); +- +- std::optional brand_text_color; +- std::optional brand_background_color; +- GURL brand_icon_url; +- GURL idp_login_url; +- std::string requested_label; +- // For registered IdPs, the type is used to only show the accounts when the +- // RP is compatible. +- std::vector types; +- // The token formats that are supported. +- std::vector formats; +- // The URL of the configuration endpoint. This is stored in +- // IdentityProviderMetadata so that the UI code can pass it along when an +- // Account is selected by the user. +- GURL config_url; +- // Whether this IdP supports signing in to additional accounts. +- bool supports_add_account{false}; +- // Whether this IdP has any filtered out account. This is reset to false each +- // time the accounts dialog is shown and recomputed then. +- bool has_filtered_out_account{false}; +- // This will be an empty image if fetching failed. +- gfx::Image brand_decoded_icon; +-}; +- +-// This class contains all of the data specific to an identity provider that is +-// going to be used to display a FedCM dialog. This data is gathered from +-// endpoints fetched when the FedCM API is invoked as well as from the +-// parameters provided by the relying party when the API is invoked. +-class CONTENT_EXPORT IdentityProviderData +- : public base::RefCounted { +- public: +- IdentityProviderData(const std::string& idp_for_display, +- const IdentityProviderMetadata& idp_metadata, +- const ClientMetadata& client_metadata, +- blink::mojom::RpContext rp_context, +- std::optional format, +- const std::vector& +- disclosure_fields, +- bool has_login_status_mismatch); +- +- std::string idp_for_display; +- IdentityProviderMetadata idp_metadata; +- ClientMetadata client_metadata; +- blink::mojom::RpContext rp_context; +- std::optional format; +- // For which fields should the dialog request permission for (assuming +- // this is for signup). +- std::vector disclosure_fields; +- // Whether there was some login status API mismatch when fetching the IDP's +- // accounts. +- bool has_login_status_mismatch; +- +- private: +- friend class base::RefCounted; +- +- ~IdentityProviderData(); +-}; + + // The relying party data that will be used to display a FedCM dialog. This data + // is extracted from the website which invoked the API, not from the FedCM +--- src/content/public/browser/identity_request_account.h.orig 2025-08-15 17:32:26.573405615 +0200 ++++ src/content/public/browser/identity_request_account.h 2025-08-16 00:53:42.592813124 +0200 +@@ -13,13 +13,106 @@ + #include "base/time/time.h" + #include "content/common/content_export.h" + #include "third_party/blink/public/common/webid/login_status_account.h" ++#include "third_party/blink/public/mojom/webid/federated_auth_request.mojom-forward.h" + #include "third_party/skia/include/core/SkColor.h" + #include "ui/gfx/image/image.h" + #include "url/gurl.h" + + namespace content { + +-class IdentityProviderData; ++// A Java counterpart will be generated for this enum. ++// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content.webid ++// GENERATED_JAVA_CLASS_NAME_OVERRIDE: IdentityRequestDialogDisclosureField ++enum class IdentityRequestDialogDisclosureField { ++ kName, ++ kEmail, ++ kPicture, ++ kPhoneNumber, ++ kUsername ++}; ++ ++// The client metadata that will be used to display a FedCM dialog. This data is ++// extracted from the client metadata endpoint from the FedCM API, where ++// 'client' is essentially the relying party which invoked the API. ++struct CONTENT_EXPORT ClientMetadata { ++ ClientMetadata(const GURL& terms_of_service_url, ++ const GURL& privacy_policy_url, ++ const GURL& brand_icon_url, ++ const gfx::Image& brand_decoded_icon); ++ ClientMetadata(const ClientMetadata& other); ++ ~ClientMetadata(); ++ ++ GURL terms_of_service_url; ++ GURL privacy_policy_url; ++ GURL brand_icon_url; ++ // This will be an empty image if the fetching never happened or if it failed. ++ gfx::Image brand_decoded_icon; ++}; ++ ++// The metadata about the identity provider that will be used to display a FedCM ++// dialog. This data is extracted from the config file which is fetched when the ++// FedCM API is invoked. ++struct CONTENT_EXPORT IdentityProviderMetadata { ++ IdentityProviderMetadata(); ++ IdentityProviderMetadata(const IdentityProviderMetadata& other); ++ ~IdentityProviderMetadata(); ++ ++ std::optional brand_text_color; ++ std::optional brand_background_color; ++ GURL brand_icon_url; ++ GURL idp_login_url; ++ std::string requested_label; ++ // For registered IdPs, the type is used to only show the accounts when the ++ // RP is compatible. ++ std::vector types; ++ // The token formats that are supported. ++ std::vector formats; ++ // The URL of the configuration endpoint. This is stored in ++ // IdentityProviderMetadata so that the UI code can pass it along when an ++ // Account is selected by the user. ++ GURL config_url; ++ // Whether this IdP supports signing in to additional accounts. ++ bool supports_add_account{false}; ++ // Whether this IdP has any filtered out account. This is reset to false each ++ // time the accounts dialog is shown and recomputed then. ++ bool has_filtered_out_account{false}; ++ // This will be an empty image if fetching failed. ++ gfx::Image brand_decoded_icon; ++}; ++ ++// This class contains all of the data specific to an identity provider that is ++// going to be used to display a FedCM dialog. This data is gathered from ++// endpoints fetched when the FedCM API is invoked as well as from the ++// parameters provided by the relying party when the API is invoked. ++class CONTENT_EXPORT IdentityProviderData ++ : public base::RefCounted { ++ public: ++ IdentityProviderData(const std::string& idp_for_display, ++ const IdentityProviderMetadata& idp_metadata, ++ const ClientMetadata& client_metadata, ++ blink::mojom::RpContext rp_context, ++ std::optional format, ++ const std::vector& ++ disclosure_fields, ++ bool has_login_status_mismatch); ++ ++ std::string idp_for_display; ++ IdentityProviderMetadata idp_metadata; ++ ClientMetadata client_metadata; ++ blink::mojom::RpContext rp_context; ++ std::optional format; ++ // For which fields should the dialog request permission for (assuming ++ // this is for signup). ++ std::vector disclosure_fields; ++ // Whether there was some login status API mismatch when fetching the IDP's ++ // accounts. ++ bool has_login_status_mismatch; ++ ++ private: ++ friend class base::RefCounted; ++ ++ ~IdentityProviderData(); ++}; + + // Represents a federated user account which is used when displaying the FedCM + // account selector. diff --git a/json_to_struct-fixed_flat_map-conflicting-declaration.patch b/json_to_struct-fixed_flat_map-conflicting-declaration.patch new file mode 100644 index 0000000..89e2f81 --- /dev/null +++ b/json_to_struct-fixed_flat_map-conflicting-declaration.patch @@ -0,0 +1,25 @@ +--- src/tools/json_to_struct/aggregation.py.orig 2025-08-15 17:32:37.009403662 +0200 ++++ src/tools/json_to_struct/aggregation.py 2025-08-16 00:58:01.264590353 +0200 +@@ -134,7 +134,9 @@ def _GenerateCCArray(type_name: str, agg + Returns: + str: The generated C++ array aggregation code. + """ +- res = f'\nconst auto {aggregation.name} =\n' ++ res = '\n const ' ++ res += f'std::array ' ++ res += f'{aggregation.name} =\n' + res += f' std::array' + + res += '({{\n' +@@ -157,7 +159,10 @@ def _GenerateCCMap(type_name: str, aggre + """ + key_type = aggregation.map_key_type + +- res = f'\nconst auto {aggregation.name} =\n' ++ res = f'\nconst ' ++ res += f'base::fixed_flat_map<{aggregation.map_key_type}, ' ++ res += f'const {type_name}*, {len(aggregation.GetSortedMapElements())}> ' ++ res += f'{aggregation.name} =\n' + res += f' base::MakeFixedFlatMap<{key_type}, const {type_name}*>' + + res += '({\n' diff --git a/linux_seccomp-SYS_SECCOMP.patch b/linux_seccomp-SYS_SECCOMP.patch new file mode 100644 index 0000000..66f5ab4 --- /dev/null +++ b/linux_seccomp-SYS_SECCOMP.patch @@ -0,0 +1,36 @@ +If signal.h is included after this header, this results in a confusing error: +In file included from ../../sandbox/linux/bpf_dsl/trap_registry.h:13, + from ../../sandbox/linux/bpf_dsl/bpf_dsl.h:18, + from ../../sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc:17: +../../sandbox/linux/system_headers/linux_seccomp.h:218:39: error: expected identifier before numeric constant + 218 | #define SYS_SECCOMP 1 + | ^ +../../sandbox/linux/system_headers/linux_seccomp.h:218:39: error: expected '}' before numeric constant +In file included from /usr/include/signal.h:58, + from ../../sandbox/linux/services/syscall_wrappers.h:8, + from ../../sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc:22: +/usr/include/bits/siginfo-consts.h:218:1: note: to match this '{' + 218 | { + | ^ +../../sandbox/linux/system_headers/linux_seccomp.h:218:39: error: expected unqualified-id before numeric constant + 218 | #define SYS_SECCOMP 1 + | ^ +In file included from /usr/include/features.h:524, + from /usr/include/sys/types.h:25, + from ../../sandbox/linux/seccomp-bpf-helpers/baseline_policy.h:8, + from ../../sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc:5: +/usr/include/signal.h:393:1: error: expected declaration before '}' token + 393 | __END_DECLS + | ^~~~~~~~~~~ + + +--- src/sandbox/linux/system_headers/linux_seccomp.h.orig 2025-10-29 07:16:45.191080342 +0100 ++++ src/sandbox/linux/system_headers/linux_seccomp.h 2025-10-29 20:08:39.559745669 +0100 +@@ -5,6 +5,7 @@ + #ifndef SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SECCOMP_H_ + #define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SECCOMP_H_ + ++#include + #include + #include + diff --git a/llhttp-lax-vector-conversions.patch b/llhttp-lax-vector-conversions.patch new file mode 100644 index 0000000..15a35a0 --- /dev/null +++ b/llhttp-lax-vector-conversions.patch @@ -0,0 +1,88 @@ +It makes no sense fixing this since llhttp's code is partly generated. + +../../third_party/electron_node/deps/llhttp/src/llhttp.c: In function ‘llhttp__internal__run’: +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2645:9: note: use ‘-flax-vector-conversions’ to permit conversions between vectors with differing element types or numbers of subparts + 2645 | ); + | ^ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2643:11: error: incompatible type for argument 1 of ‘vandq_u16’ + 2643 | vcgeq_u8(input, vdupq_n_u8(' ')), + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | | + | uint8x16_t +In file included from ../../third_party/electron_node/deps/llhttp/src/llhttp.c:14: +/usr/lib64/gcc/aarch64-suse-linux/15/include/arm_neon.h:1088:23: note: expected ‘uint16x8_t’ but argument is of type ‘uint8x16_t’ + 1088 | vandq_u16 (uint16x8_t __a, uint16x8_t __b) + | ~~~~~~~~~~~^~~ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2644:11: error: incompatible type for argument 2 of ‘vandq_u16’ + 2644 | vcleq_u8(input, vdupq_n_u8('~')) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | | + | uint8x16_t +/usr/lib64/gcc/aarch64-suse-linux/15/include/arm_neon.h:1088:39: note: expected ‘uint16x8_t’ but argument is of type ‘uint8x16_t’ + 1088 | vandq_u16 (uint16x8_t __a, uint16x8_t __b) + | ~~~~~~~~~~~^~~ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2646:26: error: incompatible type for argument 1 of ‘vorrq_u16’ + 2646 | mask = vorrq_u16(mask, single); + | ^~~~ + | | + | uint8x16_t +/usr/lib64/gcc/aarch64-suse-linux/15/include/arm_neon.h:1200:23: note: expected ‘uint16x8_t’ but argument is of type ‘uint8x16_t’ + 1200 | vorrq_u16 (uint16x8_t __a, uint16x8_t __b) + | ~~~~~~~~~~~^~~ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2646:32: error: incompatible type for argument 2 of ‘vorrq_u16’ + 2646 | mask = vorrq_u16(mask, single); + | ^~~~~~ + | | + | uint8x16_t +/usr/lib64/gcc/aarch64-suse-linux/15/include/arm_neon.h:1200:39: note: expected ‘uint16x8_t’ but argument is of type ‘uint8x16_t’ + 1200 | vorrq_u16 (uint16x8_t __a, uint16x8_t __b) + | ~~~~~~~~~~~^~~ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2648:11: error: incompatible type for argument 1 of ‘vandq_u16’ + 2648 | vcgeq_u8(input, vdupq_n_u8(0x80)), + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | | + | uint8x16_t +/usr/lib64/gcc/aarch64-suse-linux/15/include/arm_neon.h:1088:23: note: expected ‘uint16x8_t’ but argument is of type ‘uint8x16_t’ + 1088 | vandq_u16 (uint16x8_t __a, uint16x8_t __b) + | ~~~~~~~~~~~^~~ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2649:11: error: incompatible type for argument 2 of ‘vandq_u16’ + 2649 | vcleq_u8(input, vdupq_n_u8(0xff)) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | | + | uint8x16_t +/usr/lib64/gcc/aarch64-suse-linux/15/include/arm_neon.h:1088:39: note: expected ‘uint16x8_t’ but argument is of type ‘uint8x16_t’ + 1088 | vandq_u16 (uint16x8_t __a, uint16x8_t __b) + | ~~~~~~~~~~~^~~ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2651:26: error: incompatible type for argument 1 of ‘vorrq_u16’ + 2651 | mask = vorrq_u16(mask, single); + | ^~~~ + | | + | uint8x16_t +/usr/lib64/gcc/aarch64-suse-linux/15/include/arm_neon.h:1200:23: note: expected ‘uint16x8_t’ but argument is of type ‘uint8x16_t’ + 1200 | vorrq_u16 (uint16x8_t __a, uint16x8_t __b) + | ~~~~~~~~~~~^~~ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2651:32: error: incompatible type for argument 2 of ‘vorrq_u16’ + 2651 | mask = vorrq_u16(mask, single); + | ^~~~~~ + | | + | uint8x16_t +/usr/lib64/gcc/aarch64-suse-linux/15/include/arm_neon.h:1200:39: note: expected ‘uint16x8_t’ but argument is of type ‘uint8x16_t’ + 1200 | vorrq_u16 (uint16x8_t __a, uint16x8_t __b) + | ~~~~~~~~~~~^~~ +../../third_party/electron_node/deps/llhttp/src/llhttp.c:2652:30: error: incompatible type for argument 1 of ‘vshrn_n_u16’ + 2652 | narrow = vshrn_n_u16(mask, 4); + | ^~~~ + | | + | uint8x16_t + + +--- src/third_party/electron_node/deps/llhttp/unofficial.gni.orig 2025-08-15 17:33:00.577399458 +0200 ++++ src/third_party/electron_node/deps/llhttp/unofficial.gni 2025-08-18 17:28:08.494515274 +0200 +@@ -19,6 +19,7 @@ template("llhttp_gn_build") { + public_configs = [ ":llhttp_config" ] + include_dirs = [ "include" ] + sources = gypi_values.llhttp_sources ++ cflags = ["-flax-vector-conversions"] + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", diff --git a/lock_impl_posix-pthread_mutexattr_setprotocol-conflicting.patch b/lock_impl_posix-pthread_mutexattr_setprotocol-conflicting.patch new file mode 100644 index 0000000..9bcbad3 --- /dev/null +++ b/lock_impl_posix-pthread_mutexattr_setprotocol-conflicting.patch @@ -0,0 +1,19 @@ +--- src/base/synchronization/lock_impl_posix.cc.orig 2025-08-15 17:32:21.581406552 +0200 ++++ src/base/synchronization/lock_impl_posix.cc 2025-08-15 21:57:54.242385089 +0200 +@@ -20,6 +20,8 @@ + #include "base/system/sys_info.h" + #include "build/build_config.h" + ++ ++#if BUILDFLAG(IS_ANDROID) + // On Android, `pthread_mutexattr_setprotocol()` is only defined in bionic + // starting with API level 28. Make it a weak import, so that we can compile. + extern "C" { +@@ -27,6 +29,7 @@ int __attribute__((weak)) pthread_mutexa + pthread_mutexattr_t* _Nonnull __attr, + int __protocol); + } ++#endif + + namespace base { + diff --git a/masked_domain_list-flatbuffers.patch b/masked_domain_list-flatbuffers.patch new file mode 100644 index 0000000..9d7dc5a --- /dev/null +++ b/masked_domain_list-flatbuffers.patch @@ -0,0 +1,25 @@ +This code fails to build but is gated by a disabled feature flag, disabling it unconditionally + + +--- src/components/ip_protection/common/masked_domain_list_manager.cc.orig 2025-08-22 20:17:46.149834100 +0200 ++++ src/components/ip_protection/common/masked_domain_list_manager.cc 2025-08-23 01:07:33.078746196 +0200 +@@ -41,8 +41,7 @@ using ::masked_domain_list::ResourceOwne + using ::network::mojom::IpProtectionProxyBypassPolicy; + + bool UseFlatbuffer() { +- return base::FeatureList::IsEnabled( +- network::features::kMaskedDomainListFlatbufferImpl); ++ return false; + } + + bool RestrictTopLevelSiteSchemes( +--- src/components/ip_protection/common/BUILD.gn.orig 2025-08-22 20:17:46.149834100 +0200 ++++ src/components/ip_protection/common/BUILD.gn 2025-08-23 01:06:48.134754665 +0200 +@@ -479,7 +479,6 @@ source_set("masked_domain_list_manager") + "masked_domain_list_manager.h", + ] + public_deps = [ +- ":masked_domain_list", + ":url_matcher_with_bypass", + "//base", + "//components/privacy_sandbox/masked_domain_list:masked_domain_list_proto", diff --git a/material_color_utilities-tones-missing-round.patch b/material_color_utilities-tones-missing-round.patch deleted file mode 100644 index 9c08f27..0000000 --- a/material_color_utilities-tones-missing-round.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/third_party/material_color_utilities/src/cpp/palettes/tones.cc.old 2023-10-11 11:30:46.080385500 +0200 -+++ src/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2023-10-11 21:04:10.234128500 +0200 -@@ -16,6 +16,7 @@ - - #include "cpp/palettes/tones.h" - -+#include - #include "cpp/cam/cam.h" - #include "cpp/cam/hct.h" - diff --git a/nested-nested-nested-nested-nested-nested-regex-patterns.patch b/nested-nested-nested-nested-nested-nested-regex-patterns.patch deleted file mode 100644 index 162ab9a..0000000 --- a/nested-nested-nested-nested-nested-nested-regex-patterns.patch +++ /dev/null @@ -1,44 +0,0 @@ -description: fix build error when building with clang & GNU libstdc++ -author: Stephan Hartmann - -Apparently this doesn't happen with the embedded clang, but we get this: - -In file included from ../../components/autofill/core/browser/form_parsing/regex_patterns.cc:5: -In file included from ../../components/autofill/core/browser/form_parsing/regex_patterns.h:8: -In file included from ../../base/containers/span.h:10: -In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/algorithm:74: -In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/pstl/glue_algorithm_defs.h:13: -In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/functional:54: -In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:39: -/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/array:268:52: fatal error: instantiating fold expression with 303 arguments exceeded expression nesting limit of 256 - -> array && ...), _Tp>, - ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ -gen/components/autofill/core/browser/form_parsing/regex_patterns_inl.h:77:22: note: while substituting deduced template arguments into function template '' [with _Tp = autofill::MatchingPattern, _Up = +Date: Tue, 14 May 2024 23:10:31 +0530 +Subject: [PATCH] dns: add TLSA record query and parsing + +PR-URL: https://github.com/nodejs/node/pull/52983 +Refs: https://github.com/nodejs/node/issues/39569 +Reviewed-By: Paolo Insogna +Reviewed-By: James M Snell +Reviewed-By: Rich Trott +Reviewed-By: Ethan Arrowood +--- + doc/api/dns.md | 71 ++++++++++++++++++ + lib/internal/dns/utils.js | 2 + + src/cares_wrap.cc | 96 +++++++++++++++++++++++++ + src/cares_wrap.h | 8 +++ + src/env_properties.h | 4 ++ + test/common/internet.js | 2 + + test/internet/test-dns-cares-domains.js | 1 + + test/internet/test-dns.js | 41 +++++++++++ + test/internet/test-trace-events-dns.js | 1 + + 9 files changed, 226 insertions(+) + +diff --git a/lib/internal/dns/utils.js b/lib/internal/dns/utils.js +index 7d9e22d1c2458f..bcca83fd4fe54d 100644 +--- a/third_party/electron_node/lib/internal/dns/utils.js ++++ b/third_party/electron_node/lib/internal/dns/utils.js +@@ -235,6 +235,7 @@ const resolverKeys = [ + 'resolvePtr', + 'resolveSoa', + 'resolveSrv', ++ 'resolveTlsa', + 'resolveTxt', + 'reverse', + ]; +@@ -300,6 +301,7 @@ function createResolverClass(resolver) { + Resolver.prototype.resolveCname = resolveMap.CNAME = resolver('queryCname'); + Resolver.prototype.resolveMx = resolveMap.MX = resolver('queryMx'); + Resolver.prototype.resolveNs = resolveMap.NS = resolver('queryNs'); ++ Resolver.prototype.resolveTlsa = resolveMap.TLSA = resolver('queryTlsa'); + Resolver.prototype.resolveTxt = resolveMap.TXT = resolver('queryTxt'); + Resolver.prototype.resolveSrv = resolveMap.SRV = resolver('querySrv'); + Resolver.prototype.resolvePtr = resolveMap.PTR = resolver('queryPtr'); +--- src/third_party/electron_node/src/cares_wrap.cc 2025-07-03 13:55:28.684461768 +0200 ++++ src/third_party/electron_node/src/cares_wrap.cc.orig 2025-07-03 07:25:07.137463925 +0200 +@@ -40,6 +40,10 @@ + #include + #include + ++#ifndef T_TLSA ++#define T_TLSA 52 /* TLSA certificate association */ ++#endif ++ + #ifndef T_CAA + # define T_CAA 257 /* Certification Authority Authorization */ + #endif +@@ -57,6 +61,7 @@ namespace node { + namespace cares_wrap { + + using v8::Array; ++using v8::ArrayBuffer; + using v8::Context; + using v8::EscapableHandleScope; + using v8::Exception; +@@ -383,6 +388,69 @@ Maybe ParseCaaReply(Environment* en + return Just(ARES_SUCCESS); + } + ++Maybe ParseTlsaReply(Environment* env, ++ unsigned char* buf, ++ int len, ++ Local ret) { ++ EscapableHandleScope handle_scope(env->isolate()); ++ ++ ares_dns_record_t* dnsrec = nullptr; ++ ++ int status = ares_dns_parse(buf, len, 0, &dnsrec); ++ if (status != ARES_SUCCESS) { ++ ares_dns_record_destroy(dnsrec); ++ return Just(status); ++ } ++ ++ uint32_t offset = ret->Length(); ++ size_t rr_count = ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); ++ ++ for (size_t i = 0; i < rr_count; i++) { ++ const ares_dns_rr_t* rr = ++ ares_dns_record_rr_get(dnsrec, ARES_SECTION_ANSWER, i); ++ ++ if (ares_dns_rr_get_type(rr) != ARES_REC_TYPE_TLSA) continue; ++ ++ unsigned char certusage = ares_dns_rr_get_u8(rr, ARES_RR_TLSA_CERT_USAGE); ++ unsigned char selector = ares_dns_rr_get_u8(rr, ARES_RR_TLSA_SELECTOR); ++ unsigned char match = ares_dns_rr_get_u8(rr, ARES_RR_TLSA_MATCH); ++ size_t data_len; ++ const unsigned char* data = ++ ares_dns_rr_get_bin(rr, ARES_RR_TLSA_DATA, &data_len); ++ if (!data || data_len == 0) continue; ++ ++ Local data_ab = ArrayBuffer::New(env->isolate(), data_len); ++ memcpy(data_ab->Data(), data, data_len); ++ ++ Local tlsa_rec = Object::New(env->isolate()); ++ ++ if (tlsa_rec ++ ->Set(env->context(), ++ env->cert_usage_string(), ++ Integer::NewFromUnsigned(env->isolate(), certusage)) ++ .IsNothing() || ++ tlsa_rec ++ ->Set(env->context(), ++ env->selector_string(), ++ Integer::NewFromUnsigned(env->isolate(), selector)) ++ .IsNothing() || ++ tlsa_rec ++ ->Set(env->context(), ++ env->match_string(), ++ Integer::NewFromUnsigned(env->isolate(), match)) ++ .IsNothing() || ++ tlsa_rec->Set(env->context(), env->data_string(), data_ab) ++ .IsNothing() || ++ ret->Set(env->context(), offset + i, tlsa_rec).IsNothing()) { ++ ares_dns_record_destroy(dnsrec); ++ return Nothing(); ++ } ++ } ++ ++ ares_dns_record_destroy(dnsrec); ++ return Just(ARES_SUCCESS); ++} ++ + Maybe ParseTxtReply(Environment* env, + const unsigned char* buf, + int len, +@@ -945,6 +1013,11 @@ int NsTraits::Send(QueryWrap* + return ARES_SUCCESS; + } + ++int TlsaTraits::Send(QueryWrap* wrap, const char* name) { ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_TLSA); ++ return ARES_SUCCESS; ++} ++ + int TxtTraits::Send(QueryWrap* wrap, const char* name) { + wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_TXT); + return ARES_SUCCESS; +@@ -1156,6 +1229,14 @@ Maybe AnyTraits::Parse(QueryAnyWrap + } + } + ++ /* Parse TLSA records */ ++ if (!ParseTlsaReply(env, buf, len, ret).To(&status)) { ++ return Nothing(); ++ } ++ if (status != ARES_SUCCESS && status != ARES_ENODATA) { ++ return Just(status); ++ } ++ + /* Parse CAA records */ + if (!ParseCaaReply(env, buf, len, ret, true).To(&status)) { + return Nothing(); +@@ -1339,6 +1420,32 @@ Maybe NsTraits::Parse(QueryNsWrap* + return Just(ARES_SUCCESS); + } + ++Maybe TlsaTraits::Parse(QueryTlsaWrap* wrap, ++ const std::unique_ptr& response) { ++ if (response->is_host) [[unlikely]] { ++ return Just(ARES_EBADRESP); ++ } ++ ++ unsigned char* buf = response->buf.data; ++ int len = response->buf.size; ++ ++ Environment* env = wrap->env(); ++ HandleScope handle_scope(env->isolate()); ++ Context::Scope context_scope(env->context()); ++ ++ Local tlsa_records = Array::New(env->isolate()); ++ int status; ++ if (!ParseTlsaReply(env, buf, len, tlsa_records).To(&status)) { ++ return Nothing(); ++ } ++ if (status != ARES_SUCCESS) { ++ return Just(status); ++ } ++ ++ wrap->CallOnComplete(tlsa_records); ++ return Just(ARES_SUCCESS); ++} ++ + Maybe TxtTraits::Parse(QueryTxtWrap* wrap, + const std::unique_ptr& response) { + if (response->is_host) [[unlikely]] { +--- src/third_party/electron_node/src/cares_wrap.h 2025-07-03 13:50:26.156515766 +0200 ++++ src/third_party/electron_node/src/cares_wrap.h.orig 2025-07-03 07:25:07.009463947 +0200 +@@ -419,6 +419,7 @@ class QueryWrap final : public AsyncWrap + V(Ptr, resolvePtr, queryPtr) \ + V(Srv, resolveSrv, querySrv) \ + V(Soa, resolveSoa, querySoa) \ ++ V(Tlsa, resolveTlsa, queryTlsa) \ + V(Txt, resolveTxt, queryTxt) + + // All query type handlers share the same basic structure, so we can simplify +diff --git a/src/env_properties.h b/src/env_properties.h +index 9d22dc69754178..bc97dfc66c96f9 100644 +--- a/third_party/electron_node/src/env_properties.h ++++ b/third_party/electron_node/src/env_properties.h +@@ -91,6 +91,7 @@ + V(cached_data_rejected_string, "cachedDataRejected") \ + V(cached_data_string, "cachedData") \ + V(cache_key_string, "cacheKey") \ ++ V(cert_usage_string, "certUsage") \ + V(change_string, "change") \ + V(changes_string, "changes") \ + V(channel_string, "channel") \ +@@ -135,6 +136,7 @@ + V(dns_ptr_string, "PTR") \ + V(dns_soa_string, "SOA") \ + V(dns_srv_string, "SRV") \ ++ V(dns_tlsa_string, "TLSA") \ + V(dns_txt_string, "TXT") \ + V(done_string, "done") \ + V(duration_string, "duration") \ +@@ -237,6 +239,7 @@ + V(line_number_string, "lineNumber") \ + V(loop_count, "loopCount") \ + V(mac_string, "mac") \ ++ V(match_string, "match") \ + V(max_buffer_string, "maxBuffer") \ + V(max_concurrent_streams_string, "maxConcurrentStreams") \ + V(message_port_constructor_string, "MessagePort") \ +@@ -336,6 +339,7 @@ + V(scopeid_string, "scopeid") \ + V(script_id_string, "scriptId") \ + V(script_name_string, "scriptName") \ ++ V(selector_string, "selector") \ + V(serial_number_string, "serialNumber") \ + V(serial_string, "serial") \ + V(servername_string, "servername") \ diff --git a/node-cares-1.21-3.patch b/node-cares-1.21-3.patch new file mode 100644 index 0000000..21465a7 --- /dev/null +++ b/node-cares-1.21-3.patch @@ -0,0 +1,31 @@ +From b85505d450e3a401cf0d13c096abfc75a7932105 Mon Sep 17 00:00:00 2001 +From: Ethan Arrowood +Date: Mon, 7 Apr 2025 05:43:14 -0600 +Subject: [PATCH] dns: restore dns query cache ttl + +Fixes: https://github.com/nodejs/node/issues/57636 + +Co-authored-by: Robert Nagy +PR-URL: https://github.com/nodejs/node/pull/57640 +Reviewed-By: Matteo Collina +Reviewed-By: Robert Nagy +Reviewed-By: Tim Perry +Reviewed-By: Luigi Pinca +Reviewed-By: Ruben Bridgewater +Reviewed-By: James M Snell +--- + src/cares_wrap.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc +index e58f164ca5124a..fc8f361614ba5f 100644 +--- a/third_party/electron_node/src/cares_wrap.cc ++++ b/third_party/electron_node/src/cares_wrap.cc +@@ -778,6 +778,7 @@ void ChannelWrap::Setup() { + options.sock_state_cb_data = this; + options.timeout = timeout_; + options.tries = tries_; ++ options.qcache_max_ttl = 0; + + int r; + if (!library_inited_) { diff --git a/node-cares-1.21-4.patch b/node-cares-1.21-4.patch new file mode 100644 index 0000000..4825724 --- /dev/null +++ b/node-cares-1.21-4.patch @@ -0,0 +1,35 @@ +From 2be863be08ff9f16eae6bb907388c354c55c3bfc Mon Sep 17 00:00:00 2001 +From: Ethan Arrowood +Date: Mon, 2 Jun 2025 09:29:36 -0600 +Subject: [PATCH] dns: fix dns query cache implementation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +PR-URL: https://github.com/nodejs/node/pull/58404 +Refs: https://github.com/nodejs/node/pull/57640 +Reviewed-By: Juan José Arboleda +Reviewed-By: Matteo Collina +Reviewed-By: Tim Perry +--- + src/cares_wrap.cc | 6 +++--- + test/parallel/test-dns.js | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc +index 6290bcd37f3411..5016c3d51dac66 100644 +--- a/third_party/electron_node/src/cares_wrap.cc ++++ b/third_party/electron_node/src/cares_wrap.cc +@@ -879,9 +879,9 @@ void ChannelWrap::Setup() { + } + + /* We do the call to ares_init_option for caller. */ +- const int optmask = +- ARES_OPT_FLAGS | ARES_OPT_TIMEOUTMS | +- ARES_OPT_SOCK_STATE_CB | ARES_OPT_TRIES; ++ const int optmask = ARES_OPT_FLAGS | ARES_OPT_TIMEOUTMS | ++ ARES_OPT_SOCK_STATE_CB | ARES_OPT_TRIES | ++ ARES_OPT_QUERY_CACHE; + r = ares_init_options(&channel_, &options, optmask); + + if (r != ARES_SUCCESS) { diff --git a/node-cares-1.21-5.patch b/node-cares-1.21-5.patch new file mode 100644 index 0000000..490944d --- /dev/null +++ b/node-cares-1.21-5.patch @@ -0,0 +1,167 @@ +From c44fa8d0b65d3550157c2fd4b0636fb269764f3e Mon Sep 17 00:00:00 2001 +From: theanarkh +Date: Thu, 10 Jul 2025 23:50:43 +0800 +Subject: [PATCH] dns: support max timeout + +PR-URL: https://github.com/nodejs/node/pull/58440 +Reviewed-By: Luigi Pinca +Reviewed-By: Matteo Collina +--- + doc/api/dns.md | 2 + + lib/internal/dns/utils.js | 20 +++-- + src/cares_wrap.cc | 30 +++++--- + src/cares_wrap.h | 11 +-- + .../parallel/test-dns-resolver-max-timeout.js | 77 +++++++++++++++++++ + 5 files changed, 118 insertions(+), 22 deletions(-) + create mode 100644 test/parallel/test-dns-resolver-max-timeout.js + +diff --git a/lib/internal/dns/utils.js b/lib/internal/dns/utils.js +index 55f0b5268abf9d..d036c4c7255eab 100644 +--- a/third_party/electron_node/lib/internal/dns/utils.js ++++ b/third_party/electron_node/lib/internal/dns/utils.js +@@ -25,6 +25,7 @@ const { + validateInt32, + validateOneOf, + validateString, ++ validateUint32, + } = require('internal/validators'); + let binding; + function lazyBinding() { +@@ -49,6 +50,12 @@ function validateTimeout(options) { + return timeout; + } + ++function validateMaxTimeout(options) { ++ const { maxTimeout = 0 } = { ...options }; ++ validateUint32(maxTimeout, 'options.maxTimeout'); ++ return maxTimeout; ++} ++ + function validateTries(options) { + const { tries = 4 } = { ...options }; + validateInt32(tries, 'options.tries', 1); +@@ -67,17 +74,18 @@ class ResolverBase { + constructor(options = undefined) { + const timeout = validateTimeout(options); + const tries = validateTries(options); ++ const maxTimeout = validateMaxTimeout(options); + // If we are building snapshot, save the states of the resolver along + // the way. + if (isBuildingSnapshot()) { +- this[kSnapshotStates] = { timeout, tries }; ++ this[kSnapshotStates] = { timeout, tries, maxTimeout }; + } +- this[kInitializeHandle](timeout, tries); ++ this[kInitializeHandle](timeout, tries, maxTimeout); + } + +- [kInitializeHandle](timeout, tries) { ++ [kInitializeHandle](timeout, tries, maxTimeout) { + const { ChannelWrap } = lazyBinding(); +- this._handle = new ChannelWrap(timeout, tries); ++ this._handle = new ChannelWrap(timeout, tries, maxTimeout); + } + + cancel() { +@@ -187,8 +195,8 @@ class ResolverBase { + } + + [kDeserializeResolver]() { +- const { timeout, tries, localAddress, servers } = this[kSnapshotStates]; +- this[kInitializeHandle](timeout, tries); ++ const { timeout, tries, maxTimeout, localAddress, servers } = this[kSnapshotStates]; ++ this[kInitializeHandle](timeout, tries, maxTimeout); + if (localAddress) { + const { ipv4, ipv6 } = localAddress; + this._handle.setLocalAddress(ipv4, ipv6); +diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc +index 7773314fa53bc1..e9516b03ec8960 100644 +--- a/third_party/electron_node/src/cares_wrap.cc ++++ b/third_party/electron_node/src/cares_wrap.cc +@@ -787,14 +787,15 @@ Maybe ParseSoaReply(Environment* env, + } + } // anonymous namespace + +-ChannelWrap::ChannelWrap( +- Environment* env, +- Local object, +- int timeout, +- int tries) ++ChannelWrap::ChannelWrap(Environment* env, ++ Local object, ++ int timeout, ++ int tries, ++ int max_timeout) + : AsyncWrap(env, object, PROVIDER_DNSCHANNEL), + timeout_(timeout), +- tries_(tries) { ++ tries_(tries), ++ max_timeout_(max_timeout) { + MakeWeak(); + + Setup(); +@@ -808,13 +809,15 @@ void ChannelWrap::MemoryInfo(MemoryTracker* tracker) const { + + void ChannelWrap::New(const FunctionCallbackInfo& args) { + CHECK(args.IsConstructCall()); +- CHECK_EQ(args.Length(), 2); ++ CHECK_EQ(args.Length(), 3); + CHECK(args[0]->IsInt32()); + CHECK(args[1]->IsInt32()); ++ CHECK(args[2]->IsInt32()); + const int timeout = args[0].As()->Value(); + const int tries = args[1].As()->Value(); ++ const int max_timeout = args[2].As()->Value(); + Environment* env = Environment::GetCurrent(args); +- new ChannelWrap(env, args.This(), timeout, tries); ++ new ChannelWrap(env, args.This(), timeout, tries, max_timeout); + } + + GetAddrInfoReqWrap::GetAddrInfoReqWrap(Environment* env, +@@ -879,9 +882,14 @@ void ChannelWrap::Setup() { + } + + /* We do the call to ares_init_option for caller. */ +- const int optmask = ARES_OPT_FLAGS | ARES_OPT_TIMEOUTMS | +- ARES_OPT_SOCK_STATE_CB | ARES_OPT_TRIES | +- ARES_OPT_QUERY_CACHE; ++ int optmask = ARES_OPT_FLAGS | ARES_OPT_TIMEOUTMS | ARES_OPT_SOCK_STATE_CB | ++ ARES_OPT_TRIES | ARES_OPT_QUERY_CACHE; ++ ++ if (max_timeout_ > 0) { ++ options.maxtimeout = max_timeout_; ++ optmask |= ARES_OPT_MAXTIMEOUTMS; ++ } ++ + r = ares_init_options(&channel_, &options, optmask); + + if (r != ARES_SUCCESS) { +diff --git a/src/cares_wrap.h b/src/cares_wrap.h +index 876ec745d4fcc5..fd66a67164b3d3 100644 +--- a/third_party/electron_node/src/cares_wrap.h ++++ b/third_party/electron_node/src/cares_wrap.h +@@ -152,11 +152,11 @@ struct NodeAresTask final : public MemoryRetainer { + + class ChannelWrap final : public AsyncWrap { + public: +- ChannelWrap( +- Environment* env, +- v8::Local object, +- int timeout, +- int tries); ++ ChannelWrap(Environment* env, ++ v8::Local object, ++ int timeout, ++ int tries, ++ int max_timeout); + ~ChannelWrap() override; + + static void New(const v8::FunctionCallbackInfo& args); +@@ -191,6 +191,7 @@ class ChannelWrap final : public AsyncWrap { + bool library_inited_ = false; + int timeout_; + int tries_; ++ int max_timeout_; + int active_query_count_ = 0; + NodeAresTask::List task_list_; + }; diff --git a/node-cares-1.21.patch b/node-cares-1.21.patch new file mode 100644 index 0000000..8d3096b --- /dev/null +++ b/node-cares-1.21.patch @@ -0,0 +1,155 @@ +From 8807549ed9f6eaf6842ae56b8ac55ab385951636 Mon Sep 17 00:00:00 2001 +From: Aviv Keller +Date: Wed, 30 Oct 2024 10:10:28 -0400 +Subject: [PATCH] dns: stop using deprecated `ares_query` + +PR-URL: https://github.com/nodejs/node/pull/55430 +Refs: https://github.com/nodejs/node/issues/52464 +Reviewed-By: Luigi Pinca +Reviewed-By: Matteo Collina +--- + src/cares_wrap.cc | 24 ++++++++++++------------ + src/cares_wrap.h | 35 +++++++++++++++++++---------------- + 2 files changed, 31 insertions(+), 28 deletions(-) + +diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc +index ac79eeaaf7b150..84d2ab2b065e5d 100644 +--- a/third_party/electron_node/src/cares_wrap.cc ++++ b/third_party/electron_node/src/cares_wrap.cc +@@ -830,62 +830,62 @@ void ChannelWrap::EnsureServers() { + } + + int AnyTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_any); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_ANY); + return ARES_SUCCESS; + } + + int ATraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_a); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_A); + return ARES_SUCCESS; + } + + int AaaaTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_aaaa); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_AAAA); + return ARES_SUCCESS; + } + + int CaaTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, T_CAA); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_CAA); + return ARES_SUCCESS; + } + + int CnameTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_cname); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_CNAME); + return ARES_SUCCESS; + } + + int MxTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_mx); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_MX); + return ARES_SUCCESS; + } + + int NsTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_ns); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_NS); + return ARES_SUCCESS; + } + + int TxtTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_txt); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_TXT); + return ARES_SUCCESS; + } + + int SrvTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_srv); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_SRV); + return ARES_SUCCESS; + } + + int PtrTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_ptr); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_PTR); + return ARES_SUCCESS; + } + + int NaptrTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_naptr); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_NAPTR); + return ARES_SUCCESS; + } + + int SoaTraits::Send(QueryWrap* wrap, const char* name) { +- wrap->AresQuery(name, ns_c_in, ns_t_soa); ++ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_SOA); + return ARES_SUCCESS; + } + +diff --git a/src/cares_wrap.h b/src/cares_wrap.h +index 021ef1c9de518e..4a5d22c0ef085f 100644 +--- a/third_party/electron_node/src/cares_wrap.h ++++ b/third_party/electron_node/src/cares_wrap.h +@@ -246,18 +246,20 @@ class QueryWrap final : public AsyncWrap { + return Traits::Send(this, name); + } + +- void AresQuery(const char* name, int dnsclass, int type) { ++ void AresQuery(const char* name, ++ ares_dns_class_t dnsclass, ++ ares_dns_rec_type_t type) { + channel_->EnsureServers(); + TRACE_EVENT_NESTABLE_ASYNC_BEGIN1( + TRACING_CATEGORY_NODE2(dns, native), trace_name_, this, + "name", TRACE_STR_COPY(name)); +- ares_query( +- channel_->cares_channel(), +- name, +- dnsclass, +- type, +- Callback, +- MakeCallbackPointer()); ++ ares_query_dnsrec(channel_->cares_channel(), ++ name, ++ dnsclass, ++ type, ++ Callback, ++ MakeCallbackPointer(), ++ nullptr); + } + + void ParseError(int status) { +@@ -304,19 +306,20 @@ class QueryWrap final : public AsyncWrap { + return wrap; + } + +- static void Callback( +- void* arg, +- int status, +- int timeouts, +- unsigned char* answer_buf, +- int answer_len) { ++ static void Callback(void* arg, ++ ares_status_t status, ++ size_t timeouts, ++ const ares_dns_record_t* dnsrec) { + QueryWrap* wrap = FromCallbackPointer(arg); + if (wrap == nullptr) return; + + unsigned char* buf_copy = nullptr; ++ size_t answer_len = 0; + if (status == ARES_SUCCESS) { +- buf_copy = node::Malloc(answer_len); +- memcpy(buf_copy, answer_buf, answer_len); ++ // No need to explicitly call ares_free_string here, ++ // as it is a wrapper around free, which is already ++ // invoked when MallocedBuffer is destructed. ++ ares_dns_write(dnsrec, &buf_copy, &answer_len); + } + + wrap->response_data_ = std::make_unique(); diff --git a/node-compiler.patch b/node-compiler.patch deleted file mode 100644 index 3609207..0000000 --- a/node-compiler.patch +++ /dev/null @@ -1,162 +0,0 @@ -Disable various compiler configs (currently warning suppression). Like chromium-102-compiler.patch but for node - ---- src/third_party/electron_node/BUILD.gn.old -+++ src/third_party/electron_node/BUILD.gn -@@ -124,7 +124,6 @@ config("node_lib_config") { - - # FIXME(deepak1556): include paths should be corrected, - # refer https://docs.google.com/presentation/d/1oxNHaVjA9Gn_rTzX6HIpJHP7nXRua_0URXxxJ3oYRq0/edit#slide=id.g71ecd450e_2_702 -- cflags = [ "-Wno-microsoft-include" ] - - configs = [ ":node_features" ] - -@@ -250,18 +249,6 @@ component("node_lib") { - deps += [ "deps/histogram" ] - } - frameworks = [] -- cflags_cc = [ -- "-Wno-deprecated-declarations", -- "-Wno-implicit-fallthrough", -- "-Wno-return-type", -- "-Wno-sometimes-uninitialized", -- "-Wno-string-plus-int", -- "-Wno-unused-function", -- "-Wno-unused-label", -- "-Wno-unused-private-field", -- "-Wno-unused-variable", -- "-Wno-shadow", -- ] - - if (v8_enable_i18n_support) { - deps += [ "//third_party/icu" ] -@@ -353,6 +340,5 @@ component("node_lib") { - "src/node_crypto.cc", - "src/node_crypto.h", - ] -- cflags_cc += [ "-Wno-sign-compare" ] - } - } ---- src/third_party/electron_node/deps/base64/BUILD.gn.orig 2024-03-27 16:38:36.306226966 +0100 -+++ src/third_party/electron_node/deps/base64/BUILD.gn 2024-03-27 20:24:12.219928228 +0100 -@@ -21,11 +21,6 @@ static_library("base64") { - - public_configs = [ ":base64_config" ] - -- cflags_c = [ -- "-Wno-implicit-fallthrough", -- "-Wno-unused-but-set-variable", -- "-Wno-shadow", -- ] - - sources = [ - "base64/include/libbase64.h", -@@ -44,7 +39,6 @@ source_set("base64_ssse3") { - defines = [ "HAVE_SSSE3=1" ] - - cflags = [ "-mssse3" ] -- cflags_c = [ "-Wno-implicit-fallthrough" ] - } - - sources = [ "base64/lib/arch/ssse3/codec.c" ] -@@ -57,7 +51,6 @@ source_set("base64_sse41") { - defines = [ "HAVE_SSE41=1" ] - - cflags = [ "-msse4.1" ] -- cflags_c = [ "-Wno-implicit-fallthrough" ] - } - - sources = [ "base64/lib/arch/sse41/codec.c" ] -@@ -74,7 +67,6 @@ source_set("base64_sse42") { - ] - - cflags = [ "-msse4.2" ] -- cflags_c = [ "-Wno-implicit-fallthrough" ] - } - - sources = [ "base64/lib/arch/sse42/codec.c" ] -@@ -87,7 +79,6 @@ source_set("base64_avx") { - defines = [ "HAVE_AVX=1" ] - - cflags = [ "-mavx" ] -- cflags_c = [ "-Wno-implicit-fallthrough" ] - } - - sources = [ "base64/lib/arch/avx/codec.c" ] -@@ -100,10 +91,6 @@ source_set("base64_avx2") { - defines = [ "HAVE_AVX2=1" ] - - cflags = [ "-mavx2" ] -- cflags_c = [ -- "-Wno-implicit-fallthrough", -- "-Wno-implicit-function-declaration", -- ] - } - - sources = [ "base64/lib/arch/avx2/codec.c" ] -@@ -116,7 +103,6 @@ source_set("base64_neon32") { - defines = [ "HAVE_NEON32=1" ] - - cflags = [ "-mfpu=neon" ] -- cflags_c = [ "-Wno-implicit-fallthrough" ] - } - - sources = [ "base64/lib/arch/neon32/codec.c" ] -@@ -128,7 +114,6 @@ source_set("base64_neon64") { - if (target_cpu == "arm64") { - defines = [ "HAVE_NEON64=1" ] - -- cflags_c = [ "-Wno-implicit-fallthrough" ] - } - - sources = [ "base64/lib/arch/neon64/codec.c" ] ---- src/third_party/electron_node/deps/histogram/BUILD.gn.old -+++ src/third_party/electron_node/deps/histogram/BUILD.gn -@@ -1,12 +1,6 @@ - config("histogram_config") { - include_dirs = [ "include" ] - -- cflags = [ -- "-Wno-implicit-function-declaration", -- "-Wno-incompatible-pointer-types", -- "-Wno-unused-function", -- "-Wno-atomic-alignment", -- ] - } - - static_library("histogram") { ---- src/third_party/electron_node/deps/llhttp/BUILD.gn.old -+++ src/third_party/electron_node/deps/llhttp/BUILD.gn -@@ -1,6 +1,5 @@ - config("llhttp_config") { - include_dirs = [ "include" ] -- cflags = [ "-Wno-unreachable-code" ] - } - - static_library("llhttp") { ---- src/third_party/electron_node/deps/uv/BUILD.gn.old -+++ src/third_party/electron_node/deps/uv/BUILD.gn -@@ -32,24 +32,6 @@ static_library("uv") { - # This only has an effect on Windows, where it will cause libuv's symbols to be exported in node.lib - defines += [ "BUILDING_UV_SHARED=1" ] - -- cflags_c = [ -- "-Wno-incompatible-pointer-types", -- "-Wno-bitwise-op-parentheses", -- "-Wno-implicit-fallthrough", -- "-Wno-implicit-function-declaration", -- "-Wno-missing-braces", -- "-Wno-sign-compare", -- "-Wno-sometimes-uninitialized", -- "-Wno-string-conversion", -- "-Wno-switch", -- "-Wno-unused-function", -- "-Wno-unused-result", -- "-Wno-unused-variable", -- "-Wno-unreachable-code", -- "-Wno-unreachable-code-return", -- "-Wno-unused-but-set-variable", -- "-Wno-shadow", -- ] - - libs = [] - diff --git a/node-kParentNodeTag-constexpr-initializer.patch b/node-kParentNodeTag-constexpr-initializer.patch new file mode 100644 index 0000000..f9cae55 --- /dev/null +++ b/node-kParentNodeTag-constexpr-initializer.patch @@ -0,0 +1,14 @@ +--- src/third_party/blink/renderer/core/dom/node.h.orig 2025-08-15 17:32:29.121405137 +0200 ++++ src/third_party/blink/renderer/core/dom/node.h 2025-08-15 23:15:58.713118795 +0200 +@@ -1259,9 +1259,9 @@ class CORE_EXPORT Node : public EventTar + + private: + static constexpr struct ParentNodeTag { +- } kParentNodeTag; ++ } kParentNodeTag {}; + static constexpr struct ShadowHostTag { +- } kShadowHostTag; ++ } kShadowHostTag {}; + + using TaggedParentOrShadowHostNode = + subtle::TaggedUncompressedMember; diff --git a/node-nghttp-1.50.patch b/node-nghttp-1.50.patch new file mode 100644 index 0000000..8468861 --- /dev/null +++ b/node-nghttp-1.50.patch @@ -0,0 +1,78 @@ +From 02a1505efcf7099498240e83327f7c0d71696f47 Mon Sep 17 00:00:00 2001 +From: Carlos Fuentes +Date: Thu, 5 Jun 2025 14:30:07 +0200 +Subject: [PATCH] http2: add lenient flag for RFC-9113 + +PR-URL: https://github.com/nodejs/node/pull/58116 +Reviewed-By: Tim Perry +Reviewed-By: Matteo Collina +Reviewed-By: Benjamin Gruenbaum +--- + doc/api/http2.md | 12 +++ + lib/internal/http2/util.js | 10 ++- + src/node_http2.cc | 6 ++ + src/node_http2_state.h | 1 + + .../test-http2-server-rfc-9113-client.js | 80 ++++++++++++++++++ + .../test-http2-server-rfc-9113-server.js | 83 +++++++++++++++++++ + .../test-http2-util-update-options-buffer.js | 6 +- + 7 files changed, 196 insertions(+), 2 deletions(-) + create mode 100644 test/parallel/test-http2-server-rfc-9113-client.js + create mode 100644 test/parallel/test-http2-server-rfc-9113-server.js + +diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js +index 75312e5aa57c5f..396623d3b9d06f 100644 +--- a/third_party/electron_node/lib/internal/http2/util.js ++++ b/third_party/electron_node/lib/internal/http2/util.js +@@ -229,7 +229,8 @@ const IDX_OPTIONS_MAX_SESSION_MEMORY = 8; + const IDX_OPTIONS_MAX_SETTINGS = 9; + const IDX_OPTIONS_STREAM_RESET_RATE = 10; + const IDX_OPTIONS_STREAM_RESET_BURST = 11; +-const IDX_OPTIONS_FLAGS = 12; ++const IDX_OPTIONS_STRICT_HTTP_FIELD_WHITESPACE_VALIDATION = 12; ++const IDX_OPTIONS_FLAGS = 13; + + function updateOptionsBuffer(options) { + let flags = 0; +@@ -293,6 +294,13 @@ function updateOptionsBuffer(options) { + optionsBuffer[IDX_OPTIONS_STREAM_RESET_BURST] = + MathMax(1, options.streamResetBurst); + } ++ ++ if (typeof options.strictFieldWhitespaceValidation === 'boolean') { ++ flags |= (1 << IDX_OPTIONS_STRICT_HTTP_FIELD_WHITESPACE_VALIDATION); ++ optionsBuffer[IDX_OPTIONS_STRICT_HTTP_FIELD_WHITESPACE_VALIDATION] = ++ options.strictFieldWhitespaceValidation === true ? 0 : 1; ++ } ++ + optionsBuffer[IDX_OPTIONS_FLAGS] = flags; + } + +diff --git a/src/node_http2.cc b/src/node_http2.cc +index 449ecdba807945..8e51129930f2cd 100644 +--- a/third_party/electron_node/src/node_http2.cc ++++ b/third_party/electron_node/src/node_http2.cc +@@ -159,6 +159,12 @@ Http2Options::Http2Options(Http2State* http2_state, SessionType type) { + buffer[IDX_OPTIONS_PEER_MAX_CONCURRENT_STREAMS]); + } + ++ // Validate headers in accordance to RFC-9113 ++ if (flags & (1 << IDX_OPTIONS_STRICT_HTTP_FIELD_WHITESPACE_VALIDATION)) { ++ nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation( ++ option, buffer[IDX_OPTIONS_STRICT_HTTP_FIELD_WHITESPACE_VALIDATION]); ++ } ++ + // The padding strategy sets the mechanism by which we determine how much + // additional frame padding to apply to DATA and HEADERS frames. Currently + // this is set on a per-session basis, but eventually we may switch to +diff --git a/src/node_http2_state.h b/src/node_http2_state.h +index 2957a2827f370e..914ad011e021f1 100644 +--- a/third_party/electron_node/src/node_http2_state.h ++++ b/third_party/electron_node/src/node_http2_state.h +@@ -60,6 +60,7 @@ namespace http2 { + IDX_OPTIONS_MAX_SETTINGS, + IDX_OPTIONS_STREAM_RESET_RATE, + IDX_OPTIONS_STREAM_RESET_BURST, ++ IDX_OPTIONS_STRICT_HTTP_FIELD_WHITESPACE_VALIDATION, + IDX_OPTIONS_FLAGS + }; + diff --git a/node-version-ck.patch b/node-version-ck.patch new file mode 100644 index 0000000..c28de12 --- /dev/null +++ b/node-version-ck.patch @@ -0,0 +1,27 @@ +author: Andres Salomon +description: disable the node version check + +https://chromium-review.googlesource.com/c/chromium/src/+/6334038 added +a node version check, but we don't want that as we're using debian's +packaged node. + +--- a/third_party/node/node.gni ++++ b/third_party/node/node.gni +@@ -44,7 +44,6 @@ template("node") { + if (!defined(deps)) { + deps = [] + } +- deps += [ "//third_party/node:check_version" ] + } + } + } +--- a/third_party/protobuf/proto_library.gni ++++ b/third_party/protobuf/proto_library.gni +@@ -562,7 +562,6 @@ template("proto_library") { + _protoc_gen_ts_path, + "//tools/protoc_wrapper/protoc-gen-ts_proto.py", + ] + _protoc_gen_ts_runtime_deps +- deps += [ "//third_party/node:check_version" ] + } + + if (_generate_with_plugin) { diff --git a/nodejs-electron.changes b/nodejs-electron.changes index 11c2d1c..a97cb44 100644 --- a/nodejs-electron.changes +++ b/nodejs-electron.changes @@ -1,3 +1,857 @@ +------------------------------------------------------------------- +Fri Nov 14 18:57:41 UTC 2025 - Bruno Pitrus + +- New upstream release 37.10.0 + * Added app.isHardwareAccelerationEnabled(). + * Automatically focus DevTools when element is inspected or breakpoint is triggered. + * v8: Preserve field repr in property array extension + +------------------------------------------------------------------- +Sat Nov 8 18:37:21 UTC 2025 - Bruno Pitrus + +- New upstream release 37.9.0 + * Node 22.21.1 + * Fixed an issue on Wayland where right-clicking in the titlebar could break mouse interactions. + * fix crash when inspector agent attempts to evaluate on provisional frames + * Fixed draw smoothing round corner issue + +------------------------------------------------------------------- +Wed Oct 29 20:14:09 UTC 2025 - Bruno Pitrus + +- New upstream release 37.8.0 + * Support dynamic ESM imports in non-context isolated preloads +- Add linux_seccomp-SYS_SECCOMP.patch to fix ftbfs with new glibc + +------------------------------------------------------------------- +Wed Oct 22 19:32:18 UTC 2025 - Bruno Pitrus + +- New upstream release 37.7.1 + * Fixed an issue where changing the resizable property on a window would break the styles of a transparent window + * Fixed white flash on call to BrowserWindow.show +- Add webrtc-pipewire_session-missing-spa_pod_object_find_prop.patch to fix build error with new pipewire + +------------------------------------------------------------------- +Thu Oct 16 19:56:42 UTC 2025 - Bruno Pitrus + +- New upstream release 37.7.0 + * NodeJS 22.20.0 + * Fixed addBrowserView to prevent unnecessary removal and re-adding of the same BrowserView + * Fixed an issue where authentication via websockets can crash +- Fedora: use bundled simdjson due to system version being too old + +------------------------------------------------------------------- +Wed Oct 8 06:11:24 UTC 2025 - Bruno Pitrus + +- New upstream release 37.6.1 + * fix: runtime JS error that crashes GetPackageJSON +- New upstream release 37.6.0 + * Allowed for persisting File System API grant status within a given session + +------------------------------------------------------------------- +Wed Sep 17 05:33:20 UTC 2025 - Bruno Pitrus + +- New upstream release 37.5.1 + * v8: Don't assume that upper 32-bit of Int32MulOvfCheck are 0 + +------------------------------------------------------------------- +Mon Sep 15 17:51:55 UTC 2025 - Bruno Pitrus + +- aarch64: add swiftshader-llvm21.patch to fix ftbfs with new LLVM + +------------------------------------------------------------------- +Thu Sep 11 10:08:41 UTC 2025 - Bruno Pitrus + +- New upstream release 37.5.0 + * Updated Chromium to 138.0.7204.251 + * Updated Node.js to v22.19.0 +- 15.6: revert upstream changes to build with old cares (node-cares-1.21-5.patch) +- add system-ffmpeg.patch to fix build error +- remove useless single executable builder to fix build error (remove-node-sea.patch) + +------------------------------------------------------------------- +Wed Aug 27 20:12:09 UTC 2025 - Bruno Pitrus + +- New upstream release 37.4.0 + * Updated Chromium to 138.0.7204.243 + * Fixed an issue where net.isOnline() always returned true in utilityProcesses + +------------------------------------------------------------------- +Sat Aug 23 18:11:15 UTC 2025 - Bruno Pitrus + +- Update to 37.3.1 (bsc#1248464) + * Chromium 138.0.7204.235 + * Node 22.18.0 + * V8 13.8 + * Added scriptURL property to ServiceWorkerMain. + * Added a CSS rule for smooth corners. + * Utility Process unhandled rejection behavior change + * process.exit() kills utility process synchronously + * WebUSB and WebSerial Blocklist Support + * Removed: null value for session property in ProtocolResponse + * BrowserWindow.IsVisibleOnAllWorkspaces() on Linux + * see https://www.electronjs.org/blog/electron-37-0 + and https://github.com/electron/electron/releases/tag/v37.0.0 for more +- Leap 15.6: use bundled aom + * drop aom3.10-AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.patch + * drop aom3.10-AV1E_SET_AUTO_TILES.patch + * drop webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch + * drop webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR-2.patch +- Fedora <=42: use bundled llhttp +- Fedora: use bundled simdutf +- Merge MakeSbixTypeface-null-pointer-call.patch into chromium-130-fontations.patch' +- drop no longer needed patches + * build-without-speech-service.patch + * content_browser_client-incomplete-WebUIController.patch + * css_shape_value-constructor.patch + * disable-devtools-tests.patch + * distributed_point_functions-aes_128_fixed_key_hash-missing-StrCat.patch + * distributed_point_functions-evaluate_prg_hwy-signature.patch + * electron-13-blink-gcc-ambiguous-nodestructor.patch + * exception_state-constexpr-initializer.patch + * extensions-common-assert.patch + * fix-building-with-pipewire-1.3.82.patch + * fix-build-without-pdf.patch + * fix-build-without-video-effects.patch + * html_permission_element_strings_map-reproducible.patch + * MakeSbixTypeface-null-pointer-call.patch + * media_session_uma_helper-missing-optional.patch + * node-llhttp9.3.patch + * object_paint_properties-explicit-specialization-in-non-namespace-scope.patch + * perfetto-ThreadTrack-Current-null-dereference.patch + * picture_in_picture_window_manager_uma_helper-missing-optional.patch + * plugin_utils-build-without-electron_extensions.patch + * python3.14-nodedownload-FancyURLopener.patch + * raw_ptr-fpermissive.patch + * resource_response-Wchanges-meaning.patch + * resource-Wchanges-meaning.patch + * string-hasher-flax-vector-conversions.patch + * string_truncator-convert.patch + * style_scope-unqualified-To.patch + * system-simdutf.patch + * to_vector-std-projected-gcc119888.patch + * unexportable_key_service_impl-Wlto-type-mismatch.patch + * xml_document_parser-Wmissing-template-keyword.patch +- Conditionally revert upstream changes to fix build on 15.6 + * ffmpeg-4-AV_PROFILE.patch + * node-cares-1.21-4.patch + * node-nghttp-1.50.patch + * v8-highway-1.1.patch +- Add patches to fix build errors + * angle-BlobCache-Success.patch + * llhttp-lax-vector-conversions.patch + * masked_domain_list-flatbuffers.patch + * node-version-ck.patch + * partition_alloc-strict-aliasing.patch + * remove-probabilistic-token-which-uses-private-join-and-compute.patch + * system-dragonbox.patch +- Add patches that should be upstreamed + * ANNOTATE_CONTIGUOUS_CONTAINER-Wodr.patch + * event_record-optional-initializer.patch + * identity_request_account-incomplete-IdentityProviderData.patch + * json_to_struct-fixed_flat_map-conflicting-declaration.patch + * lock_impl_posix-pthread_mutexattr_setprotocol-conflicting.patch + * node-kParentNodeTag-constexpr-initializer.patch + * offscreen_canvas-incomplete-LayoutLocale.patch + * pickle_traits-kIndexSequence-constexpr-initializer.patch + * picture_in_picture_events_info-string-constexpr.patch + * sandboxed_vfs_file_impl-missing-memset.patch + * v8-simd-flax-vector-conversions.patch + * webgl_rendering_context_webgpu_base-incomplete-StaticBitmapImage.patch + * webrtc-138-Wchanges-meaning.patch + * xr_webgl_swap_chain-incomplete-StaticBitmapImage.patch + +------------------------------------------------------------------- +Tue Aug 19 17:11:54 UTC 2025 - Bruno Pitrus + +- New upstream release 35.7.5 + * Fixed an issue where shell.openPath was not non-blocking as expected. +- Leap 16: compile v8 code with x86-64-v2 instructions since the system requires them + * v8-assume-x86-64-v2-support.patch + +------------------------------------------------------------------- +Wed Aug 13 16:54:43 UTC 2025 - Bruno Pitrus + +- Fix build on Leap 16 + +------------------------------------------------------------------- +Fri Jul 11 17:53:15 UTC 2025 - Bruno Pitrus + +- Enable accelerated video decoding (VAAPI) + * vaapi-no-encoders.patch +- Drop chromium-vaapi.patch which has been dead code for a while + +------------------------------------------------------------------- +Wed Jul 2 21:04:03 UTC 2025 - Bruno Pitrus + +- New upstream release 36.7.0 + * update Node.js to 22.16.0 + +------------------------------------------------------------------- +Thu Jun 26 17:30:59 UTC 2025 - Bruno Pitrus + +- New upstream release 35.6.0 + * Added support for --no-experimental-global-navigator flag + * Fixed a potential crash using session.clearData. + * Fixed an error when importing electron for the first time from an ESM module loaded by a CJS module. + * Fixed an issue where calling Fetch.continueResponse via debugger with WebContentsView could cause a crash. + * Fixed an issue where utility processes could leak file handles. +- 15.6: use system sqlite in node +- add backported python3.14-nodedownload-FancyURLopener.patch to fix build error + +------------------------------------------------------------------- +Thu Jun 5 05:14:29 UTC 2025 - Bruno Pitrus + +- New upstream release 35.5.1 + * Fixed addChildView() crashes when adding a closed WebContentsView. + * Fixed crash when pausing in loops due to missing context when desugared. + * Fixed out of bounds read and write in V8 (CVE-2025-5419 bsc#1244020) + +------------------------------------------------------------------- +Thu May 29 17:37:49 UTC 2025 - Bruno Pitrus + +- New upstream release 35.5.0 + * Node 22.15.1 + * Added innerWidth and innerHeight options for window.open. #47045 (Also in 36, 37) + * Added support for screen.dipToScreenPoint(point) and screen.screenToDipPoint(point) on Linux X11. + * Added support for node option --experimental-network-inspection. + * Security fixes for for CVE-2025-4609 CVE-2025-4664 (bsc#1243205) +- Do not build Chromium extensions support as it's not used by us + * reduce-gn-tree.patch + * build-without-extensions.patch + * build-without-guest-view.patch + * extensions-common-assert.patch + +------------------------------------------------------------------- +Sat May 24 13:25:36 UTC 2025 - Bruno Pitrus + +- Fedora 43+: bacport change to fix build with llhttp 9.3 (node-llhttp9.3.patch) + +------------------------------------------------------------------- +Sat May 17 09:18:14 UTC 2025 - Bruno Pitrus + +- New upstream release 35.4.0 + * Node 22.15.0 + * Added support for system-context-menu on Linux + * Fixed a possible crash using the WebView tag and calling focus +- Drop CheckPortalAvailabilityOnBusThread-UaF-crash.patch applied upstream +- Add system-zstd-in-node.patch to fix build error +- 15.6: reverse upstream changes to build with old cares + * node-cares-1.21-2.patch + * node-cares-1.21-3.patch + +------------------------------------------------------------------- +Fri May 9 15:31:47 UTC 2025 - Bruno Pitrus + +- Fix reproducible builds (bsc#1041090) + * html_permission_element_strings_map-reproducible.patch + +------------------------------------------------------------------- +Thu May 8 21:03:32 UTC 2025 - Bruno Pitrus + +- New upstream release 35.3.0 + * Fixed xdg portal version detection for file dialogs +- Add file_dialog-missing-uint32_t.patch to fix build error +- Add backported CheckPortalAvailabilityOnBusThread-UaF-crash.patch to fix gh#electron/electron#47007 +- Enable debuginfo in Torque code (torque-debuginfo.patch) +- Fix headers installed in wrong location causing node-gyp unable to find config.gypi + +------------------------------------------------------------------- +Thu May 1 08:58:10 UTC 2025 - Bruno Pitrus + +- New upstream release 35.2.2 + * Fixed electron.shell.openExternal and electron.shell.openPath to honor user-defined system defaults on Linux. + * Fixed a possible crash when using navigator.bluetooth.requestDevice and the select-bluetooth-device event. + * Fixed a potential crash when closing a window with child windows. + * Fixed crash when renderer process crashes while webview is reloading. + * Fixed the visibleOnAllWorkspaces property on Linux. +- Drop electron_usb_delegate-incomplete-UsbDeviceInfo.patch applied upstream + +------------------------------------------------------------------- +Tue Apr 29 09:33:21 UTC 2025 - Bruno Pitrus + +- Remove spurious exports of internal functions bloating binary due to incorrectly building libnode with -fvisibility=default + * add this bit to use-system-libraries-in-node.patch + +------------------------------------------------------------------- +Sat Apr 26 09:53:27 UTC 2025 - Bruno Pitrus + +- Update to 35.2.1 + * Chromium 134.0.6998.205 + * Node 22.14.0 + * V8 13.4 + * Removed AVIF image format + * Added excludeUrls to webRequest filter and deprecated the use of empty arrays in urls property. + * Added fromVersionID on ServiceWorkers to get an instance of ServiceWorkerMain. + * Deprecated getPreloads and setPreloads on Session. + * Moved 'console-message' arguments into event object. + * Added ServiceWorkerMain class to interact with service workers in the main process. + * Added contextBridge.executeInMainWorld to safely execute code across world boundaries. + * Added frame to 'console-message' event. + * Added optional animation parameter to BrowserWindow.setVibrancy. + * Added permission support for document.executeCommand("paste"). + * Added support for service worker preload scripts. + * Support Portal's globalShortcuts. + Electron must be run with --enable-features=GlobalShortcutsPortal in order to have the feature working. + * see https://github.com/electron/electron/releases/tag/v35.0.0 and https://www.electronjs.org/blog/electron-35-0 for more +- Remove Fedora 40 support + * drop bundled-minizip.patch + * drop quiche-absl-HexStringToBytes.patch +- Leap 15.6: use backported wayland-protocols + * drop wayland-protocol-toplevel-icon.patch + * drop wayland-protocol-toplevel-icon-2.patch + * drop wayland-protocol-toplevel-drag.patch +- Build with LTO also on 15.6 (so now we enable it everywhere) +- Fedora: use system simdjson + * merge system-ada-url.patch into use-system-libraries-in-node.patch +- Drop no longer applicable patches + * account_id-missing-optional.patch + * blink-platform-INSIDE_BLINK-Wodr.patch + * boringssl-internal-addc-cxx.patch + * build-without-extensions.patch + * css_attr_value_tainting-missing-once_flag.patch + * electron-13-fix-base-check-nomerge.patch + * exception_context-missing-variant.patch + * fix-build-without-safebrowsing.patch + * fix-build-without-service-discovery.patch + * ip_protection_data_types-missing-optional.patch + * node-compiler.patch + * skia_image_decoder_base-missing-stack.patch + * vtt_scanner-missing-variant.patch + * wayland_connection-Wchanges-meaning.patch +- Add backported or upstreamable patches + * ax_platform_node_id-fpermissive.patch + * browser_process_impl-fix-safe_browsing_mode-0.patch + * content_browser_client-incomplete-WebUIController.patch + * css_shape_value-constructor.patch + * exception_state-constexpr-initializer.patch + * fix-build-without-pdf.patch + * fix-build-without-video-effects.patch + * media_session_uma_helper-missing-optional.patch + * object_paint_properties-explicit-specialization-in-non-namespace-scope.patch + * perfetto-ThreadTrack-Current-null-dereference.patch + * picture_in_picture_window_manager_uma_helper-missing-optional.patch + * plugin_utils-build-without-electron_extensions.patch + * raw_ptr-fpermissive.patch + * resource_response-Wchanges-meaning.patch + * resource-Wchanges-meaning.patch + * string-hasher-flax-vector-conversions.patch + * string_truncator-convert.patch + * style_scope-unqualified-To.patch + * to_vector-std-projected-gcc119888.patch + * unexportable_key_service_impl-Wlto-type-mismatch.patch + * xml_document_parser-Wmissing-template-keyword.patch +- merge remove-libphonenumber.patch & delete-old-language-detection-which-uses-tflite.patch + into remove-ai-language-detection-factory-which-requires-tflite-and-libphonenumber.patch +- Revert upstream change which breaks build with old abseil + * webrtc-make_ref_counted-absl2024-nullability.patch +- Conditionally (15.6) remove feature change which needs new spirv + * angle-SPV_BINARY_TO_TEXT_OPTION_NESTED_INDENT.patch +- Use system sqlite in node (except 15.6) + * system-sqlite.patch +- Remove more rust code + * chromium-132-no-rust.patch +- Actually disable AVIF support without disabling AV1 video + * disable-avif-really.patch +- Various other build fixes + * absl_strings-missing-headers.patch + * blink-shape_result-highway.patch + * build-without-mesage-center.patch + * fix-system-highway.patch + * gn-logspam-breaks-install.patch + * permission-gcc14.2.patch + +------------------------------------------------------------------- +Sat Apr 19 08:45:19 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.10 + * Fixed ElectronAccessibilityUI bug. + * Fixed an inverted conditional that caused broken window borders on Wayland. + +------------------------------------------------------------------- +Wed Apr 9 18:46:20 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.9 + * No user-visible changes +- Add swiftshader-llvm20-absoluteSymbols.patch to fix FTBFS on aarch64 + +------------------------------------------------------------------- +Thu Mar 27 10:19:49 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.7 + * Fixed an issue where the resizing border didn't work as expected on Wayland windows + +------------------------------------------------------------------- +Thu Mar 20 10:47:25 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.6 + * Fixed incorrect titlebar in file save dialogs + * Fix type confusion in V8 (CVE-2025-1920 bsc#1239216) +- Drop chromium-94-ffmpeg-roll.patch to fix ftbfs on Leap + +------------------------------------------------------------------- +Thu Mar 13 19:58:07 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.5 + * no user-visible changes + +------------------------------------------------------------------- +Mon Mar 10 05:45:21 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.4 + * no user-visible changes + +------------------------------------------------------------------- +Sun Mar 9 21:47:42 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.3 + * Fix use after free in V8 CVE-2025-0445 (bsc#1236806) + * Other security fixes for V8: CVE-2025-0995 CVE-2025-0998 (bsc#1237121) + +------------------------------------------------------------------- +Thu Feb 27 19:50:15 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.2 + * Updated Node.js to v20.18.3 + * Backported fix for a upstream bug that cause Offscreen Rendering to stutter. + * Fixed WebFrameMain crash related to accessing speculative frames that have been destroyed. + * Fixed v8.setHeapSnapshotNearHeapLimit api in main and utility process, + along with support for --diagnostic-dir Node.js cli flag to specify the directory to save the heap snapshots. + * Security fixes for V8: CVE-2025-0611 CVE-2025-0612 CVE-2025-0999. (bsc#1236306 bsc#1237343) +- 15.6: revert upstream changes to build with c-ares 1.19 + * node-cares-1.21.patch + +------------------------------------------------------------------- +Sun Feb 16 10:53:13 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.1 + * Fixed crashes on aarch64 with 16KiB pages. + * Fixed crash when accessing WebFrameMain frames and name attributes on destroyed frames. +- Fedora 42+: use bundled vk_mem_alloc again to fix build error + +------------------------------------------------------------------- +Thu Feb 13 09:28:36 UTC 2025 - Antonio Larrosa + +- Add patch to fix build with pipewire 1.3.82: + * fix-building-with-pipewire-1.3.82.patch + +------------------------------------------------------------------- +Thu Feb 6 21:20:53 UTC 2025 - Bruno Pitrus + +- New upstream release 33.4.0 + * Added permission support for document.executeCommand("paste"). + * Fixed crash in gin::wrappable::secondweakcallback. + +------------------------------------------------------------------- +Wed Jan 22 22:41:56 UTC 2025 - Bruno Pitrus + +- New upstream release 33.3.2 + * Updated Chromium to 130.0.6723.191 + * fix yellow background of composition text with wayland text-input-v3 + * The avoidClosingConnections option for session.clearData now properly + defaults to false when the dataTypes option is not set. + * Fixed an issue where drag-dropping two directories would cause + getAsFileSystemHandle to never resolve. + * Fixed a potential crash in chrome.tabs.update(). + * security fixes for CVE-2025-0434 CVE-2025-0436 CVE-2025-0437 (bsc#1235892) +- Add string_view-incomplete-CodePointIterator.patch to fix build error + +------------------------------------------------------------------- +Tue Jan 14 18:51:39 UTC 2025 - Bruno Pitrus + +- Add MakeSbixTypeface-null-pointer-call.patch + * fixes crash when handling SBIX color bitmap fonts (bsc#1235830) + +------------------------------------------------------------------- +Sun Jan 12 12:38:29 UTC 2025 - Bruno Pitrus + +- Update to 33.3.1 + * Drop 32-bit support + * chromium 130.0.6723.170 + * node 20.18.0 + * v8 13.0 + * Behavior Changed: frame properties may retrieve detached WebFrameMain instances or none at all + * Behavior Changed: webContents property on login on app + * Added a handler, app.setClientCertRequestPasswordHandler(handler), to help unlock cryptographic devices when a PIN is needed. + * Added View.setBorderRadius(radius) for customizing the border radius of views—with compatibility for WebContentsView. + * Extended navigationHistory API with 2 new functions for better history management. #42014 + * see https://github.com/electron/electron/releases/tag/v33.0.0 and https://www.electronjs.org/blog/electron-33-0 for more +- Disable aarch64 builds due to OBS hardware limits. Sorry. +- Drop Leap 15.5 support +- Drop no longer needed patches + * absl-base-dynamic_annotations.patch + * angle-State-constexpr.patch + * chromium-124-shims.patch + * color_provider-incomplete-ColorProviderInternal.patch + * ConsumeRadii-linker-error.patch + * Cr126-abseil-shims.patch + * crashpad-use-system-abseil.patch + * DesktopNativeWidgetAura-HandleActivationChanged-crash.patch + * harfbuzz-replace-chromium-scoped-type.patch + * harfbuzz-replace-HbScopedPointer.patch + * http_auth_ntlm_mechanism-could-not-convert-to-base-span.patch + * licenses.py-FileNotFoundError.patch + * native_css_paint_definition-expected-unqualified-id.patch + * page_popup_controller-missing-optional.patch + * partition_alloc-no-lto.patch + * preview_cancel_reason-missing-string.patch + * quiche-QuicIntervalDeque-no-match-for-operator-mm.patch + * real_time_reporting_bindings-forward-declaration.patch + * run_segmenter-missing-optional.patch + * skia-system-vulkan-headers.patch + * system-zlib.patch + * text_decoder-missing-optional.patch + * wayland-proto-31-cursor-shape.patch +- Drop libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch and replace it with more fine-grained reverts: + * aom3.10-AV1E_SET_MAX_CONSEC_FRAME_DROP_MS_CBR.patch + * aom3.10-AV1E_SET_AUTO_TILES.patch + * webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch + * webrtc-aom3.8-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR-2.patch +- Drop the following revert: + * bad-font-gc0000.patch + * bad-font-gc000.patch + * bad-font-gc00.patch + * bad-font-gc0.patch + * bad-font-gc11.patch + * bad-font-gc1.patch + * bad-font-gc2.patch + * bad-font-gc3.patch +- Add bsc1224178-font-gc.patch for a proper fix for bsc#1224178 deb#1067886 +- Add backported or forwardable patches to fix build errors: + * account_id-missing-optional.patch + * css_attr_value_tainting-missing-once_flag.patch + * electron_usb_delegate-incomplete-UsbDeviceInfo.patch + * exception_context-missing-variant.patch + * fix-build-without-service-discovery.patch + * ip_protection_data_types-missing-optional.patch + * skia_image_decoder_base-missing-stack.patch + * vtt_scanner-missing-variant.patch + * wayland_connection-Wchanges-meaning.patch +- Add patches to fix build errors due to our changes: + * build-without-speech-service.patch + * chromium-123-qrcode.patch + * chromium-125-cloud_authenticator.patch + * chromium-127-cargo_crate.patch + * chromium-127-crabby.patch + * chromium-129-disable-H.264-video-parser-during-demuxing.patch + * chromium-130-fontations.patch + * cr130-abseil-remove-unused-deps.patch + * cr130-absl-base.patch + * delete-old-language-detection-which-uses-tflite.patch + * fix-build-without-screen-ai.patch + * private_aggregation_host-uint128.patch + * remove-libphonenumber.patch + * system-absl_algorithm.patch + * wayland_version.patch +- 15.6: use bundled vulkan and spirv headers +- 15.6: revert upstream changes to build with old wayland + * wayland-protocol-toplevel-icon.patch + * wayland-protocol-toplevel-icon-2.patch + * wayland-protocol-toplevel-drag.patch +- Use bundled yuv everywhere due to system version being too old + + +------------------------------------------------------------------- +Wed Nov 27 20:33:48 UTC 2024 - Bruno Pitrus + +- New upstream release 31.7.6 + * no user-visible changes +- Leap: build with gcc 14 +- Drop Fedora 39 support + +------------------------------------------------------------------- +Tue Nov 26 14:11:01 UTC 2024 - Bruno Pitrus + +- Fix ffmpeg refusing to play opus audio files (disable-FFmpegAllowLists.patch) + +------------------------------------------------------------------- +Sun Nov 17 08:04:39 UTC 2024 - Bruno Pitrus + +- New upstream release 31.7.5 + * Fixed an issue where WebContentsViews were being improperly removed. + * Fixed an issue where the windows control overlay was unexpectedly visible in fullscreen. + * Fix use after free in Serial (CVE-2024-10827 bsc#1232843) + +------------------------------------------------------------------- +Tue Nov 12 22:49:39 UTC 2024 - Bruno Pitrus + +- New upstream release 31.7.4 + * Fixed segfault when moving WebContentsView between BrowserWindows + * Fix type confusion in v8 (CVE-2024-10231 bsc#1232060) +- Fedora 40+ build with system ada url (system-ada-url.patch) + +------------------------------------------------------------------- +Sun Nov 10 09:28:49 UTC 2024 - Bruno Pitrus + +- Fix build on Fedora 41+: + * zip_internal-missing-uLong-Z_DEFAULT_COMPRESSION.patch + * swiftshader-llvm19-LLVMJIT-getHostCPUFeatures.patch + * swiftshader-llvm19-LLVMReactor-incomplete-Module.patch + * build with system minizip, yuv, simdutf, re2 + +------------------------------------------------------------------- +Tue Oct 29 10:01:13 UTC 2024 - Bruno Pitrus + +- New upstream release 31.7.3 + * Fixed crash when network process terminates while a net log is running. + +------------------------------------------------------------------- +Fri Oct 25 03:23:53 UTC 2024 - Bruno Pitrus + +- New upstream release 31.7.2 + * Fixed calling setAlwaysOnTop on a hidden window which is then shown with showInactive on Linux under X11. + * v8: security fixes for CVE-2024-9121 CVE-2024-9122 CVE-2024-7970 + * security fixes for CVE-2024-7025 CVE-2024-9369 (bsc#1231232) + * security fixes for CVE-2024-7965 CVE-2024-7966 CVE-2024-7967 (bsc#1229591) + * security fixes for CVE-2024-8198 CVE-2024-8193 CVE-2024-7969 (bsc#1229897) + * fix use after free in WebAudio (CVE-2024-8362 bsc#1230108) + * fix heap buffer overflow in Skia (CVE-2024-8636 bsc#1230391) + * fix integer overflow in Skia (CVE-2024-9123) + +------------------------------------------------------------------- +Fri Oct 18 05:11:51 UTC 2024 - Bruno Pitrus + +- New upstream release 31.7.1 + * Fixed an issue where the exit event could be emitted twice from the utilityProcess. #44267 + * v8: security fixes for CVE-2024-9602 and CVE-2024-9603 (bsc#1231420) + +------------------------------------------------------------------- +Fri Oct 11 04:37:30 UTC 2024 - Bruno Pitrus + +- New upstream release 31.7.0 + * Node 20.18.0 + * Fixed a crash when calling focus on a WebView's webContents. + * Fixed a potential issue accessing a child window document when overriding browserWindow creation via setWindowOpenHandler. + * Fixed an issue when dragging to resize when using Window Controls Overlay on Linux. + * Fixed an issue where an exception could be thrown on BrowserView after its owner BrowserWindow was closed. + * Fixed an issue where clicking the eyedropper icon did nothing instead of opening an eyedropper for color selection as expected. + * Ensured that the sender-id hint is set when creating desktop notifications on DBus. +- Drop no longer needed electron-16-webpack-fix-openssl-3.patch +- Print a message to stderr so that support logs shared by end users are clearly distinguished from upstream builds. + +------------------------------------------------------------------- +Mon Sep 16 17:40:09 UTC 2024 - Bruno Pitrus + +- Update to 31.6.0 + * ABI break: NODE_MODULE_VERSION is now 125 + * Chromium 126.0.6478.234 + * Node 20.17.0 + * V8 12.6 + * Breaking change: Remove WebSQL support + * Breaking change: nativeImage.toDataURL will preserve PNG colorspace + * Added options parameter to Session.clearData API. + * Extended webContents.setWindowOpenHandler to support manual creation of BrowserWindow. + * clearData method added to Session + * Extended WebContentsView to accept pre-existing webContents object. + * see https://www.electronjs.org/blog/electron-31-0 and https://github.com/electron/electron/releases/tag/v31.0.0 for more +- Drop no longer needed patches + * electron-13-fix-use-thin-lto.patch + * remove-openscreen.patch + * system-yuv.patch + * chromium-122-abseil-shims.patch + * electron-16-std-vector-non-const.patch + * fake_ssl_socket_client-Wlto-type-mismatch.patch + * angle-FramebufferVk-powf.patch + * span_reader-missing-optional.patch + * bitset-missing-uint8_t-memcpy.patch + * temporal_scalability_id_extractor-missing-bitset.patch + * gpu_adapter_info-missing-optional.patch + * first_party_sets_handler_database_helper-missing-optional.patch + * async_iterable-forwarding.patch + * script_streamer-atomic-include.patch +- Add patches to fix build + * fix-build-without-safebrowsing.patch + * fix-build-without-supervised-users.patch + * Cr126-abseil-shims.patch + * absl-base-dynamic_annotations.patch + * webp-no-sharpyuv.patch + * http_auth_ntlm_mechanism-could-not-convert-to-base-span.patch + * angle-State-constexpr.patch + * color_provider-incomplete-ColorProviderInternal.patch + * run_segmenter-missing-optional.patch + * page_popup_controller-missing-optional.patch + * native_css_paint_definition-expected-unqualified-id.patch + * text_decoder-missing-optional.patch + * real_time_reporting_bindings-forward-declaration.patch + * blink-platform-INSIDE_BLINK-Wodr.patch + * quiche-QuicIntervalDeque-no-match-for-operator-mm.patch + * ConsumeRadii-linker-error.patch +- Conditionally revert upstreamed ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch on old ffmpeg +- Revert upstream changes to build with system abseil (quiche-absl-HexStringToBytes.patch) +- Refresh bad-font-gc patches from Debian +- aarch64: disable LTO also on Fedora 39 due to OOM + +------------------------------------------------------------------- +Sat Sep 14 08:13:25 UTC 2024 - Bruno Pitrus + +- New upstream release 30.5.1 + * Disable XDG portals when an old version is installed since it leads to defaultPath not working in open file dialog. + * Restored Chromium default Content-Disposition header parsing. +- x86_64, ix86: enable GDB support. Run Electron with --js-flags=--gdbjit_full to see JS stack traces in debugger. +- Remove more bundled libraries from tarball. + +------------------------------------------------------------------- +Fri Sep 6 06:16:32 UTC 2024 - Bruno Pitrus + +- New upstream release 30.5.0 + * Node 20.16.0 + +------------------------------------------------------------------- +Thu Sep 5 04:59:15 UTC 2024 - Bruno Pitrus + +- v8-strict-aliasing.patch: only use -fno-ipa-strict-aliasing, it's sufficient +- aarch64 Tumbleweed: disable LTO and use mold linker due to OOM +- change vendor string in process.versions to match what VSCode expects + +------------------------------------------------------------------- +Sat Aug 31 09:00:18 UTC 2024 - Bruno Pitrus + +- Fedora 40+, TW: add v8-strict-aliasing.patch to work around GCC14 miscompile +- aarch64: remove -jitless from electron_rebuild macro, seems not needed anymore + +------------------------------------------------------------------- +Sun Aug 18 07:39:42 UTC 2024 - thod_@gmx.de + +- New upstream release 30.4.0 + * Added a new property prefersReducedTransparency to nativeTheme, which indicates whether the user has chosen to reduce OS-level transparency via system accessibility settings. + * Aligned failure pathway in File System Access API with upstream when attempting to open a file or directory in a blocked path. + * Fixed an issue where navigator.serial.getPorts() incorrectly returned an empty array in some cases. + * Fixed an issue where the File System Access API did not remember the user's last picked directory as expected. + * Fixed the resource leak when using Node.js readable streams as the response body for a custom protocol handler. + * Resolved an issue where desktopCapturer.getSources never fulfilled its promise in some cases. + * Security fixes for CVE-2024-6989 CVE-2024-6991 (bsc#1228942) + * Security fixes for CVE-2024-6776 CVE-2024-6778 CVE-2024-6777 CVE-2024-6773 CVE-2024-6774 CVE-2024-6772 CVE-2024-6775 CVE-2024-6779 (bsc#1227979) + +------------------------------------------------------------------- +Tue Aug 13 20:28:37 UTC 2024 - Bruno Pitrus + +- Fix ftbfs with ffmpeg 7.x + * add backported ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch + * do not revert audio_file_reader-ffmpeg-AVFrame-duration.patch when building against ffmpeg 6+ + +------------------------------------------------------------------- +Sat Jul 20 10:02:27 UTC 2024 - Bruno Pitrus + +- New upstream release 30.3.0 + * Node 20.15.1 + * Added DownloadItem.getCurrentBytesPerSecond(), DownloadItem.getPercentComplete(), DownloadItem.getEndTime(). + * Fixed a potential crash when using off screen rendering. + * fix crash when resolving proxy with session.resolveProxy api +- aarch64 Fedora 40: disable LTO due to linker oom failing build + +------------------------------------------------------------------- +Fri Jul 12 10:28:06 UTC 2024 - Bruno Pitrus + +- New upstream release 30.2.0 + * Node 20.15.0 + * Enabled the Windows Control Overlay API on Linux. + * Expose systemPreferences to utilityProcess. + * Fixed a focus issue when calling BrowserWindow.setTopBrowserView. + * Fixed an issue where fetch-dependent interfaces could be missing in Web Workers with nodeIntegrationInWorker enabled. + * Fixed an issue where control could fail to return properly after saving a dialog using showOpenDialogSync on Linux. + * Fixes an issue where the user-specified default path did not work in some circumstances when using Linux dialogs. + * Fixes potentially incorrect exit code in UtilityProcess. + * (Leap 15.5) Fix heap buffer overflow in libaom (CVE-2024-5493 bsc#1225690) + * Security fixes for V8: CVE-2024-6100, CVE-2024-6101 (bsc#1226504) + * Fix use after free in Swiftshader (CVE-2024-6291 bsc#1226933) + +------------------------------------------------------------------- +Tue Jul 9 10:04:38 UTC 2024 - Bruno Pitrus + +- Update to 30.1.2 + * ABI break: NODE_MODULE_VERSION is now 123 + * Chromium 124.0.6367.243 + * Node 20.14.0 + * V8 12.4 + * Added WebContentsView and BaseWindow, replacing the now-deprecated BrowserView APIs. + * cross-origin iframes now use Permission Policy to access features + * Removed: The --disable-color-correct-rendering switch + * The inputFieldType property in the context-menu params has been removed + * Removed: process.getIOCounters() + * see https://www.electronjs.org/blog/electron-30-0 and https://github.com/electron/electron/releases/tag/v30.0.0 for more +- Fedora: use bundled simdutf as the system version is too old +- Drop no longer needed patches + * chromium-122-avoid-SFINAE-TypeConverter.patch + * chromium-122-BookmarkNode-missing-operator.patch + * chromium-98-EnumTable-crash.patch + * chromium-gcc11.patch + * CVE-2024-30260-undici-clear-proxy-authorization.patch + * CVE-2024-30261-undici-fetch-integrity.patch + * ElectronDesktopWindowTreeHostLinux-OnWindowTiledStateChanged-crash.patch + * grid_sizing_tree-Wchanges-meaning.patch + * hit_test_request-missing-optional.patch + * InternalAllocator-too-many-initializers.patch + * material_color_utilities-tones-missing-round.patch + * nested-nested-nested-nested-nested-nested-regex-patterns.patch + * perfetto-numeric_storage-double_t.patch + * plus_address_types-missing-optional.patch + * race_network_request_write_buffer_manager-missing-optional.patch + * resolution_monitor-missing-bitset.patch + * script_promise_resolver-explicit-specialization.patch + * search_engine_choice_service-missing-optional.patch + * text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch + * v8-instance-type-inl-constexpr-used-before-its-definition.patch +- Drop no longer needed -Wno-error=narrowing from CXXFLAGS +- Add patches to fix build + * chromium-124-shims.patch + * enable_stack_trace_line_numbers-symbol_level.patch + * angle-FramebufferVk-powf.patch + * licenses.py-FileNotFoundError.patch + * span_reader-missing-optional.patch + * bitset-missing-uint8_t-memcpy.patch + * temporal_scalability_id_extractor-missing-bitset.patch + * gpu_adapter_info-missing-optional.patch + * first_party_sets_handler_database_helper-missing-optional.patch + * async_iterable-forwarding.patch + * preview_cancel_reason-missing-string.patch + * script_streamer-atomic-include.patch +- Add -Wno-packed-not-aligned -Wno-address to CXXFLAGS to suppress build logspam +- Add libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch to build with old libaom +- Add backported DesktopNativeWidgetAura-HandleActivationChanged-crash.patch +- Revert upstream changes which introduce a use-after-free bug causing crashes (bsc#1224178 deb#1067886) + * bad-font-gc0000.patch + * bad-font-gc000.patch + * bad-font-gc00.patch + * bad-font-gc0.patch + * bad-font-gc11.patch + * bad-font-gc1.patch + * bad-font-gc2.patch + * bad-font-gc3.patch + + +------------------------------------------------------------------- +Thu Jul 4 04:27:14 UTC 2024 - Bruno Pitrus + +- Fix use after free in content::RenderFrameHostImpl::RemoveDocumentService (bsc#1227307) + * RenderFrameHostImpl-use-after-free.patch: correct second instance of the same bug +- ix86, aarch64: pass --jitless in %electron_rebuild macro to work around crashes on OBS and unblock downstream packages + +------------------------------------------------------------------- +Fri Jun 28 16:56:51 UTC 2024 - Bruno Pitrus + +- New upstream release 29.4.3 + * Fixed an issue where navigator.usb.getDevices() could crash in some circumstances. + * Fixed an issue where bad flags passed via --js-flags could cause a crash. + * Fixed an issue where control could fail to return properly after saving a dialog using showOpenDialogSync on Linux. + * Fixed an issue where some calls to WebUSB methods could crash. + * Fixed potentially incorrect exit code in UtilityProcess. + * Fixed support for multiple folder/file selection in //shell_dialogs portal implementation. + * Security fixes for CVE-2024-5499 CVE-2024-5493 CVE-2024-5496 (bsc#1225690) + * Security fixes for CVE-2024-5158 CVE-2024-5157 CVE-2024-5159 (bsc#1224818) + * Security fixes for CVE-2024-6100 CVE-2024-6101 (bsc#1226504) +- Correct .desktop file name to match the CHROME_DESKTOP environment variable. + +------------------------------------------------------------------- +Wed Jun 12 14:54:32 UTC 2024 - Bruno Pitrus + +- Do not build //components/sync to reduce linker load and binary size (remove-sync.patch) +- Add backported ElectronDesktopWindowTreeHostLinux-OnWindowTiledStateChanged-crash.patch + to fix segfault due to type confusion (bsc#1223366 gh#electron/electron#41839) +- Re-enable custom malloc now that the crash is fixed +- Use system vulkan headers wherever system spirv is used +- Drop Fedora 38 support + * drop v8-icu73-alt_calendar.patch + * drop v8-icu73-simple-case-folding.patch + ------------------------------------------------------------------- Wed May 29 20:19:39 UTC 2024 - Bruno Pitrus diff --git a/nodejs-electron.spec b/nodejs-electron.spec index 65cfa2c..16c957a 100644 --- a/nodejs-electron.spec +++ b/nodejs-electron.spec @@ -17,28 +17,23 @@ # -# https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck -%undefine _auto_set_build_flags %define mod_name electron # https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json -%define abi_version 121 +%define abi_version 136 # Do not provide libEGL.so, etc… %define __provides_exclude ^lib.*\\.so.*$ -# Double DWZ memory limits -%define _dwz_low_mem_die_limit 20000000 -%define _dwz_max_die_limit 100000000 -#x86 requires SSE2 -#see v8/src/codegen/ia32/assembler-ia32.cc -%ifarch %ix86 -ExclusiveArch: i586 i686 -BuildArch: i686 -%{expand:%%global optflags %(echo "%optflags") -march=pentium4 -mtune=generic} -%endif +# Since https://github.com/chromium/chromium/commit/98742ca1b98b0598b1981671abb994c1a442ba6e blink no longer builds on ix86. +#(use of _mm_cvtsi128_si64) +ExcludeArch: %ix86 + +#private_aggregation_host-uint128.patch adds a int128 which is not supported by 32-bit gcc. +#If anyone still uses these platforms, have fun with fixing it. +ExcludeArch: %arm %bcond_without pipewire @@ -56,120 +51,100 @@ BuildArch: i686 %bcond_with qt - - -%ifarch aarch64 riscv64 #Video acceleration API to support. Useful for e.g. signal messenger. #One cannot enable both, unfortunately. -#Apparently more arm hardware supports v4l2 than vaapi, -#but that code does not build on armv{6,7}hl due to too high cpu requirements. -#bcond_without v4l2 -#bcond_with vaapi -%else -#bcond_with v4l2 -#bcond_without vaapi -%endif - -#DISABLING THIS — cannot use video acceleration with system aom/vpx %bcond_with v4l2 -%bcond_with vaapi +%bcond_without vaapi +%ifarch %arm aarch64 riscv64 +%bcond_with gdbjit +%else +%bcond_without gdbjit +%endif - -%ifnarch %ix86 %arm - -%if (0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}) +#We no longer support 32-bit. %bcond_without lto -%else -%bcond_with lto -%endif -%else -%bcond_with lto -%endif + +%bcond_with mold -%if 0%{?suse_version} || 0%{?fedora} < 40 -%bcond_without system_minizip -%else -%bcond_with system_minizip -%endif - -%if 0%{?suse_version} || 0%{?fedora} >= 39 -%bcond_without icu_73 -%else -%bcond_with icu_73 -%endif - -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 || 0%{?fedora} -%bcond_without system_aom -%bcond_without system_spirv -%bcond_without harfbuzz_5 -%bcond_without link_vulkan -%bcond_without wayland_32 -%else -%bcond_with system_aom -%bcond_with system_spirv -%bcond_with harfbuzz_5 -%bcond_with link_vulkan -%bcond_with wayland_32 -%endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600 -%bcond_without system_yuv -%else %bcond_with system_yuv +%bcond_with system_simdjson + +#CPU level. Leap 16 requires x86-64-v2 so we may force it inside V8. +%if 0%{?suse_version} >= 1550 && 0%{?suse_version} < 1650 +%bcond_without v2 +%else +%bcond_with v2 %endif %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} -%bcond_without ffmpeg_5 %bcond_without system_vpx -%else -%bcond_with ffmpeg_5 -%bcond_with system_vpx -%endif - -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >= 39 +%bcond_without system_aom %bcond_without bro_11 %bcond_without ffmpeg_6 +%bcond_without system_vk_headers +%bcond_without spirv_2024 +%bcond_without cares_21 +%bcond_without nghttp_50 +%bcond_without highway_1_1 %else +%bcond_with system_vpx +%bcond_with system_aom %bcond_with bro_11 %bcond_with ffmpeg_6 +%bcond_with system_vk_headers +%bcond_with spirv_2024 +%bcond_with cares_21 +%bcond_with nghttp_50 +%bcond_with highway_1_1 %endif + %if 0%{?fedora} -%bcond_without system_llhttp + %bcond_without system_histogram -%bcond_without system_simdutf %else -%bcond_with system_llhttp %bcond_with system_histogram -%bcond_with system_simdutf + %endif -%if 0%{?fedora} >= 39 +%if 0%{?fedora} +%bcond_without system_ada +%else +%bcond_with system_ada +%endif + +%if 0%{?fedora} >= 43 +%bcond_without system_llhttp +%else +%bcond_with system_llhttp +%endif + +# requires built with `SIMDUTF_ATOMIC_REF` +%bcond_with system_simdutf + +%if 0%{?fedora} && 0%{?fedora} < 42 %bcond_without system_vma %else %bcond_with system_vma %endif - -#requires `imageSequenceTrackPresent` and `enableParsingGainMapMetadata` both of which are only in post-1.0.0 nightlies -%bcond_with system_avif - # Some chromium code assumes absl::string_view is a typedef for std::string_view. This is not true on GCC7 systems such as Leap. -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >= 39 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} %bcond_without system_abseil %else %bcond_with system_abseil %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 +%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} >= 41 #re2-11 has abseil as a public dependency. If you use system re2 you must use system abseil. %bcond_without system_re2 %else @@ -182,14 +157,11 @@ BuildArch: i686 %define PYVER 311 %endif -%if 0%{?fedora} >= 40 +%if 0%{?fedora} %define AVFORMAT_VER 6.0.1 %define RPMFUSION_VER 6.1-3 %endif -%if 0%{?fedora} >= 38 && 0%{?fedora} < 40 -%define AVFORMAT_VER 6.0.1 -%define RPMFUSION_VER 6.0.1-2 -%endif + %if 0%{?suse_version} @@ -214,31 +186,39 @@ BuildArch: i686 Name: nodejs-electron -Version: 29.4.2 +Version: 37.10.0 %global tag_version %version Release: 0 Summary: Build cross platform desktop apps with JavaScript, HTML, and CSS -License: Apache-2.0 AND blessing AND BSD-2-Clause AND BSD-3-Clause AND BSD-Source-Code AND bzip2-1.0.6 AND ISC AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND MIT-CMU AND MIT-open-group AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND MPL-2.0 AND OpenSSL AND SGI-B-2.0 AND SUSE-Public-Domain AND X11%{!?with_system_minizip: AND Zlib} +License: Apache-2.0 AND blessing AND BSD-2-Clause AND BSD-3-Clause AND BSD-Source-Code AND bzip2-1.0.6 AND ISC AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND MIT-CMU AND MIT-open-group AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND MPL-2.0 AND OpenSSL AND SGI-B-2.0 AND SUSE-Public-Domain AND X11 Group: Development/Languages/NodeJS URL: https://github.com/electron/electron Source0: %{mod_name}-%{tag_version}.tar.zst Source1: create_tarball.sh Source10: electron-launcher.sh -Source11: electron.desktop +Source11: Electron.desktop # Reverse upstream changes to be able to build against ffmpeg-4 Source400: ffmpeg-new-channel-layout.patch Source401: audio_file_reader-ffmpeg-AVFrame-duration.patch Source402: Cr122-ffmpeg-new-channel-layout.patch -# and against harfbuzz 4 -Source415: harfbuzz-replace-chromium-scoped-type.patch -Source416: harfbuzz-replace-HbScopedPointer.patch -# and icu 71 -Source417: v8-icu73-alt_calendar.patch -Source418: v8-icu73-simple-case-folding.patch -# and wayland 1.31 -Source450: wayland-proto-31-cursor-shape.patch +Source403: ffmpeg-7-ffmpeg_video_decoder-reordered_opaque.patch +Source404: ffmpeg-4-AV_PROFILE.patch +# and abseil 2407 +Source461: webrtc-make_ref_counted-absl2024-nullability.patch +# and c-ares 1.19 +Source470: node-cares-1.21.patch +Source471: node-cares-1.21-2.patch +Source472: node-cares-1.21-3.patch +Source473: node-cares-1.21-4.patch +Source474: node-cares-1.21-5.patch +# and spirv 2023 +Source480: angle-SPV_BINARY_TO_TEXT_OPTION_NESTED_INDENT.patch +#and nghttp 1.40 +Source490: node-nghttp-1.50.patch +#and highway 1.0 +Source500: v8-highway-1.1.patch # PATCHES for openSUSE-specific things (compiler flags, paths, etc.) @@ -247,8 +227,6 @@ Patch1: fpic.patch Patch2: common.gypi-compiler.patch Patch3: gcc-enable-lto.patch Patch7: chromium-91-java-only-allowed-in-android-builds.patch -# Always disable use_thin_lto which is an lld feature -Patch21: electron-13-fix-use-thin-lto.patch # Fix common.gypi to include /usr/include/electron Patch25: electron-16-system-node-headers.patch # https://sources.debian.org/patches/chromium/102.0.5005.115-1/debianization/support-i386.patch/ @@ -259,9 +237,18 @@ Patch75: gcc-asmflags.patch Patch77: angle_link_glx.patch Patch78: rdynamic.patch Patch80: icon.patch -Patch82: node-compiler.patch Patch84: aarch64-Xclang.patch Patch85: devtools-frontend-compress_files-oom.patch +Patch86: enable_stack_trace_line_numbers-symbol_level.patch +Patch97: chromium-127-cargo_crate.patch +Patch98: gn-logspam-breaks-install.patch +Patch99: torque-debuginfo.patch +Patch100: reduce-gn-tree.patch +%if %{with v2} +Patch101: v8-assume-x86-64-v2-support.patch +%else +Source101: v8-assume-x86-64-v2-support.patch +%endif # PATCHES that remove code we don't want. Most of them can be reused verbatim by other distributors, @@ -273,25 +260,42 @@ Patch570: disable-fuses.patch # https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?h=102-based&id=d617766b236a93749ddbb50b75573dd35238ffc9 Patch573: disable-webspeech.patch # https://sources.debian.org/patches/chromium/108.0.5359.124-1/disable/tests.patch/ -Patch576: disable-devtools-tests.patch Patch581: disable-tests.patch Patch583: remove-rust.patch Patch585: remove-dawn.patch Patch586: aom-vpx-no-thread-wrapper.patch -Patch587: remove-openscreen.patch Patch588: remove-password-manager-and-policy.patch Patch589: remove-puffin.patch - +Patch590: remove-sync.patch +Patch592: fix-build-without-supervised-users.patch +Patch593: fix-build-without-screen-ai.patch +#patches disabling rust features from Gentoo: https://data.gpo.zugaina.org/pf4public/dev-util/electron/files/ +Patch595: chromium-123-qrcode.patch +Patch596: chromium-130-fontations.patch +Patch597: chromium-125-cloud_authenticator.patch +Patch598: chromium-127-crabby.patch +Patch599: chromium-132-no-rust.patch +#End gentoo patches +Patch602: remove-ai-language-detection-factory-which-requires-tflite-and-libphonenumber.patch +Patch603: build-without-mesage-center.patch +Patch604: disable-avif-really.patch +Patch605: permission-gcc14.2.patch +Patch606: build-without-extensions.patch +Patch607: build-without-guest-view.patch +Patch608: vaapi-no-encoders.patch +Patch609: remove-probabilistic-token-which-uses-private-join-and-compute.patch +Patch610: masked_domain_list-flatbuffers.patch +Patch611: remove-node-sea.patch # PATCHES to use system libs Patch1000: do-not-build-libvulkan.so.patch Patch1017: system-libdrm.patch +Patch1036: node-version-ck.patch +Patch1037: system-dragonbox.patch # http://svnweb.mageia.org/packages/updates/7/chromium-browser-stable/current/SOURCES/chromium-74-pdfium-system-libopenjpeg2.patch?view=markup Patch1038: pdfium-fix-system-libs.patch -# https://sources.debian.org/patches/chromium/102.0.5005.115-1/system/zlib.patch/ -Patch1041: system-zlib.patch Patch1045: angle-system-xxhash.patch Patch1047: cares_public_headers.patch Patch1048: chromium-remove-bundled-roboto-font.patch @@ -301,43 +305,30 @@ Patch1065: base-system-nspr.patch Patch1066: system-gtest.patch Patch1068: system-six.patch Patch1069: system-usb_ids.patch -Patch1070: skia-system-vulkan-headers.patch Patch1071: system-pydeps.patch Patch1072: node-system-icu.patch Patch1073: system-nasm.patch Patch1074: no-zlib-headers.patch -Patch1076: crashpad-use-system-abseil.patch Patch1077: system-wayland.patch -Patch1078: system-simdutf.patch Patch1079: system-libm.patch -Patch1080: system-yuv.patch -Patch1081: chromium-122-abseil-shims.patch +Patch1085: webp-no-sharpyuv.patch +Patch1086: zip_internal-missing-uLong-Z_DEFAULT_COMPRESSION.patch +Patch1088: cr130-abseil-remove-unused-deps.patch +Patch1089: system-absl_algorithm.patch +Patch1090: cr130-absl-base.patch +Patch1091: use-system-libraries-in-node.patch +Patch1092: fix-system-highway.patch +Patch1093: system-sqlite.patch +Patch1094: absl_strings-missing-headers.patch +Patch1095: system-zstd-in-node.patch +Patch1096: system-ffmpeg.patch # PATCHES to fix interaction with third-party software -Patch2004: chromium-gcc11.patch Patch2010: chromium-93-ffmpeg-4.4.patch - -#Since ffmpeg 5, there is no longer first_dts member in AVFormat. Chromium upstream (and Tumbleweed) patches ffmpeg to add a av_stream_get_first_dts function. -#Upstream ref: https://chromium-review.googlesource.com/c/chromium/src/+/3525614 -#This patch is only for Leap which uses ffmpeg 4. It makes chromium use the old api and does not work with ffmpeg 5. -Patch2012: chromium-94-ffmpeg-roll.patch - -# Fixe builds with older clang versions that do not allow -# nomerge attributes on declaration. Otherwise, the following error -# is produced: -# 'nomerge' attribute cannot be applied to a declaration -# See https://reviews.llvm.org/D92800 -Patch2022: electron-13-fix-base-check-nomerge.patch -# Fix electron patched code -Patch2024: electron-16-std-vector-non-const.patch -Patch2029: electron-16-webpack-fix-openssl-3.patch -Patch2031: partition_alloc-no-lto.patch Patch2032: seccomp_bpf-no-lto.patch Patch2034: swiftshader-LLVMJIT-AddressSanitizerPass-dead-code-remove.patch Patch2035: RenderFrameHostImpl-use-after-free.patch -# https://github.com/electron/electron/pull/40032 -Patch2040: build-without-extensions.patch %if %{without bro_11} Patch2042: brotli-remove-shared-dictionary.patch %else @@ -345,62 +336,71 @@ Source2042: brotli-remove-shared-dictionary.patch %endif Patch2045: libxml-2.12-xmlCtxtGetLastError-const.patch Patch2046: chromium-118-sigtrap_system_ffmpeg.patch -%if %{with system_minizip} -Source2047: bundled-minizip.patch -%else -Patch2047: bundled-minizip.patch -%endif Patch2048: absl2023-encapsulated_web_transport-StrCat.patch +#Work around gcc14 overly aggressive optimizer. +Patch2058: v8-strict-aliasing.patch +#Fix opus audio not working (eg. Element voice messages) +Patch2059: disable-FFmpegAllowLists.patch +# https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-129-disable-H.264-video-parser-during-demuxing.patch +Patch2060: chromium-129-disable-H.264-video-parser-during-demuxing.patch +Patch2061: private_aggregation_host-uint128.patch +Patch2062: wayland_version.patch +#Conditionably disable feature which requires new highway +Patch2064: blink-shape_result-highway.patch +Patch2066: angle-BlobCache-Success.patch +Patch2067: partition_alloc-strict-aliasing.patch +Patch2068: llhttp-lax-vector-conversions.patch # PATCHES that should be submitted upstream verbatim or near-verbatim -Patch3016: chromium-98-EnumTable-crash.patch -# Fix blink nodestructor -Patch3023: electron-13-blink-gcc-ambiguous-nodestructor.patch Patch3027: electron-16-freetype-visibility-list.patch Patch3028: electron-16-third_party-symbolize-missing-include.patch # From https://git.droidware.info/wchen342/ungoogled-chromium-fedora Patch3033: chromium-94.0.4606.71-InkDropHost-crash.patch -# https://salsa.debian.org/chromium-team/chromium/-/blob/456851fc808b2a5b5c762921699994e957645917/debian/patches/upstream/nested-nested-nested-nested-nested-nested-regex-patterns.patch -Patch3064: nested-nested-nested-nested-nested-nested-regex-patterns.patch Patch3080: compact_enc_det_generated_tables-Wnarrowing.patch Patch3096: remove-date-reproducible-builds.patch -Patch3118: material_color_utilities-tones-missing-round.patch -Patch3126: perfetto-numeric_storage-double_t.patch -Patch3129: text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch -Patch3132: v8-instance-type-inl-constexpr-used-before-its-definition.patch Patch3133: swiftshader-llvm18-LLVMReactor-getInt8PtrTy.patch Patch3134: swiftshader-llvm18-LLVMJIT-Host.patch Patch3135: swiftshader-llvm18-LLVMJIT-CodeGenOptLevel.patch -Patch3136: CVE-2024-30260-undici-clear-proxy-authorization.patch -Patch3137: CVE-2024-30261-undici-fetch-integrity.patch -Patch3138: distributed_point_functions-aes_128_fixed_key_hash-missing-StrCat.patch -Patch3139: chromium-122-avoid-SFINAE-TypeConverter.patch -Patch3140: plus_address_types-missing-optional.patch -Patch3141: chromium-122-BookmarkNode-missing-operator.patch -Patch3142: search_engine_choice_service-missing-optional.patch -Patch3143: race_network_request_write_buffer_manager-missing-optional.patch Patch3144: mt21_util-flax-vector-conversions.patch -Patch3145: script_promise_resolver-explicit-specialization.patch -Patch3146: hit_test_request-missing-optional.patch -Patch3147: grid_sizing_tree-Wchanges-meaning.patch -Patch3148: resolution_monitor-missing-bitset.patch -Patch3149: boringssl-internal-addc-cxx.patch -Patch3150: InternalAllocator-too-many-initializers.patch -Patch3151: distributed_point_functions-evaluate_prg_hwy-signature.patch -Patch3152: fake_ssl_socket_client-Wlto-type-mismatch.patch +Patch3174: swiftshader-llvm19-LLVMJIT-getHostCPUFeatures.patch +Patch3175: swiftshader-llvm19-LLVMReactor-incomplete-Module.patch +Patch3185: bsc1224178-font-gc.patch +Patch3186: string_view-incomplete-CodePointIterator.patch +Patch3187: swiftshader-llvm20-absoluteSymbols.patch +Patch3198: ax_platform_node_id-fpermissive.patch +Patch3204: browser_process_impl-fix-safe_browsing_mode-0.patch +Patch3209: file_dialog-missing-uint32_t.patch +Patch3210: webrtc-138-Wchanges-meaning.patch +Patch3211: sandboxed_vfs_file_impl-missing-memset.patch +Patch3212: lock_impl_posix-pthread_mutexattr_setprotocol-conflicting.patch +Patch3213: node-kParentNodeTag-constexpr-initializer.patch +Patch3214: pickle_traits-kIndexSequence-constexpr-initializer.patch +Patch3215: offscreen_canvas-incomplete-LayoutLocale.patch +Patch3216: identity_request_account-incomplete-IdentityProviderData.patch +Patch3217: xr_webgl_swap_chain-incomplete-StaticBitmapImage.patch +Patch3218: json_to_struct-fixed_flat_map-conflicting-declaration.patch +Patch3219: webgl_rendering_context_webgpu_base-incomplete-StaticBitmapImage.patch +Patch3220: picture_in_picture_events_info-string-constexpr.patch +Patch3221: event_record-optional-initializer.patch +Patch3222: ANNOTATE_CONTIGUOUS_CONTAINER-Wodr.patch +Patch3223: v8-simd-flax-vector-conversions.patch +Patch3224: swiftshader-llvm21.patch +Patch3225: webrtc-pipewire_session-missing-spa_pod_object_find_prop.patch +Patch3226: linux_seccomp-SYS_SECCOMP.patch # Patches to re-enable upstream force disabled features. # There's no sense in submitting them but they may be reused as-is by other packagers. Patch5000: more-locales.patch -Patch5006: chromium-vaapi.patch BuildRequires: brotli -%if %{with system_cares} BuildRequires: c-ares-devel +%if %{with cares_21} +BuildRequires: c-ares-devel >= 1.21 %endif BuildRequires: cmake(Crc32c) BuildRequires: double-conversion-devel BuildRequires: desktop-file-utils +BuildRequires: dragonbox-devel %if 0%{?fedora} BuildRequires: flatbuffers-compiler %endif @@ -413,25 +413,33 @@ BuildRequires: HdrHistogram_c-devel BuildRequires: hicolor-icon-theme BuildRequires: hwdata BuildRequires: ImageMagick +%if 0%{?fedora} >= 34 +BuildRequires: increase-file-max +%endif %if 0%{?fedora} BuildRequires: libatomic %endif +%if %{with system_ada} +BuildRequires: cmake(ada) +%endif %if %{with system_aom} -# requires AV1E_SET_QUANTIZER_ONE_PASS -BuildRequires: libaom-devel >= 3.7~ +BuildRequires: libaom-devel >= 3.8~ %endif BuildRequires: libbsd-devel BuildRequires: libpng-devel BuildRequires: libXNVCtrl-devel %if %{with system_llhttp} -BuildRequires: llhttp-devel >= 8 +BuildRequires: llhttp-devel >= 9.3 %endif %if %{with swiftshader} && %{without subzero} BuildRequires: llvm-devel >= 16 %endif BuildRequires: memory-constraints +%if %{with mold} +BuildRequires: mold +%endif %ifarch %ix86 x86_64 %x86_64 -%if %{without system_aom} || %{without system_vpx} +%if %{without system_vpx} BuildRequires: nasm %endif %endif @@ -440,14 +448,15 @@ BuildRequires: ninja >= 1.7.2 %else BuildRequires: ninja-build >= 1.7.2 %endif -%if 0%{?fedora} >= 37 +%if 0%{?fedora} BuildRequires: nodejs-npm +#otherwise electron-typescript-definitions crashes like https://github.com/nodejs/node/issues/51752 +BuildRequires: nodejs-full-i18n %else BuildRequires: npm %endif -%if 0%{?suse_version} -BuildRequires: nodejs-packaging -%endif +BuildRequires: npm(rollup) +BuildRequires: nodejs-packaging BuildRequires: pkgconfig BuildRequires: plasma-wayland-protocols BuildRequires: python3-json5 @@ -460,14 +469,20 @@ BuildRequires: (python3-setuptools if python3 >= 3.12) %endif BuildRequires: python%{PYVER}-six %if %{with system_simdutf} -BuildRequires: simdutf-devel >= 3 +BuildRequires: simdutf-devel >= 5 %endif BuildRequires: snappy-devel %if 0%{?suse_version} BuildRequires: update-desktop-files %endif BuildRequires: util-linux -BuildRequires: vulkan-headers +%if %{with system_vk_headers} +# Actually we need also SpvFPEncoding from spirv-headers but Fedora version is non-indicative. +# Let's only specify the vulkan version because they are usually updated together. +BuildRequires: vulkan-headers >= 1.3.296 +%endif +#For skia, needed anyway +BuildRequires: vulkan-headers >= 1.3 %if %{with system_vma} BuildRequires: VulkanMemoryAllocator-devel >= 3 %endif @@ -498,13 +513,14 @@ BuildRequires: pkgconfig(absl_int128) BuildRequires: pkgconfig(absl_memory) BuildRequires: pkgconfig(absl_node_hash_map) BuildRequires: pkgconfig(absl_node_hash_set) +BuildRequires: pkgconfig(absl_nullability) BuildRequires: pkgconfig(absl_optional) BuildRequires: pkgconfig(absl_random_random) BuildRequires: pkgconfig(absl_span) BuildRequires: pkgconfig(absl_stacktrace) BuildRequires: pkgconfig(absl_status) BuildRequires: pkgconfig(absl_statusor) -BuildRequires: pkgconfig(absl_strings) +BuildRequires: pkgconfig(absl_strings) >= 20240700 BuildRequires: pkgconfig(absl_str_format) BuildRequires: pkgconfig(absl_symbolize) BuildRequires: pkgconfig(absl_synchronization) @@ -525,47 +541,28 @@ BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glproto) -BuildRequires: pkgconfig(gtest) +BuildRequires: pkgconfig(gtest) >= 1.12 BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(harfbuzz) >= 3 -%if %{with harfbuzz_5} BuildRequires: pkgconfig(harfbuzz) >= 5 -%endif -BuildRequires: pkgconfig(icu-i18n) >= 71 -%if %{with icu_73} BuildRequires: pkgconfig(icu-i18n) >= 73 -%else -BuildRequires: pkgconfig(icu-i18n) >= 71 -%endif BuildRequires: pkgconfig(jsoncpp) %if 0%{?fedora} Recommends: (ffmpeg-libs%{_isa} or libavcodec-freeworld%{_isa}) %endif %if %{with ffmpeg_6} BuildRequires: pkgconfig(libavcodec) >= 60 -%endif -%if %{with ffmpeg_5} -BuildRequires: pkgconfig(libavcodec) >= 59 -BuildRequires: pkgconfig(libavformat) >= 59 -BuildRequires: pkgconfig(libavutil) >= 57 +BuildRequires: pkgconfig(libavformat) >= 60 +BuildRequires: pkgconfig(libavutil) >= 58 %if 0%{?fedora} #requires av_stream_get_first_dts, see rhbz#2240127 BuildRequires: libavformat-free-devel >= %AVFORMAT_VER Requires: (ffmpeg-libs%{_isa} >= %RPMFUSION_VER or libavformat-free%{_isa} >= %AVFORMAT_VER) -# have choice for libvpl.so.2()(64bit) needed by libavcodec-free: libvpl oneVPL -%ifarch x86_64 %x86_64 -BuildRequires: oneVPL -%endif %endif %else BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavformat) >= 58 BuildRequires: pkgconfig(libavutil) %endif -%if %{with system_avif} -# Needs avifRGBImage::maxThreads -BuildRequires: pkgconfig(libavif) >= 1 -%endif %if %{with bro_11} BuildRequires: pkgconfig(libbrotlicommon) >= 1.1~ %endif @@ -574,13 +571,21 @@ BuildRequires: pkgconfig(libbrotlienc) BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libdrm) -BuildRequires: pkgconfig(libevent) +%if %{with highway_1_1} +# requires SumsOf2 +BuildRequires: pkgconfig(libhwy) >= 1.1 +%endif BuildRequires: pkgconfig(libhwy) >= 1 +%if %{with nghttp_50} +# needs nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation +BuildRequires: pkgconfig(libnghttp2) >= 1.50 +%endif BuildRequires: pkgconfig(libnghttp2) BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libsecret-1) +BuildRequires: pkgconfig(libudev) %if %{with vaapi} BuildRequires: pkgconfig(libva) %endif @@ -590,16 +595,15 @@ BuildRequires: pkgconfig(libxml-2.0) >= 2.9.5 BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(libxxhash) %if %{with system_yuv} -# needs I410ToI420 -BuildRequires: pkgconfig(libyuv) >= 1855 +%if 0%{?suse_version} +# needs I010ToNV12 +BuildRequires: pkgconfig(libyuv) >= 1894 %endif -%if %{with system_minizip} -%if 0%{?fedora} -BuildRequires: minizip-compat-devel -%else +# Fedora does not provide meaningful versioning, sorry +BuildRequires: pkgconfig(libyuv) +%endif +BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(minizip) -%endif -%endif BuildRequires: pkgconfig(nspr) >= 4.9.5 BuildRequires: pkgconfig(nss) >= 3.26 BuildRequires: pkgconfig(opus) >= 1.3.1 @@ -614,21 +618,22 @@ BuildRequires: pkgconfig(Qt6Widgets) #re2-11 has abseil as a public dependency. If you use system re2 you must use system abseil. BuildRequires: cmake(re2) >= 11 %endif -%if %{with system_spirv} +%if %{with system_simdjson} +# requires https://github.com/simdjson/simdjson/commit/f64c004cb71b08fdadb9881e2f0525800a0356e2 +BuildRequires: pkgconfig(simdjson) >= 3.13 +%endif %if 0%{?suse_version} BuildRequires: spirv-headers %else BuildRequires: spirv-headers-devel %endif +%if %{with spirv_2024} +BuildRequires: pkgconfig(SPIRV-Tools) >= 2024 +%endif BuildRequires: pkgconfig(SPIRV-Tools) >= 2022.2 -%endif -%if %{with link_vulkan} +BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(vulkan) >= 1.3 -%endif -BuildRequires: pkgconfig(wayland-protocols) -%if %{with wayland_32} -BuildRequires: pkgconfig(wayland-protocols) >= 1.32 -%endif +BuildRequires: pkgconfig(wayland-protocols) >= 1.37 BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xshmfence) BuildRequires: pkgconfig(zlib) @@ -641,13 +646,19 @@ BuildRequires: libjpeg-turbo-devel # requires VP9E_SET_QUANTIZER_ONE_PASS BuildRequires: pkgconfig(vpx) >= 1.13~ %endif -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} -BuildRequires: gcc >= 13 -BuildRequires: gcc-c++ >= 13 +%if 0%{?suse_version} >= 1650 || 0%{?fedora} +BuildRequires: gcc >= 14 +BuildRequires: gcc-c++ >= 14 %else -BuildRequires: gcc13-PIE -BuildRequires: gcc13-c++ +%if 0%{?suse_version} >= 1550 +BuildRequires: gcc15-PIE +BuildRequires: gcc15-c++ +%else +BuildRequires: gcc14-PIE +BuildRequires: gcc14-c++ %endif +%endif + %if %{with pipewire} BuildRequires: pkgconfig(libpipewire-0.3) BuildRequires: pkgconfig(libspa-0.2) @@ -656,14 +667,6 @@ BuildRequires: pkgconfig(libspa-0.2) Requires: hicolor-icon-theme Requires: google-roboto-fonts -# This required library is dlopened -%if %{without link_vulkan} -%ifarch %ix86 %arm -Requires: libvulkan.so.1 -%else -Requires: libvulkan.so.1()(64bit) -%endif -%endif %if %{with qt} %if 0%{?fedora} @@ -735,43 +738,54 @@ providing better integration with desktop environments such as KDE. - # Sanity check if macro corresponds to the actual ABI test $(grep ^node_module_version electron/build/args/all.gn | sed 's/.* = //') = %abi_version -%if %{without system_abseil} -patch -R -p1 < %PATCH1076 + + + + +%if %{without cares_21} +patch -R -p1 < %SOURCE472 +patch -R -p1 < %SOURCE471 +patch -R -p1 < %SOURCE470 +patch -R -p1 < %SOURCE474 +patch -R -p1 < %SOURCE473 %endif + + %if %{without ffmpeg_6} +patch -R -p1 < %SOURCE403 patch -R -p1 < %SOURCE402 -%endif - -%if %{with ffmpeg_5} -patch -R -p1 < %PATCH2012 -%else patch -R -p1 < %SOURCE400 -%endif - - - -%if %{without harfbuzz_5} -patch -R -p1 < %SOURCE415 -patch -R -p1 < %SOURCE416 -%endif - -%if %{without icu_73} -patch -R -p1 < %SOURCE417 -patch -R -p1 < %SOURCE418 -%endif - -%if %{without wayland_32} -patch -R -p1 < %SOURCE450 -%endif - - -# This one depends on an ffmpeg nightly, reverting unconditionally. patch -R -p1 < %SOURCE401 +patch -R -p1 < %SOURCE404 +%endif + +%if %{without spirv_2024} +patch -R -p1 < %SOURCE480 +%endif + +%if %{without nghttp_50} +patch -R -p1 < %SOURCE490 +%endif + +%if %{without highway_1_1} +patch -R -p1 < %SOURCE500 +%endif + + +# This one just removes compatibility with old abseil and does not add anything, reverting unconditionally. +patch -R -p1 < %SOURCE461 + + +#Replace non-free rollup 4.x with rollup 3.x. This probably won't last for long and we will have to figure out how to build rollup 4 +rm -rf third_party/node/node_modules/@rollup/wasm-node/ +rm -rf third_party/devtools-frontend/src/node_modules/@rollup/wasm-node/ +cp -arvT %{nodejs_sitelib}/rollup third_party/node/node_modules/@rollup/wasm-node +cp -alrvT third_party/node/node_modules/@rollup/wasm-node third_party/devtools-frontend/src/node_modules/@rollup/wasm-node + # Link system wayland-protocols-devel into where chrome expects them mkdir -p third_party/wayland/src @@ -795,6 +809,131 @@ ln -sf %{_bindir}/eu-strip buildtools/third_party/eu-strip/bin/eu-strip sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ tools/generate_shim_headers/generate_shim_headers.py +# Remove bundled libraries +gn_system_libraries=( + brotli + crc32c + dav1d + double-conversion + ffmpeg + flac + flatbuffers + fontconfig + freetype + harfbuzz-ng + highway + icu + jsoncpp + libdrm + libjpeg + libpng + libsecret + libusb + libwebp + libXNVCtrl + libxml + libxslt + opus + snappy + woff2 + zlib + zstd + swiftshader-SPIRV-Headers + swiftshader-SPIRV-Tools + vulkan-SPIRV-Tools +) + +%if %{with system_abseil} +find third_party/abseil-cpp -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( + absl_algorithm + absl_base + absl_cleanup + absl_crc + absl_container + absl_debugging + absl_flags + absl_functional + absl_hash + absl_log + absl_log_internal + absl_memory + absl_meta + absl_numeric + absl_random + absl_status + absl_strings + absl_synchronization + absl_time + absl_types + absl_utility +) +%endif + + +%if %{with system_aom} +find third_party/libaom -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( libaom ) +%endif + + + + + + +%if %{with system_re2} +find third_party/re2 -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( re2 ) +%endif + + +%if %{with system_vk_headers} +find third_party/vulkan-headers -type f ! -name "*.gn" -a ! -name "*.gni" -delete +find third_party/spirv-headers -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( vulkan-SPIRV-Headers ) +%endif + +%if %{with system_vma} +find third_party/vulkan_memory_allocator -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( vulkan_memory_allocator ) +%endif + +%if %{with system_vpx} +find third_party/libvpx -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( libvpx ) +%endif + + +%if %{with system_yuv} +find third_party/libyuv -type f ! -name "*.gn" -a ! -name "*.gni" -delete +gn_system_libraries+=( libyuv ) +%endif + +%if %{with system_simdutf} +find third_party/simdutf -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +gn_system_libraries+=( simdutf ) +%endif + +build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries[@]} + + +%if %{with system_ada} +find third_party/electron_node/deps/ada -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +%endif + +%if %{with system_llhttp} +find third_party/electron_node/deps/llhttp -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +%endif + +%if %{with system_histogram} +find third_party/electron_node/deps/histogram -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +%endif + +%if %{with system_simdjson} +find third_party/electron_node/deps/simdjson -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete +%endif + + %build pushd electron/shell/browser/resources/win @@ -845,54 +984,74 @@ ARCH_FLAGS="$(echo $ARCH_FLAGS | sed -e 's/ -fexceptions / /g')" # for wayland export CXXFLAGS="${ARCH_FLAGS} -I/usr/include/wayland -I/usr/include/libxkbcommon" + +#no pkgconfig, only cmake. add the include path manually +%if 0%{?fedora} +export CXXFLAGS="${CXXFLAGS} -I$(echo /usr/include/dragonbox-*)" +%endif + export CFLAGS="${CXXFLAGS}" # Google has a bad coding style, using a macro `NOTREACHED()` that is not properly detected by GCC # multiple times throughout the codebase (including generated code). It is not possible to redefine the macro to __builtin_unreachable, # as it has an astonishing syntax, behaving like an ostream (in debug builds it is supposed to trap and print an error message) export CXXFLAGS="${CXXFLAGS} -Wno-error=return-type" -# [ 8947s] gen/third_party/blink/renderer/bindings/modules/v8/v8_gpu_sampler_descriptor.h:212:39: error: narrowing conversion of '4294967295' from 'unsigned int' to 'float' [-Wnarrowing] -# [ 8947s] 212 | float member_lod_max_clamp_{0xffffffff}; -# I have no idea where this code is generated, and it is not something that needs a critical fix. -# Remove this once upstream issues a proper patch. -export CXXFLAGS="${CXXFLAGS} -Wno-error=narrowing" # A bunch of memcpy'ing of JSObject in V8 runs us into “Logfile got too big, killed job.” export CXXFLAGS="${CXXFLAGS} -Wno-class-memaccess" +# Warning spam from generated mojom code again makes the log too big +export CXXFLAGS="${CXXFLAGS} -Wno-packed-not-aligned -Wno-address" +# warning spam in third_party/blink/renderer/bindings/modules/v8 +export CXXFLAGS="${CXXFLAGS} -Wno-template-id-cdtor -Wno-non-virtual-dtor" # REDUCE DEBUG for C++ as it gets TOO large due to “heavy hemplate use in Blink”. See symbol_level below and chromium-102-compiler.patch export CXXFLAGS="$(echo ${CXXFLAGS} | sed -e 's/-g / /g' -e 's/-g$//g')" -%ifnarch x86_64 %x86_64 +#Fix build with abseil < 2025 +export CXXFLAGS="$CXXFLAGS -Dabsl_nullable= -Dabsl_nonnull= " + +%ifarch %ix86 %arm export CFLAGS="$(echo ${CFLAGS} | sed -e 's/-g /-g1 /g' -e 's/-g$/-g1/g')" %endif + #The chromium build process passes lots of .o files directly to the linker instead of using static libraries, #and relies on the linker eliminating unused sections. #Re-add these parameters from build/config/compiler/BUILD.gn. export LDFLAGS="%{?build_ldflags} -Wl,-O2 -Wl,--gc-sections " +# mold does not respect it otherwise +export LDFLAGS="$LDFLAGS -Wl,--as-needed" + %ifarch %ix86 %arm #try to reduce memory -export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory" +export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif #ifarch ix86 arm -%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora} +%if 0%{?suse_version} >= 1650 || 0%{?fedora} export CC=gcc export CXX=g++ export AR=gcc-ar export NM=gcc-nm export RANLIB=gcc-ranlib %else -export CC=gcc-13 -export CXX=g++-13 -export AR=gcc-ar-13 -export NM=gcc-nm-13 -export RANLIB=gcc-ranlib-13 +%if 0%{?suse_version} >= 1550 +export CC=gcc-15 +export CXX=g++-15 +export AR=gcc-ar-15 +export NM=gcc-nm-15 +export RANLIB=gcc-ranlib-15 +%else +export CC=gcc-14 +export CXX=g++-14 +export AR=gcc-ar-14 +export NM=gcc-nm-14 +export RANLIB=gcc-ranlib-14 +%endif %endif @@ -912,153 +1071,36 @@ unset MALLOC_PERTURB_ %if %{with lto} %ifarch aarch64 -export LDFLAGS="$LDFLAGS -flto=2 --param ggc-min-expand=20 --param ggc-min-heapsize=32768 --param lto-max-streaming-parallelism=1 -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +export LDFLAGS="$LDFLAGS -flto=auto --param ggc-min-expand=20 --param ggc-min-heapsize=32768 --param lto-max-streaming-parallelism=4 " %else # x64 is fine with the the default settings (the machines have 30GB+ ram) export LDFLAGS="$LDFLAGS -flto=auto" %endif %endif -gn_system_libraries=( - brotli - crc32c - dav1d - double-conversion - ffmpeg - flac - flatbuffers - fontconfig - freetype - harfbuzz-ng - highway - icu - jsoncpp - libdrm - libevent - libjpeg - libpng - libsecret - libusb - libwebp - libXNVCtrl - libxml - libxslt - opus - snappy - woff2 - zlib -) - -%if %{with system_abseil} -find third_party/abseil-cpp -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( - absl_algorithm - absl_base - absl_cleanup - absl_crc - absl_container - absl_debugging - absl_flags - absl_functional - absl_hash - absl_log - absl_log_internal - absl_memory - absl_meta - absl_numeric - absl_random - absl_status - absl_strings - absl_synchronization - absl_time - absl_types - absl_utility -) +%if %{with mold} +export LDFLAGS="$LDFLAGS -fuse-ld=mold" %endif +# Ccache is truncated to 5GB which is not enough for Electron, leading to slower rebuilds +export CCACHE_COMPRESS=1 +ccache -o max_size=0 || true -%if %{with system_aom} -find third_party/libaom -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( libaom ) -%endif - -%if %{with system_avif} -find third_party/libavif -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( libavif ) -%endif - - - - -%if %{with system_minizip} -find third_party/zlib/contrib -type f ! -name "*.gn" -a ! -name "*.gni" -delete -%endif - - -%if %{with system_re2} -find third_party/re2 -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( re2 ) -%endif - - -%if %{with system_spirv} -find third_party/swiftshader/third_party/SPIRV-Headers/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete -find third_party/swiftshader/third_party/SPIRV-Tools/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete - -find third_party/vulkan-deps/spirv-headers/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete -find third_party/vulkan-deps/spirv-tools/ -type f ! -name "*.gn" -a ! -name "*.gni" -delete - -gn_system_libraries+=( - swiftshader-SPIRV-Headers - swiftshader-SPIRV-Tools -#The following can only be unbundled if you don't build DAWN (WebGPU) - vulkan-SPIRV-Headers - vulkan-SPIRV-Tools -) -%endif - -%if %{with system_vma} -find third_party/vulkan_memory_allocator -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( vulkan_memory_allocator ) -%endif - -%if %{with system_vpx} -find third_party/libvpx -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( libvpx ) -%endif - - -%if %{with system_yuv} -find third_party/libyuv -type f ! -name "*.gn" -a ! -name "*.gni" -delete -gn_system_libraries+=( libyuv ) -%endif - -build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries[@]} - -%if %{with link_vulkan} -find third_party/angle/src/third_party/volk -type f ! -name "*.gn" -a ! -name "*.gni" -delete -%endif - -%if %{with system_llhttp} -find third_party/electron_node/deps/llhttp -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete -%endif - -%if %{with system_histogram} -find third_party/electron_node/deps/histogram -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete -%endif - -%if %{with system_simdutf} -find third_party/electron_node/deps/simdutf -type f ! -name "*.gn" -a ! -name "*.gni" -a ! -name "*.gyp" -a ! -name "*.gypi" -delete -%endif +#see generate_node_headers.py +export ELECTRON_OUT_DIR=Release # Create the configuration for GN # Available options: out/Release/gn args --list out/Release/ myconf_gn="" myconf_gn+=' override_electron_version="%{tag_version}"' -myconf_gn+=' electron_vendor_version="suse:Electron for openSUSE"' +# The only known consumer of process.versions. is VSCode: +# https://github.com/microsoft/vscode/blob/main/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts +myconf_gn+=' electron_vendor_version="microsoft-build:Electron for openSUSE"' myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" myconf_gn+=" use_custom_libcxx=false" +myconf_gn+=' use_safe_libstdcxx=false' +myconf_gn+=' use_llvm_libatomic=false' %ifarch %ix86 myconf_gn+=" host_cpu=\"x86\"" %endif @@ -1111,9 +1153,7 @@ myconf_gn+=" use_cups=false" # link libvulkan.so and libGLX.so instead of dlopening myconf_gn+=" angle_use_custom_libvulkan=false" -%if %{with link_vulkan} myconf_gn+=" angle_shared_libvulkan=false" -%endif myconf_gn+=" angle_link_glx=true" #Use faster flat_map instead of fallback std::unordered_map implementation in ANGLE. @@ -1130,13 +1170,13 @@ myconf_gn+=' angle_enable_swiftshader=true' # do not build PDF support +myconf_gn+=' enable_glic=false' myconf_gn+=" enable_pdf=false" +myconf_gn+=' enable_pdf_ink2=false' myconf_gn+=" enable_pdf_viewer=false" myconf_gn+=" enable_print_preview=false" myconf_gn+=" enable_printing=false" -myconf_gn+=" enable_basic_printing=false" myconf_gn+=' use_cups=false' -myconf_gn+=' enable_print_content_analysis=false' #we don't build PDF support, so disabling the below: #myconf_gn+=" use_system_lcms2=true" #myconf_gn+=" use_system_libopenjpeg2=true" @@ -1150,47 +1190,48 @@ myconf_gn+=' content_enable_legacy_ipc=true' #do not build webextensions support myconf_gn+=' enable_electron_extensions=false' -myconf_gn+=' enable_extensions_legacy_ipc=false' +myconf_gn+=' enable_platform_apps=false' # The option below get overriden by whatever is in CFLAGS/CXXFLAGS, so they affect only C++ code. # symbol_level=2 is full debug # symbol_level=1 is enough info for stacktraces # symbol_level=0 no debuginfo (only function names in private symbols) # blink (HTML engine) and v8 (js engine) are template-heavy, trying to compile them with full debug leads to linker errors due to inherent limitations of the DWARF format. -%ifnarch %ix86 %arm aarch64 + +%if 0%{?fedora} +myconf_gn+=' symbol_level=1' #OOM during linking +%else +%ifarch aarch64 #OOM or logidlelimit, pick your poison +myconf_gn+=' symbol_level=1' +%else myconf_gn+=' symbol_level=2' +%endif +%endif myconf_gn+=' blink_symbol_level=1' myconf_gn+=' v8_symbol_level=1' -%endif -%ifarch %ix86 %arm -#Sorry, no debug on 32bit. -myconf_gn+=" symbol_level=1" -myconf_gn+=" blink_symbol_level=0" -myconf_gn+=" v8_symbol_level=0" -%endif -%ifarch aarch64 -# linker OOM, sorry. -# we still seem to get some debug generated during linking when LTO is enabled -myconf_gn+=' symbol_level=0' -myconf_gn+=' blink_symbol_level=0' -myconf_gn+=' v8_symbol_level=0' -%endif + +#symbol_level should not affect generated code. +myconf_gn+=' enable_stack_trace_line_numbers=true' + +#This does nothing since we patch the config out, but is needed to avoid an assert +myconf_gn+=' use_debug_fission=true' # do not build some chrome features not used by electron # (some of these only go to buildflag_headers and are dead code rn, but disabling them preemptively as long as they're visible) myconf_gn+=" enable_vr=false" -myconf_gn+=" enable_reading_list=false" myconf_gn+=" enable_reporting=false" myconf_gn+=" build_with_tflite_lib=false" myconf_gn+=" build_tflite_with_xnnpack=false" -myconf_gn+=" build_webnn_with_xnnpack=false" +myconf_gn+=' build_tflite_with_opencl=false' myconf_gn+=" safe_browsing_mode=0" -myconf_gn+=" enable_maldoca=false" +myconf_gn+=' safe_browsing_use_unrar=false' myconf_gn+=" enable_captive_portal_detection=false" myconf_gn+=" enable_browser_speech_service=false" myconf_gn+=" enable_speech_service=false" myconf_gn+=" enable_screen_ai_service=false" +myconf_gn+=' enable_screen_ai_browsertests=false' +myconf_gn+=' enable_constraints=false' myconf_gn+=" include_transport_security_state_preload_list=false" myconf_gn+=" enable_web_speech=false" myconf_gn+=" chrome_wide_echo_cancellation_supported=false" @@ -1199,51 +1240,60 @@ myconf_gn+=" enable_click_to_call=false" myconf_gn+=" enable_webui_tab_strip=false" myconf_gn+=" enable_webui_certificate_viewer=false" myconf_gn+=" enable_background_contents=false" -myconf_gn+=" enable_extractors=false" -myconf_gn+=" enable_feed_v2=false" myconf_gn+=" ozone_platform_headless=false" myconf_gn+=" angle_enable_gl_null=false" myconf_gn+=" enable_paint_preview=false" myconf_gn+=" use_bundled_weston=false" -myconf_gn+=" enable_component_updater=false" myconf_gn+=" enable_lens_desktop=false" myconf_gn+=' enable_bound_session_credentials=false' myconf_gn+=' enable_chrome_notifications=false' myconf_gn+=' enable_message_center=false' -myconf_gn+=' enable_system_notifications=false' myconf_gn+=' enable_supervised_users=false' myconf_gn+=' enable_compose=false' myconf_gn+=' enterprise_cloud_content_analysis=false' myconf_gn+=' enterprise_local_content_analysis=false' -myconf_gn+=' enterprise_data_controls=false' -myconf_gn+=' enterprise_client_certificates=false' myconf_gn+=' enterprise_watermark=false' myconf_gn+=' enterprise_content_analysis=false' +myconf_gn+=' enable_video_effects=false' +myconf_gn+=' use_fake_screen_ai=true' +myconf_gn+=' webnn_use_tflite=false' +myconf_gn+=' build_dawn_tests=false' +myconf_gn+=' enable_compute_pressure=false' + + +#These can only be disabled if we don't start at //... but at //electron:... +myconf_gn+=' absl_build_tests=false' +myconf_gn+=' build_with_model_execution=false' +myconf_gn+=' enable_extensions=false' +myconf_gn+=' enable_guest_view=false' +myconf_gn+=' enable_extensions_core=true' #cannot be disabled yet +myconf_gn+=' enable_on_device_translation=false' +myconf_gn+=' enable_session_service=false' +myconf_gn+=' enterprise_client_certificates=false' +myconf_gn+=' enterprise_data_controls=false' +myconf_gn+=' enterprise_telomere_reporting=false' + #FIXME: possibly enable this when skia gets built with rust code by default. #Need to patch in optflags and possibly FFI LTO hacks (see signal-desktop package for how it's done) myconf_gn+=' enable_rust=false' +myconf_gn+=' enable_rust_png=false' myconf_gn+=' enable_chromium_prelude=false' +myconf_gn+=' rtc_rusty_base64=false' +myconf_gn+=' v8_enable_temporal_support=false' -#See net/base/features.cc. It's not enabled yet. -#FIXME: enable this and add shims to build with system zstd when it's enabled -myconf_gn+=' disable_zstd_filter=true' - -myconf_gn+=' chrome_certificate_policies_supported=false' +#myconf_gn+=' chrome_root_store_cert_management_ui=false' myconf_gn+=' use_kerberos=false' -myconf_gn+=' disable_histogram_support=true' - - #Do not build Chromecast myconf_gn+=" enable_remoting=false" myconf_gn+=" enable_media_remoting=false" myconf_gn+=" enable_service_discovery=false" +myconf_gn+=' enable_mdns=false' #disable some debug/tracing hooks, they increase size and we do not build chrome://tracing anyway (see disable-catapult.patch) -myconf_gn+=" enable_trace_logging=false" myconf_gn+=" optional_trace_events_enabled=false" myconf_gn+=" rtc_disable_logging=true" myconf_gn+=" rtc_disable_metrics=true" @@ -1255,6 +1305,7 @@ myconf_gn+=' enable_perfetto_zlib=false' + myconf_gn+=' dawn_complete_static_libs=true' myconf_gn+=" enable_library_cdms=false" myconf_gn+=" use_pulseaudio=true link_pulseaudio=true" @@ -1262,10 +1313,6 @@ myconf_gn+=" is_component_build=false" myconf_gn+=" use_sysroot=false" myconf_gn+=" fatal_linker_warnings=false" -#disable malloc interposer - bsc#1223366 -myconf_gn+=' use_allocator_shim=false' -myconf_gn+=' enable_backup_ref_ptr_support=false' -myconf_gn+=" use_partition_alloc=true" myconf_gn+=" disable_fieldtrial_testing_config=true" @@ -1295,6 +1342,7 @@ myconf_gn+=" v8_use_external_startup_data=true" myconf_gn+=" use_system_zlib=true" myconf_gn+=" use_system_libjpeg=true" myconf_gn+=" use_system_libpng=true" +myconf_gn+=' use_system_libwayland=true' #we don't build PDF support, so disabling the below: #myconf_gn+=" use_system_lcms2=true" @@ -1304,23 +1352,30 @@ myconf_gn+=" use_system_harfbuzz=true" myconf_gn+=" use_system_freetype=true" myconf_gn+=" use_system_cares=true" myconf_gn+=" use_system_nghttp2=true" +%if %{with system_ada} +myconf_gn+=' use_system_ada=true' +%endif %if %{with system_llhttp} myconf_gn+=" use_system_llhttp=true" %endif %if %{with system_histogram} myconf_gn+=" use_system_histogram=true" %endif -%if %{with system_simdutf} -myconf_gn+=' use_system_simdutf=true' +%if %{with system_simdjson} +myconf_gn+=' use_system_simdjson=true' %endif myconf_gn+=" is_clang=false" -myconf_gn+=" use_gold=false" %if %{with lto} myconf_gn+=" gcc_lto=true" # endif with lto %endif +%if %{with gdbjit} +#Enable GDB protocol (--js-flags=--gdbjit_full). It's disabled by default in Chromium but very useful for Node/Electron +myconf_gn+=' v8_enable_gdbjit=true' +%endif + %if %{with pipewire} myconf_gn+=" rtc_use_pipewire=true rtc_link_pipewire=true" @@ -1346,7 +1401,13 @@ myconf_gn+=" ffmpeg_branding=\"Chrome\"" # GN does not support passing cflags: # https://bugs.chromium.org/p/chromium/issues/detail?id=642016 -gn gen out/Release --testonly=false --args="import(\"//electron/build/args/release.gn\") ${myconf_gn}" +gn gen out/Release --testonly=false \ +--root-target=//electron:electron_app \ +--root-pattern=//electron:electron_app \ +--root-pattern=//electron:chromium_licenses \ +--root-pattern=//electron:copy_node_headers \ +--root-pattern=//electron:electron_version_file \ +--args="import(\"//electron/build/args/release.gn\") ${myconf_gn}" # dump the linker command line (if any) in case of failure @@ -1377,7 +1438,13 @@ desktop-file-install --dir %{buildroot}%{_datadir}/applications/ %{SOURCE11} pushd out/Release install -pm 0644 version -t %{buildroot}%{_libdir}/electron/ -gn desc . //electron:electron_app runtime_deps | grep -v ^gen/ | sort | uniq | xargs -t cp -l -v --parents -t %{buildroot}%{_libdir}/electron/ -- +gn desc \ +--root-target=//electron:electron_app \ +--root-pattern=//electron:electron_app \ +--root-pattern=//electron:chromium_licenses \ +--root-pattern=//electron:copy_node_headers \ +--root-pattern=//electron:electron_version_file \ +. //electron:electron_app runtime_deps | grep -v ^gen/ | sort | uniq | xargs -t cp -a -v --parents -t %{buildroot}%{_libdir}/electron/ -- popd @@ -1386,7 +1453,8 @@ popd -cp -lrvT out/Release/gen/node_headers/include/node %{buildroot}%{_includedir}/electron +cp -lrvT out/Release/gen/node_headers %{buildroot}%{_includedir}/electron + # Electron has a little known feature that make it work like a nodejs binary. # We make use of it in the %%electron_rebuild macro which builds all dependencies in node_modules against Electron's headers. @@ -1428,7 +1496,7 @@ cp /dev/stdin %{buildroot}%{_rpmconfigdir}/macros.d/macros.electron <<"EOF" # Build native modules against Electron. This should be done as the first step in ‰build. You must set CFLAGS/LDFLAGS previously. # You can call it multiple times in different directories and pass more parameters to it (seen in vscode) -%%electron_rebuild PATH="%{_libexecdir}/electron-node:$PATH" npm rebuild --verbose --foreground-scripts --nodedir=%{_includedir}/electron +%%electron_rebuild PATH="%{_libexecdir}/electron-node:$PATH" npm rebuild --verbose --foreground-scripts --nodedir=%{_includedir}/electron # Sanity check that native modules load. You must include this in ‰check if the package includes native modules (possibly in addition to actual test suites) # These do, in order: @@ -1469,16 +1537,16 @@ EOF chmod -v 644 %{buildroot}%{_rpmconfigdir}/macros.d/macros.electron #help debugedit find the source files -ln -srv third_party/emoji-segmenter/src/emoji_presentation_scanner.c -t out/Release -ln -srv third_party/emoji-segmenter/src/emoji_presentation_scanner.rl -t out/Release -ln -srv third_party/angle/src/compiler/translator/glslang.l -t out/Release -ln -srv third_party/angle/src/compiler/preprocessor/preprocessor.l -t out/Release -ln -srv third_party -t out/Release +ln -srvf third_party/emoji-segmenter/src/emoji_presentation_scanner.c -t out/Release +ln -srvf third_party/emoji-segmenter/src/emoji_presentation_scanner.rl -t out/Release +ln -srvf third_party/angle/src/compiler/translator/glslang.l -t out/Release +ln -srvf third_party/angle/src/compiler/preprocessor/preprocessor.l -t out/Release +ln -srvf third_party -t out/Release %files %license electron/LICENSE out/Release/LICENSES.chromium.html %{_bindir}/electron -%{_datadir}/applications/electron.desktop +%{_datadir}/applications/Electron.desktop %{_datadir}/icons/hicolor/16x16/apps/electron.png %{_datadir}/icons/hicolor/32x32/apps/electron.png %{_datadir}/icons/hicolor/48x48/apps/electron.png diff --git a/offscreen_canvas-incomplete-LayoutLocale.patch b/offscreen_canvas-incomplete-LayoutLocale.patch new file mode 100644 index 0000000..4ada564 --- /dev/null +++ b/offscreen_canvas-incomplete-LayoutLocale.patch @@ -0,0 +1,10 @@ +--- src/third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h.orig 2025-08-15 17:32:29.249405113 +0200 ++++ src/third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h 2025-08-16 00:00:02.342263133 +0200 +@@ -23,6 +23,7 @@ + #include "third_party/blink/renderer/platform/graphics/dom_node_id.h" + #include "third_party/blink/renderer/platform/heap/garbage_collected.h" + #include "third_party/blink/renderer/platform/heap/prefinalizer.h" ++#include "third_party/blink/renderer/platform/text/layout_locale.h" + #include "ui/gfx/geometry/size.h" + + namespace blink { diff --git a/partition_alloc-no-lto.patch b/partition_alloc-no-lto.patch deleted file mode 100644 index 3a0b6e5..0000000 --- a/partition_alloc-no-lto.patch +++ /dev/null @@ -1,75 +0,0 @@ -Compile files which declare functions in inline assembly without LTO due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57703 - ---- src/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.old 2022-10-01 13:53:03.367797474 +0200 -+++ src/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn 2022-10-05 14:23:53.999860356 +0200 -@@ -90,6 +90,33 @@ if (!is_debug || partition_alloc_optimiz - _add_configs += [ "//build/config/compiler:no_optimize" ] - } - -+if (use_starscan) { -+ static_library("partition_alloc_asm") { -+ if (gcc_lto) { -+ configs -= [ "//build/config/compiler:gcc_lto" ] -+ } -+ if (current_cpu == "x64") { -+ assert(pcscan_stack_supported) -+ sources = [ "starscan/stack/asm/x64/push_registers_asm.cc" ] -+ } else if (current_cpu == "x86") { -+ assert(pcscan_stack_supported) -+ sources = [ "starscan/stack/asm/x86/push_registers_asm.cc" ] -+ } else if (current_cpu == "arm") { -+ assert(pcscan_stack_supported) -+ sources = [ "starscan/stack/asm/arm/push_registers_asm.cc" ] -+ } else if (current_cpu == "arm64") { -+ assert(pcscan_stack_supported) -+ sources = [ "starscan/stack/asm/arm64/push_registers_asm.cc" ] -+ } else if (current_cpu == "riscv64") { -+ assert(pcscan_stack_supported) -+ sources = [ "starscan/stack/asm/riscv64/push_registers_asm.cc" ] -+ } else { -+ assert(!pcscan_stack_supported) -+ # To support a trampoline for another arch, please refer to v8/src/heap/base. -+ } -+ } -+} -+ - component("raw_ptr") { - # `gn check` is unhappy with most `#includes` when PA isn't - # actually built. -@@ -497,25 +524,10 @@ if (is_clang_or_gcc) { - # The Android NDK supports PR_MTE_* macros as of NDK r23. - defines += [ "HAS_PR_MTE_MACROS" ] - } -+ deps = [ ":allocator_base" ] - if (use_starscan) { -- if (current_cpu == "x64") { -- assert(pcscan_stack_supported) -- sources += [ "starscan/stack/asm/x64/push_registers_asm.cc" ] -- } else if (current_cpu == "x86") { -- assert(pcscan_stack_supported) -- sources += [ "starscan/stack/asm/x86/push_registers_asm.cc" ] -- } else if (current_cpu == "arm") { -- assert(pcscan_stack_supported) -- sources += [ "starscan/stack/asm/arm/push_registers_asm.cc" ] -- } else if (current_cpu == "arm64") { -- assert(pcscan_stack_supported) -- sources += [ "starscan/stack/asm/arm64/push_registers_asm.cc" ] -- } else if (current_cpu == "riscv64") { -- assert(pcscan_stack_supported) -- sources += [ "starscan/stack/asm/riscv64/push_registers_asm.cc" ] -- } else { -- # To support a trampoline for another arch, please refer to v8/src/heap/base. -- assert(!pcscan_stack_supported) -+ if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" || current_cpu == "arm64" || current_cpu == "riscv64") { -+ deps += [ ":partition_alloc_asm" ] - } - } - if (use_freelist_pool_offsets) { -@@ -536,7 +548,6 @@ if (is_clang_or_gcc) { - ":memory_tagging", - "//build/config/compiler:wexit_time_destructors", - ] -- deps = [ ":allocator_base" ] - public_configs = [] - if (is_android) { - # tagging.cc requires __arm_mte_set_* functions. diff --git a/partition_alloc-strict-aliasing.patch b/partition_alloc-strict-aliasing.patch new file mode 100644 index 0000000..b9e7a09 --- /dev/null +++ b/partition_alloc-strict-aliasing.patch @@ -0,0 +1,51 @@ +#0 partition_alloc::internal::SlotSpanMetadata<(partition_alloc::internal::MetadataKind)0>::Free(unsigned long, partition_alloc::PartitionRoot*)::{lambda()#1}::operator()() const (__closure=, __closure=) + at ../../base/allocator/partition_allocator/src/partition_alloc/partition_page.h:805 +#1 partition_alloc::internal::SlotSpanMetadata<(partition_alloc::internal::MetadataKind)0>::Free (this=, slot_start=, + root=, this=, slot_start=, root=) + at ../../base/allocator/partition_allocator/src/partition_alloc/partition_page.h:805 +#2 partition_alloc::PartitionRoot::FreeInSlotSpan (this=, slot_start=, slot_span=, this=, + slot_start=, slot_span=) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1607 +#3 partition_alloc::PartitionRoot::RawFree (this=, slot_start=, slot_span=, this=, + slot_start=, slot_span=) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1673 +#4 partition_alloc::PartitionRoot::RawFreeWithThreadCache (this=, slot_start=, slot_start_ptr=, + slot_span=, this=, slot_start=, slot_start_ptr=, slot_span=) + at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1740 +#5 partition_alloc::PartitionRoot::FreeNoHooksImmediate (this=, object=, slot_span=, + slot_start=, this=, object=, slot_span=, slot_start=) + at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1598 +#6 partition_alloc::PartitionRoot::FreeInline<(partition_alloc::internal::FreeFlags)2> (this=, object=, + this=, object=) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1514 +#7 partition_alloc::PartitionRoot::FreeInlineInUnknownRoot<(partition_alloc::internal::FreeFlags)2> (object=0x5a000024fa0) + at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1446 +#8 allocator_shim::internal::PartitionAllocFunctionsInternal<(partition_alloc::internal::AllocFlags)16, (partition_alloc::internal::FreeFlags)2>::Free ( + object=0x5a000024fa0, context=) + at ../../base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc:434 +#9 0x0000555555561755 in std::__new_allocator::deallocate (this=0x7fffffffdb10, __p=, __n=) + at /usr/include/c++/15/bits/new_allocator.h:172 +#10 std::allocator::deallocate (this=0x7fffffffdb10, __p=, __n=) at /usr/include/c++/15/bits/allocator.h:215 +#11 std::allocator_traits >::deallocate (__a=..., __p=, __n=) + at /usr/include/c++/15/bits/alloc_traits.h:649 +#12 std::__cxx11::basic_string, std::allocator >::_M_destroy (this=0x7fffffffdb10, __size=) + at /usr/include/c++/15/bits/basic_string.h:305 +#13 std::__cxx11::basic_string, std::allocator >::_M_dispose (this=0x7fffffffdb10) + at /usr/include/c++/15/bits/basic_string.h:299 +#14 std::__cxx11::basic_string, std::allocator >::~basic_string (this=, this=) + at /usr/include/c++/15/bits/basic_string.h:896 +#15 base::CommandLine::AppendSwitchesAndArguments (this=, argv=...) at ../../base/command_line.cc:657 +#16 base::CommandLine::InitFromArgv (this=, argv=...) at ../../base/command_line.cc:333 +#17 base::CommandLine::InitFromArgv (this=, argc=, argv=) at ../../base/command_line.cc:324 +#18 base::CommandLine::Init (argc=, argv=) at ../../base/command_line.cc:275 +#19 base::CommandLine::Init (argc=, argv=) at ../../base/command_line.cc:262 +#20 main (argc=, argv=) at ../../components/url_formatter/spoof_checks/top_domains/top_domain_generator.cc:88 + + +--- src/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn.orig 2025-08-15 17:32:21.517406564 +0200 ++++ src/base/allocator/partition_allocator/src/partition_alloc/BUILD.gn 2025-08-16 16:11:37.214993083 +0200 +@@ -266,6 +266,7 @@ if (is_clang_or_gcc) { + config("partition_alloc_implementation") { + # See also: `partition_alloc_base/component_export.h` + defines = [ "IS_PARTITION_ALLOC_IMPL" ] ++ cflags = ["-fno-strict-aliasing"] + } + + config("partition_alloc_base_implementation") { diff --git a/perfetto-numeric_storage-double_t.patch b/perfetto-numeric_storage-double_t.patch deleted file mode 100644 index 9e04f8b..0000000 --- a/perfetto-numeric_storage-double_t.patch +++ /dev/null @@ -1,14 +0,0 @@ -Fix inconsistent type alias use -On linux ix86, `double_t` evaluates to `long double`. This contradicts the `double` expected below. - ---- src/third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc.old 2023-10-13 11:25:09.719946900 +0200 -+++ src/third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc 2023-10-14 23:54:10.728423000 +0200 -@@ -39,7 +39,7 @@ namespace trace_processor { - namespace column { - namespace { - --using NumericValue = std::variant; -+using NumericValue = std::variant; - - // Using the fact that binary operators in std are operators() of classes, we - // can wrap those classes in variants and use them for std::visit in diff --git a/permission-gcc14.2.patch b/permission-gcc14.2.patch new file mode 100644 index 0000000..44b08c5 --- /dev/null +++ b/permission-gcc14.2.patch @@ -0,0 +1,13 @@ +This file fails to compile under gcc 14.2 but should be entirely dead code + +--- src/components/services/app_service/public/cpp/BUILD.gn.orig 2025-04-21 18:29:17.630307050 +0200 ++++ src/components/services/app_service/public/cpp/BUILD.gn 2025-04-23 18:18:14.510674646 +0200 +@@ -28,8 +28,6 @@ component("app_types") { + "menu.h", + "package_id.cc", + "package_id.h", +- "permission.cc", +- "permission.h", + "preferred_app.cc", + "preferred_app.h", + "run_on_os_login_types.cc", diff --git a/pickle_traits-kIndexSequence-constexpr-initializer.patch b/pickle_traits-kIndexSequence-constexpr-initializer.patch new file mode 100644 index 0000000..4811040 --- /dev/null +++ b/pickle_traits-kIndexSequence-constexpr-initializer.patch @@ -0,0 +1,11 @@ +--- src/net/base/pickle_traits.h.orig 2025-08-15 17:32:28.209405309 +0200 ++++ src/net/base/pickle_traits.h 2025-08-15 23:39:04.010398326 +0200 +@@ -563,7 +563,7 @@ struct PickleTraits { + } + + static constexpr std::make_index_sequence> +- kIndexSequence; ++ kIndexSequence {}; + }; + + // bool is treated specially by base::Pickle. diff --git a/picture_in_picture_events_info-string-constexpr.patch b/picture_in_picture_events_info-string-constexpr.patch new file mode 100644 index 0000000..74f1a5f --- /dev/null +++ b/picture_in_picture_events_info-string-constexpr.patch @@ -0,0 +1,19 @@ +--- src/media/base/picture_in_picture_events_info.cc.orig 2025-08-15 17:32:27.805405385 +0200 ++++ src/media/base/picture_in_picture_events_info.cc 2025-08-16 10:13:19.526480207 +0200 +@@ -5,6 +5,7 @@ + #include "media/base/picture_in_picture_events_info.h" + + #include ++#include + + #include "base/notreached.h" + #include "base/strings/stringprintf.h" +@@ -34,7 +35,7 @@ std::string PictureInPictureEventsInfo:: + // static + std::string PictureInPictureEventsInfo::AutoPipInfoToString( + AutoPipInfo auto_pip_info) { +- constexpr std::array bool_to_string{"false", "true"}; ++ constexpr std::array bool_to_string{"false", "true"}; + return base::StringPrintf( + "{reason: %s, has audio focus: %s, is_playing: %s, was recently audible: " + "%s, has safe url: %s, meets media engagement conditions: %s, blocked " diff --git a/plus_address_types-missing-optional.patch b/plus_address_types-missing-optional.patch deleted file mode 100644 index 1a36beb..0000000 --- a/plus_address_types-missing-optional.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8d253767f895b45053c39ea99a8f02bbe7071d3a Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Mon, 19 Feb 2024 19:00:26 +0000 -Subject: [PATCH] IWYU: usage of std::optional in plus_address_types.h requires - include -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Bug: 41455655 -Change-Id: Ibfda146f5bf7485ad31828f1dc22eb39b57f83b5 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5306779 -Reviewed-by: Jan Keitel -Commit-Queue: José Dapena Paz -Cr-Commit-Position: refs/heads/main@{#1262436} ---- - components/plus_addresses/plus_address_types.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/components/plus_addresses/plus_address_types.h b/components/plus_addresses/plus_address_types.h -index 7a7eaa2a818a9..77569d345011a 100644 ---- a/components/plus_addresses/plus_address_types.h -+++ b/components/plus_addresses/plus_address_types.h -@@ -5,6 +5,7 @@ - #ifndef COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_TYPES_H_ - #define COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_TYPES_H_ - -+#include - #include - #include - diff --git a/private_aggregation_host-uint128.patch b/private_aggregation_host-uint128.patch new file mode 100644 index 0000000..b9396b7 --- /dev/null +++ b/private_aggregation_host-uint128.patch @@ -0,0 +1,42 @@ +Abseil's int128 hasd broken comparison under gcc: + +In file included from /usr/include/c++/14/string:49, + from ../../content/browser/private_aggregation/private_aggregation_host.h:11: +/usr/include/c++/14/bits/stl_function.h: In instantiation of ‘constexpr bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = content::{anonymous}::ContributionMergeKey]’: +/usr/include/c++/14/bits/stl_map.h:599:37: required from ‘std::pair, std::_Select1st >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::emplace(_Args&& ...) [with _Args = {content::{anonymous}::ContributionMergeKey, blink::mojom::AggregatableReportHistogramContribution&}; _Key = content::{anonymous}::ContributionMergeKey; _Tp = blink::mojom::AggregatableReportHistogramContribution; _Compare = std::less; _Alloc = std::allocator >; typename std::_Rb_tree<_Key, std::pair, std::_Select1st >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind >::other>::iterator = std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind >::other = std::allocator >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind > = __gnu_cxx::__alloc_traits >, std::pair >::rebind >; typename _Allocator::value_type = std::pair]’ + 599 | if (__i == end() || key_comp()(__k, (*__i).first)) + | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ +../../content/browser/private_aggregation/private_aggregation_host.cc:457:37: required from here + 457 | accepted_contributions.emplace(std::move(merge_key), + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ + 458 | *std::move(contribution)); + | ~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/include/c++/14/bits/stl_function.h:405:20: error: use of deleted function ‘constexpr auto content::{anonymous}::ContributionMergeKey::operator<=>(const content::{anonymous}::ContributionMergeKey&) const’ + 405 | { return __x < __y; } + | ~~~~^~~~~ +../../content/browser/private_aggregation/private_aggregation_host.cc:141:8: note: ‘constexpr auto content::{anonymous}::ContributionMergeKey::operator<=>(const content::{anonymous}::ContributionMergeKey&) const’ is implicitly deleted because the default definition would be ill-formed: + 141 | auto operator<=>(const ContributionMergeKey& a) const = default; + | ^~~~~~~~ +../../content/browser/private_aggregation/private_aggregation_host.cc:143:17: note: three-way comparison of ‘content::{anonymous}::ContributionMergeKey::bucket’ has type ‘absl::lts_20240722::strong_ordering’, not a comparison category type + 143 | absl::uint128 bucket; + | ^~~~~~ + +--- src/content/browser/private_aggregation/private_aggregation_pending_contributions.h.orig 2025-08-15 17:32:26.465405636 +0200 ++++ src/content/browser/private_aggregation/private_aggregation_pending_contributions.h 2025-08-16 09:29:24.094983368 +0200 +@@ -18,7 +18,6 @@ + #include "base/numerics/safe_conversions.h" + #include "content/browser/private_aggregation/private_aggregation_budgeter.h" + #include "content/common/content_export.h" +-#include "third_party/abseil-cpp/absl/numeric/int128.h" + #include "third_party/blink/public/mojom/aggregation_service/aggregatable_report.mojom.h" + #include "third_party/blink/public/mojom/private_aggregation/private_aggregation_host.mojom.h" + +@@ -53,7 +52,7 @@ class CONTENT_EXPORT PrivateAggregationP + + auto operator<=>(const ContributionMergeKey& a) const = default; + +- absl::uint128 bucket; ++ unsigned __int128 bucket; + uint64_t filtering_id; + }; + diff --git a/race_network_request_write_buffer_manager-missing-optional.patch b/race_network_request_write_buffer_manager-missing-optional.patch deleted file mode 100644 index 3fd424e..0000000 --- a/race_network_request_write_buffer_manager-missing-optional.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5b2d53797e5580cbfea00d732fe25a97c7048b5b Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Wed, 24 Jan 2024 06:46:33 +0000 -Subject: [PATCH] IWYU: missing include for std::optional usage in - race_network_request_write_buffer_manager.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Bug: 957519 -Change-Id: Id3a6c3cc3c1273208bde43b70a2bd298695f7cc4 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5223947 -Reviewed-by: Shunya Shishido -Commit-Queue: José Dapena Paz -Cr-Commit-Position: refs/heads/main@{#1251264} ---- - .../service_worker/race_network_request_write_buffer_manager.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/content/common/service_worker/race_network_request_write_buffer_manager.h b/content/common/service_worker/race_network_request_write_buffer_manager.h -index 0e7f17417dbd9..ad9ea1348a977 100644 ---- a/content/common/service_worker/race_network_request_write_buffer_manager.h -+++ b/content/common/service_worker/race_network_request_write_buffer_manager.h -@@ -5,6 +5,8 @@ - #ifndef CONTENT_COMMON_SERVICE_WORKER_RACE_NETWORK_REQUEST_WRITE_BUFFER_MANAGER_H_ - #define CONTENT_COMMON_SERVICE_WORKER_RACE_NETWORK_REQUEST_WRITE_BUFFER_MANAGER_H_ - -+#include -+ - #include "base/containers/span.h" - #include "content/common/content_export.h" - #include "mojo/public/cpp/system/data_pipe.h" diff --git a/reduce-gn-tree.patch b/reduce-gn-tree.patch new file mode 100644 index 0000000..8fddbec --- /dev/null +++ b/reduce-gn-tree.patch @@ -0,0 +1,37 @@ +Run gn starting at only the targets we want to build (//electron:blah), not at (//...) to avoid hitting asserts in dead code. +This makes this overriden build argument dead code which causes a warning during `gen` and more importantly `desc`. Remove it. + +--- src/electron/build/args/all.gn.orig 2025-09-10 22:18:06.769733598 +0200 ++++ src/electron/build/args/all.gn 2025-09-10 22:54:05.929977283 +0200 +@@ -1,5 +1,4 @@ + is_electron_build = true +-root_extra_deps = [ "//electron" ] + + # Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json + node_module_version = 136 +@@ -75,4 +74,3 @@ enterprise_cloud_content_analysis = fals + content_enable_legacy_ipc = true + + # We don't use anything from here, and it causes target collisions +-enable_linux_installer = false + +All gn list calls must be also fixed because otherwise they fail just as gn gen does + + +--- src/third_party/electron_node/tools/generate_config_gypi.py.orig 2025-05-22 20:19:41.558145459 +0200 ++++ src/third_party/electron_node/tools/generate_config_gypi.py 2025-05-22 22:01:23.213518671 +0200 +@@ -30,7 +30,13 @@ def bool_string_to_number(v): + def get_gn_config(out_dir): + # Read args from GN configurations. + gn_args = subprocess.check_output( +- [GN, 'args', '--list', '--short', '-C', out_dir]) ++ [GN, 'args', '--list', ++ '--root-target=//electron:electron_app', ++ '--root-pattern=//electron:electron_app', ++ '--root-pattern=//electron:chromium_licenses', ++ '--root-pattern=//electron:copy_node_headers', ++ '--root-pattern=//electron:electron_version_file', ++ '--short', '-C', out_dir]) + config = dict(re.findall(GN_RE, gn_args.decode())) + # Get napi_build_version from Node, which is not part of GN args. + config['napi_build_version'] = getnapibuildversion.get_napi_version() diff --git a/remove-ai-language-detection-factory-which-requires-tflite-and-libphonenumber.patch b/remove-ai-language-detection-factory-which-requires-tflite-and-libphonenumber.patch new file mode 100644 index 0000000..da14645 --- /dev/null +++ b/remove-ai-language-detection-factory-which-requires-tflite-and-libphonenumber.patch @@ -0,0 +1,428 @@ +--- src/third_party/blink/renderer/modules/ai/BUILD.gn.orig 2025-08-15 17:32:29.337405097 +0200 ++++ src/third_party/blink/renderer/modules/ai/BUILD.gn 2025-08-16 17:57:26.885671869 +0200 +@@ -7,45 +7,19 @@ import("//third_party/blink/renderer/mod + blink_modules_sources("ai") { + sources = [ + "ai_context_observer.h", +- "ai_interface_proxy.cc", +- "ai_interface_proxy.h", + "ai_metrics.cc", + "ai_metrics.h", +- "ai_utils.cc", +- "ai_utils.h", + "ai_writing_assistance_base.h", + "ai_writing_assistance_create_client.h", + "availability.cc", + "availability.h", +- "create_monitor.cc", +- "create_monitor.h", + "exception_helpers.cc", + "exception_helpers.h", +- "language_model.cc", +- "language_model.h", +- "language_model_create_client.cc", +- "language_model_create_client.h", + "language_model_params.cc", + "language_model_params.h", +- "language_model_prompt_builder.cc", +- "language_model_prompt_builder.h", + "model_execution_responder.cc", + "model_execution_responder.h", +- "on_device_translation/create_translator_client.cc", +- "on_device_translation/create_translator_client.h", +- "on_device_translation/language_detector.cc", +- "on_device_translation/language_detector.h", + "on_device_translation/resolver_with_abort_signal.h", +- "on_device_translation/translator.cc", +- "on_device_translation/translator.h", +- "proofreader.cc", +- "proofreader.h", +- "rewriter.cc", +- "rewriter.h", +- "summarizer.cc", +- "summarizer.h", +- "writer.cc", +- "writer.h", + ] + + public_deps = [ "//third_party/blink/public/mojom:mojom_modules_blink" ] +@@ -53,8 +27,6 @@ blink_modules_sources("ai") { + deps = [ + "//components/language_detection/content/common", + "//components/language_detection/content/common:common_blink", +- "//components/language_detection/content/renderer", +- "//components/language_detection/core", + "//third_party/blink/renderer/modules/canvas", + "//third_party/blink/renderer/modules/webaudio", + ] +--- src/third_party/blink/renderer/platform/BUILD.gn.orig 2025-04-12 14:33:45.435739667 +0200 ++++ src/third_party/blink/renderer/platform/BUILD.gn 2025-04-12 15:58:59.809440918 +0200 +@@ -1239,8 +1239,6 @@ component("platform") { + "keyboard_codes.h", + "language.cc", + "language.h", +- "language_detection/language_detection_model.cc", +- "language_detection/language_detection_model.h", + "link_hash.cc", + "link_hash.h", + "media/media_player_client.h", +@@ -1757,11 +1755,8 @@ component("platform") { + "//cc/mojo_embedder", + "//components/language_detection/content/common", + "//components/language_detection/content/common:common_blink", +- "//components/language_detection/content/renderer", +- "//components/language_detection/core", + "//components/paint_preview/common", + "//components/search_engines:search_engine_utils", +- "//components/translate/core/language_detection:language_detection", + "//components/viz/client", + "//components/viz/common", + "//components/webrtc:net_address_utils", +--- src/components/translate/core/common/BUILD.gn.orig 2025-04-12 14:33:35.535738956 +0200 ++++ src/components/translate/core/common/BUILD.gn 2025-04-12 16:04:56.897440792 +0200 +@@ -23,7 +23,6 @@ static_library("common") { + deps = [ + "//base", + "//components/language/core/common", +- "//components/language_detection/core:core", + "//third_party/metrics_proto", + "//url", + ] +--- src/third_party/blink/renderer/bindings/idl_in_modules.gni.orig 2025-08-15 17:32:29.049405150 +0200 ++++ src/third_party/blink/renderer/bindings/idl_in_modules.gni 2025-08-16 14:55:26.743869183 +0200 +@@ -19,15 +19,8 @@ static_idl_files_in_modules = [ + "//third_party/blink/renderer/modules/ad_auction/storage_interest_group.idl", + "//third_party/blink/renderer/modules/ai/availability.idl", + "//third_party/blink/renderer/modules/ai/create_monitor.idl", +- "//third_party/blink/renderer/modules/ai/language_model.idl", + "//third_party/blink/renderer/modules/ai/language_model_create_options.idl", + "//third_party/blink/renderer/modules/ai/language_model_params.idl", +- "//third_party/blink/renderer/modules/ai/on_device_translation/language_detector.idl", +- "//third_party/blink/renderer/modules/ai/on_device_translation/translator.idl", +- "//third_party/blink/renderer/modules/ai/proofreader.idl", +- "//third_party/blink/renderer/modules/ai/rewriter.idl", +- "//third_party/blink/renderer/modules/ai/summarizer.idl", +- "//third_party/blink/renderer/modules/ai/writer.idl", + "//third_party/blink/renderer/modules/animationworklet/animation_worklet_global_scope.idl", + "//third_party/blink/renderer/modules/animationworklet/css_animation_worklet.idl", + "//third_party/blink/renderer/modules/animationworklet/worklet_animation.idl", +--- src/third_party/blink/renderer/bindings/generated_in_modules.gni.orig 2025-08-15 17:32:29.049405150 +0200 ++++ src/third_party/blink/renderer/bindings/generated_in_modules.gni 2025-08-16 15:26:16.723512975 +0200 +@@ -682,18 +682,6 @@ generated_dictionary_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_key_system_track_configuration.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_landmark.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_landmark.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detection_result.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detection_result.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector_create_core_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector_create_core_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector_create_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector_create_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector_detect_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector_detect_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_append_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_append_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_clone_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_clone_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_create_core_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_create_core_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_create_options.cc", +@@ -704,8 +692,6 @@ generated_dictionary_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_message.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_message_content.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_message_content.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_prompt_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_prompt_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_lock_info.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_lock_info.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_lock_manager_snapshot.cc", +@@ -1008,14 +994,6 @@ generated_dictionary_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_private_attribution_network.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_private_attribution_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_private_attribution_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofreader_create_core_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofreader_create_core_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofreader_create_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofreader_create_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofread_correction.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofread_correction.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofread_result.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofread_result.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_protected_audience_private_aggregation_config.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_protected_audience_private_aggregation_config.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential_creation_options.cc", +@@ -1064,12 +1042,6 @@ generated_dictionary_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_remote_desktop_client_override.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_request_device_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_request_device_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_rewrite_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_rewrite_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_create_core_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_create_core_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_create_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_create_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_router_condition.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_router_condition.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_router_rule.cc", +@@ -1278,12 +1250,6 @@ generated_dictionary_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sub_apps_list_result.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_subsample_entry.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_subsample_entry.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_create_core_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_create_core_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_create_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_create_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_summarize_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_summarize_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_svc_output_metadata.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_svc_output_metadata.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sync_event_init.cc", +@@ -1296,12 +1262,6 @@ generated_dictionary_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_text_encoder_encode_into_result.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_top_level_storage_access_permission_descriptor.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_top_level_storage_access_permission_descriptor.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translator_create_core_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translator_create_core_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translator_create_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translator_create_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translator_translate_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translator_translate_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_usb_connection_event_init.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_usb_connection_event_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_usb_control_transfer_parameters.cc", +@@ -1380,12 +1340,6 @@ generated_dictionary_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_websocket_stream_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_write_params.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_write_params.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_write_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_write_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_create_core_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_create_core_options.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_create_options.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_create_options.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_depth_state_init.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_depth_state_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_dom_overlay_init.cc", +@@ -1772,8 +1726,6 @@ generated_enumeration_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_presentation_connection_state.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_private_attribution_event.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_private_attribution_event.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_correction_type.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_correction_type.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_push_encryption_key_name.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_push_encryption_key_name.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_recording_state.cc", +@@ -1782,12 +1734,6 @@ generated_enumeration_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_red_eye_reduction.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_remote_playback_state.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_remote_playback_state.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_format.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_format.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_length.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_length.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_tone.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter_tone.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_router_source_enum.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_router_source_enum.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rtc_bundle_policy.cc", +@@ -1868,12 +1814,6 @@ generated_enumeration_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_storage_bucket_durability.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sub_apps_result_code.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sub_apps_result_code.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_format.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_format.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_length.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_length.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_type.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer_type.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_display_media_include_or_exclude.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_display_media_include_or_exclude.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_track_default_type.cc", +@@ -1912,12 +1852,6 @@ generated_enumeration_sources_in_modules + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_well_known_directory.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_write_command_type.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_write_command_type.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_format.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_format.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_length.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_length.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_tone.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer_tone.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_depth_data_format.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_depth_data_format.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_depth_type.cc", +@@ -2464,12 +2398,8 @@ generated_interface_sources_in_modules = + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_keyboard_layout_map.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_khr_parallel_shader_compile.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_khr_parallel_shader_compile.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_detector.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_params.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model_params.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_language_model.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_launch_params.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_launch_params.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_launch_queue.cc", +@@ -2708,8 +2638,6 @@ generated_interface_sources_in_modules = + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_private_aggregation.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_private_attribution.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_private_attribution.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofreader.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_proofreader.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_protected_audience.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_protected_audience.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_public_key_credential.cc", +@@ -2732,8 +2660,6 @@ generated_interface_sources_in_modules = + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_remote_playback.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_restriction_target.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_restriction_target.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rewriter.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rtc_certificate.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rtc_certificate.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_rtc_data_channel.cc", +@@ -2902,8 +2828,6 @@ generated_interface_sources_in_modules = + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sub_apps.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_subtle_crypto.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_subtle_crypto.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_summarizer.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_svg_element.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_svg_element.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_sync_event.cc", +@@ -2926,8 +2850,6 @@ generated_interface_sources_in_modules = + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_track_default.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_track_default_list.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_track_default_list.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translator.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_translator.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_url.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_url.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_usb.cc", +@@ -3100,8 +3022,6 @@ generated_interface_sources_in_modules = + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_worklet_animation_effect.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_worklet_group_effect.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_worklet_group_effect.h", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer.cc", +- "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_writer.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_anchor.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_anchor.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_xr_anchor_set.cc", +--- src/content/public/browser/content_browser_client.cc 2025-04-17 16:18:19.395831947 +0200 ++++ src/content/public/browser/content_browser_client.cc 2025-04-18 22:48:04.297289260 +0200 +@@ -1882,15 +1882,6 @@ GetContentLanguageDetectionDriver() { + } + } // namespace + +-void ContentBrowserClient::BindLanguageDetectionDriver( +- content::BrowserContext* browser_context, +- base::SupportsUserData* context_user_data, +- mojo::PendingReceiver< +- language_detection::mojom::ContentLanguageDetectionDriver> receiver) { +- if (base::FeatureList::IsEnabled(blink::features::kLanguageDetectionAPI)) { +- GetContentLanguageDetectionDriver().AddReceiver(std::move(receiver)); +- } +-} + + #if !BUILDFLAG(IS_ANDROID) + void ContentBrowserClient::QueryInstalledWebAppsByManifestId( +--- src/content/browser/browser_interface_binders.cc.orig 2025-07-20 14:51:05.789212478 +0200 ++++ src/content/browser/browser_interface_binders.cc 2025-08-15 20:15:02.320284607 +0200 +@@ -1161,19 +1161,6 @@ void PopulateFrameBinders(RenderFrameHos + base::Unretained(host))); + } + +- if (base::FeatureList::IsEnabled(blink::features::kLanguageDetectionAPI)) { +- map->Add( +- base::BindRepeating( +- [](RenderFrameHostImpl* host, +- mojo::PendingReceiver< +- language_detection::mojom::ContentLanguageDetectionDriver> +- receiver) { +- GetContentClient()->browser()->BindLanguageDetectionDriver( +- host->GetBrowserContext(), &host->document_associated_data(), +- std::move(receiver)); +- }, +- base::Unretained(host))); +- } + } + + void PopulateBinderMapWithContext( +@@ -1465,19 +1452,6 @@ void PopulateDedicatedWorkerBinders(Dedi + }, + base::Unretained(host))); + } +- if (base::FeatureList::IsEnabled(blink::features::kLanguageDetectionAPI)) { +- map->Add( +- base::BindRepeating( +- [](DedicatedWorkerHost* host, +- mojo::PendingReceiver< +- language_detection::mojom::ContentLanguageDetectionDriver> +- receiver) { +- GetContentClient()->browser()->BindLanguageDetectionDriver( +- host->GetProcessHost()->GetBrowserContext(), host, +- std::move(receiver)); +- }, +- base::Unretained(host))); +- } + } + + void PopulateBinderMapWithContext( +@@ -1575,19 +1549,6 @@ void PopulateSharedWorkerBinders(SharedW + }, + base::Unretained(host))); + } +- if (base::FeatureList::IsEnabled(blink::features::kLanguageDetectionAPI)) { +- map->Add( +- base::BindRepeating( +- [](SharedWorkerHost* host, +- mojo::PendingReceiver< +- language_detection::mojom::ContentLanguageDetectionDriver> +- receiver) { +- GetContentClient()->browser()->BindLanguageDetectionDriver( +- host->GetProcessHost()->GetBrowserContext(), host, +- std::move(receiver)); +- }, +- base::Unretained(host))); +- } + + #if !BUILDFLAG(IS_ANDROID) + map->Add(base::BindRepeating( +@@ -1753,22 +1714,6 @@ void PopulateServiceWorkerBinders(Servic + }, + base::Unretained(host))); + } +- if (base::FeatureList::IsEnabled(blink::features::kLanguageDetectionAPI)) { +- map->Add( +- base::BindRepeating( +- [](ServiceWorkerHost* host, +- mojo::PendingReceiver< +- language_detection::mojom::ContentLanguageDetectionDriver> +- receiver) { +- if (auto* process_host = static_cast( +- RenderProcessHost::FromID(host->worker_process_id()))) { +- GetContentClient()->browser()->BindLanguageDetectionDriver( +- process_host->GetBrowserContext(), host, +- std::move(receiver)); +- } +- }, +- base::Unretained(host))); +- } + + // RenderProcessHost binders + map->Add(BindServiceWorkerReceiver( +--- src/content/public/browser/content_browser_client.h 2025-04-16 14:45:28.636752215 +0200 ++++ src/content/public/browser/content_browser_client.h 2025-04-18 23:30:15.399851141 +0200 +@@ -3144,11 +3144,6 @@ class CONTENT_EXPORT ContentBrowserClien + // Binds to a singleton new instance of + // `language_detection::ContentLanguageDetectionDriver` which receives the + // model from a local file specified by a flag param.. +- virtual void BindLanguageDetectionDriver( +- BrowserContext* browser_context, +- base::SupportsUserData* context_user_data, +- mojo::PendingReceiver< +- language_detection::mojom::ContentLanguageDetectionDriver> receiver); + + #if !BUILDFLAG(IS_ANDROID) + // Given the last committed URL of the RenderFrameHost, |frame_url|, and the diff --git a/remove-date-reproducible-builds.patch b/remove-date-reproducible-builds.patch index 750c1fc..eead439 100644 --- a/remove-date-reproducible-builds.patch +++ b/remove-date-reproducible-builds.patch @@ -1,29 +1,29 @@ ---- a/tools/json_schema_compiler/cpp_util.py -+++ b/tools/json_schema_compiler/cpp_util.py -@@ -13,9 +13,9 @@ +--- src/tools/json_schema_compiler/cpp_util.py.orig 2024-12-08 18:35:12.604673841 +0100 ++++ src/tools/json_schema_compiler/cpp_util.py 2024-12-20 14:33:48.193965844 +0100 +@@ -11,9 +11,9 @@ import os + import posixpath import re - CHROMIUM_LICENSE = ( --"""// Copyright %d The Chromium Authors -+"""// Copyright 2022 The Chromium Authors +-CHROMIUM_LICENSE = ("""// Copyright %d The Chromium Authors ++CHROMIUM_LICENSE = ("""// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file.""" % datetime.now().year -+// found in the LICENSE file.""" - ) +-// found in the LICENSE file.""" % datetime.now().year) ++// found in the LICENSE file.""") GENERATED_FILE_MESSAGE = """// GENERATED FROM THE API DEFINITION IN // %s ---- a/tools/json_to_struct/json_to_struct.py -+++ b/tools/json_to_struct/json_to_struct.py -@@ -74,7 +74,7 @@ - import java_element_generator + // by tools/json_schema_compiler. +--- src/tools/json_to_struct/json_to_struct.py.orig 2025-07-19 11:32:45.069979393 +0200 ++++ src/tools/json_to_struct/json_to_struct.py 2025-08-15 15:02:55.044700914 +0200 +@@ -84,7 +84,7 @@ import java_element_generator import struct_generator + -HEAD = u"""// Copyright %d The Chromium Authors +HEAD = u"""// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@@ -227,7 +227,7 @@ +@@ -316,7 +316,7 @@ def GenerateStruct(basepath, output_root year: Year to display next to the copy-right in the header. """ year = int(year) if year else datetime.now().year @@ -32,9 +32,9 @@ _GenerateH(basepath, output_root, head, namespace, schema, description) _GenerateCC(basepath, output_root, head, namespace, schema, description) ---- src/tools/json_schema_compiler/feature_compiler.py.old 2022-12-02 23:49:17.031737400 +0100 -+++ src/tools/json_schema_compiler/feature_compiler.py 2023-01-04 06:47:07.764551600 +0100 -@@ -19,7 +19,7 @@ +--- src/tools/json_schema_compiler/feature_compiler.py.orig 2024-12-08 18:35:12.604673841 +0100 ++++ src/tools/json_schema_compiler/feature_compiler.py 2024-12-20 14:34:28.740897256 +0100 +@@ -17,7 +17,7 @@ import json_parse # The template for the header file of the generated FeatureProvider. HEADER_FILE_TEMPLATE = """ @@ -43,7 +43,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@@ -43,7 +43,7 @@ +@@ -41,7 +41,7 @@ void %(method_name)s(FeatureProvider* pr # The beginning of the .cc file for the generated FeatureProvider. CC_FILE_BEGIN = """ @@ -52,11 +52,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@@ -899,7 +899,6 @@ - replace('.', '_').upper()), - 'method_name': self._method_name, - 'source_files': str([ToPosixPath(f) for f in self._source_files]), -- 'year': str(datetime.now().year) +@@ -987,8 +987,6 @@ class FeatureCompiler(object): + self._method_name, + 'source_files': + str([ToPosixPath(f) for f in self._source_files]), +- 'year': +- str(datetime.now().year) }) if not os.path.exists(self._out_root): os.makedirs(self._out_root) diff --git a/remove-dawn.patch b/remove-dawn.patch index cdd49ce..a64f114 100644 --- a/remove-dawn.patch +++ b/remove-dawn.patch @@ -9,12 +9,12 @@ Remove this unused component which brings a huge dependency on //third_party/daw - "//services/on_device_model:on_device_model_service", - "//services/on_device_model/public/cpp", - "//services/on_device_model/public/mojom", + "//services/screen_ai/buildflags", "//services/service_manager/public/cpp", "//services/service_manager/public/mojom", - "//services/shape_detection:lib", ---- src/content/utility/services.cc.orig -+++ src/content/utility/services.cc -@@ -31,7 +31,6 @@ +--- src/content/utility/services.cc.orig 2024-12-08 18:34:58.184673416 +0100 ++++ src/content/utility/services.cc 2024-12-18 12:44:27.424691055 +0100 +@@ -32,7 +32,6 @@ #include "services/audio/service_factory.h" #include "services/data_decoder/data_decoder_service.h" #include "services/network/network_service.h" @@ -22,23 +22,22 @@ Remove this unused component which brings a huge dependency on //third_party/daw #include "services/tracing/public/mojom/tracing_service.mojom.h" #include "services/tracing/tracing_service.h" #include "services/video_capture/public/mojom/video_capture_service.mojom.h" -@@ -327,13 +326,6 @@ auto RunVideoCapture( - return service; +@@ -371,12 +370,6 @@ auto RunVideoEffects( } + #endif -auto RunOnDeviceModel( - mojo::PendingReceiver - receiver) { -- return std::make_unique( -- std::move(receiver)); +- return on_device_model::OnDeviceModelService::Create(std::move(receiver)); -} - #if BUILDFLAG(ENABLE_VR) && !BUILDFLAG(IS_ANDROID) auto RunXrDeviceService( mojo::PendingReceiver receiver) { -@@ -408,9 +400,6 @@ void RegisterMainThreadServices(mojo::Se - services.Add(RunTracing); - services.Add(RunVideoCapture); +@@ -455,9 +448,6 @@ void RegisterMainThreadServices(mojo::Se + services.Add(RunVideoEffects); + #endif - if (optimization_guide::features::CanLaunchOnDeviceModelService()) { - services.Add(RunOnDeviceModel); @@ -46,28 +45,27 @@ Remove this unused component which brings a huge dependency on //third_party/daw #if BUILDFLAG(GOOGLE_CHROME_BRANDING) && BUILDFLAG(IS_CHROMEOS) services.Add(RunShapeDetectionService); ---- src/content/utility/utility_main.cc.old 2024-04-02 09:53:16.050958400 +0000 -+++ src/content/utility/utility_main.cc 2024-04-07 17:41:04.823696600 +0000 +--- src/content/utility/utility_main.cc.orig 2025-04-11 12:05:20.386081545 +0200 ++++ src/content/utility/utility_main.cc 2025-04-11 19:56:46.620452510 +0200 @@ -32,7 +32,6 @@ #include "sandbox/policy/mojom/sandbox.mojom.h" #include "sandbox/policy/sandbox.h" #include "sandbox/policy/sandbox_type.h" -#include "services/on_device_model/on_device_model_service.h" #include "services/tracing/public/cpp/trace_startup.h" - #include "third_party/icu/source/common/unicode/unistr.h" - #include "third_party/icu/source/i18n/unicode/timezone.h" -@@ -202,10 +201,6 @@ int UtilityMain(MainFunctionParams param - ? base::MessagePumpType::UI - : base::MessagePumpType::DEFAULT; + #include "services/video_effects/public/cpp/buildflags.h" -- if (parameters.command_line->GetSwitchValueASCII(switches::kUtilitySubType) == -- on_device_model::mojom::OnDeviceModelService::Name_) { +@@ -243,9 +242,6 @@ int UtilityMain(MainFunctionParams param + } + } + +- if (utility_sub_type == on_device_model::mojom::OnDeviceModelService::Name_) { - CHECK(on_device_model::OnDeviceModelService::PreSandboxInit()); - } - #if BUILDFLAG(IS_MAC) - auto sandbox_type = -@@ -283,11 +278,6 @@ int UtilityMain(MainFunctionParams param + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + // Thread type delegate of the process should be registered before first +@@ -278,11 +274,6 @@ int UtilityMain(MainFunctionParams param case sandbox::mojom::Sandbox::kAudio: pre_sandbox_hook = base::BindOnce(&audio::AudioPreSandboxHook); break; @@ -79,3 +77,13 @@ Remove this unused component which brings a huge dependency on //third_party/daw case sandbox::mojom::Sandbox::kSpeechRecognition: pre_sandbox_hook = base::BindOnce(&speech::SpeechRecognitionPreSandboxHook); +@@ -454,9 +445,6 @@ int UtilityMain(MainFunctionParams param + + run_loop.Run(); + +- if (utility_sub_type == on_device_model::mojom::OnDeviceModelService::Name_) { +- CHECK(on_device_model::OnDeviceModelService::Shutdown()); +- } + + #if defined(LEAK_SANITIZER) + // Invoke LeakSanitizer before shutting down the utility thread, to avoid diff --git a/remove-node-sea.patch b/remove-node-sea.patch new file mode 100644 index 0000000..993180d --- /dev/null +++ b/remove-node-sea.patch @@ -0,0 +1,46 @@ +Do not build single-executable builder, it is useless on distro electron and fails to compile + +--- src/third_party/electron_node/src/node_sea.cc.orig 2025-10-15 11:27:25.079700709 +0200 ++++ src/third_party/electron_node/src/node_sea.cc 2025-10-15 12:04:33.977861545 +0200 +@@ -384,6 +384,7 @@ struct SeaConfig { + std::vector exec_argv; + }; + ++#if 0 + std::optional ParseSingleExecutableConfig( + const std::string& config_path) { + std::string config; +@@ -571,6 +572,7 @@ std::optional ParseSingleExec + + return result; + } ++#endif + + ExitCode GenerateSnapshotForSEA(const SeaConfig& config, + const std::vector& args, +@@ -772,6 +774,7 @@ ExitCode GenerateSingleExecutableBlob( + + } // anonymous namespace + ++#if 0 + ExitCode BuildSingleExecutableBlob(const std::string& config_path, + const std::vector& args, + const std::vector& exec_args) { +@@ -785,6 +788,7 @@ ExitCode BuildSingleExecutableBlob(const + + return ExitCode::kGenericUserError; + } ++#endif + + void GetAsset(const FunctionCallbackInfo& args) { + CHECK_EQ(args.Length(), 1); +--- src/third_party/electron_node/unofficial.gni.orig 2025-09-10 22:31:58.561822889 +0200 ++++ src/third_party/electron_node/unofficial.gni 2025-09-11 12:03:47.577452435 +0200 +@@ -48,6 +48,7 @@ template("node_gn_build") { + if (v8_enable_i18n_support) { + defines += [ "NODE_HAVE_I18N_SUPPORT=1" ] + } ++ defines += ["DISABLE_SINGLE_EXECUTABLE_APPLICATION=1"] + } + + config("node_external_config") { diff --git a/remove-openscreen.patch b/remove-openscreen.patch deleted file mode 100644 index c3174f0..0000000 --- a/remove-openscreen.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/chrome/common/BUILD.gn.old -+++ src/chrome/common/BUILD.gn -@@ -350,7 +350,6 @@ static_library("common_lib") { - "//extensions/common:core_api_provider", - "//extensions/common/api", - "//extensions/strings", -- "//media/cast:net", - "//services/device/public/cpp/usb", - ] - } diff --git a/remove-password-manager-and-policy.patch b/remove-password-manager-and-policy.patch index 4101dbe..097a3c4 100644 --- a/remove-password-manager-and-policy.patch +++ b/remove-password-manager-and-policy.patch @@ -1,57 +1,13 @@ -From 54ec71011a6ebb873590802a70b2bc07578ba201 Mon Sep 17 00:00:00 2001 -From: Szabolcs David -Date: Mon, 10 Oct 2022 17:20:43 +0200 -Subject: Make user agent helpers buildable without unwanted dependencies - -"//components/policy" is enormously large with its resource files and -we don't want to build it for only one preference name. - -User agent utils are required to fill -navigator.userAgentData members in JavaScript. - -Task-number: QTBUG-107260 -Task-number: QTBUG-107451 -Change-Id: I752df68a8095ddb3f598a71f0419c1a2c9c408bb -Reviewed-by: Allan Sandfeld Jensen ---- - chromium/components/embedder_support/user_agent_utils.cc | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/chromium/components/embedder_support/user_agent_utils.cc b/chromium/components/embedder_support/user_agent_utils.cc -index c957a691efc..408fb837d80 100644 ---- a/components/embedder_support/user_agent_utils.cc -+++ b/components/embedder_support/user_agent_utils.cc -@@ -446,12 +446,14 @@ blink::UserAgentMetadata GetUserAgentMetadata(const PrefService* pref_service, - blink::UserAgentMetadata metadata; - - bool enable_updated_grease_by_policy = true; -+#if 0 - if (pref_service) { - if (pref_service->HasPrefPath( - policy::policy_prefs::kUserAgentClientHintsGREASEUpdateEnabled)) - enable_updated_grease_by_policy = pref_service->GetBoolean( - policy::policy_prefs::kUserAgentClientHintsGREASEUpdateEnabled); - } -+#endif - - // Low entropy client hints. - metadata.brand_version_list = --- -cgit v1.2.3 - - - -…and now come Electron—specific changes to support the above: - --- src/components/browsing_data/core/BUILD.gn.old +++ src/components/browsing_data/core/BUILD.gn -@@ -36,9 +36,7 @@ static_library("core") { +@@ -36,10 +36,7 @@ static_library("core") { deps = [ "//base", "//components/autofill/core/browser", - "//components/bookmarks/browser", "//components/history/core/browser", - "//components/password_manager/core/browser", +- "//components/password_manager/core/browser/features:password_features", "//components/pref_registry", "//components/prefs", "//components/strings", @@ -63,8 +19,8 @@ cgit v1.2.3 "//components/sync/nigori", - "//components/sync/service", ] - if (is_chromeos) { - public_deps += [ "//components/sync/chromeos" ] + } + --- src/components/permissions/prediction_service/BUILD.gn.old +++ src/components/permissions/prediction_service/BUILD.gn @@ -31,8 +31,6 @@ source_set("prediction_service") { @@ -76,30 +32,46 @@ cgit v1.2.3 ] if (build_with_tflite_lib) { ---- src/components/embedder_support/BUILD.gn.old -+++ src/components/embedder_support/BUILD.gn -@@ -24,11 +24,8 @@ static_library("browser_util") { +--- src/components/embedder_support/BUILD.gn.orig 2025-07-19 11:32:33.129979749 +0200 ++++ src/components/embedder_support/BUILD.gn 2025-08-13 11:51:36.828843854 +0200 +@@ -19,9 +19,7 @@ static_library("content_settings") { + ] + deps = [ - ":embedder_support", - "//build:branding_buildflags", -- "//components/background_sync", - "//components/content_settings/browser", "//components/content_settings/core/browser", +- "//components/content_settings/core/browser:cookie_settings", + "//content/public/browser", + "//net", + "//third_party/blink/public/mojom:mojom_platform_headers", +@@ -36,7 +34,6 @@ static_library("permissions") { + ] + + deps = [ +- "//components/background_sync", "//components/permissions", + "//device/vr/buildflags", + "//services/device/public/cpp:device_features", +@@ -58,7 +55,6 @@ static_library("user_agent") { + ":embedder_support", + "//build:branding_buildflags", + "//build/util:chromium_git_revision", - "//components/policy/core/common", "//components/prefs", "//components/version_info", - "//content/public/browser", ---- src/components/permissions/BUILD.gn.old -+++ src/components/permissions/BUILD.gn -@@ -109,8 +109,6 @@ source_set("permissions") { + "//net", +--- src/components/permissions/BUILD.gn.orig 2025-04-11 12:05:19.206024144 +0200 ++++ src/components/permissions/BUILD.gn 2025-04-11 20:04:52.832323166 +0200 +@@ -119,10 +119,7 @@ source_set("permissions") { + ] deps = [ "//base", - "//build:chromeos_buildflags", - "//components/back_forward_cache", - "//components/content_settings/browser", "//components/content_settings/core/browser", +- "//components/content_settings/core/browser:cookie_settings", "//components/favicon/core:core", + "//components/guest_view/buildflags", "//components/keyed_service/content", --- src/components/proxy_config/BUILD.gn.old +++ src/components/proxy_config/BUILD.gn @@ -122,10 +94,19 @@ cgit v1.2.3 sources += [ "proxy_policy_handler.cc", "proxy_policy_handler.h", ---- src/components/content_settings/core/browser/BUILD.gn.old +--- src/components/content_settings/core/browser/BUILD.gn.orig +++ src/components/content_settings/core/browser/BUILD.gn -@@ -70,7 +70,7 @@ static_library("browser") { - "//url", +@@ -78,8 +78,6 @@ static_library("browser") { + + if (use_blink) { + deps += [ +- "//components/policy:generated", +- "//components/policy/core/browser", + "//components/privacy_sandbox:privacy_sandbox_prefs", + ] + } +@@ -93,7 +91,7 @@ source_set("cookie_settings") { + "cookie_settings.h", ] - if (!is_ios) { @@ -133,15 +114,6 @@ cgit v1.2.3 sources += [ "cookie_settings_policy_handler.cc", "cookie_settings_policy_handler.h", -@@ -82,8 +82,6 @@ static_library("browser") { - if (use_blink) { - deps += [ - "//components/permissions:permissions_common", -- "//components/policy:generated", -- "//components/policy/core/browser", - "//components/privacy_sandbox:privacy_sandbox_prefs", - ] - } --- src/electron/chromium_src/BUILD.gn.orig +++ src/electron/chromium_src/BUILD.gn @@ -466,7 +466,7 @@ source_set("chrome_spellchecker") { @@ -179,28 +151,29 @@ cgit v1.2.3 "//device/vr/buildflags", ] } ---- src/components/search_engines/BUILD.gn.old -+++ src/components/search_engines/BUILD.gn -@@ -15,47 +15,25 @@ static_library("search_engines") { +--- src/components/search_engines/BUILD.gn.orig 2025-07-19 11:32:33.625979784 +0200 ++++ src/components/search_engines/BUILD.gn 2025-08-13 11:58:08.964717036 +0200 +@@ -12,50 +12,20 @@ if (is_android) { + static_library("search_engines") { + sources = [ "choice_made_location.h", - "default_search_manager.cc", - "default_search_manager.h", -- "default_search_policy_handler.cc", -- "default_search_policy_handler.h", - "eea_countries_ids.h", - "enterprise_site_search_manager.cc", - "enterprise_site_search_manager.h", +- "default_search_manager.cc", +- "default_search_manager.h", +- "enterprise/default_search_policy_handler.cc", +- "enterprise/default_search_policy_handler.h", +- "enterprise/enterprise_search_manager.cc", +- "enterprise/enterprise_search_manager.h", - "keyword_table.cc", - "keyword_table.h", "keyword_web_data_service.cc", "keyword_web_data_service.h", +- "reconciling_template_url_data_holder.cc", +- "reconciling_template_url_data_holder.h", + "search_engine_choice/search_engine_choice_metrics_service_accessor.h", - "search_engine_choice/search_engine_choice_service.cc", - "search_engine_choice/search_engine_choice_service.h", -- "search_engine_choice_utils.cc", -- "search_engine_choice_utils.h", - "search_engines_pref_names.h", - "search_engines_switches.cc", - "search_engines_switches.h", +- "search_engine_choice/search_engine_choice_utils.cc", +- "search_engine_choice/search_engine_choice_utils.h", - "search_host_to_urls_map.cc", - "search_host_to_urls_map.h", "search_terms_data.cc", @@ -209,8 +182,8 @@ cgit v1.2.3 - "template_url.h", "template_url_data.cc", "template_url_data.h", - "template_url_data_util.cc", - "template_url_data_util.h", +- "template_url_data_util.cc", +- "template_url_data_util.h", - "template_url_fetcher.cc", - "template_url_fetcher.h", "template_url_id.h", @@ -218,6 +191,8 @@ cgit v1.2.3 - "template_url_parser.h", - "template_url_prepopulate_data.cc", - "template_url_prepopulate_data.h", + "template_url_prepopulate_data_resolver.cc", + "template_url_prepopulate_data_resolver.h", - "template_url_service.cc", - "template_url_service.h", "template_url_service_client.h", @@ -229,28 +204,33 @@ cgit v1.2.3 ] public_deps = [ -@@ -69,20 +47,14 @@ static_library("search_engines") { +@@ -70,7 +42,6 @@ static_library("search_engines") { "//components/sync", "//components/webdata/common", "//third_party/metrics_proto", - "//third_party/omnibox_proto", + "//third_party/search_engines_data:prepopulated_engines", ] - deps = [ - "//base:i18n", +@@ -79,17 +50,11 @@ static_library("search_engines") { "//components/country_codes", + "//components/crash/core/common:crash_key", "//components/database_utils", - "//components/infobars/core", - "//components/lens:lens", +- "//components/lens/proto/server:proto", + "//components/metrics", "//components/omnibox/common", - "//components/policy:generated", - "//components/policy/core/browser", "//components/pref_registry", + "//components/regional_capabilities", + "//components/regional_capabilities:country_access_reason", - "//components/search_provider_logos:switches", "//components/signin/public/base", "//components/strings", "//components/url_formatter", -@@ -94,7 +66,6 @@ static_library("search_engines") { +@@ -101,7 +66,6 @@ static_library("search_engines") { "//services/network/public/mojom", "//sql", "//third_party/metrics_proto", @@ -258,15 +238,15 @@ cgit v1.2.3 "//ui/base", "//ui/gfx", "//ui/gfx/geometry", -@@ -120,7 +91,7 @@ static_library("search_engines") { - ] +@@ -141,7 +105,7 @@ static_library("search_engines") { + } } -- if (is_linux || is_win || is_mac || is_chromeos_ash) { +- if (is_linux || is_win || is_mac || is_chromeos) { + if (false) { sources += [ - "site_search_policy_handler.cc", - "site_search_policy_handler.h", + "enterprise/search_aggregator_policy_handler.cc", + "enterprise/search_aggregator_policy_handler.h", --- src/components/search/BUILD.gn.old +++ src/components/search/BUILD.gn @@ -6,10 +6,6 @@ static_library("search") { @@ -280,3 +260,60 @@ cgit v1.2.3 ] deps = [ +--- src/extensions/common/BUILD.gn.orig 2025-04-11 12:05:20.590871749 +0200 ++++ src/extensions/common/BUILD.gn 2025-04-11 20:05:59.704305366 +0200 +@@ -313,8 +313,6 @@ static_library("common") { + "extension_set.cc", + "extension_set.h", + "extension_updater_uma.h", +- "extension_urls.cc", +- "extension_urls.h", + "extension_utility_types.h", + "extensions_client.cc", + "extensions_client.h", +@@ -524,8 +522,6 @@ static_library("common") { + "//components/crx_file", + "//components/nacl/common:buildflags", + "//components/pdf/common:util", +- "//components/safe_browsing/core/common", +- "//components/safe_browsing/core/common/hashprefix_realtime:hash_realtime_utils", + "//components/url_formatter", + "//components/url_matcher", + "//components/version_info", +--- src/components/password_manager/core/browser/password_manager_switches.cc.orig 2024-12-08 18:34:56.591340037 +0100 ++++ src/components/password_manager/core/browser/password_manager_switches.cc 2024-12-18 12:47:00.934694855 +0100 +@@ -10,11 +10,9 @@ namespace password_manager { + // Specifies which encryption storage backend to use. Possible values are + // kwallet, kwallet5, kwallet6, gnome-libsecret, basic. + // Any other value will lead to Chrome detecting the best backend automatically. +-const char kPasswordStore[] = "password-store"; + + // Enables the feature of allowing the user to disable the backend via a + // setting. +-const char kEnableEncryptionSelection[] = "enable-encryption-selection"; + #endif // BUILDFLAG(IS_LINUX) + + // Enables Password Sharing button in password details UI in settings when +--- src/components/password_manager/core/browser/password_manager_switches.h.orig 2024-12-08 18:34:56.591340037 +0100 ++++ src/components/password_manager/core/browser/password_manager_switches.h 2024-12-18 12:48:40.918030653 +0100 +@@ -11,8 +11,8 @@ + namespace password_manager { + + #if BUILDFLAG(IS_LINUX) +-extern const char kPasswordStore[]; +-extern const char kEnableEncryptionSelection[]; ++inline constexpr const char kPasswordStore[] = "password-store"; ++inline constexpr const char kEnableEncryptionSelection[] = "enable-encryption-selection"; + #endif // BUILDFLAG(IS_LINUX) + + extern const char kEnableShareButtonUnbranded[]; +--- src/chrome/common/extensions/BUILD.gn.orig 2025-01-02 10:33:17.939583644 +0100 ++++ src/chrome/common/extensions/BUILD.gn 2025-01-02 11:36:57.232099250 +0100 +@@ -76,7 +76,6 @@ source_set("extensions") { + "//chrome/common/extensions/api:extensions_features", + "//components/app_constants", + "//components/device_signals/core/common:features", +- "//components/policy/core/common", + "//components/url_formatter", + "//components/version_info", + "//extensions:extensions_resources", diff --git a/remove-probabilistic-token-which-uses-private-join-and-compute.patch b/remove-probabilistic-token-which-uses-private-join-and-compute.patch new file mode 100644 index 0000000..56c2715 --- /dev/null +++ b/remove-probabilistic-token-which-uses-private-join-and-compute.patch @@ -0,0 +1,32 @@ +partially revert https://github.com/chromium/chromium/commit/43410138fb38ff4bdba9720ac57b26434443f761 + +--- src/components/ip_protection/common/BUILD.gn.orig 2025-08-15 17:32:25.445405827 +0200 ++++ src/components/ip_protection/common/BUILD.gn 2025-08-15 20:36:06.954140693 +0200 +@@ -63,7 +63,6 @@ source_set("ip_protection_core_impl") { + public_deps = [ + ":ip_protection_core", + ":ip_protection_data_types", +- ":ip_protection_probabilistic_reveal_token_manager", + ":ip_protection_proxy_config_manager", + ":ip_protection_token_manager", + ":masked_domain_list_manager", +@@ -108,7 +107,6 @@ source_set("ip_protection_core_impl_mojo + ] + deps = [ + ":ip_protection_core_host_remote", +- ":ip_protection_probabilistic_reveal_token_mojo_fetcher", + ":ip_protection_proxy_config_manager_impl", + ":ip_protection_proxy_config_mojo_fetcher", + ":ip_protection_token_manager_impl", +--- src/components/ip_protection/common/ip_protection_core_impl_mojo.cc.orig 2025-08-15 17:32:25.445405827 +0200 ++++ src/components/ip_protection/common/ip_protection_core_impl_mojo.cc 2025-08-16 19:10:17.599046225 +0200 +@@ -81,8 +81,7 @@ IpProtectionCoreImplMojo::IpProtectionCo + std::unique_ptr>(), + probabilistic_reveal_token_registry, + (core_host_remote && +- base::FeatureList::IsEnabled( +- net::features::kEnableProbabilisticRevealTokens)) ++ false) + ? std::make_unique( + std::make_unique< + IpProtectionProbabilisticRevealTokenMojoFetcher>( diff --git a/remove-puffin.patch b/remove-puffin.patch index 4b98ad5..1817cba 100644 --- a/remove-puffin.patch +++ b/remove-puffin.patch @@ -18,14 +18,3 @@ "//components/content_settings/core/common", "//components/crash/core/common", "//components/device_signals/core/common:features", ---- src/components/services/screen_ai/BUILD.gn.old -+++ src/components/services/screen_ai/BUILD.gn -@@ -41,8 +41,6 @@ if (is_linux || is_chromeos) { - - deps = [ - "//base", -- "//components/component_updater", -- "//components/services/screen_ai/public/cpp:utilities", - "//sandbox/linux:sandbox_services", - "//ui/accessibility:ax_base", - ] diff --git a/remove-rust.patch b/remove-rust.patch index 5c3b126..6399989 100644 --- a/remove-rust.patch +++ b/remove-rust.patch @@ -1,52 +1,107 @@ Remove this dead code which brings a dependency on rustc ---- src/components/BUILD.gn.orig 2024-03-27 16:30:09.189645288 +0100 -+++ src/components/BUILD.gn 2024-03-28 23:11:14.847582213 +0100 -@@ -282,7 +282,6 @@ test("components_unittests") { +--- src/components/BUILD.gn.orig 2025-04-11 12:05:18.743943100 +0200 ++++ src/components/BUILD.gn 2025-04-11 19:52:11.508526413 +0200 +@@ -297,7 +297,6 @@ test("components_unittests") { "//components/profile_metrics:unit_tests", "//components/proxy_config:unit_tests", "//components/push_notification:unit_tests", - "//components/qr_code_generator:unit_tests", "//components/query_parser:unit_tests", "//components/reading_list/core:unit_tests", - "//components/reporting/client:unit_tests", ---- src/chrome/test/BUILD.gn.orig 2024-03-27 16:37:20.829583999 +0100 -+++ src/chrome/test/BUILD.gn 2024-03-28 23:15:36.696977127 +0100 -@@ -1765,8 +1765,6 @@ if (!is_android && !is_fuchsia) { + "//components/regional_capabilities:unit_tests", +--- src/chrome/browser/BUILD.gn.orig 2025-04-11 12:13:12.927314100 +0200 ++++ src/chrome/browser/BUILD.gn 2025-04-11 19:52:48.976512203 +0200 +@@ -1777,7 +1777,6 @@ static_library("browser") { + "//chrome/browser/profiling_host", + + # TODO(crbug.com/40228447): break this dep when favicon is in its own target +- "//chrome/browser/share", + + # TODO(358041220): There is a circular_dependency of `cookie_controls:impl` module + # with "//chrome/browser" due to the inclusion of //c/b/policy/profile_policy_connector.h +@@ -1935,7 +1934,6 @@ static_library("browser") { + "//chrome/browser/search_engines", + "//chrome/browser/send_tab_to_self", + "//chrome/browser/serial", +- "//chrome/browser/share", + "//chrome/browser/sharing:buildflags", + "//chrome/browser/signin", + "//chrome/browser/signin:identity_manager_provider", +@@ -8426,7 +8424,6 @@ static_library("browser_generated_files" + "//chrome/browser/new_tab_page/modules/v2/calendar:mojo_bindings", + "//chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption:mojo_bindings", + "//chrome/browser/profile_resetter:profile_reset_report_proto", +- "//chrome/browser/share/proto:proto", + "//chrome/browser/support_tool:support_tool_proto", + "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto", + "//chrome/browser/ui:webui_name_variants", +@@ -8877,7 +8874,6 @@ static_library("test_support") { + "//chrome/browser/policy/messaging_layer/proto:crd_event_proto", + "//chrome/browser/search_engine_choice", + "//chrome/browser/search_engines", +- "//chrome/browser/share:share", + "//chrome/common", + "//chrome/common/notifications", + "//chrome/common/safe_browsing:proto", +--- src/chrome/browser/ui/BUILD.gn.orig 2024-12-08 18:34:54.011339960 +0100 ++++ src/chrome/browser/ui/BUILD.gn 2024-12-18 12:39:08.101349746 +0100 +@@ -425,7 +425,6 @@ static_library("ui") { + "//chrome/browser/search_engine_choice", + "//chrome/browser/search_engine_choice:impl", + "//chrome/browser/search_engines", +- "//chrome/browser/share", + "//chrome/browser/signin", + "//chrome/browser/signin:identity_manager_provider", + "//chrome/browser/signin:impl", +@@ -591,7 +590,6 @@ static_library("ui") { + "//components/privacy_sandbox:tracking_protection_settings", + "//components/profile_metrics", + "//components/proxy_config", +- "//components/qr_code_generator:bitmap_generator", + "//components/query_parser", + "//components/reading_list/core", + "//components/renderer_context_menu", +--- src/chrome/test/BUILD.gn.orig 2025-04-11 12:13:12.932314099 +0200 ++++ src/chrome/test/BUILD.gn 2025-04-11 19:53:28.092504094 +0200 +@@ -2163,7 +2163,6 @@ if (!is_android) { + "//chrome/browser/web_applications:prevent_close_test_support", + "//chrome/browser/web_applications:web_applications_test_support", + "//chrome/browser/webaudio:browser_tests", +- "//chrome/browser/webauthn:test_support", + "//chrome/common:version_header", "//chrome/common/privacy_budget:test_support", "//chrome/renderer", - "//chrome/renderer/companion/visual_query:browser_tests", -- "//chrome/services/qrcode_generator/public/cpp", -- "//chrome/services/qrcode_generator/public/mojom", - "//chrome/services/removable_storage_writer:lib", - "//chrome/test/data/webui:resources_grit", - "//chrome/test/data/webui/mojo:mojo_bindings", -@@ -6818,7 +6816,6 @@ if (!is_fuchsia) { - "//chrome/common/themes:unit_tests", - "//chrome/renderer/companion/visual_query:unit_tests", - "//chrome/services/file_util:unit_tests", -- "//chrome/services/qrcode_generator/public/cpp", - "//components/account_id", - "//components/assist_ranker/proto", - "//components/autofill/content/browser:test_support", ---- src/chrome/services/qrcode_generator/BUILD.gn.orig 2024-03-27 16:30:07.952978653 +0100 -+++ src/chrome/services/qrcode_generator/BUILD.gn 2024-03-28 23:20:47.829864401 +0100 -@@ -15,8 +15,6 @@ source_set("qrcode_generator") { - deps = [ - "//base", - "//chrome:strings", -- "//components/qr_code_generator", -- "//components/qr_code_generator:qr_code_generator_features", - "//components/vector_icons", - "//mojo/public/cpp/bindings", - "//net", ---- src/chrome/services/qrcode_generator/public/cpp/BUILD.gn.orig 2024-03-27 16:30:07.952978653 +0100 -+++ src/chrome/services/qrcode_generator/public/cpp/BUILD.gn 2024-03-28 23:22:28.019734555 +0100 -@@ -15,7 +15,6 @@ source_set("cpp") { - "//chrome:strings", - "//chrome/services/qrcode_generator", - "//chrome/services/qrcode_generator/public/mojom", -- "//components/qr_code_generator:qr_code_generator_features", - "//content/public/browser", - "//skia", - ] +@@ -2337,7 +2336,6 @@ if (!is_android) { + "//components/privacy_sandbox/privacy_sandbox_attestations:test_support", + "//components/privacy_sandbox/privacy_sandbox_attestations/proto:proto", + "//components/proxy_config", +- "//components/qr_code_generator:bitmap_generator", + "//components/reading_list/core", + "//components/resources", + "//components/safe_browsing:buildflags", +@@ -6648,7 +6646,6 @@ test("unit_tests") { + "//components/privacy_sandbox/privacy_sandbox_attestations:test_support", + "//components/privacy_sandbox/privacy_sandbox_attestations/proto:proto", + "//components/proxy_config", +- "//components/qr_code_generator:bitmap_generator", + "//components/query_parser", + "//components/reading_list/core", + "//components/reading_list/core:test_support", +@@ -6829,7 +6826,6 @@ test("unit_tests") { + "//third_party/metrics_proto", + "//third_party/microsoft_webauthn", + "//third_party/re2", +- "//third_party/rust/fend_core/v1/wrapper:unit_tests", + "//third_party/webrtc_overrides:webrtc_component", + "//third_party/widevine/cdm:headers", + "//third_party/zlib/google:compression_utils", +@@ -8115,8 +8111,6 @@ test("unit_tests") { + "//chrome/browser/upgrade_detector:build_state_observer", + "//chrome/browser/web_applications:features", + "//chrome/browser/web_applications:web_applications_test_support", +- "//chrome/browser/webauthn:test_support", +- "//chrome/browser/webauthn/proto", + "//chrome/common/read_anything:mojo_bindings", + "//chrome/services/speech:unit_tests", + "//components/app_constants", diff --git a/remove-sync.patch b/remove-sync.patch new file mode 100644 index 0000000..2da8031 --- /dev/null +++ b/remove-sync.patch @@ -0,0 +1,270 @@ +Do not build //components/sync with its massive protos. +It's unused in Electron (it's only there to support Google profile login) and dropping it saves about 1~2 MB binary size. + + +Inspired by: +* https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit?h=122-based&id=8a9d741f4c4cf8170d5c50a336d51fe5d1b16ce8 +* https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit?h=122-based&id=6a11e9169f5889883bf63a3522d0c3f8f23552b0 + +--- src/components/search_engines/BUILD.gn.orig 2025-04-11 12:05:19.397475381 +0200 ++++ src/components/search_engines/BUILD.gn 2025-04-11 20:18:41.424101555 +0200 +@@ -65,7 +65,6 @@ static_library("search_engines") { + "//components/google/core/common", + "//components/keyed_service/core", + "//components/prefs", +- "//components/sync", + "//components/webdata/common", + "//third_party/metrics_proto", + "//third_party/search_engines_data:prepopulated_engines", +--- src/electron/BUILD.gn.orig 2025-04-11 12:02:41.207130337 +0200 ++++ src/electron/BUILD.gn 2025-04-11 20:18:41.424101555 +0200 +@@ -1210,6 +1210,8 @@ if (is_mac) { + "//third_party/electron_node:libnode", + "//ui/strings", + ] ++ ++ assert_no_deps = [ "//components/sync/*" ] + + data = [] + data_deps = [] +--- src/electron/chromium_src/BUILD.gn.orig ++++ src/electron/chromium_src/BUILD.gn +@@ -493,7 +493,6 @@ source_set("chrome_spellchecker") { + "//base:base_static", + "//components/language/core/browser", + "//components/spellcheck:buildflags", +- "//components/sync", + ] + + public_deps += [ "//chrome/common:constants" ] +--- src/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc.orig ++++ src/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc +@@ -27,10 +27,6 @@ + #include "chrome/common/chrome_constants.h" + #include "components/spellcheck/browser/spellcheck_host_metrics.h" + #include "components/spellcheck/common/spellcheck_common.h" +-#include "components/sync/model/sync_change.h" +-#include "components/sync/model/sync_change_processor.h" +-#include "components/sync/protocol/dictionary_specifics.pb.h" +-#include "components/sync/protocol/entity_specifics.pb.h" + #include "content/public/browser/browser_task_traits.h" + #include "content/public/browser/browser_thread.h" + +@@ -256,7 +252,6 @@ bool SpellcheckCustomDictionary::AddWord + int result = dictionary_change->Sanitize(GetWords()); + Apply(*dictionary_change); + Notify(*dictionary_change); +- Sync(*dictionary_change); + Save(std::move(dictionary_change)); + return result == VALID_CHANGE; + } +@@ -268,7 +263,6 @@ bool SpellcheckCustomDictionary::RemoveW + int result = dictionary_change->Sanitize(GetWords()); + Apply(*dictionary_change); + Notify(*dictionary_change); +- Sync(*dictionary_change); + Save(std::move(dictionary_change)); + return result == VALID_CHANGE; + } +@@ -302,10 +296,12 @@ bool SpellcheckCustomDictionary::IsLoade + return is_loaded_; + } + ++#if 0 + bool SpellcheckCustomDictionary::IsSyncing() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + return !!sync_processor_.get(); + } ++#endif + + void SpellcheckCustomDictionary::Load() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +@@ -317,6 +313,7 @@ void SpellcheckCustomDictionary::Load() + weak_ptr_factory_.GetWeakPtr())); + } + ++#if 0 + void SpellcheckCustomDictionary::WaitUntilReadyToSync(base::OnceClosure done) { + DCHECK(!wait_until_ready_to_sync_cb_); + if (is_loaded_) +@@ -414,6 +411,7 @@ SpellcheckCustomDictionary::ProcessSyncC + base::WeakPtr SpellcheckCustomDictionary::AsWeakPtr() { + return weak_ptr_factory_.GetWeakPtr(); + } ++#endif + + SpellcheckCustomDictionary::LoadFileResult::LoadFileResult() + : is_valid_file(false) {} +@@ -460,7 +458,6 @@ void SpellcheckCustomDictionary::OnLoade + dictionary_change.AddWords(result->words); + dictionary_change.Sanitize(GetWords()); + Apply(dictionary_change); +- Sync(dictionary_change); + is_loaded_ = true; + if (wait_until_ready_to_sync_cb_) + std::move(wait_until_ready_to_sync_cb_).Run(); +@@ -507,6 +504,7 @@ void SpellcheckCustomDictionary::Save( + std::move(dictionary_change), custom_dictionary_path_)); + } + ++#if 0 + std::optional SpellcheckCustomDictionary::Sync( + const Change& dictionary_change) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +@@ -558,6 +556,7 @@ std::optional Spellc + + return std::nullopt; + } ++#endif + + void SpellcheckCustomDictionary::Notify(const Change& dictionary_change) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); +--- src/chrome/browser/spellchecker/spellcheck_custom_dictionary.h.orig ++++ src/chrome/browser/spellchecker/spellcheck_custom_dictionary.h +@@ -17,9 +17,6 @@ + #include "base/observer_list.h" + #include "base/task/sequenced_task_runner.h" + #include "components/spellcheck/browser/spellcheck_dictionary.h" +-#include "components/sync/model/model_error.h" +-#include "components/sync/model/sync_data.h" +-#include "components/sync/model/syncable_service.h" + + namespace base { + class Location; +@@ -38,8 +35,7 @@ class SyncChangeProcessor; + // foo + // checksum_v1 = ec3df4034567e59e119fcf87f2d9bad4 + // +-class SpellcheckCustomDictionary final : public SpellcheckDictionary, +- public syncer::SyncableService { ++class SpellcheckCustomDictionary final : public SpellcheckDictionary { + public: + // A change to the dictionary. + class Change { +@@ -162,11 +158,11 @@ class SpellcheckCustomDictionary final : + bool IsLoaded(); + + // Returns true if the dictionary is being synced. Otherwise returns false. +- bool IsSyncing(); + + // Overridden from SpellcheckDictionary: + void Load() override; + ++#if 0 + // Overridden from syncer::SyncableService: + void WaitUntilReadyToSync(base::OnceClosure done) override; + std::optional MergeDataAndStartSyncing( +@@ -179,6 +175,7 @@ class SpellcheckCustomDictionary final : + const base::Location& from_here, + const syncer::SyncChangeList& change_list) override; + base::WeakPtr AsWeakPtr() override; ++#endif + + private: + friend class DictionarySyncIntegrationTestHelper; +@@ -217,7 +214,6 @@ class SpellcheckCustomDictionary final : + // Notifies the sync service of the |dictionary_change|. Syncs up to the + // maximum syncable words on the server. Disables syncing of this dictionary + // if the server contains the maximum number of syncable words. +- std::optional Sync(const Change& dictionary_change); + + // Notifies observers of the dictionary change if the dictionary has been + // changed. +@@ -236,7 +232,6 @@ class SpellcheckCustomDictionary final : + base::ObserverList::Unchecked observers_; + + // Used to send local changes to the sync infrastructure. +- std::unique_ptr sync_processor_; + + // True if the dictionary has been loaded. Otherwise false. + bool is_loaded_; +--- src/device/fido/BUILD.gn.orig 2025-04-11 12:05:20.416153184 +0200 ++++ src/device/fido/BUILD.gn 2025-04-11 20:19:44.976088243 +0200 +@@ -159,25 +159,6 @@ component("fido") { + "device_operation.h", + "device_response_converter.cc", + "device_response_converter.h", +- "enclave/attestation.cc", +- "enclave/attestation.h", +- "enclave/attestation_report.h", +- "enclave/constants.cc", +- "enclave/constants.h", +- "enclave/enclave_authenticator.cc", +- "enclave/enclave_authenticator.h", +- "enclave/enclave_discovery.cc", +- "enclave/enclave_discovery.h", +- "enclave/enclave_protocol_utils.cc", +- "enclave/enclave_protocol_utils.h", +- "enclave/enclave_websocket_client.cc", +- "enclave/enclave_websocket_client.h", +- "enclave/metrics.cc", +- "enclave/metrics.h", +- "enclave/transact.cc", +- "enclave/transact.h", +- "enclave/types.cc", +- "enclave/types.h", + "fido_authenticator.cc", + "fido_authenticator.h", + "fido_device.cc", +@@ -242,7 +223,6 @@ component("fido") { + ] + + deps += [ +- "//components/sync/protocol:protocol", + "//device/fido/enclave/proto:proto", + "//services/device/public/cpp/hid", + "//services/device/public/cpp/usb", +--- src/device/fido/fido_discovery_factory.cc.orig 2025-04-11 12:05:20.421153186 +0200 ++++ src/device/fido/fido_discovery_factory.cc 2025-04-11 20:18:43.280101088 +0200 +@@ -12,7 +12,6 @@ + #include "device/bluetooth/bluetooth_adapter_factory.h" + #include "device/fido/cable/fido_cable_discovery.h" + #include "device/fido/cable/v2_discovery.h" +-#include "device/fido/enclave/enclave_discovery.h" + #include "device/fido/features.h" + #include "device/fido/fido_discovery_base.h" + #include "device/fido/hid/fido_hid_discovery.h" +@@ -128,11 +127,7 @@ std::vector> + FidoDiscoveryFactory::MaybeCreateEnclaveDiscovery() { +- if (!enclave_ui_request_stream_ || !network_context_factory_) { + return std::nullopt; +- } +- return std::make_unique( +- std::move(enclave_ui_request_stream_), network_context_factory_); + } + + bool FidoDiscoveryFactory::IsTestOverride() { +--- src/device/fido/fido_discovery_factory.h.orig ++++ src/device/fido/fido_discovery_factory.h +@@ -15,7 +15,6 @@ + #include "base/containers/span.h" + #include "base/memory/raw_ptr.h" + #include "build/build_config.h" +-#include "components/sync/protocol/webauthn_credential_specifics.pb.h" + #include "device/fido/cable/cable_discovery_data.h" + #include "device/fido/cable/v2_constants.h" + #include "device/fido/ctap_get_assertion_request.h" +--- src/components/variations/service/BUILD.gn.orig 2024-12-08 18:34:57.401340060 +0100 ++++ src/components/variations/service/BUILD.gn 2025-01-01 21:55:42.476247680 +0100 +@@ -74,7 +74,6 @@ static_library("service") { + "//components/network_time", + "//components/pref_registry", + "//components/prefs", +- "//components/sync/service", + "//components/variations", + "//components/variations/field_trial_config", + "//components/variations/proto", +--- src/content/public/browser/BUILD.gn.orig 2025-04-11 12:05:20.173348334 +0200 ++++ src/content/public/browser/BUILD.gn 2025-04-12 14:17:07.499743022 +0200 +@@ -584,9 +584,7 @@ source_set("browser_sources") { + deps = [ + "//cc", + "//components/input", +- "//components/language_detection/content/browser", + "//components/language_detection/content/common", +- "//components/language_detection/core/browser:language_detection_model_service", + "//components/services/storage/public/cpp", + "//components/variations:variations", + "//components/viz/host", diff --git a/resolution_monitor-missing-bitset.patch b/resolution_monitor-missing-bitset.patch deleted file mode 100644 index 4c25f25..0000000 --- a/resolution_monitor-missing-bitset.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 214859e3567ea9def85305e4f021a5d407e1ccfe Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Tue, 23 Jan 2024 10:56:36 +0000 -Subject: [PATCH] IWYU: missing include for usage of std::bitset in - resolution_monitor.cc -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Bug: 957519 -Change-Id: Ia538bbca63105397963632d2a145886e256efeb6 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5190545 -Commit-Queue: José Dapena Paz -Reviewed-by: Henrik Boström -Cr-Commit-Position: refs/heads/main@{#1250732} ---- - .../renderer/platform/peerconnection/resolution_monitor.cc | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc b/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc -index 5d6a6495045c4..33135a1b22473 100644 ---- a/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc -+++ b/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc -@@ -4,6 +4,8 @@ - - #include "third_party/blink/renderer/platform/peerconnection/resolution_monitor.h" - -+#include -+ - #include "base/containers/span.h" - #include "base/logging.h" - #include "base/memory/ptr_util.h" diff --git a/sandboxed_vfs_file_impl-missing-memset.patch b/sandboxed_vfs_file_impl-missing-memset.patch new file mode 100644 index 0000000..d909b54 --- /dev/null +++ b/sandboxed_vfs_file_impl-missing-memset.patch @@ -0,0 +1,11 @@ +--- src/sql/sandboxed_vfs_file_impl.cc.orig 2025-08-15 17:32:28.681405220 +0200 ++++ src/sql/sandboxed_vfs_file_impl.cc 2025-08-15 21:55:09.415178758 +0200 +@@ -9,6 +9,8 @@ + + #include "sql/sandboxed_vfs_file_impl.h" + ++#include ++ + #include "base/notreached.h" + #include "sql/sandboxed_vfs.h" + diff --git a/script_promise_resolver-explicit-specialization.patch b/script_promise_resolver-explicit-specialization.patch deleted file mode 100644 index 98827bf..0000000 --- a/script_promise_resolver-explicit-specialization.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 8b293359cafbc741e7742de824b98fbf87a51b51 Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Thu, 8 Feb 2024 09:32:57 +0000 -Subject: [PATCH] Do not use templates for ScriptPromiseResolver::ToV8 - implementation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The usage of templates for reusing the internal implementation of ToV8 -is not making the code simpler. So, inline the implementations. - -This also fixes a GCC build issue because it was implemented with -template specializations declared in the class scope, and that is -hitting the GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282 - -Bug: 819294 -Change-Id: I51f5a9e0a6e80ac707b630f270179c29fd84b059 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5223626 -Commit-Queue: José Dapena Paz -Reviewed-by: Yuki Shiino -Cr-Commit-Position: refs/heads/main@{#1257835} ---- - .../core/v8/script_promise_resolver.h | 60 +++++-------------- - 1 file changed, 14 insertions(+), 46 deletions(-) - -diff --git a/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h b/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h -index 93cecd06c2814..ae0081b735a67 100644 ---- a/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h -+++ b/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h -@@ -316,70 +316,38 @@ class CORE_EXPORT ScriptPromiseResolver - return V8String(isolate, value); - } - -- template -- static v8::Local ToV8SignedIntegerInternal(int64_t value, -- v8::Isolate*); -- -- template <> -- v8::Local ToV8SignedIntegerInternal<4>(int64_t value, -- v8::Isolate* isolate) { -- return v8::Integer::New(isolate, static_cast(value)); -- } -- -- template <> -- v8::Local ToV8SignedIntegerInternal<8>(int64_t value, -- v8::Isolate* isolate) { -- int32_t value_in32_bit = static_cast(value); -- if (value_in32_bit == value) { -- return v8::Integer::New(isolate, value_in32_bit); -- } -- // V8 doesn't have a 64-bit integer implementation. -- return v8::Number::New(isolate, value); -- } -- -- template -- static v8::Local ToV8UnsignedIntegerInternal(uint64_t value, -- v8::Isolate*); -- -- template <> -- v8::Local ToV8UnsignedIntegerInternal<4>(uint64_t value, -- v8::Isolate* isolate) { -- return v8::Integer::NewFromUnsigned(isolate, static_cast(value)); -- } -- -- template <> -- v8::Local ToV8UnsignedIntegerInternal<8>(uint64_t value, -- v8::Isolate* isolate) { -- uint32_t value_in32_bit = static_cast(value); -- if (value_in32_bit == value) { -- return v8::Integer::NewFromUnsigned(isolate, value_in32_bit); -- } -- // V8 doesn't have a 64-bit integer implementation. -- return v8::Number::New(isolate, value); -- } -- - static v8::Local ToV8(int32_t value, - v8::Local creation_context, - v8::Isolate* isolate) { -- return ToV8SignedIntegerInternal(value, isolate); -+ return v8::Integer::New(isolate, value); - } - - static v8::Local ToV8(int64_t value, - v8::Local creation_context, - v8::Isolate* isolate) { -- return ToV8SignedIntegerInternal(value, isolate); -+ int32_t value_in32_bit = static_cast(value); -+ if (value_in32_bit == value) { -+ return v8::Integer::New(isolate, value_in32_bit); -+ } -+ // V8 doesn't have a 64-bit integer implementation. -+ return v8::Number::New(isolate, value); - } - - static v8::Local ToV8(uint32_t value, - v8::Local creation_context, - v8::Isolate* isolate) { -- return ToV8UnsignedIntegerInternal(value, isolate); -+ return v8::Integer::NewFromUnsigned(isolate, value); - } - - static v8::Local ToV8(uint64_t value, - v8::Local creation_context, - v8::Isolate* isolate) { -- return ToV8UnsignedIntegerInternal(value, isolate); -+ uint32_t value_in32_bit = static_cast(value); -+ if (value_in32_bit == value) { -+ return v8::Integer::NewFromUnsigned(isolate, value_in32_bit); -+ } -+ // V8 doesn't have a 64-bit integer implementation. -+ return v8::Number::New(isolate, value); - } - - static v8::Local ToV8(bool value, diff --git a/search_engine_choice_service-missing-optional.patch b/search_engine_choice_service-missing-optional.patch deleted file mode 100644 index 7692640..0000000 --- a/search_engine_choice_service-missing-optional.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 4b48bc4dd6ce9c56d254e552a33a7b7c2d6fc226 Mon Sep 17 00:00:00 2001 -From: Jose Dapena Paz -Date: Thu, 1 Feb 2024 17:01:51 +0000 -Subject: [PATCH] IWYU: usage of std::optional in - search_engine_choice_service.h requires include -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Bug: 957519 -Change-Id: If89767ae4cd261081efda97cde6a296209b68782 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5259337 -Reviewed-by: Colin Blundell -Commit-Queue: José Dapena Paz -Cr-Commit-Position: refs/heads/main@{#1255105} ---- - .../search_engine_choice/search_engine_choice_service.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/components/search_engines/search_engine_choice/search_engine_choice_service.h b/components/search_engines/search_engine_choice/search_engine_choice_service.h -index b84ea7ec5fc08..c9dcce4b7c833 100644 ---- a/components/search_engines/search_engine_choice/search_engine_choice_service.h -+++ b/components/search_engines/search_engine_choice/search_engine_choice_service.h -@@ -5,6 +5,8 @@ - #ifndef COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_CHOICE_SEARCH_ENGINE_CHOICE_SERVICE_H_ - #define COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_CHOICE_SEARCH_ENGINE_CHOICE_SERVICE_H_ - -+#include -+ - #include "base/memory/raw_ref.h" - #include "base/memory/weak_ptr.h" - #include "components/country_codes/country_codes.h" diff --git a/seccomp_bpf-no-lto.patch b/seccomp_bpf-no-lto.patch index d8e6abe..954e9b6 100644 --- a/seccomp_bpf-no-lto.patch +++ b/seccomp_bpf-no-lto.patch @@ -1,6 +1,6 @@ ---- src/sandbox/linux/BUILD.gn.old 2022-10-12 18:06:31.399406000 +0200 -+++ src/sandbox/linux/BUILD.gn 2022-10-22 11:55:59.621396300 +0200 -@@ -196,6 +196,27 @@ +--- src/sandbox/linux/BUILD.gn.orig 2025-08-15 17:32:28.529405249 +0200 ++++ src/sandbox/linux/BUILD.gn 2025-08-16 19:07:14.523083090 +0200 +@@ -205,6 +205,26 @@ test("sandbox_linux_unittests") { } } @@ -17,7 +17,6 @@ + deps = [ + ":sandbox_services", + "//base", -+ "//build:chromeos_buildflags", + "//sandbox:sandbox_buildflags", + ] + if (gcc_lto) { @@ -28,7 +27,7 @@ component("seccomp_bpf") { sources = [ "bpf_dsl/bpf_dsl.cc", -@@ -227,8 +247,6 @@ +@@ -236,8 +256,6 @@ component("seccomp_bpf") { "seccomp-bpf/die.h", "seccomp-bpf/sandbox_bpf.cc", "seccomp-bpf/sandbox_bpf.h", @@ -37,11 +36,11 @@ "seccomp-bpf/trap.cc", "seccomp-bpf/trap.h", ] -@@ -240,6 +258,7 @@ +@@ -249,6 +267,7 @@ component("seccomp_bpf") { ] deps = [ ":sandbox_services", + ":seccomp_bpf_asm", "//base", - "//build:chromeos_buildflags", "//sandbox:sandbox_buildflags", + ] diff --git a/skia-system-vulkan-headers.patch b/skia-system-vulkan-headers.patch deleted file mode 100644 index 3b830ae..0000000 --- a/skia-system-vulkan-headers.patch +++ /dev/null @@ -1,22 +0,0 @@ -Unbundle only Skia's vulkan headers. ANGLE needs the bleeding-edge ones in vulkan-deps - ---- a/third_party/skia/include/private/gpu/vk/SkiaVulkan.h -+++ b/third_party/skia/include/private/gpu/vk/SkiaVulkan.h -@@ -11,7 +11,7 @@ - // IWYU pragma: begin_exports - - #if SKIA_IMPLEMENTATION || !defined(SK_VULKAN) --#include "include/third_party/vulkan/vulkan/vulkan_core.h" -+#include - #else - // For google3 builds we don't set SKIA_IMPLEMENTATION so we need to make sure that the vulkan - // headers stay up to date for our needs -@@ -21,7 +21,7 @@ - #ifdef SK_BUILD_FOR_ANDROID - // This is needed to get android extensions for external memory - #if SKIA_IMPLEMENTATION || !defined(SK_VULKAN) --#include "include/third_party/vulkan/vulkan/vulkan_android.h" -+#include - #else - // For google3 builds we don't set SKIA_IMPLEMENTATION so we need to make sure that the vulkan - // headers stay up to date for our needs diff --git a/string_view-incomplete-CodePointIterator.patch b/string_view-incomplete-CodePointIterator.patch new file mode 100644 index 0000000..cc6b891 --- /dev/null +++ b/string_view-incomplete-CodePointIterator.patch @@ -0,0 +1,61 @@ +In file included from /usr/include/c++/15/string:55, + from /usr/include/c++/15/bits/locale_classes.h:42, + from /usr/include/c++/15/bits/ios_base.h:43, + from /usr/include/c++/15/ios:46, + from /usr/include/c++/15/ostream:42, + from /usr/include/c++/15/bits/unique_ptr.h:43, + from /usr/include/c++/15/memory:80, + from ../../base/check.h:9, + from ../../third_party/blink/renderer/platform/wtf/allocator/allocator.h:8, + from ../../third_party/blink/renderer/platform/wtf/text/atomic_string.h:30: +/usr/include/c++/15/bits/range_access.h: In instantiation of ‘constexpr decltype (__cont.begin()) std::begin(const _Container&) [with _Container = WTF::String; decltype (__cont.begin()) = WTF::CodePointIterator]’: +../../third_party/perfetto/include/perfetto/tracing/traced_value.h:386:25: required by substitution of ‘template typename perfetto::check_traced_value_support()))>::type perfetto::internal::WriteImpl(perfetto::base::priority_tag<1>, perfetto::TracedValue, T&&) [with T = const WTF::String&]’ + 386 | decltype(*std::begin(std::declval()))>::type + | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ +../../third_party/perfetto/include/perfetto/tracing/traced_value.h:427:24: required by substitution of ‘template using perfetto::check_traced_value_support_t = decltype ((perfetto::internal::WriteImpl(std::declval(), std::declval(), declval()), declval())) [with T = const WTF::String&; Result = int]’ + 427 | internal::WriteImpl( + | ~~~~~~~~~~~~~~~~~~~^ + 428 | std::declval>(), + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 429 | std::declval(), + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 430 | std::declval()), + | ~~~~~~~~~~~~~~~~~~ +../../third_party/perfetto/include/perfetto/tracing/traced_value.h:465:15: required by substitution of ‘template static char (& perfetto::internal::has_traced_value_support::check_support(perfetto::check_traced_value_support_t))[1] [with V = const WTF::String&]’ + 465 | static Yes& check_support(check_traced_value_support_t); + | ^~~~~~~~~~~~~ +../../third_party/perfetto/include/perfetto/tracing/traced_value.h:470:71: required from ‘constexpr const bool perfetto::internal::has_traced_value_support::value’ + 470 | static constexpr bool value = sizeof(Yes) == sizeof(check_support(0)); + | ~~~~~~~~~~~~~~~~~^~~~ +../../third_party/perfetto/include/perfetto/tracing/traced_value.h:480:46: required from ‘void perfetto::WriteIntoTracedValue(TracedValue, T&&) [with T = const WTF::String&]’ + 480 | internal::has_traced_value_support::value, + | ^~~~~ +../../third_party/blink/renderer/platform/wtf/text/atomic_string.cc:127:33: required from here + 127 | perfetto::WriteIntoTracedValue(std::move(context), GetString()); + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +/usr/include/c++/15/bits/range_access.h:66:67: error: invalid use of incomplete type ‘class WTF::CodePointIterator’ + 66 | begin(const _Container& __cont) noexcept(noexcept(__cont.begin())) + | ~~~~~~~~~~~~^~ +In file included from ../../third_party/blink/renderer/platform/wtf/text/atomic_string.h:35: +../../third_party/blink/renderer/platform/wtf/text/string_view.h:31:7: note: forward declaration of ‘class WTF::CodePointIterator’ + 31 | class CodePointIterator; + | ^~~~~~~~~~~~~~~~~ + +--- src/third_party/blink/renderer/platform/wtf/text/string_view.h.orig 2025-04-20 19:22:39.910671377 +0200 ++++ src/third_party/blink/renderer/platform/wtf/text/string_view.h 2025-04-20 21:05:46.878482748 +0200 +@@ -19,6 +19,7 @@ + #include "base/numerics/safe_conversions.h" + #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" + #include "third_party/blink/renderer/platform/wtf/get_ptr.h" ++#include "third_party/blink/renderer/platform/wtf/text/code_point_iterator.h" + #include "third_party/blink/renderer/platform/wtf/text/string_impl.h" + + #if DCHECK_IS_ON() +@@ -28,7 +29,6 @@ + namespace WTF { + + class AtomicString; +-class CodePointIterator; + class String; + + enum class Utf8ConversionMode : uint8_t { diff --git a/swiftshader-llvm19-LLVMJIT-getHostCPUFeatures.patch b/swiftshader-llvm19-LLVMJIT-getHostCPUFeatures.patch new file mode 100644 index 0000000..357baca --- /dev/null +++ b/swiftshader-llvm19-LLVMJIT-getHostCPUFeatures.patch @@ -0,0 +1,16 @@ +--- src/third_party/swiftshader/src/Reactor/LLVMJIT.cpp.orig 2024-10-29 10:12:16.688190300 +0100 ++++ src/third_party/swiftshader/src/Reactor/LLVMJIT.cpp 2024-11-06 19:02:57.381872200 +0100 +@@ -221,8 +221,13 @@ JITGlobals *JITGlobals::get() + + // Retrieve host CPU name and sub-target features and add them to builder. + // Relocation model, code model and codegen opt level are kept to default values. ++#if LLVM_VERSION_MAJOR >= 19 ++ llvm::StringMap cpuFeatures= llvm::sys::getHostCPUFeatures(); ++ bool ok = true; ++#else + llvm::StringMap cpuFeatures; + bool ok = llvm::sys::getHostCPUFeatures(cpuFeatures); ++#endif + + #if defined(__i386__) || defined(__x86_64__) || \ + (defined(__linux__) && (defined(__arm__) || defined(__aarch64__))) diff --git a/swiftshader-llvm19-LLVMReactor-incomplete-Module.patch b/swiftshader-llvm19-LLVMReactor-incomplete-Module.patch new file mode 100644 index 0000000..8eda96a --- /dev/null +++ b/swiftshader-llvm19-LLVMReactor-incomplete-Module.patch @@ -0,0 +1,10 @@ +--- src/third_party/swiftshader/src/Reactor/LLVMReactor.cpp.orig 2024-10-29 10:12:16.688190300 +0100 ++++ src/third_party/swiftshader/src/Reactor/LLVMReactor.cpp 2024-11-06 19:06:12.194548700 +0100 +@@ -25,6 +25,7 @@ + + #include "llvm/IR/Intrinsics.h" + #include "llvm/IR/IntrinsicsX86.h" ++#include "llvm/IR/Module.h" + #include "llvm/Support/Alignment.h" + #include "llvm/Support/Error.h" + #include "llvm/Support/ManagedStatic.h" diff --git a/swiftshader-llvm20-absoluteSymbols.patch b/swiftshader-llvm20-absoluteSymbols.patch new file mode 100644 index 0000000..ba70a30 --- /dev/null +++ b/swiftshader-llvm20-absoluteSymbols.patch @@ -0,0 +1,14 @@ +--- src/third_party/swiftshader/src/Reactor/LLVMJIT.cpp.orig 2025-04-09 20:33:23.551038841 +0200 ++++ src/third_party/swiftshader/src/Reactor/LLVMJIT.cpp 2025-04-09 21:13:20.546410219 +0200 +@@ -73,6 +73,11 @@ __pragma(warning(push)) + # include "llvm/Transforms/IPO.h" + #endif + ++ ++#if LLVM_VERSION_MAJOR >= 20 // https://github.com/llvm/llvm-project/commit/dc11c0601577afb8f67513d041ee25dabe3555b9 ++#include "llvm/ExecutionEngine/Orc/AbsoluteSymbols.h" ++#endif ++ + #ifdef _MSC_VER + __pragma(warning(pop)) + #endif diff --git a/swiftshader-llvm21.patch b/swiftshader-llvm21.patch new file mode 100644 index 0000000..6f7d367 --- /dev/null +++ b/swiftshader-llvm21.patch @@ -0,0 +1,43 @@ +--- src/third_party/swiftshader/src/Reactor/LLVMJIT.cpp 2025-09-15 18:56:08.652126119 +0200 ++++ /var/tmp/build-root/openSUSE_Tumbleweed-x86_64/home/abuild/rpmbuild/BUILD/nodejs-electron-37.5.0-build/src/third_party/swiftshader/src/Reactor/LLVMJIT.cpp 2025-09-15 19:25:40.331977649 +0200 +@@ -78,6 +78,10 @@ __pragma(warning(push)) + #include "llvm/ExecutionEngine/Orc/AbsoluteSymbols.h" + #endif + ++#if LLVM_VERSION_MAJOR >= 21 // https://github.com/llvm/llvm-project/commit/0faa181434cf959110651fe974bef31e7390eba8 ++#include "llvm/ExecutionEngine/Orc/SelfExecutorProcessControl.h" ++#endif ++ + #ifdef _MSC_VER + __pragma(warning(pop)) + #endif +@@ -820,7 +824,11 @@ public: + , session(std::move(Unwrap(llvm::orc::SelfExecutorProcessControl::Create()))) + #endif + #if USE_LEGACY_OBJECT_LINKING_LAYER +- , objectLayer(session, [this]() { ++ , objectLayer(session, [this]( ++#if LLVM_VERSION_MAJOR >= 21 // https://github.com/llvm/llvm-project/commit/cd585864c0bbbd74ed2a2b1ccc191eed4d1c8f90 ++ const llvm::MemoryBuffer & ++#endif ++ ) { + return std::make_unique(&memoryMapper); + }) + #else +@@ -959,7 +967,15 @@ JITBuilder::JITBuilder() + , module(new llvm::Module("", *context)) + , builder(new llvm::IRBuilder<>(*context)) + { +- module->setTargetTriple(LLVM_DEFAULT_TARGET_TRIPLE); ++ module->setTargetTriple( ++#if LLVM_VERSION_MAJOR >= 21 // https://github.com/llvm/llvm-project/commit/979c275097a642e9b96c6b0a12f013c831af3a6e ++ llvm::Triple( ++#endif ++ LLVM_DEFAULT_TARGET_TRIPLE ++#if LLVM_VERSION_MAJOR >= 21 ++ ) ++#endif ++ ); + module->setDataLayout(JITGlobals::get()->getDataLayout()); + + msanInstrumentation = getPragmaState(MemorySanitizerInstrumentation); diff --git a/system-absl_algorithm.patch b/system-absl_algorithm.patch new file mode 100644 index 0000000..0e422d3 --- /dev/null +++ b/system-absl_algorithm.patch @@ -0,0 +1,27 @@ +Add absl_algorithm to shims +This library is used in chrome 130 therefore it should be now submitted upstream + +--- webrtc-5845d/build/linux/unbundle/absl_algorithm.gn.orig 2023-09-21 19:43:13.163148940 +0200 ++++ webrtc-5845d/build/linux/unbundle/absl_algorithm.gn 2023-09-21 21:24:11.594506276 +0200 +@@ -1,6 +1,21 @@ + import("//build/config/linux/pkg_config.gni") + import("//build/shim_headers.gni") + ++pkg_config("system_absl_algorithm") { ++ packages = [ "absl_algorithm" ] ++} ++ ++shim_headers("algorithm_shim") { ++ root_path = "." ++ prefix = "absl/algorithm/" ++ headers = [ "algorithm.h" ] ++} ++ ++source_set("algorithm") { ++ deps = [ ":algorithm_shim" ] ++ public_configs = [ ":system_absl_algorithm" ] ++} ++ + pkg_config("system_absl_algorithm_container") { + packages = [ "absl_algorithm_container" ] + } diff --git a/system-dragonbox.patch b/system-dragonbox.patch new file mode 100644 index 0000000..cc823e8 --- /dev/null +++ b/system-dragonbox.patch @@ -0,0 +1,11 @@ +--- src/v8/src/numbers/conversions.cc.orig 2025-08-15 17:36:40.101358286 +0200 ++++ src/v8/src/numbers/conversions.cc 2025-08-16 14:28:06.284178438 +0200 +@@ -23,7 +23,7 @@ + #include "src/objects/string-inl.h" + #include "src/strings/char-predicates-inl.h" + #include "src/utils/allocation.h" +-#include "third_party/dragonbox/src/include/dragonbox/dragonbox.h" ++#include + #include "third_party/fast_float/src/include/fast_float/fast_float.h" + #include "third_party/fast_float/src/include/fast_float/float_common.h" + diff --git a/system-ffmpeg.patch b/system-ffmpeg.patch new file mode 100644 index 0000000..1a9c465 --- /dev/null +++ b/system-ffmpeg.patch @@ -0,0 +1,15 @@ +--- src/electron/BUILD.gn.orig 2025-09-10 22:18:06.769733598 +0200 ++++ src/electron/BUILD.gn 2025-09-10 22:58:47.594001652 +0200 +@@ -1650,11 +1650,7 @@ if (is_linux && is_official_build) { + deps = [ "//third_party/angle:libGLESv2" ] + } + +- strip_binary("strip_libffmpeg_shlib") { +- binary_input = "$root_out_dir/libffmpeg.so" +- symbol_output = "$root_out_dir/debug/libffmpeg.so.debug" +- compress_debug_sections = true +- deps = [ "//third_party/ffmpeg" ] ++ source_set("strip_libffmpeg_shlib") { + } + + strip_binary("strip_libvk_swiftshader_shlib") { diff --git a/system-gtest.patch b/system-gtest.patch index 6902354..969862a 100644 --- a/system-gtest.patch +++ b/system-gtest.patch @@ -10,72 +10,42 @@ We don't need this huge test-only dependency in the tarball. Only one header is +#include #endif // TESTING_GTEST_INCLUDE_GTEST_GTEST_PROD_H_ ---- a/third_party/electron_node/deps/googletest/BUILD.gn 2022-07-22 14:56:38.984761919 +0200 -+++ b/third_party/electron_node/deps/googletest/BUILD.gn 2022-07-29 19:21:57.655767809 +0200 -@@ -1,61 +1,11 @@ --config("gtest_config") { -- include_dirs = [ "include" ] -- defines = [ "UNIT_TEST" ] --} +--- src/third_party/electron_node/deps/googletest/unofficial.gni.orig 2025-04-11 12:06:33.194184022 +0200 ++++ src/third_party/electron_node/deps/googletest/unofficial.gni 2025-04-11 20:55:32.455520889 +0200 +@@ -1,3 +1,5 @@ +import("//build/config/linux/pkg_config.gni") ++ + # This file is used by GN for building, which is NOT the build system used for + # building official binaries. + # Please edit the gyp files if you are making changes to build system. +@@ -5,27 +7,14 @@ + # The actual configurations are put inside a template in unofficial.gni to + # prevent accidental edits from contributors. + template("googletest_gn_build") { +- config("googletest_config") { +- include_dirs = [ "include" ] ++ pkg_config("googletest_config") { ++ packages = [ "gtest" ] + } --static_library("gtest") { -- include_dirs = [ -- "include", -- "." # src -- ] -+pkg_config("gtest_config") { -+ packages = [ "gtest" ] -+} +- gypi_values = exec_script("../../tools/gypi_to_gn.py", +- [ rebase_path("googletest.gyp") ], +- "scope", +- [ "googletest.gyp" ]) -+source_set("gtest") { - public_configs = [ ":gtest_config" ] -- -- cflags_cc = [ -- "-Wno-c++98-compat-extra-semi", -- "-Wno-unused-const-variable", -- "-Wno-unreachable-code-return", -- ] -- -- defines = [ -- "GTEST_HAS_POSIX_RE=0", -- "GTEST_LANG_CXX11=1", -- ] -- -- sources = [ -- "include/gtest/gtest_pred_impl.h", -- "include/gtest/gtest_prod.h", -- "include/gtest/gtest-death-test.h", -- "include/gtest/gtest-matchers.h", -- "include/gtest/gtest-message.h", -- "include/gtest/gtest-param-test.h", -- "include/gtest/gtest-printers.h", -- "include/gtest/gtest-spi.h", -- "include/gtest/gtest-test-part.h", -- "include/gtest/gtest-typed-test.h", -- "include/gtest/gtest.h", -- "include/gtest/internal/gtest-death-test-internal.h", -- "include/gtest/internal/gtest-filepath.h", -- "include/gtest/internal/gtest-internal.h", -- "include/gtest/internal/gtest-param-util.h", -- "include/gtest/internal/gtest-port-arch.h", -- "include/gtest/internal/gtest-port.h", -- "include/gtest/internal/gtest-string.h", -- "include/gtest/internal/gtest-type-util.h", -- "include/gtest/internal/custom/gtest-port.h", -- "include/gtest/internal/custom/gtest-printers.h", -- "include/gtest/internal/custom/gtest.h", -- "src/gtest-all.cc", -- "src/gtest-death-test.cc", -- "src/gtest-filepath.cc", -- "src/gtest-internal-inl.h", -- "src/gtest-matchers.cc", -- "src/gtest-port.cc", -- "src/gtest-printers.cc", -- "src/gtest-test-part.cc", -- "src/gtest-typed-test.cc", -- "src/gtest.cc", -- ] - } + source_set(target_name) { + forward_variables_from(invoker, "*") +- testonly = true +- include_dirs = [ +- "include", +- ".", +- ] +- defines = [ +- "GTEST_HAS_POSIX_RE=0", +- "GTEST_LANG_CXX11=1", +- ] +- sources = gypi_values.googletest_sources ++ public_configs = [ ":googletest_config" ] + } - static_library("gtest_main") { + source_set("gtest_main") { diff --git a/system-libdrm.patch b/system-libdrm.patch index f5fed9d..07ba642 100644 --- a/system-libdrm.patch +++ b/system-libdrm.patch @@ -29,27 +29,14 @@ Index: chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/crtc_controller.h #include "ui/ozone/platform/drm/common/scoped_drm_types.h" Index: chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/hardware_display_controller.cc =================================================================== ---- chromium-98.0.4758.80.orig/ui/ozone/platform/drm/gpu/hardware_display_controller.cc -+++ chromium-98.0.4758.80/ui/ozone/platform/drm/gpu/hardware_display_controller.cc -@@ -20,7 +20,7 @@ +--- src/ui/ozone/platform/drm/gpu/hardware_display_controller.cc.orig 2025-04-11 12:05:30.840157601 +0200 ++++ src/ui/ozone/platform/drm/gpu/hardware_display_controller.cc 2025-04-11 20:45:59.075673214 +0200 +@@ -18,7 +18,7 @@ + #include "base/logging.h" #include "base/metrics/histogram_macros.h" - #include "base/ranges/algorithm.h" #include "base/trace_event/typed_macros.h" -#include "third_party/libdrm/src/include/drm/drm_fourcc.h" +#include #include "third_party/perfetto/include/perfetto/tracing/traced_value.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkImage.h" -Index: chromium-98.0.4758.80/media/gpu/chromeos/video_decoder_pipeline_unittest.cc -=================================================================== ---- chromium-98.0.4758.80.orig/media/gpu/chromeos/video_decoder_pipeline_unittest.cc -+++ chromium-98.0.4758.80/media/gpu/chromeos/video_decoder_pipeline_unittest.cc -@@ -23,7 +23,7 @@ - #include "media/gpu/chromeos/dmabuf_video_frame_pool.h" - #include "testing/gmock/include/gmock/gmock.h" - #include "testing/gtest/include/gtest/gtest.h" --#include "third_party/libdrm/src/include/drm/drm_fourcc.h" -+#include - - #if BUILDFLAG(IS_CHROMEOS_ASH) - // gn check does not account for BUILDFLAG(), so including this header will diff --git a/system-pydeps.patch b/system-pydeps.patch index a680916..5dd82c7 100644 --- a/system-pydeps.patch +++ b/system-pydeps.patch @@ -71,17 +71,6 @@ Unbundle assorted lexing/parsing/transpiling tools written in Python. ../../build/scripts/blinkbuild/__init__.py ../../build/scripts/blinkbuild/name_style_converter.py bind_gen/__init__.py ---- a/third_party/blink/renderer/modules/sanitizer_api/builtins/generate_attribute_lists.py -+++ b/third_party/blink/renderer/modules/sanitizer_api/builtins/generate_attribute_lists.py -@@ -4,7 +4,7 @@ - # found in the LICENSE file. - """Generate list of attribute names known to this version of Chromium.""" - --from pyjson5.src import json5 -+import json5 - import optparse - import sys - --- src/third_party/blink/renderer/bindings/scripts/check_generated_file_list.pydeps.old 2022-11-30 10:28:05.822183900 +0000 +++ src/third_party/blink/renderer/bindings/scripts/check_generated_file_list.pydeps 2022-11-30 19:51:45.562760400 +0000 @@ -2,29 +2,6 @@ @@ -127,29 +116,30 @@ Unbundle assorted lexing/parsing/transpiling tools written in Python. ../../build/scripts/blinkbuild/__init__.py ../../build/scripts/blinkbuild/name_style_converter.py validate_web_idl.py ---- a/mojo/public/tools/bindings/mojom.gni -+++ b/mojo/public/tools/bindings/mojom.gni -@@ -699,7 +699,7 @@ - allow_remote = true - custom_processor = "mojom_parser" +--- src/mojo/public/tools/bindings/mojom.gni.orig 2025-04-11 12:05:21.530272509 +0200 ++++ src/mojo/public/tools/bindings/mojom.gni 2025-04-11 20:56:50.579500868 +0200 +@@ -802,7 +802,7 @@ template("mojom") { + + action("${parser_target_name}_action") { script = mojom_parser_script - inputs = mojom_parser_sources + ply_sources + [ build_metadata_filename ] + inputs = mojom_parser_sources + [ build_metadata_filename ] sources = sources_list public_deps = parser_deps - outputs = [] ---- src/third_party/blink/renderer/build/scripts/scripts.gni.old -+++ src/third_party/blink/renderer/build/scripts/scripts.gni -@@ -17,9 +17,6 @@ _scripts_dir = "//third_party/blink/rend - scripts_for_json5_files = [ - # jinja2/__init__.py contains version string, so sufficient as - # dependency for whole jinja2 package -- "//third_party/jinja2/__init__.py", -- "//third_party/markupsafe/__init__.py", # jinja2 dep -- "//third_party/pyjson5/src/json5/__init__.py", - "$_scripts_dir/blinkbuild/name_style_converter.py", - "$_scripts_dir/hasher.py", - "$_scripts_dir/json5_generator.py", + outputs = action_outputs +--- src/third_party/blink/renderer/build/scripts/scripts.gni.orig 2024-12-08 18:35:01.138006834 +0100 ++++ src/third_party/blink/renderer/build/scripts/scripts.gni 2024-12-18 13:24:36.436191575 +0100 +@@ -18,10 +18,6 @@ if (is_ios) { + _scripts_dir = "//third_party/blink/renderer/build/scripts" + + scripts_for_json5_files = jinja2_sources + [ +- "//third_party/pyjson5/src/json5/__init__.py", +- "//third_party/pyjson5/src/json5/lib.py", +- "//third_party/pyjson5/src/json5/parser.py", +- "//third_party/pyjson5/src/json5/version.py", + "$_scripts_dir/blinkbuild/name_style_converter.py", + "$_scripts_dir/json5_generator.py", + "$_scripts_dir/license.py", --- src/third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps.old +++ src/third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps @@ -2,10 +2,6 @@ @@ -174,3 +164,14 @@ Unbundle assorted lexing/parsing/transpiling tools written in Python. "//third_party/jinja2/__init__.py", "//third_party/jinja2/_identifier.py", "//third_party/jinja2/async_utils.py", +--- src/third_party/blink/renderer/core/sanitizer/builtins_all_known.py.orig 2025-04-16 14:36:32.677312629 +0200 ++++ src/third_party/blink/renderer/core/sanitizer/builtins_all_known.py 2025-04-16 21:52:51.840741724 +0200 +@@ -13,7 +13,7 @@ namespace that Blink's C++ implementatio + import json + import optparse + import sys +-from pyjson5.src import json5 ++import json5 + + + def error(context, *infos): diff --git a/system-simdutf.patch b/system-simdutf.patch deleted file mode 100644 index 4740c62..0000000 --- a/system-simdutf.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- src/third_party/electron_node/deps/simdutf/BUILD.gn.old 2023-10-13 11:35:11.896370000 +0200 -+++ src/third_party/electron_node/deps/simdutf/BUILD.gn 2023-10-17 19:29:35.882793400 +0200 -@@ -1,15 +1,26 @@ -+declare_args() { -+ use_system_simdutf = false -+} -+ - config("simdutf_config") { -+ if(use_system_simdutf) { -+ libs = ["simdutf"] -+ } else { - include_dirs = [ "." ] -+ } - } - - static_library("simdutf") { -+ if(!use_system_simdutf) { - include_dirs = [ "." ] - sources = [ - "simdutf.cpp", - ] -+ } - - public_configs = [ ":simdutf_config" ] - -+ if(!use_system_simdutf) { - cflags_cc = [ - "-Wno-ambiguous-reversed-operator", - "-Wno-c++98-compat-extra-semi", -@@ -17,4 +28,5 @@ static_library("simdutf") { - "-Wno-unused-const-variable", - "-Wno-unused-function", - ] -+ } - } diff --git a/system-six.patch b/system-six.patch index 8f5a589..a099e7b 100644 --- a/system-six.patch +++ b/system-six.patch @@ -8,7 +8,7 @@ The `-w` parameter to gen_share_targets_proto.py and several other scripts remov @@ -156,7 +156,8 @@ def Run(self): parser = optparse.OptionParser() - # TODO(crbug.com/614082): Remove this once the bug is fixed. + # TODO(crbug.com/41255210): Remove this once the bug is fixed. - parser.add_option('-w', '--wrap', action="store_true", default=False, + parser.add_option('-w', '--fake-option', action="store_true", default=False) + parser.add_option('--wrap', action="store_true", default=False, diff --git a/system-sqlite.patch b/system-sqlite.patch new file mode 100644 index 0000000..1f818b3 --- /dev/null +++ b/system-sqlite.patch @@ -0,0 +1,50 @@ +Unbundle Node's sqlite copy. Note that this is NOT the sqlite used by Chromium, which is a fork. +(Yes, there are two instances of sqlite in Electron) + +--- src/third_party/electron_node/deps/sqlite/unofficial.gni 2025-04-16 14:39:35.699035282 +0200 ++++ /var/tmp/build-root/openSUSE_Tumbleweed-x86_64/home/abuild/rpmbuild/BUILD/nodejs-electron-35.1.5-build/src/third_party/electron_node/deps/sqlite/unofficial.gni 2025-04-18 15:46:13.417442111 +0200 +@@ -1,3 +1,4 @@ ++import("//build/config/linux/pkg_config.gni") + # This file is used by GN for building, which is NOT the build system used for + # building official binaries. + # Please edit the gyp files if you are making changes to build system. +@@ -5,8 +6,8 @@ + # The actual configurations are put inside a template in unofficial.gni to + # prevent accidental edits from contributors. + template("sqlite_gn_build") { +- config("sqlite_config") { +- include_dirs = [ "." ] ++ pkg_config("sqlite_config") { ++ packages = ["sqlite3"] + defines = [ + "SQLITE_ENABLE_COLUMN_METADATA", + "SQLITE_ENABLE_DBSTAT_VTAB", +@@ -14,28 +15,9 @@ template("sqlite_gn_build") { + ] + } + +- gypi_values = exec_script("../../tools/gypi_to_gn.py", +- [ rebase_path("sqlite.gyp") ], +- "scope", +- [ "sqlite.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":sqlite_config" ] +- sources = gypi_values.sqlite_sources +- cflags_c = [ +- "-Wno-implicit-fallthrough", +- "-Wno-unreachable-code-return", +- "-Wno-unreachable-code-break", +- "-Wno-unreachable-code", +- ] +- if (is_win) { +- cflags_c += [ +- "-Wno-sign-compare", +- "-Wno-unused-but-set-variable", +- "-Wno-unused-function", +- "-Wno-unused-variable", +- ] +- } + } + } diff --git a/system-wayland.patch b/system-wayland.patch index 866c199..378f3ee 100644 --- a/system-wayland.patch +++ b/system-wayland.patch @@ -1,81 +1,6 @@ ---- src/third_party/wayland/BUILD.gn.old -+++ src/third_party/wayland/BUILD.gn -@@ -45,7 +45,14 @@ - generator_type = "protocol-client" - } - -+pkg_config("system_wayland_client") { -+ packages = [ "wayland-client" ] -+} -+ - source_set("wayland_util") { -+ public_configs = [":system_wayland_client"] -+} -+source_set("xwayland_util") { - sources = [ - "src/src/wayland-private.h", - "src/src/wayland-util.c", -@@ -77,7 +84,14 @@ - public_configs = [ ":wayland_config" ] - } - --static_library("wayland_server") { -+pkg_config("system_wayland_server") { -+ packages = [ "wayland-server" ] -+} -+ -+source_set("wayland_server") { -+ public_configs = [":system_wayland_server"] -+} -+static_library("xwayland_server") { - sources = [ - "src/src/event-loop.c", - "src/src/wayland-server.c", -@@ -104,7 +118,10 @@ - public_configs = [ ":wayland_config" ] - } - --static_library("wayland_client") { -+source_set("wayland_client") { -+ public_configs = [":system_wayland_client"] -+} -+static_library("xwayland_client") { - sources = [ "src/src/wayland-client.c" ] - - deps = [ -@@ -124,7 +141,14 @@ - public_configs = [ ":wayland_config" ] - } - --static_library("wayland_egl") { -+pkg_config("system_wayland_egl") { -+ packages = [ "wayland-egl" ] -+} -+ -+source_set("wayland_egl") { -+ public_configs = [":system_wayland_egl"] -+} -+static_library("xwayland_egl") { - sources = [ - "src/egl/wayland-egl-backend.h", - "src/egl/wayland-egl-core.h", -@@ -143,7 +167,14 @@ - public_configs = [ ":wayland_config" ] - } - --static_library("wayland_cursor") { -+pkg_config("system_wayland_cursor") { -+ packages = [ "wayland-cursor" ] -+} -+ -+source_set("wayland_cursor") { -+ public_configs = [":system_wayland_cursor"] -+} -+static_library("xwayland_cursor") { - sources = [ - "src/cursor/cursor-data.h", - "src/cursor/os-compatibility.c", -@@ -173,7 +204,11 @@ +--- src/third_party/wayland/BUILD.gn.orig 2024-12-08 18:35:12.381340501 +0100 ++++ src/third_party/wayland/BUILD.gn 2024-12-18 13:29:59.426062502 +0100 +@@ -289,7 +289,11 @@ config("wayland_scanner_config") { include_dirs = [ "include/" ] } diff --git a/system-yuv.patch b/system-yuv.patch deleted file mode 100644 index d087e73..0000000 --- a/system-yuv.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- src/build/linux/unbundle/libyuv.gn.orig -+++ src/build/linux/unbundle/libyuv.gn -@@ -1,7 +1,7 @@ - import("//build/config/linux/pkg_config.gni") - import("//build/shim_headers.gni") - --pkg_config("system_yuv") { -+pkg_config("libyuv_config") { - packages = [ "libyuv" ] - } - -@@ -33,5 +33,5 @@ shim_headers("libyuv_shim") { - - source_set("libyuv") { - deps = [ ":libyuv_shim" ] -- public_configs = [ ":system_yuv" ] -+ public_configs = [ ":libyuv_config" ] - } diff --git a/system-zlib.patch b/system-zlib.patch deleted file mode 100644 index a8c5069..0000000 --- a/system-zlib.patch +++ /dev/null @@ -1,32 +0,0 @@ -description: use system zlib library instead of embedded lzma in courgette -author: Michael Gilbert - ---- a/courgette/BUILD.gn -+++ b/courgette/BUILD.gn -@@ -58,7 +58,6 @@ static_library("courgette_lib") { - - deps = [ - "//base", -- "//third_party/lzma_sdk", - ] - - public_deps = [ -@@ -79,7 +78,6 @@ source_set("courgette_common") { - ] - deps = [ - "//base", -- "//third_party/lzma_sdk", - ] - } - ---- a/courgette/crc.cc -+++ b/courgette/crc.cc -@@ -7,6 +7,8 @@ - #include - #include - -+#define COURGETTE_USE_CRC_LIB -+ - #ifdef COURGETTE_USE_CRC_LIB - # include "zlib.h" - #else diff --git a/system-zstd-in-node.patch b/system-zstd-in-node.patch new file mode 100644 index 0000000..195d20f --- /dev/null +++ b/system-zstd-in-node.patch @@ -0,0 +1,10 @@ +--- src/build/linux/unbundle/zstd.gn.orig 2025-05-15 00:07:52.687879791 +0200 ++++ src/build/linux/unbundle/zstd.gn 2025-05-15 00:52:47.403841155 +0200 +@@ -25,3 +25,7 @@ source_set("decompress") { + public_configs = [ ":system_zstd" ] + public_deps = [ ":zstd_headers" ] + } ++source_set("headers") { ++ public_configs = [ ":system_zstd" ] ++ public_deps = [ ":zstd_headers" ] ++} diff --git a/text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch b/text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch deleted file mode 100644 index 5ffe3dc..0000000 --- a/text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch +++ /dev/null @@ -1,148 +0,0 @@ -From f62990fb134b7e610502b6804945debaa51960a5 Mon Sep 17 00:00:00 2001 -From: Koji Ishii -Date: Fri, 9 Feb 2024 18:47:02 +0000 -Subject: [PATCH] Support ICU 74 in `LazyTextBreakIterator` - -This patch extends the `kBreakAllLineBreakClassTable` table -for 5 new LineBreak classes in ICU 74. - -They are for Brahmic scripts, which "line breaks can occur at -the boundaries of any orthographic syllable"[1]. The -`break-all` has no additional break opportunities that all -entries are `0`. - -This patch also adds `0` for 3 classes added in ICU 58[2], -instead of doing so in code, to make future additions -possible. - -[1] https://unicode.org/reports/tr14/#BreakOpportunities -[2] https://chromiumcodereview.appspot.com/2440923002 - -Bug: 324419151 -Change-Id: I8002edb927280f63b5b668b09076cc71feaeac3e -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5279337 -Auto-Submit: Koji Ishii -Commit-Queue: Ian Kilpatrick -Reviewed-by: Ian Kilpatrick -Cr-Commit-Position: refs/heads/main@{#1258643} ---- - .../platform/text/text_break_iterator.cc | 98 ++++++++++--------- - 1 file changed, 53 insertions(+), 45 deletions(-) - -diff --git a/third_party/blink/renderer/platform/text/text_break_iterator.cc b/third_party/blink/renderer/platform/text/text_break_iterator.cc -index 703dc2399075469..38ab94a0a460b5c 100644 ---- a/third_party/blink/renderer/platform/text/text_break_iterator.cc -+++ b/third_party/blink/renderer/platform/text/text_break_iterator.cc -@@ -161,11 +161,7 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar - }; - // clang-format on - --#if U_ICU_VERSION_MAJOR_NUM >= 58 --#define BA_LB_COUNT (U_LB_COUNT - 3) --#else - #define BA_LB_COUNT U_LB_COUNT --#endif - // Line breaking table for CSS word-break: break-all. This table differs from - // asciiLineBreakTable in: - // - Indices are Line Breaking Classes defined in UAX#14 Unicode Line Breaking -@@ -174,47 +170,59 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar - // normal line break, not "prohibit break." - // clang-format off - static const unsigned char kBreakAllLineBreakClassTable[][BA_LB_COUNT / 8 + 1] = { -- // XX AI AL B2 BA BB BK CB CL CM CR EX GL HY ID IN IS LF NS NU OP PO PR QU SA SG SP SY ZW NL WJ H2 H3 JL JT JV CP CJ HL RI -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AI -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AL -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // B2 -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // BA -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BB -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BK -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CB -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // CL -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CM -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CR -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // EX -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // GL -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // HY -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ID -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // IN -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // IS -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // LF -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NS -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // NU -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // OP -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // PO -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // PR -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // QU -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // SA -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SG -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SP -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // SY -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ZW -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NL -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // WJ -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H2 -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H3 -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JL -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JT -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JV -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // CP -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CJ -- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // HL -- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // RI -+ // XX AI AL B2 BA BB BK CB CL CM CR EX GL HY ID IN IS LF NS NU OP PO PR QU SA SG SP SY ZW NL WJ H2 H3 JL JT JV CP CJ HL RI EB EM ZWJ AK AP AS VF VI -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AI -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AL -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // B2 -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BA -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BB -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BK -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CB -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CL -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CM -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CR -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // EX -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // GL -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // HY -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ID -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // IN -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // IS -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // LF -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NS -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NU -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // OP -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // PO -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // PR -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // QU -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SA -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SG -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SP -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SY -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ZW -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NL -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // WJ -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H2 -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H3 -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JL -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JT -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JV -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CP -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CJ -+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // HL -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // RI -+ // Added in ICU 58. -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // EB -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // EM -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ZWJ -+#if U_ICU_VERSION_MAJOR_NUM >= 74 -+ // Added in ICU 74. https://icu.unicode.org/download/74 -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AK -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AP -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AS -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // VF -+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // VI -+#endif // U_ICU_VERSION_MAJOR_NUM >= 74 - }; - // clang-format on - diff --git a/torque-debuginfo.patch b/torque-debuginfo.patch new file mode 100644 index 0000000..270d2ac --- /dev/null +++ b/torque-debuginfo.patch @@ -0,0 +1,61 @@ +Adds debuginfo directives to embedded.S and torque-generated .cc files. + +This does not change the electron binary in any way (the text is identical), only makes the symbols better. + +Revert https://github.com/v8/v8/commit/28e0e97dfe0d2b4587cb8f9a809fcaeb4670546f + +reverted: +--- b/v8/src/snapshot/embedded/embedded-file-writer.cc ++++ a/v8/src/snapshot/embedded/embedded-file-writer.cc +@@ -77,10 +77,6 @@ void EmbeddedFileWriter::WriteBuiltin(Pl + v8::internal::SourcePositionTableIterator positions( + vpos, SourcePositionTableIterator::kExternalOnly); + +-#ifndef DEBUG +- CHECK(positions.done()); // Release builds must not contain debug infos. +-#endif +- + // Some builtins (InterpreterPushArgsThenFastConstructFunction, + // JSConstructStubGeneric) have entry points located in the middle of them, we + // need to store their addresses since they are part of the list of allowed +reverted: +--- b/v8/src/snapshot/embedded/embedded-file-writer.h ++++ a/v8/src/snapshot/embedded/embedded-file-writer.h +@@ -121,11 +121,6 @@ + } + + void WriteExternalFilenames(PlatformEmbeddedFileWriterBase* w) const { +-#ifndef DEBUG +- // Release builds must not contain debug infos. +- CHECK_EQ(external_filenames_by_index_.size(), 0); +-#endif +- + w->Comment( + "Source positions in the embedded blob refer to filenames by id."); + w->Comment("Assembly directives here map the id to a filename."); +--- src/v8/src/torque/torque-code-generator.cc.orig 2025-05-07 20:01:00.337777745 +0200 ++++ src/v8/src/torque/torque-code-generator.cc 2025-05-08 20:03:23.726364897 +0200 +@@ -26,11 +26,9 @@ bool TorqueCodeGenerator::IsEmptyInstruc + + void TorqueCodeGenerator::EmitInstruction(const Instruction& instruction, + Stack* stack) { +-#ifdef DEBUG + if (!IsEmptyInstruction(instruction)) { + EmitSourcePosition(instruction->pos); + } +-#endif + + switch (instruction.kind()) { + #define ENUM_ITEM(T) \ +--- src/v8/src/compiler/code-assembler.cc.orig 2025-05-07 20:01:00.165777775 +0200 ++++ src/v8/src/compiler/code-assembler.cc 2025-05-08 21:30:20.037471973 +0200 +@@ -100,7 +100,9 @@ void CodeAssemblerState::SetInitialDebug + int line) { + #if DEBUG + AssemblerDebugInfo debug_info = {msg, file, line}; ++#endif + raw_assembler_->SetCurrentExternalSourcePosition({file, line}); ++#if DEBUG + raw_assembler_->SetInitialDebugInformation(debug_info); + #endif // DEBUG + } diff --git a/use-system-libraries-in-node.patch b/use-system-libraries-in-node.patch new file mode 100644 index 0000000..7dc6c29 --- /dev/null +++ b/use-system-libraries-in-node.patch @@ -0,0 +1,159 @@ +Also remove spurious exports of internal functions bloating binary due to incorrectly building libnode with -fvisibility=default +Both this and the unbundle flags should be upstreamed but probably separately. + +--- src/third_party/electron_node/node.gni.orig 2025-04-20 10:49:28.656330018 +0200 ++++ src/third_party/electron_node/node.gni 2025-04-20 19:08:01.482693254 +0200 +@@ -73,10 +73,12 @@ declare_args() { + node_use_amaro = true + + # Allows downstream packagers (eg. Linux distributions) to build against system shared libraries. ++ use_system_ada = false + use_system_cares = false + use_system_nghttp2 = false + use_system_llhttp = false + use_system_histogram = false ++ use_system_simdjson = false + } + + assert(!node_enable_inspector || node_use_openssl, +--- src/third_party/electron_node/unofficial.gni.orig 2025-05-14 23:39:11.439896657 +0200 ++++ src/third_party/electron_node/unofficial.gni 2025-05-15 00:49:20.743843435 +0200 +@@ -9,6 +9,35 @@ import("$node_v8_path/gni/v8.gni") + # The actual configurations are put inside a template in unofficial.gni to + # prevent accidental edits from contributors. + template("node_gn_build") { ++ if (is_linux) { ++ import("//build/config/linux/pkg_config.gni") ++ if (use_system_cares) { ++ pkg_config("system_cares") { ++ packages = [ "libcares" ] ++ } ++ } ++ if (use_system_histogram) { ++ pkg_config("system_histogram") { ++ packages = [ "hdr_histogram" ] ++ } ++ } ++ if (use_system_llhttp) { ++ pkg_config("system_llhttp") { ++ packages = [ "libllhttp" ] ++ } ++ } ++ if (use_system_nghttp2) { ++ pkg_config("system_nghttp2") { ++ packages = [ "libnghttp2" ] ++ } ++ } ++ if (use_system_simdjson) { ++ pkg_config("system_simdjson") { ++ packages = [ "simdjson" ] ++ } ++ } ++ } ++ + config("node_features") { + defines = [] + if (is_component_build) { +@@ -139,24 +168,20 @@ template("node_gn_build") { + + source_set("libnode") { + configs += [ ":node_internal_config" ] ++ libs = [] + public_configs = [ + ":node_external_config", + "deps/googletest:googletest_config", + ":zstd_include_config" + ] + public_deps = [ +- "deps/ada", + "deps/uv", + "//electron:electron_js2c", +- "deps/simdjson", + "$node_v8_path", + ] + deps = [ + ":run_node_js2c", +- "deps/cares", +- "deps/histogram", + "deps/nbytes", +- "deps/nghttp2", + "deps/postject", + "deps/uvwasi", + "//third_party/zlib", +@@ -186,21 +211,36 @@ template("node_gn_build") { + "Security.framework", + ] + } +- if (is_posix) { +- configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] +- configs += [ "//build/config/gcc:symbol_visibility_default" ] ++ if (use_system_ada) { ++ libs += ["ada"] ++ } else { ++ public_deps += [ "deps/ada" ] ++ } ++ if (use_system_cares) { ++ configs += [ ":system_cares" ] ++ } else { ++ deps += [ "deps/cares" ] + } + if (use_system_llhttp) { +- libs += [ "llhttp" ] ++ configs += [ ":system_llhttp" ] + } else { + deps += [ "deps/llhttp" ] + } + if (use_system_histogram) { +- libs += [ "hdr_histogram" ] +- include_dirs += [ "/usr/include/hdr" ] ++ configs += [":system_histogram"] + } else { + deps += [ "deps/histogram" ] + } ++ if (use_system_nghttp2) { ++ configs += [":system_nghttp2"] ++ } else { ++ deps += [ "deps/nghttp2" ] ++ } ++ if (use_system_simdjson) { ++ public_configs += [":system_simdjson"] ++ } else { ++ public_deps += [ "deps/simdjson" ] ++ } + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } +@@ -229,19 +269,6 @@ template("node_gn_build") { + sources += node_inspector.node_inspector_sources + + node_inspector.node_inspector_generated_sources + } +- if (is_linux) { +- import("//build/config/linux/pkg_config.gni") +- if (use_system_cares) { +- pkg_config("cares") { +- packages = [ "libcares" ] +- } +- } +- if (use_system_nghttp2) { +- pkg_config("nghttp2") { +- packages = [ "libnghttp2" ] +- } +- } +- } + } + + config("zstd_include_config") { +@@ -435,11 +462,13 @@ template("node_gn_build") { + ] + + sources = [ "src/node_snapshot_stub.cc" ] ++ if(false) { #Test only target, not sure why it breaks gn + sources += exec_script("./tools/search_files.py", + [ rebase_path(".", root_build_dir), + rebase_path("test/cctest", root_build_dir), + "cc" ], + "list lines") ++ } + + if (node_use_openssl) { + deps += [ "deps/ncrypto" ] diff --git a/v8-assume-x86-64-v2-support.patch b/v8-assume-x86-64-v2-support.patch new file mode 100644 index 0000000..2062e0d --- /dev/null +++ b/v8-assume-x86-64-v2-support.patch @@ -0,0 +1,51 @@ +--- src/v8/src/codegen/cpu-features.h.orig 2025-08-19 18:33:53.729236588 +0200 ++++ src/v8/src/codegen/cpu-features.h 2025-08-19 19:06:19.769049465 +0200 +@@ -122,6 +122,12 @@ class V8_EXPORT_PRIVATE CpuFeatures : pu + } + + static bool IsSupported(CpuFeature f) { ++ if(f == SSE4_2) return true; ++ if(f == SSE4_1) return true; ++ if(f == SSSE3) return true; ++ if(f == SSE3) return true; ++ if(f == SAHF) return true; ++ if(f == POPCNT) return true; + return (supported_ & (1u << f)) != 0; + } + +--- src/v8/src/base/cpu.h.orig 2025-08-19 18:33:53.705236589 +0200 ++++ src/v8/src/base/cpu.h 2025-08-19 19:09:47.921029664 +0200 +@@ -73,15 +73,15 @@ class V8_BASE_EXPORT CPU final { + static const int kUnknownCacheLineSize = 0; + + // x86 features +- bool has_cmov() const { return has_cmov_; } +- bool has_sahf() const { return has_sahf_; } +- bool has_mmx() const { return has_mmx_; } +- bool has_sse() const { return has_sse_; } +- bool has_sse2() const { return has_sse2_; } +- bool has_sse3() const { return has_sse3_; } +- bool has_ssse3() const { return has_ssse3_; } +- bool has_sse41() const { return has_sse41_; } +- bool has_sse42() const { return has_sse42_; } ++ bool has_cmov() const { return true; } ++ bool has_sahf() const { return true; } ++ bool has_mmx() const { return true; } ++ bool has_sse() const { return true; } ++ bool has_sse2() const { return true; } ++ bool has_sse3() const { return true; } ++ bool has_ssse3() const { return true; } ++ bool has_sse41() const { return true; } ++ bool has_sse42() const { return true; } + bool has_osxsave() const { return has_osxsave_; } + bool has_avx() const { return has_avx_; } + bool has_avx2() const { return has_avx2_; } +@@ -92,7 +92,7 @@ class V8_BASE_EXPORT CPU final { + bool has_bmi1() const { return has_bmi1_; } + bool has_bmi2() const { return has_bmi2_; } + bool has_lzcnt() const { return has_lzcnt_; } +- bool has_popcnt() const { return has_popcnt_; } ++ bool has_popcnt() const { return true; } + bool is_atom() const { return is_atom_; } + bool has_intel_jcc_erratum() const { return has_intel_jcc_erratum_; } + bool has_cetss() const { return has_cetss_; } diff --git a/v8-highway-1.1.patch b/v8-highway-1.1.patch new file mode 100644 index 0000000..6e6c04c --- /dev/null +++ b/v8-highway-1.1.patch @@ -0,0 +1,150 @@ +From 1cb68a06f8c0ea3ad29cab6efe5ac673817596ce Mon Sep 17 00:00:00 2001 +From: pthier +Date: Tue, 6 May 2025 10:28:03 +0200 +Subject: [PATCH] Reland "[regexp] Simdify global atom match with single + character pattern" + +This is a reland of commit 36f07e9a04484dd4b97713f8e821d3b83ade8f53 + +Changes since revert: Accumulate number of matches after a cache hit +instead of overwriting them. + +Original change's description: +> [regexp] Simdify global atom match with single character pattern +> +> Use highway to find matching characters for RegExp with a single +> character atom pattern. +> +> Bug: 413411337 +> Change-Id: I9bf686aca2da37025613a9227eb0ec69176a676f +> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6487695 +> Reviewed-by: Jakob Linke +> Commit-Queue: Patrick Thier +> Cr-Commit-Position: refs/heads/main@{#100006} + +Fixed: 414857029 +Bug: 413411337 +Change-Id: I3ebd72f3b91ce5e7b603e43540cd4e10090c1868 +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6513551 +Reviewed-by: Camillo Bruni +Commit-Queue: Patrick Thier +Cr-Commit-Position: refs/heads/main@{#100088} +--- + src/runtime/runtime-regexp.cc | 95 ++++++++++++++++++++++++++++++++--- + test/mjsunit/regexp-global.js | 24 +++++++++ + 2 files changed, 112 insertions(+), 7 deletions(-) + +diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc +index 5689cdc8d1db..e5cee437d1c3 100644 +--- a/v8/src/runtime/runtime-regexp.cc ++++ b/v8/src/runtime/runtime-regexp.cc +@@ -3,7 +3,9 @@ + // found in the LICENSE file. + + #include ++#include + ++#include "hwy/highway.h" + #include "src/base/small-vector.h" + #include "src/base/strings.h" + #include "src/common/message-template.h" +@@ -2164,13 +2166,92 @@ inline void RegExpMatchGlobalAtom_OneCharPattern( + Isolate* isolate, base::Vector subject, const PChar pattern, + int start_index, int* number_of_matches, int* last_match_index, + const DisallowGarbageCollection& no_gc) { +- for (int i = start_index; i < subject.length(); i++) { +- // Subtle: the valid variants are {SChar,PChar} in: +- // {uint8_t,uint8_t}, {uc16,uc16}, {uc16,uint8_t}. In the latter case, +- // we cast the uint8_t pattern to uc16 for the comparison. +- if (subject[i] != static_cast(pattern)) continue; +- (*number_of_matches)++; +- (*last_match_index) = i; ++ static_assert(std::is_unsigned_v); ++ static_assert(std::is_unsigned_v); ++ // We can utilize SIMD to check multiple characters at once. ++ // Since the pattern is a single char, we create a mask setting each lane in ++ // the vector to the pattern char. ++ // Since reductions from a vector to a general purpose register (i.e. ++ // ReduceSum in this algorithm) are expensive, we keep a count for each lane ++ // in a vector until the count could potentially overflow and only reduce to ++ // a general purpose register then. I.e. if SChar is uint8_t, we have a ++ // 16xuint8_t vector to count matches, which we reduce to an int every 255 ++ // blocks. ++ namespace hw = hwy::HWY_NAMESPACE; ++ hw::ScalableTag tag; ++ // We need a wider tag to avoid overflows on lanes when summing up submatches. ++ using WidenedTag = hw::RepartitionToWide; ++ WidenedTag sum_tag; ++ static constexpr size_t stride = hw::Lanes(tag); ++ // Subtle: the valid variants are {SChar,PChar} in: ++ // {uint8_t,uint8_t}, {uc16,uc16}, {uc16,uint8_t}. In the latter case, ++ // we cast the uint8_t pattern to uc16 for the comparison. ++ const auto mask = hw::Set(tag, static_cast(pattern)); ++ ++ int matches = 0; ++ auto submatches = hw::Zero(tag); ++ const SChar* last_match_block = nullptr; ++ hw::Mask last_match_vec; ++ ++ const SChar* block = subject.data() + start_index; ++ const SChar* end = subject.data() + subject.length(); ++ ++ // ReduceSum is expensive, so we gather matches into a vector. max_count is ++ // the maximum number of matches we can count in the vector before it ++ // overflows. ++ int max_count = std::numeric_limits::max(); ++ while (block + stride * max_count <= end) { ++ for (int i = 0; i < max_count; i++, block += stride) { ++ const auto input = hw::LoadU(tag, block); ++ const auto match = input == mask; ++ // Lanes with matches have all bits set, so we subtract to increase the ++ // count by 1. ++ submatches = hw::Sub(submatches, hw::VecFromMask(tag, match)); ++ if (!hw::AllFalse(tag, match)) { ++ last_match_block = block; ++ last_match_vec = match; ++ } ++ } ++ // SumsOf2 promotes the sum of 2 consecutive lanes into a wider lane. ++ auto promoted_submatches = hw::SumsOf2(submatches); ++ // Wider lane sums can be reduces without overflows. ++ matches += hw::ReduceSum(sum_tag, promoted_submatches); ++ submatches = hw::Zero(tag); ++ } ++ ++ // For blocks shorter than stride * max_count, lanes in submatches can't ++ // overflow. ++ DCHECK_LT(end - block, stride * max_count); ++ for (; block + stride <= end; block += stride) { ++ const auto input = hw::LoadU(tag, block); ++ const auto match = input == mask; ++ submatches = hw::Sub(submatches, hw::VecFromMask(tag, match)); ++ if (!hw::AllFalse(tag, match)) { ++ last_match_block = block; ++ last_match_vec = match; ++ } ++ } ++ auto promoted_submatches = hw::SumsOf2(submatches); ++ matches += hw::ReduceSum(sum_tag, promoted_submatches); ++ ++ // Handle remaining chars. ++ // last_match_block already contains the last match position, so use a special ++ // vector with lane 0 set to extract the last_match_index later. ++ const auto scalar_last_match_vec = hw::FirstN(tag, 1); ++ for (SChar c = *block; block < end; c = *(++block)) { ++ if (c != static_cast(pattern)) continue; ++ matches++; ++ last_match_block = block; ++ last_match_vec = scalar_last_match_vec; ++ } ++ ++ // Store results. ++ *number_of_matches += matches; ++ if (last_match_block != nullptr) { ++ DCHECK(!hw::AllFalse(tag, last_match_vec)); ++ *last_match_index = static_cast( ++ last_match_block + hw::FindKnownLastTrue(tag, last_match_vec) - ++ subject.data()); + } + } + diff --git a/v8-icu73-alt_calendar.patch b/v8-icu73-alt_calendar.patch deleted file mode 100644 index 7d12e24..0000000 --- a/v8-icu73-alt_calendar.patch +++ /dev/null @@ -1,164 +0,0 @@ -From d9715adf895e9acfbaf17ae05b18f2b2467ca322 Mon Sep 17 00:00:00 2001 -From: Frank Tang -Date: Tue, 20 Jun 2023 15:12:47 -0700 -Subject: [PATCH] [Intl] rm alt_calendar hack post ICU 73-1 - -Also need to bump up the required ICU version. - -Bug: v8:14086 -Change-Id: I52a53fcd201f3272aa712123fc00c54d0b762d53 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4628805 -Reviewed-by: Shu-yu Guo -Commit-Queue: Frank Tang -Cr-Commit-Position: refs/heads/main@{#88431} ---- - src/objects/intl-objects.h | 2 +- - src/objects/js-date-time-format-inl.h | 2 -- - src/objects/js-date-time-format.cc | 30 +++++++-------------------- - src/objects/js-date-time-format.h | 2 -- - src/objects/js-date-time-format.tq | 8 ------- - 5 files changed, 8 insertions(+), 36 deletions(-) - -diff --git a/src/objects/intl-objects.h b/src/objects/intl-objects.h -index 4339673d566..b628cf686f3 100644 ---- a/v8/src/objects/intl-objects.h -+++ b/v8/src/objects/intl-objects.h -@@ -21,7 +21,7 @@ - #include "unicode/locid.h" - #include "unicode/uversion.h" - --#define V8_MINIMUM_ICU_VERSION 71 -+#define V8_MINIMUM_ICU_VERSION 73 - - namespace U_ICU_NAMESPACE { - class BreakIterator; -diff --git a/src/objects/js-date-time-format-inl.h b/src/objects/js-date-time-format-inl.h -index 8c93a8eeb63..fefe081f8f5 100644 ---- a/v8/src/objects/js-date-time-format-inl.h -+++ b/v8/src/objects/js-date-time-format-inl.h -@@ -28,8 +28,6 @@ ACCESSORS(JSDateTimeFormat, icu_simple_date_format, - Tagged>, - kIcuDateIntervalFormatOffset) - --BOOL_ACCESSORS(JSDateTimeFormat, flags, alt_calendar, AltCalendarBit::kShift) -- - inline void JSDateTimeFormat::set_hour_cycle(HourCycle hour_cycle) { - int hints = flags(); - hints = HourCycleBits::update(hints, hour_cycle); -diff --git a/src/objects/js-date-time-format.cc b/src/objects/js-date-time-format.cc -index 62d6fdcb935..6aae75c8de8 100644 ---- a/v8/src/objects/js-date-time-format.cc -+++ b/v8/src/objects/js-date-time-format.cc -@@ -530,8 +530,7 @@ Handle JSDateTimeFormat::TimeZoneId(Isolate* isolate, - - namespace { - Handle GetCalendar(Isolate* isolate, -- const icu::SimpleDateFormat& simple_date_format, -- bool is_alt_calendar = false) { -+ const icu::SimpleDateFormat& simple_date_format) { - // getType() returns legacy calendar type name instead of LDML/BCP47 calendar - // key values. intl.js maps them to BCP47 values for key "ca". - // TODO(jshin): Consider doing it here, instead. -@@ -542,17 +541,9 @@ Handle GetCalendar(Isolate* isolate, - // and - // http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/calendar.xml - if (calendar_str == "gregorian") { -- if (is_alt_calendar) { -- calendar_str = "iso8601"; -- } else { -- calendar_str = "gregory"; -- } -+ calendar_str = "gregory"; - } else if (calendar_str == "ethiopic-amete-alem") { - calendar_str = "ethioaa"; -- } else if (calendar_str == "islamic") { -- if (is_alt_calendar) { -- calendar_str = "islamic-rgsa"; -- } - } - return isolate->factory()->NewStringFromAsciiChecked(calendar_str.c_str()); - } -@@ -567,8 +558,7 @@ Handle GetTimeZone(Isolate* isolate, - Handle JSDateTimeFormat::Calendar( - Isolate* isolate, Handle date_time_format) { - return GetCalendar(isolate, -- *(date_time_format->icu_simple_date_format()->raw()), -- date_time_format->alt_calendar()); -+ *(date_time_format->icu_simple_date_format()->raw())); - } - - Handle JSDateTimeFormat::TimeZone( -@@ -2328,9 +2318,6 @@ MaybeHandle JSDateTimeFormat::New( - icu_locale.setUnicodeKeywordValue("ca", calendar_str.get(), status); - DCHECK(U_SUCCESS(status)); - } -- bool alt_calendar = -- strstr(icu_locale.getName(), "calendar=iso8601") != nullptr || -- strstr(icu_locale.getName(), "calendar=islamic-rgsa") != nullptr; - - if (numbering_system_str != nullptr && - Intl::IsValidNumberingSystem(numbering_system_str.get())) { -@@ -2640,7 +2627,6 @@ MaybeHandle JSDateTimeFormat::New( - date_time_format->set_time_style(time_style); - } - date_time_format->set_hour_cycle(dateTimeFormatHourCycle); -- date_time_format->set_alt_calendar(alt_calendar); - date_time_format->set_locale(*locale_str); - date_time_format->set_icu_locale(*managed_locale); - date_time_format->set_icu_simple_date_format(*managed_format); -@@ -2742,10 +2728,8 @@ MaybeHandle FormatToPartsWithTemporalSupport( - DateTimeValueRecord x_record; - MAYBE_ASSIGN_RETURN_ON_EXCEPTION_VALUE( - isolate, x_record, -- HandleDateTimeValue( -- isolate, *format, -- GetCalendar(isolate, *format, date_time_format->alt_calendar()), x, -- method_name), -+ HandleDateTimeValue(isolate, *format, GetCalendar(isolate, *format), x, -+ method_name), - Handle()); - - return FormatMillisecondsByKindToArray(isolate, *format, x_record.kind, -@@ -3070,8 +3054,8 @@ MaybeHandle FormatRangeCommonWithTemporalSupport( - // 6. Let x be ? HandleDateTimeValue(dateTimeFormat, x). - icu::SimpleDateFormat* icu_simple_date_format = - date_time_format->icu_simple_date_format()->raw(); -- Handle date_time_format_calendar = GetCalendar( -- isolate, *icu_simple_date_format, date_time_format->alt_calendar()); -+ Handle date_time_format_calendar = -+ GetCalendar(isolate, *icu_simple_date_format); - DateTimeValueRecord x_record; - MAYBE_ASSIGN_RETURN_ON_EXCEPTION_VALUE( - isolate, x_record, -diff --git a/src/objects/js-date-time-format.h b/src/objects/js-date-time-format.h -index cdf87c2268a..ceebcc5e8f9 100644 ---- a/v8/src/objects/js-date-time-format.h -+++ b/v8/src/objects/js-date-time-format.h -@@ -150,8 +150,6 @@ class JSDateTimeFormat - DECL_ACCESSORS(icu_simple_date_format, Managed) - DECL_ACCESSORS(icu_date_interval_format, Managed) - -- DECL_BOOLEAN_ACCESSORS(alt_calendar) -- - DECL_PRINTER(JSDateTimeFormat) - - TQ_OBJECT_CONSTRUCTORS(JSDateTimeFormat) -diff --git a/src/objects/js-date-time-format.tq b/src/objects/js-date-time-format.tq -index ef0584e7901..6fab20c71d1 100644 ---- a/v8/src/objects/js-date-time-format.tq -+++ b/v8/src/objects/js-date-time-format.tq -@@ -10,14 +10,6 @@ bitfield struct JSDateTimeFormatFlags extends uint31 { - hour_cycle: HourCycle: 3 bit; - date_style: DateTimeStyle: 3 bit; - time_style: DateTimeStyle: 3 bit; -- // ICU report the same type "gregorian" for both "gregorian" calendar and -- // "iso8601" calendar and the same type "islamic" for both "islamic" and -- // "islamic-rgsa" calendar. We use the alt_calendar bit to distinguish between -- // them. When the type is "gregorian" and the alt_calendar bit is set, it is -- // "iso8601", otherwise the true "gregorian" calendar. While the type is -- // "islamic" and the alt_calendar bit is set, it is "islamic-rgsa" calendar, -- // otherwise "islamic" calendar. -- alt_calendar: bool: 1bit; - } - - extern class JSDateTimeFormat extends JSObject { diff --git a/v8-icu73-simple-case-folding.patch b/v8-icu73-simple-case-folding.patch deleted file mode 100644 index e9de641..0000000 --- a/v8-icu73-simple-case-folding.patch +++ /dev/null @@ -1,194 +0,0 @@ -From 572b80f2e906a826a499c4c5561b90b97a687f0e Mon Sep 17 00:00:00 2001 -From: pthier -Date: Tue, 18 Jul 2023 16:27:28 +0200 -Subject: [PATCH] [regexp] Remove special handling for simple case folding - -ICU 73 introduced creating closures using simple case folding. -We can directly use this method instead of our own special handling where simple case folding (required by JS spec) differs from full case -folding (the previously only supported mode in ICU). - -Bug: v8:13377 -Change-Id: I42bbcc37fe5c1f33a1d6c36f0d4ceb18a67a9b43 -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4694009 -Commit-Queue: Patrick Thier -Reviewed-by: Jakob Linke -Cr-Commit-Position: refs/heads/main@{#89024} ---- - src/regexp/gen-regexp-special-case.cc | 48 --------------------------- - src/regexp/regexp-ast.h | 6 ---- - src/regexp/regexp-compiler-tonode.cc | 24 +------------- - src/regexp/regexp-parser.cc | 2 +- - src/regexp/special-case.h | 10 ------ - 5 files changed, 2 insertions(+), 88 deletions(-) - -diff --git a/src/regexp/gen-regexp-special-case.cc b/src/regexp/gen-regexp-special-case.cc -index 55618f11783..86f6b212c93 100644 ---- a/v8/src/regexp/gen-regexp-special-case.cc -+++ b/v8/src/regexp/gen-regexp-special-case.cc -@@ -9,7 +9,6 @@ - - #include "src/base/strings.h" - #include "src/regexp/special-case.h" --#include "unicode/usetiter.h" - - namespace v8 { - namespace internal { -@@ -127,52 +126,6 @@ void PrintSpecial(std::ofstream& out) { - PrintSet(out, "SpecialAddSet", special_add); - } - --void PrintUnicodeSpecial(std::ofstream& out) { -- icu::UnicodeSet non_simple_folding; -- icu::UnicodeSet current; -- UErrorCode status = U_ZERO_ERROR; -- // Look at all characters except white spaces. -- icu::UnicodeSet interestingCP(u"[^[:White_Space:]]", status); -- CHECK_EQ(status, U_ZERO_ERROR); -- icu::UnicodeSetIterator iter(interestingCP); -- while (iter.next()) { -- UChar32 c = iter.getCodepoint(); -- current.set(c, c); -- current.closeOver(USET_CASE_INSENSITIVE).removeAllStrings(); -- CHECK(!current.isBogus()); -- // Remove characters from the closeover that have a simple case folding. -- icu::UnicodeSet toRemove; -- icu::UnicodeSetIterator closeOverIter(current); -- while (closeOverIter.next()) { -- UChar32 closeOverChar = closeOverIter.getCodepoint(); -- UChar32 closeOverSCF = u_foldCase(closeOverChar, U_FOLD_CASE_DEFAULT); -- if (closeOverChar != closeOverSCF) { -- toRemove.add(closeOverChar); -- } -- } -- CHECK(!toRemove.isBogus()); -- current.removeAll(toRemove); -- -- // The current character and its simple case folding are also always OK. -- UChar32 scf = u_foldCase(c, U_FOLD_CASE_DEFAULT); -- current.remove(c); -- current.remove(scf); -- -- // If there are any characters remaining, they were added due to full case -- // foldings and shouldn't match the current charcter according to the spec. -- if (!current.isEmpty()) { -- // Ensure that the character doesn't have a simple case folding. -- // Otherwise the current approach of simply removing the character from -- // the set before calling closeOver won't work. -- CHECK_EQ(c, scf); -- non_simple_folding.add(c); -- } -- } -- CHECK(!non_simple_folding.isBogus()); -- -- PrintSet(out, "UnicodeNonSimpleCloseOverSet", non_simple_folding); --} -- - void WriteHeader(const char* header_filename) { - std::ofstream out(header_filename); - out << std::hex << std::setfill('0') << std::setw(4); -@@ -193,7 +146,6 @@ void WriteHeader(const char* header_filename) { - << "namespace internal {\n\n"; - - PrintSpecial(out); -- PrintUnicodeSpecial(out); - - out << "\n" - << "} // namespace internal\n" -diff --git a/src/regexp/regexp-ast.h b/src/regexp/regexp-ast.h -index e7453ad3f8f..8e3bb12fce2 100644 ---- a/v8/src/regexp/regexp-ast.h -+++ b/v8/src/regexp/regexp-ast.h -@@ -134,12 +134,6 @@ class CharacterRange { - static void AddUnicodeCaseEquivalents(ZoneList* ranges, - Zone* zone); - --#ifdef V8_INTL_SUPPORT -- // Creates the closeOver of the given UnicodeSet, removing all -- // characters/strings that can't be derived via simple case folding. -- static void UnicodeSimpleCloseOver(icu::UnicodeSet& set); --#endif // V8_INTL_SUPPORT -- - bool Contains(base::uc32 i) const { return from_ <= i && i <= to_; } - base::uc32 from() const { return from_; } - base::uc32 to() const { return to_; } -diff --git a/src/regexp/regexp-compiler-tonode.cc b/src/regexp/regexp-compiler-tonode.cc -index 5ff16ee71d2..9c83e2332e8 100644 ---- a/v8/src/regexp/regexp-compiler-tonode.cc -+++ b/v8/src/regexp/regexp-compiler-tonode.cc -@@ -423,27 +423,6 @@ RegExpNode* UnanchoredAdvance(RegExpCompiler* compiler, - - } // namespace - --#ifdef V8_INTL_SUPPORT --// static --void CharacterRange::UnicodeSimpleCloseOver(icu::UnicodeSet& set) { -- // Remove characters for which closeOver() adds full-case-folding equivalents -- // because we should work only with simple case folding mappings. -- icu::UnicodeSet non_simple = icu::UnicodeSet(set); -- non_simple.retainAll(RegExpCaseFolding::UnicodeNonSimpleCloseOverSet()); -- set.removeAll(non_simple); -- -- set.closeOver(USET_CASE_INSENSITIVE); -- // Full case folding maps single characters to multiple characters. -- // Those are represented as strings in the set. Remove them so that -- // we end up with only simple and common case mappings. -- set.removeAllStrings(); -- -- // Add characters that have non-simple case foldings again (they match -- // themselves). -- set.addAll(non_simple); --} --#endif // V8_INTL_SUPPORT -- - // static - void CharacterRange::AddUnicodeCaseEquivalents(ZoneList* ranges, - Zone* zone) { -@@ -465,8 +444,7 @@ void CharacterRange::AddUnicodeCaseEquivalents(ZoneList* ranges, - } - // Clear the ranges list without freeing the backing store. - ranges->Rewind(0); -- -- UnicodeSimpleCloseOver(set); -+ set.closeOver(USET_SIMPLE_CASE_INSENSITIVE); - for (int i = 0; i < set.getRangeCount(); i++) { - ranges->Add(Range(set.getRangeStart(i), set.getRangeEnd(i)), zone); - } -diff --git a/src/regexp/regexp-parser.cc b/src/regexp/regexp-parser.cc -index 76ca02bf240..730dfb9da86 100644 ---- a/v8/src/regexp/regexp-parser.cc -+++ b/v8/src/regexp/regexp-parser.cc -@@ -1897,7 +1897,7 @@ bool LookupPropertyValueName(UProperty property, - ExtractStringsFromUnicodeSet(set, result_strings, flags, zone); - } - const bool needs_case_folding = IsUnicodeSets(flags) && IsIgnoreCase(flags); -- if (needs_case_folding) CharacterRange::UnicodeSimpleCloseOver(set); -+ if (needs_case_folding) set.closeOver(USET_SIMPLE_CASE_INSENSITIVE); - set.removeAllStrings(); - if (negate) set.complement(); - for (int i = 0; i < set.getRangeCount(); i++) { -diff --git a/src/regexp/special-case.h b/src/regexp/special-case.h -index c80b94e976a..753c9231ede 100644 ---- a/v8/src/regexp/special-case.h -+++ b/v8/src/regexp/special-case.h -@@ -71,21 +71,11 @@ namespace internal { - // another character. Characters that match no other characters in - // their equivalence class are added to IgnoreSet. Characters that - // match at least one other character are added to SpecialAddSet. --// --// For unicode ignoreCase ("iu" and "iv"), --// UnicodeSet::closeOver(USET_CASE_INSENSITIVE) adds all characters that are in --// the same equivalence class. This includes characaters that are in the same --// equivalence class using full case folding. According to the spec, only --// simple case folding shall be considered. We therefore create --// UnicodeNonSimpleCloseOverSet containing all characters for which --// UnicodeSet::closeOver adds characters that are not simple case folds. This --// set should be used similar to IgnoreSet described above. - - class RegExpCaseFolding final : public AllStatic { - public: - static const icu::UnicodeSet& IgnoreSet(); - static const icu::UnicodeSet& SpecialAddSet(); -- static const icu::UnicodeSet& UnicodeNonSimpleCloseOverSet(); - - // This implements ECMAScript 2020 21.2.2.8.2 (Runtime Semantics: - // Canonicalize) step 3, which is used to determine whether diff --git a/v8-instance-type-inl-constexpr-used-before-its-definition.patch b/v8-instance-type-inl-constexpr-used-before-its-definition.patch deleted file mode 100644 index f482f0f..0000000 --- a/v8-instance-type-inl-constexpr-used-before-its-definition.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- src/v8/src/objects/instance-type-inl.h.orig 2024-02-21 13:34:15.959879700 +0000 -+++ src/v8/src/objects/instance-type-inl.h 2024-02-25 13:47:34.748156000 +0000 -@@ -71,7 +71,9 @@ constexpr bool kHasUniqueMapOfInstanceTy - - template - constexpr RootIndex kUniqueMapOfInstanceType = -- UniqueMapOfInstanceType(type).value_or(RootIndex::kRootListLength); -+ kHasUniqueMapOfInstanceType? -+ *UniqueMapOfInstanceType(type): -+ RootIndex::kRootListLength; - - // Manually curated list of instance type ranges which are associated with a - // unique range of map addresses on the read only heap. Both ranges are -@@ -129,14 +131,17 @@ UniqueMapRangeOfInstanceTypeRange(Instan - return {}; - } - -+constexpr inline TaggedAddressRange NULL_ADDRESS_RANGE{kNullAddress, kNullAddress}; -+ - template - constexpr bool kHasUniqueMapRangeOfInstanceTypeRange = - UniqueMapRangeOfInstanceTypeRange(first, last).has_value(); - - template - constexpr TaggedAddressRange kUniqueMapRangeOfInstanceTypeRange = -- UniqueMapRangeOfInstanceTypeRange(first, last) -- .value_or(TaggedAddressRange(kNullAddress, kNullAddress)); -+ kHasUniqueMapRangeOfInstanceTypeRange? -+ *UniqueMapRangeOfInstanceTypeRange(first, last): -+ NULL_ADDRESS_RANGE; - - inline constexpr base::Optional - UniqueMapRangeOfInstanceType(InstanceType type) { -@@ -149,8 +154,9 @@ constexpr bool kHasUniqueMapRangeOfInsta - - template - constexpr TaggedAddressRange kUniqueMapRangeOfInstanceType = -- UniqueMapRangeOfInstanceType(type).value_or( -- TaggedAddressRange(kNullAddress, kNullAddress)); -+ kHasUniqueMapRangeOfInstanceType? -+ *UniqueMapRangeOfInstanceType(type): -+ NULL_ADDRESS_RANGE; - - inline bool MayHaveMapCheckFastCase(InstanceType type) { - if (UniqueMapOfInstanceType(type)) return true; diff --git a/v8-simd-flax-vector-conversions.patch b/v8-simd-flax-vector-conversions.patch new file mode 100644 index 0000000..ab55951 --- /dev/null +++ b/v8-simd-flax-vector-conversions.patch @@ -0,0 +1,55 @@ +--- src/v8/src/objects/simd.cc.orig 2025-08-15 17:36:40.113358284 +0200 ++++ src/v8/src/objects/simd.cc 2025-08-17 16:29:26.826424105 +0200 +@@ -953,7 +953,7 @@ bool Uint8ArrayFromHexWithNeon(const bas + uint8x16_t second_part_first_batch = + vld1q_u8(reinterpret_cast(&input_vector[i + 8])); + first_batch = +- vmovn_high_u16(vmovn_u16(first_batch), second_part_first_batch); ++ vmovn_high_u16(vmovn_u16(vreinterpretq_u16_u8(first_batch)), vreinterpretq_u16_u8(second_part_first_batch)); + } + + // Load second batch of 16 hex characters into a Neon register +@@ -966,20 +966,20 @@ bool Uint8ArrayFromHexWithNeon(const bas + uint8x16_t second_part_second_batch = + vld1q_u8(reinterpret_cast(&input_vector[i + 24])); + second_batch = +- vmovn_high_u16(vmovn_u16(second_batch), second_part_second_batch); ++ vmovn_high_u16(vmovn_u16(vreinterpretq_u16_u8(second_batch)), vreinterpretq_u16_u8(second_part_second_batch)); + } + + // low nibbles are values with even indexes in fist_batch. + // (0x36, 0x00, 0x66, 0x00, 0x46, 0x00, 0x32, 0x00, 0x31, 0x00, 0x32, 0x00, + // 0x31, 0x00, 0x32, 0x00) +- uint8x16_t first_batch_lo_nibbles = +- vreinterpretq_u8_u16(vshrq_n_u16(vreinterpretq_u16_u8(first_batch), 8)); ++ uint16x8_t first_batch_lo_nibbles = ++ vshrq_n_u16(vreinterpretq_u16_u8(first_batch), 8); + + // low nibbles are values with even indexes in second_batch. + // (0x36, 0x00, 0x66, 0x00, 0x66, 0x00, 0x32, 0x00, 0x31, 0x00, 0x32, 0x00, + // 0x31, 0x00, 0x66, 0x00) +- uint8x16_t second_batch_lo_nibbles = vreinterpretq_u8_u16( +- vshrq_n_u16(vreinterpretq_u16_u8(second_batch), 8)); ++ uint16x8_t second_batch_lo_nibbles = ++ vshrq_n_u16(vreinterpretq_u16_u8(second_batch), 8); + + // Append low nibbles of first batch and second batch and remove 0x00s. + // (0x36, 0x66, 0x46, 0x32, 0x31, 0x32, 0x31, 0x32, 0x36, 0x66, 0x66, 0x32, +@@ -992,7 +992,7 @@ bool Uint8ArrayFromHexWithNeon(const bas + // significant byte. (0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x37, 0x36, + // 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x66) + uint8x16_t hi_nibbles = +- vmovn_high_u16(vmovn_u16(first_batch), second_batch); ++ vmovn_high_u16(vmovn_u16(vreinterpretq_u16_u8(first_batch)), vreinterpretq_u16_u8(second_batch)); + + // mapping low nibbles to uint8_t values. + // (0x06, 0x0f, 0x0f, 0x02, 0x01, 0x02, 0x01, 0x02, 0x06, 0x0f, 0x0f, 0x02, +@@ -1023,7 +1023,7 @@ bool Uint8ArrayFromHexWithNeon(const bas + // (0x60, 0x60, 0x60, 0x60, 0x60, 0x70, 0x60, 0x70, 0x60, 0x60, 0x60, 0x60, + // 0x60, 0x70, 0x60, 0xf0) + uint8x16_t uint8_shifted_high_nibbles = +- vshlq_n_u64(vreinterpretq_u64_u8(uint8_high_nibbles), 4); ++ vreinterpretq_u8_u64(vshlq_n_u64(vreinterpretq_u64_u8(uint8_high_nibbles), 4)); + + // final result of combining pairs of uint8_t values of low and high + // nibbles. diff --git a/v8-strict-aliasing.patch b/v8-strict-aliasing.patch new file mode 100644 index 0000000..58b4de8 --- /dev/null +++ b/v8-strict-aliasing.patch @@ -0,0 +1,42 @@ +Work around numerous type confusion bugs in V8 due to GCC14 being much more aggressive about misoptimizing them + +Example crash (relibly happens during building electron inside mksnapshot): + +#0 v8::internal::compiler::CFGBuilder::CollectSuccessorBlocks () at ../../v8/src/compiler/scheduler.cc:435 +#1 v8::internal::compiler::CFGBuilder::ConnectCall () at ../../v8/src/compiler/scheduler.cc:451 +#2 v8::internal::compiler::CFGBuilder::ConnectBlocks () at ../../v8/src/compiler/scheduler.cc:402 +#3 v8::internal::compiler::CFGBuilder::ConnectBlocks (this=0x55b3d1fc26a8, node=0x55b3d1fb6508) at ../../v8/src/compiler/scheduler.cc:365 +#4 0x000055b3d0b6b05f in v8::internal::compiler::CFGBuilder::Run () at ../../v8/src/compiler/scheduler.cc:268 +#5 v8::internal::compiler::Scheduler::BuildCFG (this=0x7ffd856fb860) at ../../v8/src/compiler/scheduler.cc:633 +#6 0x000055b3d0b6f692 in v8::internal::compiler::Scheduler::ComputeSchedule (zone=0x55b3d1fa4100, graph=0x1070, flags=..., tick_counter=0x7ffd856fbfa0, profile_data=0x0) at ../../v8/src/compiler/scheduler.cc:64 +#7 0x000055b3d0b3f3fb in v8::internal::compiler::ComputeSchedulePhase::Run () at ../../v8/src/compiler/pipeline.cc:1805 +#8 v8::internal::compiler::PipelineImpl::Run () at ../../v8/src/compiler/pipeline.cc:775 +#9 v8::internal::compiler::PipelineImpl::ComputeScheduledGraph (this=0x7ffd856fc3b0) at ../../v8/src/compiler/pipeline.cc:3869 +#10 0x000055b3d0b4b8e6 in v8::internal::compiler::Pipeline::GenerateCodeForCodeStub (isolate=0x55b3d1ac7700 , call_descriptor=0x55b3d1fb6b48, + graph=0x7ffd856fbd30, jsgraph=0x7ffd856fbc88, source_positions=0x7ffd856fc090, kind=2, debug_name=0x55b3d1752b49 "V8.TFCSAOptimization", builtin=13, options=..., profile_data=0x0) at ../../v8/src/compiler/pipeline.cc:2951 +#11 0x000055b3d0a003a9 in v8::internal::compiler::CodeAssembler::GenerateCode (state=0x7ffd856fd180, options=..., profile_data=0x0) at ../../v8/src/compiler/code-assembler.cc:175 +#12 0x000055b3d0d8703d in BuildWithCodeStubAssemblerCS (isolate=0x55b3d1f19000, builtin=13, generator=0x0, interface_descriptor=3, name=0x7ffd856fd120 "\001") at ../../v8/src/builtins/setup-builtins-internal.cc:213 +#13 0x000055b3d0d87440 in v8::internal::SetupIsolateDelegate::SetupBuiltinsInternal (isolate=0x55b3d1f19000) at ../../v8/src/builtins/setup-builtins-internal.cc:373 +#14 0x000055b3d1726a05 in v8::internal::SetupIsolateDelegate::SetupBuiltins () at ../../v8/src/init/setup-isolate-full.cc:29 +#15 v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) [clone .isra.0] () at ../../v8/src/execution/isolate.cc:4857 +#16 0x000055b3d0503632 in v8::internal::Isolate::InitWithoutSnapshot () at ../../v8/src/execution/isolate.cc:4366 +#17 v8::internal::SnapshotCreatorImpl::InitInternal (this=0x55b3d1f2d660, blob=0x0) at ../../v8/src/snapshot/snapshot.cc:868 +#18 0x000055b3d009c347 in v8::internal::SnapshotCreatorImpl::SnapshotCreatorImpl () at ../../v8/src/snapshot/snapshot.cc:929 +#19 v8::SnapshotCreator::SnapshotCreator () at ../../v8/src/api/api.cc:557 +#20 main (argc=-777226496, argc@entry=14, argv=0x55b3d1fb6b48, argv@entry=0x7ffd85718da8) at ../../v8/src/snapshot/mksnapshot.cc:293 +#21 0x00007f26f162a340 in __libc_start_call_main (main=main@entry=0x55b3d009b0c0 , argc=argc@entry=14, argv=argv@entry=0x7ffd85718da8) at ../sysdeps/nptl/libc_start_call_main.h:58 +#22 0x00007f26f162a409 in __libc_start_main_impl (main=0x55b3d009b0c0 , argc=14, argv=0x7ffd85718da8, init=, fini=, rtld_fini=, stack_end=0x7ffd85718d98) + at ../csu/libc-start.c:360 +#23 0x000055b3d009df75 in _start () at ../sysdeps/x86_64/start.S:115 + + +--- src/v8/BUILD.gn.old ++++ src/v8/BUILD.gn +@@ -775,6 +775,7 @@ config("internal_config") { + libs = [ "atomic" ] + } + } ++ cflags = ["-fno-ipa-strict-aliasing"] + } + + # Should be applied to all targets that write trace events. diff --git a/vaapi-no-encoders.patch b/vaapi-no-encoders.patch new file mode 100644 index 0000000..d2ed155 --- /dev/null +++ b/vaapi-no-encoders.patch @@ -0,0 +1,123 @@ +These encoders: +* are supported by ~no hardware +* i can't think of any actual use for them in the apps we ship, and +* most importantly, fail to build with system aom/vpx. + +The hardware *decoders*, on the other hand, are useful for Signal Messenger, and should work now. + +--- src/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.orig 2025-07-19 11:32:35.717979936 +0200 ++++ src/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2025-08-15 14:42:43.908933011 +0200 +@@ -46,13 +46,10 @@ + #include "media/gpu/gpu_video_encode_accelerator_helpers.h" + #include "media/gpu/h264_dpb.h" + #include "media/gpu/macros.h" +-#include "media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h" + #include "media/gpu/vaapi/h264_vaapi_video_encoder_delegate.h" + #include "media/gpu/vaapi/vaapi_common.h" + #include "media/gpu/vaapi/vaapi_utils.h" + #include "media/gpu/vaapi/vaapi_wrapper.h" +-#include "media/gpu/vaapi/vp8_vaapi_video_encoder_delegate.h" +-#include "media/gpu/vaapi/vp9_vaapi_video_encoder_delegate.h" + #include "media/gpu/vp8_reference_frame_vector.h" + #include "media/gpu/vp9_reference_frame_vector.h" + +@@ -233,8 +230,7 @@ EncoderStatus VaapiVideoEncodeAccelerato + } + + const VideoCodec codec = VideoCodecProfileToVideoCodec(config.output_profile); +- if (codec != VideoCodec::kH264 && codec != VideoCodec::kVP8 && +- codec != VideoCodec::kVP9 && codec != VideoCodec::kAV1) { ++ if (codec != VideoCodec::kH264) { + MEDIA_LOG(ERROR, media_log.get()) + << "Unsupported profile: " << GetProfileName(config.output_profile); + return {EncoderStatus::Codes::kEncoderInitializationError}; +@@ -324,11 +320,6 @@ void VaapiVideoEncodeAccelerator::Initia + : VaapiWrapper::kEncodeVariableBitrate; + } + break; +- case VideoCodec::kVP8: +- case VideoCodec::kVP9: +- case VideoCodec::kAV1: +- mode = VaapiWrapper::kEncodeConstantQuantizationParameter; +- break; + default: + NotifyError({EncoderStatus::Codes::kEncoderUnsupportedCodec, + "Unsupported codec: " + GetCodecName(output_codec_)}); +@@ -380,24 +371,6 @@ void VaapiVideoEncodeAccelerator::Initia + } + } + break; +- case VideoCodec::kVP8: +- if (!IsConfiguredForTesting()) { +- encoder_ = std::make_unique( +- vaapi_wrapper_, error_cb); +- } +- break; +- case VideoCodec::kVP9: +- if (!IsConfiguredForTesting()) { +- encoder_ = std::make_unique( +- vaapi_wrapper_, error_cb); +- } +- break; +- case VideoCodec::kAV1: +- if (!IsConfiguredForTesting()) { +- encoder_ = std::make_unique( +- vaapi_wrapper_, error_cb); +- } +- break; + default: + NOTREACHED() << "Unsupported codec type " << GetCodecName(output_codec_); + } +@@ -896,19 +869,6 @@ VaapiVideoEncodeAccelerator::CreateEncod + picture = base::MakeRefCounted( + reconstructed_surface->ReleaseAsVASurfaceHandle()); + break; +- case VideoCodec::kVP8: +- picture = base::MakeRefCounted( +- reconstructed_surface->ReleaseAsVASurfaceHandle()); +- break; +- case VideoCodec::kVP9: +- picture = base::MakeRefCounted( +- reconstructed_surface->ReleaseAsVASurfaceHandle()); +- break; +- case VideoCodec::kAV1: +- picture = base::MakeRefCounted( +- /*display_va_surface=*/nullptr, +- reconstructed_surface->ReleaseAsVASurfaceHandle()); +- break; + default: + return nullptr; + } +--- src/media/gpu/vaapi/BUILD.gn.orig 2025-07-02 22:10:56.132470571 +0200 ++++ src/media/gpu/vaapi/BUILD.gn 2025-07-11 18:17:18.866524759 +0200 +@@ -36,8 +36,6 @@ source_set("vaapi") { + sources = [ + "av1_vaapi_video_decoder_delegate.cc", + "av1_vaapi_video_decoder_delegate.h", +- "av1_vaapi_video_encoder_delegate.cc", +- "av1_vaapi_video_encoder_delegate.h", + "h264_vaapi_video_decoder_delegate.cc", + "h264_vaapi_video_decoder_delegate.h", + "h264_vaapi_video_encoder_delegate.cc", +@@ -67,12 +65,8 @@ source_set("vaapi") { + "vaapi_webp_decoder.h", + "vp8_vaapi_video_decoder_delegate.cc", + "vp8_vaapi_video_decoder_delegate.h", +- "vp8_vaapi_video_encoder_delegate.cc", +- "vp8_vaapi_video_encoder_delegate.h", + "vp9_vaapi_video_decoder_delegate.cc", + "vp9_vaapi_video_decoder_delegate.h", +- "vp9_vaapi_video_encoder_delegate.cc", +- "vp9_vaapi_video_encoder_delegate.h", + ] + if (enable_hevc_parser_and_hw_decoder) { + sources += [ +@@ -96,8 +90,6 @@ source_set("vaapi") { + "//media/gpu:video_frame_mapper_common", + "//media/gpu/chromeos:common", + "//mojo/public/cpp/bindings", +- "//third_party/libaom:libaomrc", +- "//third_party/libvpx:libvpxrc", + "//third_party/libyuv", + "//ui/gfx", + "//ui/gfx/geometry", diff --git a/wayland-proto-31-cursor-shape.patch b/wayland-proto-31-cursor-shape.patch deleted file mode 100644 index 1ec03f4..0000000 --- a/wayland-proto-31-cursor-shape.patch +++ /dev/null @@ -1,820 +0,0 @@ -From 653716a6838676b6cf257e0d9756eccbf509fabb Mon Sep 17 00:00:00 2001 -From: Ilya Bizyaev -Date: Fri, 19 Jan 2024 02:02:03 +0000 -Subject: [PATCH] Implement cursor-shape-v1 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This CL is largely based on the existing support for the custom -zcr-cursor-shapes-v1 protocol used by Lacros. - -cursor-shape-v1 is the new upstream protocol for server-side cursor shapes -based on zcr-cursor-shapes-v1. Of compositors, it is currently -implemented in KDE's KWin (in Plasma 6.0) and Sway (not yet released). - -The enum mapping is based on -https://source.chromium.org/chromium/chromium/src/+/main:ui/base/cursor/cursor_factory.cc;l=115;drc=67d90538f11c6b232dbfd716075db52aeb34fd15 -— despite the seemingly fewer shapes in cursor-shape-v1's list, the -reduction is the same as in Chromium's own FreeDesktop cursor loading code, -so there's no downside in letting the compositor do the work for us -whenever it offers to. Since the compositor — and, by extension, the -desktop environment — are the source of truth for cursor display -settings, this simplifies complying with the user's preferences. - -Unlike Lacros, we cannot be sure at compile time that the compositor has -support for this protocol, so the cursor loading code is changed to not -give up on a shape when is has no bitmap and instead let the update -code try the server-side approach. - -Exo does not support cursor-shape-v1, so it will keep using the -zcr-cursor-shapes-v1 branch. - -I have tested this CL in a Plasma 6 RC1 session with this CSS demo: -https://www.tutorialrepublic.com/codelab.php?topic=css&file=cursor-property - -Low-Coverage-Reason: TRIVIAL_CHANGE Not tested are the enum conversion and getters/setters, which is boilerplate. -Bug: 1427111 -Cq-Include-Trybots: luci.chromium.try:linux-lacros-rel,linux-wayland-rel -Change-Id: I50567021e6fd80a641bbc906370c517efe16ffb9 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5196950 -Commit-Queue: Ilya Bizyaev -Reviewed-by: Henrique Ferreiro -Reviewed-by: Kramer Ge -Cr-Commit-Position: refs/heads/main@{#1249191} ---- - third_party/wayland-protocols/BUILD.gn | 4 + - ui/ozone/common/bitmap_cursor_factory.cc | 90 +------- - .../common/bitmap_cursor_factory_unittest.cc | 12 +- - ui/ozone/platform/wayland/BUILD.gn | 5 + - .../platform/wayland/common/wayland_object.cc | 3 + - .../platform/wayland/common/wayland_object.h | 2 + - .../wayland/host/wayland_connection.cc | 3 + - .../wayland/host/wayland_connection.h | 7 + - .../host/wayland_connection_test_api.h | 5 + - .../wayland/host/wayland_cursor_shape.cc | 194 ++++++++++++++++++ - .../wayland/host/wayland_cursor_shape.h | 53 +++++ - .../platform/wayland/host/wayland_window.cc | 18 +- - .../wayland/host/wayland_window_unittest.cc | 76 +++++++ - .../wayland/host/wayland_zcr_cursor_shapes.cc | 2 - - 14 files changed, 371 insertions(+), 103 deletions(-) - create mode 100644 ui/ozone/platform/wayland/host/wayland_cursor_shape.cc - create mode 100644 ui/ozone/platform/wayland/host/wayland_cursor_shape.h - -diff --git a/third_party/wayland-protocols/BUILD.gn b/third_party/wayland-protocols/BUILD.gn -index b0c0082769055..db15b95e41dd4 100644 ---- a/third_party/wayland-protocols/BUILD.gn -+++ b/third_party/wayland-protocols/BUILD.gn -@@ -15,6 +15,10 @@ wayland_protocol("content_type_protocol") { - sources = [ "unstable/content-type/content-type-v1.xml" ] - } - -+wayland_protocol("cursor_shape_protocol") { -+ sources = [ "src/staging/cursor-shape/cursor-shape-v1.xml" ] -+} -+ - wayland_protocol("cursor_shapes_protocol") { - sources = [ "unstable/cursor-shapes/cursor-shapes-unstable-v1.xml" ] - } -diff --git a/ui/ozone/common/bitmap_cursor_factory.cc b/ui/ozone/common/bitmap_cursor_factory.cc -index cf9bb8655a9cb..fd7274ccd28e4 100644 ---- a/ui/ozone/common/bitmap_cursor_factory.cc -+++ b/ui/ozone/common/bitmap_cursor_factory.cc -@@ -8,84 +8,11 @@ - - #include "base/check_op.h" - #include "base/memory/scoped_refptr.h" --#include "build/chromeos_buildflags.h" - #include "ui/base/cursor/mojom/cursor_type.mojom-shared.h" - #include "ui/ozone/common/bitmap_cursor.h" - - namespace ui { - --namespace { -- --#if BUILDFLAG(IS_CHROMEOS_LACROS) --// Returns true if ozone should use the default cursor for |type|, instead of --// loading and storing bitmaps for it. Used on Lacros to skip client-side bitmap --// loading for server-side cursors. --bool UseDefaultCursorForType(mojom::CursorType type) { -- using mojom::CursorType; -- switch (type) { -- case CursorType::kNull: -- case CursorType::kPointer: -- case CursorType::kCross: -- case CursorType::kHand: -- case CursorType::kIBeam: -- case CursorType::kWait: -- case CursorType::kHelp: -- case CursorType::kEastResize: -- case CursorType::kNorthResize: -- case CursorType::kNorthEastResize: -- case CursorType::kNorthWestResize: -- case CursorType::kSouthResize: -- case CursorType::kSouthEastResize: -- case CursorType::kSouthWestResize: -- case CursorType::kWestResize: -- case CursorType::kNorthSouthResize: -- case CursorType::kEastWestResize: -- case CursorType::kNorthEastSouthWestResize: -- case CursorType::kNorthWestSouthEastResize: -- case CursorType::kColumnResize: -- case CursorType::kRowResize: -- case CursorType::kMiddlePanning: -- case CursorType::kEastPanning: -- case CursorType::kNorthPanning: -- case CursorType::kNorthEastPanning: -- case CursorType::kNorthWestPanning: -- case CursorType::kSouthPanning: -- case CursorType::kSouthEastPanning: -- case CursorType::kSouthWestPanning: -- case CursorType::kWestPanning: -- case CursorType::kMove: -- case CursorType::kVerticalText: -- case CursorType::kCell: -- case CursorType::kContextMenu: -- case CursorType::kAlias: -- case CursorType::kProgress: -- case CursorType::kNoDrop: -- case CursorType::kCopy: -- case CursorType::kNotAllowed: -- case CursorType::kZoomIn: -- case CursorType::kZoomOut: -- case CursorType::kGrab: -- case CursorType::kGrabbing: -- case CursorType::kDndNone: -- case CursorType::kDndMove: -- case CursorType::kDndCopy: -- case CursorType::kDndLink: -- return true; -- case CursorType::kNone: -- case CursorType::kMiddlePanningVertical: -- case CursorType::kMiddlePanningHorizontal: -- case CursorType::kCustom: -- case CursorType::kEastWestNoResize: -- case CursorType::kNorthEastSouthWestNoResize: -- case CursorType::kNorthSouthNoResize: -- case CursorType::kNorthWestSouthEastNoResize: -- return false; -- } --} --#endif // BUILDFLAG(IS_CHROMEOS_LACROS) -- --} // namespace -- - BitmapCursorFactory::BitmapCursorFactory() = default; - - BitmapCursorFactory::~BitmapCursorFactory() = default; -@@ -93,18 +20,11 @@ BitmapCursorFactory::~BitmapCursorFactory() = default; - scoped_refptr BitmapCursorFactory::GetDefaultCursor( - mojom::CursorType type) { - if (!default_cursors_.count(type)) { -- if (type == mojom::CursorType::kNone --#if BUILDFLAG(IS_CHROMEOS_LACROS) -- || UseDefaultCursorForType(type) --#endif -- ) { -- // Lacros uses server-side cursors for most types. These cursors don't -- // need to load bitmap images on the client. -- // Similarly, the hidden cursor doesn't use any bitmap. -- default_cursors_[type] = base::MakeRefCounted(type); -- } else { -- return nullptr; -- } -+ // Return a cursor not backed by a bitmap to preserve the type information. -+ // It can still be used to request the compositor to draw a server-side -+ // cursor for the given type. -+ // kNone is handled separately and does not need a bitmap. -+ default_cursors_[type] = base::MakeRefCounted(type); - } - - return default_cursors_[type]; -diff --git a/ui/ozone/common/bitmap_cursor_factory_unittest.cc b/ui/ozone/common/bitmap_cursor_factory_unittest.cc -index 905b721d66193..6428821d90c6b 100644 ---- a/ui/ozone/common/bitmap_cursor_factory_unittest.cc -+++ b/ui/ozone/common/bitmap_cursor_factory_unittest.cc -@@ -4,7 +4,6 @@ - - #include "ui/ozone/common/bitmap_cursor_factory.h" - --#include "build/chromeos_buildflags.h" - #include "testing/gtest/include/gtest/gtest.h" - #include "ui/base/cursor/mojom/cursor_type.mojom-shared.h" - #include "ui/base/cursor/platform_cursor.h" -@@ -24,8 +23,7 @@ TEST(BitmapCursorFactoryTest, InvisibleCursor) { - CursorType::kNone); - } - --#if BUILDFLAG(IS_CHROMEOS_LACROS) --TEST(BitmapCursorFactoryTest, LacrosUsesDefaultCursorsForCommonTypes) { -+TEST(BitmapCursorFactoryTest, DefaultCursorsHaveTypeInformation) { - BitmapCursorFactory factory; - - // Verify some common cursor types. -@@ -45,12 +43,4 @@ TEST(BitmapCursorFactoryTest, LacrosUsesDefaultCursorsForCommonTypes) { - CursorType::kIBeam); - } - --TEST(BitmapCursorFactoryTest, LacrosCustomCursor) { -- BitmapCursorFactory factory; -- auto cursor = factory.GetDefaultCursor(CursorType::kCustom); -- // Custom cursors don't have a default platform cursor. -- EXPECT_EQ(cursor, nullptr); --} --#endif // BUILDFLAG(IS_CHROMEOS_LACROS) -- - } // namespace ui -diff --git a/ui/ozone/platform/wayland/BUILD.gn b/ui/ozone/platform/wayland/BUILD.gn -index 8ebc966e1e1c3..d3dc3c736aa3c 100644 ---- a/ui/ozone/platform/wayland/BUILD.gn -+++ b/ui/ozone/platform/wayland/BUILD.gn -@@ -103,6 +103,8 @@ source_set("wayland") { - "host/wayland_cursor.h", - "host/wayland_cursor_position.cc", - "host/wayland_cursor_position.h", -+ "host/wayland_cursor_shape.cc", -+ "host/wayland_cursor_shape.h", - "host/wayland_data_device.cc", - "host/wayland_data_device.h", - "host/wayland_data_device_base.cc", -@@ -256,6 +258,7 @@ source_set("wayland") { - "//third_party/wayland:wayland_util", - "//third_party/wayland-protocols:alpha_compositing_protocol", - "//third_party/wayland-protocols:content_type_protocol", -+ "//third_party/wayland-protocols:cursor_shape_protocol", - "//third_party/wayland-protocols:cursor_shapes_protocol", - "//third_party/wayland-protocols:extended_drag", - "//third_party/wayland-protocols:fractional_scale_protocol", -@@ -274,6 +277,7 @@ source_set("wayland") { - "//third_party/wayland-protocols:relative_pointer_protocol", - "//third_party/wayland-protocols:single_pixel_buffer", - "//third_party/wayland-protocols:stylus_protocol", -+ "//third_party/wayland-protocols:tablet_protocol", - "//third_party/wayland-protocols:text_input_extension_protocol", - "//third_party/wayland-protocols:text_input_protocol", - "//third_party/wayland-protocols:touchpad_haptics_protocol", -@@ -623,6 +627,7 @@ source_set("wayland_unittests") { - "//testing/gmock", - "//testing/gtest", - "//third_party/wayland:wayland_server", -+ "//third_party/wayland-protocols:cursor_shape_protocol", - "//third_party/wayland-protocols:cursor_shapes_protocol", - "//third_party/wayland-protocols:keyboard_extension_protocol", - "//third_party/wayland-protocols:linux_dmabuf_protocol", -diff --git a/ui/ozone/platform/wayland/common/wayland_object.cc b/ui/ozone/platform/wayland/common/wayland_object.cc -index bcc48aaeb186e..7f09a9f4f67dd 100644 ---- a/ui/ozone/platform/wayland/common/wayland_object.cc -+++ b/ui/ozone/platform/wayland/common/wayland_object.cc -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -228,6 +229,8 @@ IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_viewport) - IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_viewporter) - IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_content_type_v1) - IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_content_type_manager_v1) -+IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_cursor_shape_device_v1) -+IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_cursor_shape_manager_v1) - IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_fractional_scale_manager_v1) - IMPLEMENT_WAYLAND_OBJECT_TRAITS(wp_fractional_scale_v1) - IMPLEMENT_WAYLAND_OBJECT_TRAITS(xdg_activation_v1) -diff --git a/ui/ozone/platform/wayland/common/wayland_object.h b/ui/ozone/platform/wayland/common/wayland_object.h -index c84c084841ea9..436e7ff5f3910 100644 ---- a/ui/ozone/platform/wayland/common/wayland_object.h -+++ b/ui/ozone/platform/wayland/common/wayland_object.h -@@ -146,6 +146,8 @@ DECLARE_WAYLAND_OBJECT_TRAITS(wp_viewport) - DECLARE_WAYLAND_OBJECT_TRAITS(wp_viewporter) - DECLARE_WAYLAND_OBJECT_TRAITS(wp_content_type_manager_v1) - DECLARE_WAYLAND_OBJECT_TRAITS(wp_content_type_v1) -+DECLARE_WAYLAND_OBJECT_TRAITS(wp_cursor_shape_device_v1) -+DECLARE_WAYLAND_OBJECT_TRAITS(wp_cursor_shape_manager_v1) - DECLARE_WAYLAND_OBJECT_TRAITS(wp_fractional_scale_manager_v1) - DECLARE_WAYLAND_OBJECT_TRAITS(wp_fractional_scale_v1) - DECLARE_WAYLAND_OBJECT_TRAITS(xdg_activation_v1) -diff --git a/ui/ozone/platform/wayland/host/wayland_connection.cc b/ui/ozone/platform/wayland/host/wayland_connection.cc -index 5c62c0ead1497..944c9dd6904cd 100644 ---- a/ui/ozone/platform/wayland/host/wayland_connection.cc -+++ b/ui/ozone/platform/wayland/host/wayland_connection.cc -@@ -41,6 +41,7 @@ - #include "ui/ozone/platform/wayland/host/wayland_buffer_manager_host.h" - #include "ui/ozone/platform/wayland/host/wayland_cursor.h" - #include "ui/ozone/platform/wayland/host/wayland_cursor_position.h" -+#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h" - #include "ui/ozone/platform/wayland/host/wayland_data_device_manager.h" - #include "ui/ozone/platform/wayland/host/wayland_drm.h" - #include "ui/ozone/platform/wayland/host/wayland_event_source.h" -@@ -165,6 +166,8 @@ bool WaylandConnection::Initialize(bool use_threaded_polling) { - RegisterGlobalObjectFactory(WaylandZcrColorManager::kInterfaceName, - &WaylandZcrColorManager::Instantiate); - } -+ RegisterGlobalObjectFactory(WaylandCursorShape::kInterfaceName, -+ &WaylandCursorShape::Instantiate); - RegisterGlobalObjectFactory(WaylandZcrCursorShapes::kInterfaceName, - &WaylandZcrCursorShapes::Instantiate); - RegisterGlobalObjectFactory(WaylandZcrTouchpadHaptics::kInterfaceName, -diff --git a/ui/ozone/platform/wayland/host/wayland_connection.h b/ui/ozone/platform/wayland/host/wayland_connection.h -index b0bb930a3de99..13be193482721 100644 ---- a/ui/ozone/platform/wayland/host/wayland_connection.h -+++ b/ui/ozone/platform/wayland/host/wayland_connection.h -@@ -62,6 +62,7 @@ class WaylandZwpPointerGestures; - class WaylandZwpRelativePointerManager; - class WaylandDataDeviceManager; - class WaylandCursorPosition; -+class WaylandCursorShape; - class WaylandWindowDragController; - class GtkPrimarySelectionDeviceManager; - class GtkShell1; -@@ -209,6 +210,10 @@ class WaylandConnection { - return zcr_color_manager_.get(); - } - -+ WaylandCursorShape* wayland_cursor_shape() const { -+ return cursor_shape_.get(); -+ } -+ - WaylandZcrCursorShapes* zcr_cursor_shapes() const { - return zcr_cursor_shapes_.get(); - } -@@ -383,6 +388,7 @@ class WaylandConnection { - friend class WaylandZwpPointerGestures; - friend class WaylandZwpRelativePointerManager; - friend class WaylandZcrColorManager; -+ friend class WaylandCursorShape; - friend class WaylandZcrCursorShapes; - friend class XdgActivation; - friend class XdgForeignWrapper; -@@ -483,6 +489,7 @@ class WaylandConnection { - std::unique_ptr zaura_output_manager_; - std::unique_ptr zaura_shell_; - std::unique_ptr zcr_color_manager_; -+ std::unique_ptr cursor_shape_; - std::unique_ptr zcr_cursor_shapes_; - std::unique_ptr zcr_touchpad_haptics_; - std::unique_ptr zwp_pointer_constraints_; -diff --git a/ui/ozone/platform/wayland/host/wayland_connection_test_api.h b/ui/ozone/platform/wayland/host/wayland_connection_test_api.h -index 31e61aff6010b..419801f0257a3 100644 ---- a/ui/ozone/platform/wayland/host/wayland_connection_test_api.h -+++ b/ui/ozone/platform/wayland/host/wayland_connection_test_api.h -@@ -10,6 +10,7 @@ - - #include "base/memory/raw_ptr.h" - #include "ui/ozone/platform/wayland/host/wayland_connection.h" -+#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h" - #include "ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.h" - - namespace ui { -@@ -22,6 +23,10 @@ class WaylandConnectionTestApi { - WaylandConnectionTestApi& operator=(const WaylandConnectionTestApi&) = delete; - ~WaylandConnectionTestApi() = default; - -+ void SetCursorShape(std::unique_ptr obj) { -+ impl_->cursor_shape_ = std::move(obj); -+ } -+ - void SetZcrCursorShapes(std::unique_ptr obj) { - impl_->zcr_cursor_shapes_ = std::move(obj); - } -diff --git a/ui/ozone/platform/wayland/host/wayland_cursor_shape.cc b/ui/ozone/platform/wayland/host/wayland_cursor_shape.cc -new file mode 100644 -index 0000000000000..e9b6f0c678c03 ---- /dev/null -+++ b/ui/ozone/platform/wayland/host/wayland_cursor_shape.cc -@@ -0,0 +1,194 @@ -+// Copyright 2024 The Chromium Authors -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h" -+ -+#include -+ -+#include "base/check.h" -+#include "third_party/abseil-cpp/absl/types/optional.h" -+#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h" -+#include "ui/gfx/native_widget_types.h" -+#include "ui/ozone/platform/wayland/host/wayland_connection.h" -+#include "ui/ozone/platform/wayland/host/wayland_pointer.h" -+#include "ui/ozone/platform/wayland/host/wayland_seat.h" -+ -+namespace ui { -+ -+namespace { -+constexpr uint32_t kMinVersion = 1; -+} -+ -+using mojom::CursorType; -+ -+// static -+constexpr char WaylandCursorShape::kInterfaceName[]; -+ -+// static -+void WaylandCursorShape::Instantiate(WaylandConnection* connection, -+ wl_registry* registry, -+ uint32_t name, -+ const std::string& interface, -+ uint32_t version) { -+ CHECK_EQ(interface, kInterfaceName) << "Expected \"" << kInterfaceName -+ << "\" but got \"" << interface << "\""; -+ -+ if (connection->cursor_shape_ || -+ !wl::CanBind(interface, version, kMinVersion, kMinVersion)) { -+ return; -+ } -+ -+ auto cursor_shape_manager = -+ wl::Bind(registry, name, kMinVersion); -+ if (!cursor_shape_manager) { -+ LOG(ERROR) << "Failed to bind wp_cursor_shape_manager_v1"; -+ return; -+ } -+ connection->cursor_shape_ = std::make_unique( -+ cursor_shape_manager.release(), connection); -+} -+ -+WaylandCursorShape::WaylandCursorShape(wp_cursor_shape_manager_v1* cursor_shape, -+ WaylandConnection* connection) -+ : wp_cursor_shape_manager_v1_(cursor_shape), connection_(connection) { -+ // |wp_cursor_shape_manager_v1_| and |connection_| may be null in tests. -+} -+ -+WaylandCursorShape::~WaylandCursorShape() = default; -+ -+wp_cursor_shape_device_v1* WaylandCursorShape::GetShapeDevice() { -+ DCHECK(connection_->seat()->pointer()); -+ -+ if (!wp_cursor_shape_device_v1_.get()) { -+ wl_pointer* pointer = connection_->seat()->pointer()->wl_object(); -+ wp_cursor_shape_device_v1_.reset(wp_cursor_shape_manager_v1_get_pointer( -+ wp_cursor_shape_manager_v1_.get(), pointer)); -+ } -+ DCHECK(wp_cursor_shape_device_v1_); -+ return wp_cursor_shape_device_v1_.get(); -+} -+ -+// static -+absl::optional WaylandCursorShape::ShapeFromType(CursorType type) { -+ switch (type) { -+ case CursorType::kNull: -+ // kNull is an alias for kPointer. Fall through. -+ case CursorType::kPointer: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT; -+ case CursorType::kCross: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR; -+ case CursorType::kHand: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER; -+ case CursorType::kIBeam: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT; -+ case CursorType::kWait: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_WAIT; -+ case CursorType::kHelp: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_HELP; -+ case CursorType::kEastResize: -+ case CursorType::kEastPanning: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_E_RESIZE; -+ case CursorType::kNorthResize: -+ case CursorType::kNorthPanning: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_N_RESIZE; -+ case CursorType::kNorthEastResize: -+ case CursorType::kNorthEastPanning: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NE_RESIZE; -+ case CursorType::kNorthWestResize: -+ case CursorType::kNorthWestPanning: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NW_RESIZE; -+ case CursorType::kSouthResize: -+ case CursorType::kSouthPanning: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_S_RESIZE; -+ case CursorType::kSouthEastResize: -+ case CursorType::kSouthEastPanning: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SE_RESIZE; -+ case CursorType::kSouthWestResize: -+ case CursorType::kSouthWestPanning: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SW_RESIZE; -+ case CursorType::kWestResize: -+ case CursorType::kWestPanning: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_W_RESIZE; -+ case CursorType::kNorthSouthResize: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NS_RESIZE; -+ case CursorType::kEastWestResize: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_EW_RESIZE; -+ case CursorType::kNorthEastSouthWestResize: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NESW_RESIZE; -+ case CursorType::kNorthWestSouthEastResize: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NWSE_RESIZE; -+ case CursorType::kColumnResize: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COL_RESIZE; -+ case CursorType::kRowResize: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ROW_RESIZE; -+ case CursorType::kMove: -+ // Returning `MOVE` is the correct thing here, but Blink does not make a -+ // distinction between move and all-scroll. Other platforms use a cursor -+ // more consistent with all-scroll, so use that. -+ case CursorType::kMiddlePanning: -+ case CursorType::kMiddlePanningVertical: -+ case CursorType::kMiddlePanningHorizontal: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL; -+ case CursorType::kVerticalText: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_VERTICAL_TEXT; -+ case CursorType::kCell: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CELL; -+ case CursorType::kContextMenu: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU; -+ case CursorType::kAlias: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALIAS; -+ case CursorType::kProgress: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_PROGRESS; -+ case CursorType::kNoDrop: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NO_DROP; -+ case CursorType::kCopy: -+ case CursorType::kDndCopy: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COPY; -+ case CursorType::kNone: -+ // To be cleared through wl_pointer.set_cursor. -+ return absl::nullopt; -+ case CursorType::kNotAllowed: -+ case CursorType::kNorthSouthNoResize: -+ case CursorType::kEastWestNoResize: -+ case CursorType::kNorthEastSouthWestNoResize: -+ case CursorType::kNorthWestSouthEastNoResize: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NOT_ALLOWED; -+ case CursorType::kZoomIn: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_IN; -+ case CursorType::kZoomOut: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_OUT; -+ case CursorType::kGrab: -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRAB; -+ case CursorType::kGrabbing: -+ case CursorType::kDndNone: -+ case CursorType::kDndMove: -+ case CursorType::kDndLink: -+ // For drag-and-drop, the compositor knows the drag type and can use it to -+ // additionally decorate the cursor. -+ return WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRABBING; -+ case CursorType::kCustom: -+ // "Custom" means a bitmap cursor, which cannot use the shape API. -+ return absl::nullopt; -+ } -+} -+ -+void WaylandCursorShape::SetCursorShape(uint32_t shape) { -+ DCHECK(connection_->seat()); -+ -+ // Nothing to do if there is no pointer (mouse) connected. -+ if (!connection_->seat()->pointer()) { -+ return; -+ } -+ -+ auto pointer_enter_serial = -+ connection_->serial_tracker().GetSerial(wl::SerialType::kMouseEnter); -+ if (!pointer_enter_serial) { -+ VLOG(1) << "Failed to set cursor shape: no mouse enter serial found."; -+ return; -+ } -+ wp_cursor_shape_device_v1_set_shape(GetShapeDevice(), -+ pointer_enter_serial->value, shape); -+} -+ -+} // namespace ui -diff --git a/ui/ozone/platform/wayland/host/wayland_cursor_shape.h b/ui/ozone/platform/wayland/host/wayland_cursor_shape.h -new file mode 100644 -index 0000000000000..9bb2fab21a539 ---- /dev/null -+++ b/ui/ozone/platform/wayland/host/wayland_cursor_shape.h -@@ -0,0 +1,53 @@ -+// Copyright 2024 The Chromium Authors -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_CURSOR_SHAPE_H_ -+#define UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_CURSOR_SHAPE_H_ -+ -+#include "base/memory/raw_ptr.h" -+#include "third_party/abseil-cpp/absl/types/optional.h" -+#include "ui/base/cursor/mojom/cursor_type.mojom-forward.h" -+#include "ui/ozone/platform/wayland/common/wayland_object.h" -+ -+namespace ui { -+ -+class WaylandConnection; -+ -+// Wraps the cursor_shape interface for Wayland server-side cursor support. -+class WaylandCursorShape -+ : public wl::GlobalObjectRegistrar { -+ public: -+ static constexpr char kInterfaceName[] = "wp_cursor_shape_manager_v1"; -+ -+ static void Instantiate(WaylandConnection* connection, -+ wl_registry* registry, -+ uint32_t name, -+ const std::string& interface, -+ uint32_t version); -+ -+ WaylandCursorShape(wp_cursor_shape_manager_v1* cursor_shape, -+ WaylandConnection* connection); -+ WaylandCursorShape(const WaylandCursorShape&) = delete; -+ WaylandCursorShape& operator=(const WaylandCursorShape&) = delete; -+ virtual ~WaylandCursorShape(); -+ -+ // Returns the cursor shape value for a cursor |type|, or nullopt if the -+ // type isn't supported by Wayland's cursor shape API. -+ static absl::optional ShapeFromType(mojom::CursorType type); -+ -+ // Calls wp_cursor_shape_device_v1_set_shape(). See interface description -+ // for values for |shape|. Virtual for testing. -+ virtual void SetCursorShape(uint32_t shape); -+ -+ private: -+ wp_cursor_shape_device_v1* GetShapeDevice(); -+ -+ const wl::Object wp_cursor_shape_manager_v1_; -+ wl::Object wp_cursor_shape_device_v1_; -+ const raw_ptr connection_; -+}; -+ -+} // namespace ui -+ -+#endif // UI_OZONE_PLATFORM_WAYLAND_HOST_WAYLAND_CURSOR_SHAPE_H_ -diff --git a/ui/ozone/platform/wayland/host/wayland_window.cc b/ui/ozone/platform/wayland/host/wayland_window.cc -index 68f87776ef4f0..f5c36964ad36d 100644 ---- a/ui/ozone/platform/wayland/host/wayland_window.cc -+++ b/ui/ozone/platform/wayland/host/wayland_window.cc -@@ -41,6 +41,7 @@ - #include "ui/ozone/platform/wayland/common/wayland_overlay_config.h" - #include "ui/ozone/platform/wayland/host/dump_util.h" - #include "ui/ozone/platform/wayland/host/wayland_connection.h" -+#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h" - #include "ui/ozone/platform/wayland/host/wayland_data_drag_controller.h" - #include "ui/ozone/platform/wayland/host/wayland_event_source.h" - #include "ui/ozone/platform/wayland/host/wayland_frame_manager.h" -@@ -1110,7 +1111,9 @@ void WaylandWindow::UpdateCursorShape(scoped_refptr cursor) { - base::IsValueInRangeForNumericType( - cursor->cursor_image_scale_factor())); - -- absl::optional shape = -+ absl::optional shape = -+ WaylandCursorShape::ShapeFromType(cursor->type()); -+ absl::optional zcr_shape = - WaylandZcrCursorShapes::ShapeFromType(cursor->type()); - - // Round cursor scale factor to ceil as wl_surface.set_buffer_scale accepts -@@ -1118,20 +1121,25 @@ void WaylandWindow::UpdateCursorShape(scoped_refptr cursor) { - if (cursor->type() == CursorType::kNone) { // Hide the cursor. - connection_->SetCursorBitmap( - {}, gfx::Point(), std::ceil(cursor->cursor_image_scale_factor())); -+ } else if (connection_->wayland_cursor_shape() && shape.has_value()) { -+ // Prefer Wayland server-side cursor support, as the compositor knows better -+ // how to draw the cursor. -+ connection_->wayland_cursor_shape()->SetCursorShape(shape.value()); - } else if (cursor->platform_data()) { // Check for theme-provided cursor. - connection_->SetPlatformCursor( - reinterpret_cast(cursor->platform_data()), - std::ceil(cursor->cursor_image_scale_factor())); - } else if (connection_->zcr_cursor_shapes() && -- shape.has_value()) { // Check for Wayland server-side cursor -- // support (e.g. exo for lacros). -+ zcr_shape.has_value()) { // Check for Exo server-side cursor -+ // support. - #if BUILDFLAG(IS_CHROMEOS_LACROS) - // Lacros should not load image assets for default cursors. See - // `BitmapCursorFactory::GetDefaultCursor()`. - DCHECK(cursor->bitmaps().empty()); - #endif // BUILDFLAG(IS_CHROMEOS_LACROS) -- connection_->zcr_cursor_shapes()->SetCursorShape(shape.value()); -- } else { // Use client-side bitmap cursors as fallback. -+ connection_->zcr_cursor_shapes()->SetCursorShape(zcr_shape.value()); -+ } else if (!cursor->bitmaps() -+ .empty()) { // Use client-side bitmap cursors as fallback. - // Translate physical pixels to DIPs. - gfx::Point hotspot_in_dips = gfx::ScaleToRoundedPoint( - cursor->hotspot(), 1.0f / cursor->cursor_image_scale_factor()); -diff --git a/ui/ozone/platform/wayland/host/wayland_window_unittest.cc b/ui/ozone/platform/wayland/host/wayland_window_unittest.cc -index 49dcdfed360fe..7a1640bc6f045 100644 ---- a/ui/ozone/platform/wayland/host/wayland_window_unittest.cc -+++ b/ui/ozone/platform/wayland/host/wayland_window_unittest.cc -@@ -11,6 +11,7 @@ - #include - #include - -+#include - #include - #include - #include -@@ -51,6 +52,7 @@ - #include "ui/ozone/platform/wayland/common/wayland_util.h" - #include "ui/ozone/platform/wayland/host/wayland_buffer_manager_host.h" - #include "ui/ozone/platform/wayland/host/wayland_connection_test_api.h" -+#include "ui/ozone/platform/wayland/host/wayland_cursor_shape.h" - #include "ui/ozone/platform/wayland/host/wayland_event_source.h" - #include "ui/ozone/platform/wayland/host/wayland_output.h" - #include "ui/ozone/platform/wayland/host/wayland_output_manager.h" -@@ -146,6 +148,16 @@ wl::ScopedWlArray MakeStateArray(const std::vector states) { - return wl::ScopedWlArray(states); - } - -+class MockCursorShape : public WaylandCursorShape { -+ public: -+ MockCursorShape() : WaylandCursorShape(nullptr, nullptr) {} -+ MockCursorShape(const MockCursorShape&) = delete; -+ MockCursorShape& operator=(const MockCursorShape&) = delete; -+ ~MockCursorShape() override = default; -+ -+ MOCK_METHOD(void, SetCursorShape, (uint32_t), (override)); -+}; -+ - class MockZcrCursorShapes : public WaylandZcrCursorShapes { - public: - MockZcrCursorShapes() : WaylandZcrCursorShapes(nullptr, nullptr) {} -@@ -264,6 +276,14 @@ class WaylandWindowTest : public WaylandTest { - hit_tests->push_back(static_cast(HTTOPRIGHT)); - } - -+ MockCursorShape* InstallMockCursorShape() { -+ auto zcr_cursor_shapes = std::make_unique(); -+ MockCursorShape* mock_cursor_shapes = zcr_cursor_shapes.get(); -+ WaylandConnectionTestApi test_api(connection_.get()); -+ test_api.SetCursorShape(std::move(zcr_cursor_shapes)); -+ return mock_cursor_shapes; -+ } -+ - MockZcrCursorShapes* InstallMockZcrCursorShapes() { - auto zcr_cursor_shapes = std::make_unique(); - MockZcrCursorShapes* mock_cursor_shapes = zcr_cursor_shapes.get(); -@@ -1692,6 +1712,62 @@ TEST_P(WaylandWindowTest, CanDispatchMouseEventFocus) { - EXPECT_TRUE(window_->CanDispatchEvent(&test_mouse_event_)); - } - -+TEST_P(WaylandWindowTest, SetCursorUsesCursorShapeForCommonTypes) { -+ SetPointerFocusedWindow(window_.get()); -+ MockCursorShape* mock_cursor_shape = InstallMockCursorShape(); -+ -+ // Verify some commonly-used cursors. -+ EXPECT_CALL(*mock_cursor_shape, -+ SetCursorShape(WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT)); -+ auto pointer_cursor = AsPlatformCursor( -+ base::MakeRefCounted(mojom::CursorType::kPointer)); -+ window_->SetCursor(pointer_cursor.get()); -+ -+ EXPECT_CALL(*mock_cursor_shape, -+ SetCursorShape(WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER)); -+ auto hand_cursor = AsPlatformCursor( -+ base::MakeRefCounted(mojom::CursorType::kHand)); -+ window_->SetCursor(hand_cursor.get()); -+ -+ EXPECT_CALL(*mock_cursor_shape, -+ SetCursorShape(WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT)); -+ auto ibeam_cursor = AsPlatformCursor( -+ base::MakeRefCounted(mojom::CursorType::kIBeam)); -+ window_->SetCursor(ibeam_cursor.get()); -+} -+ -+TEST_P(WaylandWindowTest, SetCursorCallsCursorShapeOncePerCursor) { -+ SetPointerFocusedWindow(window_.get()); -+ MockCursorShape* mock_cursor_shape = InstallMockCursorShape(); -+ auto hand_cursor = AsPlatformCursor( -+ base::MakeRefCounted(mojom::CursorType::kHand)); -+ // Setting the same cursor twice on the client only calls the server once. -+ EXPECT_CALL(*mock_cursor_shape, SetCursorShape(_)).Times(1); -+ window_->SetCursor(hand_cursor.get()); -+ window_->SetCursor(hand_cursor.get()); -+} -+ -+TEST_P(WaylandWindowTest, SetCursorDoesNotUseCursorShapeForNoneCursor) { -+ SetPointerFocusedWindow(window_.get()); -+ MockCursorShape* mock_cursor_shape = InstallMockCursorShape(); -+ EXPECT_CALL(*mock_cursor_shape, SetCursorShape(_)).Times(0); -+ auto none_cursor = AsPlatformCursor( -+ base::MakeRefCounted(mojom::CursorType::kNone)); -+ window_->SetCursor(none_cursor.get()); -+} -+ -+TEST_P(WaylandWindowTest, SetCursorDoesNotUseCursorShapeForCustomCursors) { -+ SetPointerFocusedWindow(window_.get()); -+ MockCursorShape* mock_cursor_shape = InstallMockCursorShape(); -+ -+ // Custom cursors require bitmaps, so they do not use server-side cursors. -+ EXPECT_CALL(*mock_cursor_shape, SetCursorShape(_)).Times(0); -+ auto custom_cursor = AsPlatformCursor( -+ base::MakeRefCounted(mojom::CursorType::kCustom, SkBitmap(), -+ gfx::Point(), kDefaultCursorScale)); -+ window_->SetCursor(custom_cursor.get()); -+} -+ - TEST_P(WaylandWindowTest, SetCursorUsesZcrCursorShapesForCommonTypes) { - SetPointerFocusedWindow(window_.get()); - MockZcrCursorShapes* mock_cursor_shapes = InstallMockZcrCursorShapes(); -diff --git a/ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.cc b/ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.cc -index 9e3243dceea20..297c48e614087 100644 ---- a/ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.cc -+++ b/ui/ozone/platform/wayland/host/wayland_zcr_cursor_shapes.cc -@@ -168,8 +168,6 @@ absl::optional WaylandZcrCursorShapes::ShapeFromType(CursorType type) { - return ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_COPY; - case CursorType::kDndLink: - return ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_LINK; -- // NOTE: If you add a new cursor shape, please also update -- // UseDefaultCursorForType() in bitmap_cursor_factory_ozone.cc. - } - } - diff --git a/wayland_version.patch b/wayland_version.patch new file mode 100644 index 0000000..cd057bb --- /dev/null +++ b/wayland_version.patch @@ -0,0 +1,9 @@ +--- src/third_party/wayland/wayland_version.gni.orig 2025-01-02 22:24:04.094885287 +0100 ++++ src/third_party/wayland/wayland_version.gni 2025-01-04 20:36:25.262834108 +0100 +@@ -4,5 +4,5 @@ + # is true to check system wayland package version meets + # at least the version of third-party/wayland so that it won't + # make any compile error with chromium +-wayland_version = "1.23.0" ++wayland_version = "1.22.0" + wayland_egl_version = "18.1.0" diff --git a/webgl_rendering_context_webgpu_base-incomplete-StaticBitmapImage.patch b/webgl_rendering_context_webgpu_base-incomplete-StaticBitmapImage.patch new file mode 100644 index 0000000..51183e4 --- /dev/null +++ b/webgl_rendering_context_webgpu_base-incomplete-StaticBitmapImage.patch @@ -0,0 +1,10 @@ +--- src/third_party/blink/renderer/modules/webgl/webgl_rendering_context_webgpu_base.cc.orig 2025-08-15 17:32:29.453405076 +0200 ++++ src/third_party/blink/renderer/modules/webgl/webgl_rendering_context_webgpu_base.cc 2025-08-16 09:32:54.602946843 +0200 +@@ -10,6 +10,7 @@ + #include "third_party/blink/renderer/platform/graphics/gpu/dawn_control_client_holder.h" + #include "third_party/blink/renderer/platform/graphics/gpu/webgpu_callback.h" + #include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" ++#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" + #include "third_party/blink/renderer/platform/graphics/web_graphics_context_3d_provider_util.h" + #include "third_party/blink/renderer/platform/weborigin/kurl.h" + #include "third_party/blink/renderer/platform/wtf/functional.h" diff --git a/webp-no-sharpyuv.patch b/webp-no-sharpyuv.patch new file mode 100644 index 0000000..54b91ea --- /dev/null +++ b/webp-no-sharpyuv.patch @@ -0,0 +1,23 @@ +Electron does not actually use sharpyuv. This enables buillding it on Leap which has old webp + +--- src/build/linux/unbundle/libwebp.gn.orig 2024-07-24 12:50:43.685795800 +0200 ++++ src/build/linux/unbundle/libwebp.gn 2024-08-04 21:34:09.357750400 +0200 +@@ -13,10 +13,6 @@ pkg_config("system_libwebp") { + ] + } + +-pkg_config("system_libsharpyuv") { +- packages = [ "libsharpyuv" ] +-} +- + shim_headers("libwebp_shim") { + root_path = "src/src" + headers = [ +@@ -44,7 +40,6 @@ source_set("libwebp_webp") { + + source_set("libwebp_sharpyuv") { + deps = [ ":libsharpyuv_shim" ] +- public_configs = [ ":system_libsharpyuv" ] + } + + group("libwebp") { diff --git a/webrtc-138-Wchanges-meaning.patch b/webrtc-138-Wchanges-meaning.patch new file mode 100644 index 0000000..4a74ee1 --- /dev/null +++ b/webrtc-138-Wchanges-meaning.patch @@ -0,0 +1,33 @@ +--- webrtc-7204a/third_party/webrtc/pc/codec_vendor.h.orig 2025-08-10 20:30:35.548562304 +0200 ++++ webrtc-7204a/third_party/webrtc/pc/codec_vendor.h 2025-08-10 21:06:25.516311580 +0200 +@@ -119,7 +119,7 @@ class CodecVendor { + class CodecLookupHelper { + public: + virtual ~CodecLookupHelper() = default; +- virtual PayloadTypeSuggester* PayloadTypeSuggester() = 0; ++ virtual webrtc::PayloadTypeSuggester* PayloadTypeSuggester() = 0; + // Look up the codec vendor to use, depending on context. + // This call may get additional arguments in the future, to aid + // in selection of the correct context. +--- webrtc-7204a/third_party/webrtc/pc/jsep_transport.h.orig 2025-08-10 20:30:35.552562303 +0200 ++++ webrtc-7204a/third_party/webrtc/pc/jsep_transport.h 2025-08-10 21:10:32.100282629 +0200 +@@ -214,7 +214,7 @@ class JsepTransport { + return rtp_dtls_transport_; + } + +- scoped_refptr SctpTransport() const { return sctp_transport_; } ++ scoped_refptr SctpTransport() const { return sctp_transport_; } + + // TODO(bugs.webrtc.org/9719): Delete method, update callers to use + // SctpTransport() instead. +--- webrtc-7204a/third_party/webrtc/p2p/base/port_interface.h.orig 2025-08-10 20:30:35.544562305 +0200 ++++ webrtc-7204a/third_party/webrtc/p2p/base/port_interface.h 2025-08-10 20:58:44.792364738 +0200 +@@ -55,7 +55,7 @@ class PortInterface { + virtual ~PortInterface(); + + virtual IceCandidateType Type() const = 0; +- virtual const Network* Network() const = 0; ++ virtual const webrtc::Network* Network() const = 0; + + // Methods to set/get ICE role and tiebreaker values. + virtual void SetIceRole(IceRole role) = 0; diff --git a/webrtc-make_ref_counted-absl2024-nullability.patch b/webrtc-make_ref_counted-absl2024-nullability.patch new file mode 100644 index 0000000..dc6540a --- /dev/null +++ b/webrtc-make_ref_counted-absl2024-nullability.patch @@ -0,0 +1,30 @@ +From 36a764f13dc04d0c06b89d9e5a205224eb2784c8 Mon Sep 17 00:00:00 2001 +From: Danil Chapovalov +Date: Thu, 24 Oct 2024 11:12:57 +0200 +Subject: [PATCH] Remove nullability compatible tag in scoped_refptr as + obsolete + +As of https://github.com/abseil/abseil-cpp/commit/485f2be7c1d2f1a2ad2d89f6aef308dd7bfede8d, this no longer has any effect; instead, the ABSL_NULLABILITY_COMPATIBLE attribute which is already present on the class determines whether a class is compatible with nullability annotations. + +Bug: None +Change-Id: I5aeca86c86c2b6eadb2644695ee3621e92f1f568 +Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366601 +Reviewed-by: Harald Alvestrand +Commit-Queue: Danil Chapovalov +Cr-Commit-Position: refs/heads/main@{#43532} +--- + api/scoped_refptr.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/api/scoped_refptr.h b/api/scoped_refptr.h +index c6fb5605ca..e3274741cc 100644 +--- a/third_party/webrtc/api/scoped_refptr.h ++++ b/third_party/webrtc/api/scoped_refptr.h +@@ -73,7 +73,6 @@ namespace webrtc { + template + class ABSL_NULLABILITY_COMPATIBLE scoped_refptr { + public: +- using absl_nullability_compatible = void; + using element_type = T; + + scoped_refptr() : ptr_(nullptr) {} diff --git a/webrtc-pipewire_session-missing-spa_pod_object_find_prop.patch b/webrtc-pipewire_session-missing-spa_pod_object_find_prop.patch new file mode 100644 index 0000000..381fdbb --- /dev/null +++ b/webrtc-pipewire_session-missing-spa_pod_object_find_prop.patch @@ -0,0 +1,44 @@ +From 97a8bd200d63ab96786ef1064de0195bccadcbed Mon Sep 17 00:00:00 2001 +From: Your Name +Date: Fri, 10 Oct 2025 16:48:14 +0300 +Subject: [PATCH] fix pipewire headers + + 8:26.15 In file included from Unified_cpp_ure_internal_impl_gn0.cpp:38: + 8:26.16 firefox-143.0.3/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc:149:10: error: use of undeclared identifier 'spa_pod_object_find_prop'; did you mean 'spa_pod_object_body'? + 8:26.16 149 | prop = spa_pod_object_find_prop(obj, prop, SPA_FORMAT_VIDEO_framerate); + 8:26.16 | ^ + 8:26.16 /usr/include/spa-0.2/spa/pod/pod.h:164:8: note: 'spa_pod_object_body' declared here + 8:26.16 164 | struct spa_pod_object_body { + 8:26.16 | ^ + 8:26.16 In file included from Unified_cpp_ure_internal_impl_gn0.cpp:38: + 8:26.16 firefox-143.0.3/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc:151:11: error: use of undeclared identifier 'spa_pod_get_values' + 8:26.16 151 | val = spa_pod_get_values(&prop->value, &n_items, &choice); + 8:26.16 | ^ + 8:26.16 firefox-143.0.3/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc:170:10: error: use of undeclared identifier 'spa_pod_object_find_prop'; did you mean 'spa_pod_object_body'? + 8:26.16 170 | prop = spa_pod_object_find_prop(obj, prop, SPA_FORMAT_VIDEO_size); + 8:26.16 | ^ + 8:26.17 /usr/include/spa-0.2/spa/pod/pod.h:164:8: note: 'spa_pod_object_body' declared here + 8:26.17 164 | struct spa_pod_object_body { + 8:26.17 | ^ + 8:26.17 In file included from Unified_cpp_ure_internal_impl_gn0.cpp:38: + 8:26.17 /var/tmp/portage/www-client/firefox-143.0.3/work/firefox-143.0.3/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc:174:9: error: use of undeclared identifier 'spa_pod_get_values' + 8:26.17 174 | val = spa_pod_get_values(&prop->value, &n_items, &choice); +--- + .../libwebrtc/modules/video_capture/linux/pipewire_session.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc b/third_party/libwebrtc/modules/video_capture/linux/pipewire_session.cc +index 25c4dfa..7216874 100644 +--- a/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc ++++ b/third_party/webrtc/modules/video_capture/linux/pipewire_session.cc +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + + #include +-- +2.49.0 + diff --git a/xr_webgl_swap_chain-incomplete-StaticBitmapImage.patch b/xr_webgl_swap_chain-incomplete-StaticBitmapImage.patch new file mode 100644 index 0000000..8a6518e --- /dev/null +++ b/xr_webgl_swap_chain-incomplete-StaticBitmapImage.patch @@ -0,0 +1,10 @@ +--- src/third_party/blink/renderer/modules/xr/xr_webgl_swap_chain.h.orig 2025-08-15 17:32:29.469405073 +0200 ++++ src/third_party/blink/renderer/modules/xr/xr_webgl_swap_chain.h 2025-08-16 00:08:44.433036412 +0200 +@@ -8,6 +8,7 @@ + #include "third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h" + #include "third_party/blink/renderer/modules/webgl/webgl_unowned_texture.h" + #include "third_party/blink/renderer/modules/xr/xr_swap_chain.h" ++#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" + #include "third_party/blink/renderer/platform/heap/garbage_collected.h" + #include "third_party/blink/renderer/platform/heap/member.h" + diff --git a/zip_internal-missing-uLong-Z_DEFAULT_COMPRESSION.patch b/zip_internal-missing-uLong-Z_DEFAULT_COMPRESSION.patch new file mode 100644 index 0000000..eaaa199 --- /dev/null +++ b/zip_internal-missing-uLong-Z_DEFAULT_COMPRESSION.patch @@ -0,0 +1,12 @@ +--- src/third_party/zlib/google/zip_internal.cc.orig 2025-01-06 22:04:22.495198404 +0100 ++++ src/third_party/zlib/google/zip_internal.cc 2025-01-12 19:16:36.143995598 +0100 +@@ -10,6 +10,9 @@ + #include + #include + ++#include ++#include ++ + #include "base/containers/fixed_flat_set.h" + #include "base/files/file_path.h" + #include "base/logging.h"