17
0

27 Commits

Author SHA256 Message Date
0f89da960d Accepting request 1199171 from devel:languages:nodejs
OBS-URL: https://build.opensuse.org/request/show/1199171
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=130
2024-09-06 15:19:06 +00:00
2713ef1712 - New upstream release 30.5.0
* Node 20.16.0

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=169
2024-09-06 11:21:23 +00:00
ec5006ea2e Accepting request 1198860 from devel:languages:nodejs
OBS-URL: https://build.opensuse.org/request/show/1198860
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=129
2024-09-05 13:47:22 +00:00
260ba0122d - 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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=168
2024-09-05 05:02:09 +00:00
f6dde4469c Accepting request 1198001 from devel:languages:nodejs
OBS-URL: https://build.opensuse.org/request/show/1198001
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=128
2024-09-01 17:22:16 +00:00
e8dda073d6 - Fedora 40+, TW: add v8-strict-aliasing.patch to work around GCC14 miscompile
- aarch64: remove -jitless from electron_rebuild macro, seems not needed anymore

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=167
2024-08-31 09:02:17 +00:00
85d8cae8fd Accepting request 1194669 from devel:languages:nodejs
OBS-URL: https://build.opensuse.org/request/show/1194669
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=127
2024-08-19 21:45:24 +00:00
fff53f3c2e - 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)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=166
2024-08-19 08:58:03 +00:00
9dda8dd120 revert on leap
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=165
2024-08-18 12:09:05 +00:00
d74ae9ab23 Accepting request 1194025 from devel:languages:nodejs
OBS-URL: https://build.opensuse.org/request/show/1194025
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=126
2024-08-16 10:23:29 +00:00
805ede6b84 - 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+

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=164
2024-08-14 22:08:54 +00:00
26d96f1da7 Accepting request 1188799 from devel:languages:nodejs
electron 30.3.0

OBS-URL: https://build.opensuse.org/request/show/1188799
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=125
2024-07-22 15:17:30 +00:00
b817b0df97 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=163 2024-07-20 12:14:23 +00:00
4c06b33c6b - 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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=162
2024-07-20 10:06:30 +00:00
754f344fe0 Accepting request 1187068 from devel:languages:nodejs
Electron 30

OBS-URL: https://build.opensuse.org/request/show/1187068
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=124
2024-07-15 17:46:32 +00:00
a03e893c19 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=161 2024-07-14 09:01:13 +00:00
26d8b6ddb5 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=160 2024-07-12 11:37:44 +00:00
29251bbf34 Accepting request 1187058 from home:dziobian:gulgul-ultron:19
- 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)
- Update to 30.1.2 XXXFIXMEXXX
  * 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

OBS-URL: https://build.opensuse.org/request/show/1187058
OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=159
2024-07-12 10:45:39 +00:00
73c6162442 Accepting request 1185256 from devel:languages:nodejs
OBS-URL: https://build.opensuse.org/request/show/1185256
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=123
2024-07-04 14:26:58 +00:00
94ec34be6b - 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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=158
2024-07-04 04:31:28 +00:00
e95bf3c296 Accepting request 1183969 from devel:languages:nodejs
OBS-URL: https://build.opensuse.org/request/show/1183969
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=122
2024-07-01 09:19:33 +00:00
d83e41ea5c - 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.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=157
2024-06-29 08:08:03 +00:00
8fdf2bc55f Accepting request 1180753 from devel:languages:nodejs
Is this note OK @darix?

OBS-URL: https://build.opensuse.org/request/show/1180753
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-electron?expand=0&rev=121
2024-06-14 16:59:13 +00:00
8a7b712932 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=156 2024-06-13 17:21:12 +00:00
9d30973976 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=155 2024-06-13 17:20:33 +00:00
669e2448d0 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=154 2024-06-13 10:55:08 +00:00
b798aa04c9 - Do not build //components/sync (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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=153
2024-06-13 10:51:02 +00:00
162 changed files with 9695 additions and 7112 deletions

View File

@@ -1,229 +0,0 @@
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<T, Traits>::~HeapVecto
const size_t length = object_size / sizeof(T);
using ByteBuffer = uint8_t*;
ByteBuffer payload = reinterpret_cast<ByteBuffer>(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<T>::value) {
@@ -176,11 +176,11 @@ struct TraceInCollectionTrait<kNoWeakHan
cppgc::subtle::ObjectSizeTrait<const Backing>::GetSize(
*reinterpret_cast<const Backing*>(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<T>::value) {
for (unsigned i = 0; i < length; ++i) {
if (!std::is_polymorphic_v<T> ||
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<FieldId, int, 16> 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 <typename T, unsigned inlineCapacity>
struct SameSizeAsVectorWithInlineCapacity {
SameSizeAsVectorWithInlineCapacity<T, 0> 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<const unsigned char*>(from);
@@ -606,7 +606,7 @@ class VectorBuffer<T, 0, Allocator> : 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<T, 0, Allocator> : pr
capacity_ = static_cast<wtf_size_t>(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<wtf_size_t>(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<T, InlineCapacity, Allocator
Shrink(new_capacity);
T* old_buffer = data();
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
wtf_size_t old_capacity = capacity();
#endif
if (new_capacity > 0) {
@@ -2160,7 +2160,7 @@ void Vector<T, InlineCapacity, Allocator
return;
}
Base::ResetBufferPointer();
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
if (old_buffer != data()) {
MARKING_AWARE_ANNOTATE_NEW_BUFFER(Allocator, data(), capacity(), size_);
ANNOTATE_DELETE_BUFFER(old_buffer, old_capacity, size_);
@@ -2270,7 +2270,7 @@ template <typename T, wtf_size_t InlineC
template <typename U>
ALWAYS_INLINE void Vector<T, InlineCapacity, Allocator>::UncheckedAppend(
U&& val) {
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
// Vectors in ASAN builds don't have InlineCapacity.
push_back(std::forward<U>(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<T, VectorTraits<T>>(visitor, *buffer_entry);
@@ -2542,7 +2542,7 @@ void Vector<T, InlineCapacity, Allocator
}
// Shrinking to inline buffer from out-of-line one.
T *old_begin = data(), *old_end = DataEnd();
-#ifdef ANNOTATE_CONTIGUOUS_CONTAINER
+#ifdef WTF_ANNOTATE_CONTIGUOUS_CONTAINER
const wtf_size_t old_capacity = capacity();
#endif
Base::ResetBufferPointer();
diff '--color=auto' -urp src.old/third_party/blink/renderer/platform/wtf/vector_test.cc src/third_party/blink/renderer/platform/wtf/vector_test.cc
--- src.old/third_party/blink/renderer/platform/wtf/vector_test.cc 2025-08-15 17:32:29.581405051 +0200
+++ src/third_party/blink/renderer/platform/wtf/vector_test.cc 2025-08-17 14:47:13.846152160 +0200
@@ -377,7 +377,7 @@ TEST(VectorTest, SwapWithInlineCapacity)
vector_b.swap(vector_a);
}
-#if defined(ANNOTATE_CONTIGUOUS_CONTAINER)
+#if defined(WTF_ANNOTATE_CONTIGUOUS_CONTAINER)
TEST(VectorTest, ContainerAnnotations) {
Vector<int> 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

View File

@@ -178,7 +178,7 @@ index 3c97e4a6cf4c7..a55e4ab51d5b3 100644
- smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance); - smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance);
- } - }
- -
- // TODO(crbug.com/40268540): Consider rejecting metadata that - // TODO(https://crbug.com/1446302): Consider rejecting metadata that
- // does not specify all values. - // does not specify all values.
- if (mdcv->has_primaries || mdcv->has_luminance) { - if (mdcv->has_primaries || mdcv->has_luminance) {
- hdr_metadata.smpte_st_2086 = smpte_st_2086; - 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); + smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance);
+ } + }
+ +
+ // TODO(crbug.com/40268540): Consider rejecting metadata that + // TODO(https://crbug.com/1446302): Consider rejecting metadata that
+ // does not specify all values. + // does not specify all values.
+ if (mdcv->has_primaries || mdcv->has_luminance) { + if (mdcv->has_primaries || mdcv->has_luminance) {
+ hdr_metadata.smpte_st_2086 = smpte_st_2086; + 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 - // Treat dolby vision contents as dolby vision codec only if the
- // device support clear DV decoding, otherwise use the original - // device support clear DV decoding, otherwise use the original
- // HEVC or AVC codec and profile. - // HEVC or AVC codec and profile.
- if (media::IsDecoderSupportedVideoType(type)) { - if (media::IsSupportedVideoType(type)) {
- codec = type.codec; - codec = type.codec;
- profile = type.profile; - profile = type.profile;
- } - }
@@ -307,7 +307,7 @@ index 3c97e4a6cf4c7..a55e4ab51d5b3 100644
+ // Treat dolby vision contents as dolby vision codec only if the + // Treat dolby vision contents as dolby vision codec only if the
+ // device support clear DV decoding, otherwise use the original + // device support clear DV decoding, otherwise use the original
+ // HEVC or AVC codec and profile. + // HEVC or AVC codec and profile.
+ if (media::IsDecoderSupportedVideoType(type)) { + if (media::IsSupportedVideoType(type)) {
+ codec = type.codec; + codec = type.codec;
+ profile = type.profile; + profile = type.profile;
+ } + }

View File

@@ -0,0 +1,33 @@
From f9819bb70b413c8310cd209c75cc555495e28564 Mon Sep 17 00:00:00 2001
From: Allen Bauer <kylixrd@chromium.org>
Date: Fri, 31 May 2024 15:55:13 +0000
Subject: [PATCH] Harden DesktopNativeWidgetAura against a destroyed Widget.
Under CLIENT_OWNS_WIDGET ownership mode, it is possible for the Widget to have already been destroyed. This hardens the NativeWidget to handle this case without crashing.
Bug: 40242079, 40232479
Change-Id: I455e1690b49ff50e4eac3b9a085d9f15ccb6adec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5585758
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1308668}
---
ui/views/widget/desktop_aura/desktop_native_widget_aura.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 9ae19505357c6b..1974865e8c8a8f 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -431,8 +431,8 @@ DesktopNativeWidgetAura::tooltip_controller() {
}
void DesktopNativeWidgetAura::HandleActivationChanged(bool active) {
- DCHECK(native_widget_delegate_);
- if (!native_widget_delegate_->ShouldHandleNativeWidgetActivationChanged(
+ if (!native_widget_delegate_ ||
+ !native_widget_delegate_->ShouldHandleNativeWidgetActivationChanged(
active)) {
return;
}

View File

@@ -1,17 +1,17 @@
--- 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.orig 2023-02-08 21:38:09.974003318 +0100
+++ src/content/browser/renderer_host/render_frame_host_impl.cc 2024-12-20 14:29:00.900380913 +0100 +++ src/content/browser/renderer_host/render_frame_host_impl.cc 2023-02-13 14:13:50.217792624 +0100
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
#include <deque> #include <deque>
#include <limits> #include <limits>
#include <memory> #include <memory>
+#include <new> +#include <new>
#include <optional> #include <optional>
#include <string_view>
#include <tuple> #include <tuple>
@@ -2276,7 +2277,12 @@ RenderFrameHostImpl::~RenderFrameHostImp #include <unordered_map>
// completes. Among other things, this ensures that any `SafeRef`s from @@ -1818,7 +1819,12 @@ RenderFrameHostImpl::~RenderFrameHostImp
// `DocumentService` and `RenderFrameHostUserData` subclasses are still valid // `DocumentService` and `RenderFrameHostUserData` subclasses are still valid
// when their destructors run. // when their destructors run.
document_associated_data_->RemoveAllServices();
- document_associated_data_.reset(); - document_associated_data_.reset();
+ // HACK: Using .reset() here works on MSVC and LLVM libc++ because the std::optional + // 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++ + // is still valid while the destructor runs. This does not work on GNU libstdc++
@@ -22,7 +22,7 @@
// If this was the last active frame in the SiteInstanceGroup, the // If this was the last active frame in the SiteInstanceGroup, the
// DecrementActiveFrameCount call will trigger the deletion of the // DecrementActiveFrameCount call will trigger the deletion of the
@@ -14482,7 +14488,9 @@ bool RenderFrameHostImpl::DidCommitNavig @@ -13254,7 +13260,9 @@ bool RenderFrameHostImpl::DidCommitNavig
// RenderFrameHost commits before the navigation commits. This happens // RenderFrameHost commits before the navigation commits. This happens
// when the current RenderFrameHost crashes before navigating to a new // when the current RenderFrameHost crashes before navigating to a new
// URL. // URL.

View File

@@ -15,7 +15,7 @@
</conditions> </conditions>
<hardware> <hardware>
<memory> <memory>
<size unit="G">30</size> <!-- lto1-wpa does really need enormous amounts of memory --> <size unit="G">24</size>
</memory> </memory>
</hardware> </hardware>
</overwrite> </overwrite>
@@ -31,4 +31,16 @@
<jobs>8</jobs> <jobs>8</jobs>
</hardware> </hardware>
</overwrite> </overwrite>
<overwrite>
<conditions>
<arch>aarch64</arch>
<arch>armv7l</arch>
<arch>armv6l</arch>
</conditions>
<hardware>
<cpu>
<flag>asimdrdm</flag> <!-- prevent scheduling on old machines -->
</cpu>
</hardware>
</overwrite>
</constraints> </constraints>

View File

@@ -1,40 +0,0 @@
--- 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") {

View File

@@ -1,14 +0,0 @@
--- 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 <vulkan/vulkan.h>
#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

View File

@@ -0,0 +1,39 @@
From 2f934a47e9709cac9ce04d312b7aa496948bced6 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Mon, 18 Mar 2024 12:53:27 +0100
Subject: [PATCH] libstdc++: replace std::powf with std:pow
libstdc++ before GCC 14 does not provide std::powf. So replace the
call with std::pow, that provides an overload for floats.
For reference of the bug tracking the missing methods in libstdc++:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700
Bug: chromium:41455655
Change-Id: Idfb53fe3c71f4dc0198cf6ba3e26c07895f65bc6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5379670
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
---
src/libANGLE/renderer/vulkan/FramebufferVk.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
index 98831436adb..e88339521e6 100644
--- a/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
+++ b/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -1726,10 +1726,10 @@ angle::Result FramebufferVk::generateFragmentShadingRateWithCPU(
for (uint32_t point = 0; point < activeFocalPoints.size(); point++)
{
float density =
- 1.0f / std::max(std::powf(activeFocalPoints[point].focalX - px, 2) *
- std::powf(activeFocalPoints[point].gainX, 2) +
- std::powf(activeFocalPoints[point].focalY - py, 2) *
- std::powf(activeFocalPoints[point].gainY, 2) -
+ 1.0f / std::max(std::pow(activeFocalPoints[point].focalX - px, 2.0f) *
+ std::pow(activeFocalPoints[point].gainX, 2.0f) +
+ std::pow(activeFocalPoints[point].focalY - py, 2.0f) *
+ std::pow(activeFocalPoints[point].gainY, 2.0f) -
activeFocalPoints[point].foveaArea,
1.0f);

View File

@@ -1,62 +0,0 @@
From 397eb7c81ee996027470b2453b787e4947cdc8c0 Mon Sep 17 00:00:00 2001
From: Shahbaz Youssefi <syoussefi@chromium.org>
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 <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
---
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

View File

@@ -11,8 +11,8 @@
"src/common/base", "src/common/base",
- "src/common/third_party/xxhash", - "src/common/third_party/xxhash",
] ]
libs = []
if (is_android) { if (is_android) {
libs = [ "log" ]
@@ -431,18 +432,12 @@ @@ -431,18 +432,12 @@
} }
} }

View File

@@ -0,0 +1,98 @@
From e4d212302ed2e71c224ae67bdaf2a2816be34f21 Mon Sep 17 00:00:00 2001
From: Mattias Buelens <mattias.buelens@gmail.com>
Date: Tue, 26 Mar 2024 19:25:54 +0000
Subject: [PATCH] streams: Fix gcc compatibility for
ReadableStream::valuesForBinding()
The perfect forwarding technique we used turned out to be incompatible
with gcc. Revert to something simpler.
Bug: 40612900
Change-Id: I45f3588354fe96159c7f84d969ac222a935b1c1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5372645
Reviewed-by: Adam Rice <ricea@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1278534}
---
.../bindings/core/v8/async_iterable.h | 32 +++++++++----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/third_party/blink/renderer/bindings/core/v8/async_iterable.h b/third_party/blink/renderer/bindings/core/v8/async_iterable.h
index 115ee5303414c..8a0d085b8174e 100644
--- a/third_party/blink/renderer/bindings/core/v8/async_iterable.h
+++ b/third_party/blink/renderer/bindings/core/v8/async_iterable.h
@@ -200,42 +200,42 @@ class PairAsyncIterable {
PairAsyncIterable(const PairAsyncIterable&) = delete;
PairAsyncIterable& operator=(const PairAsyncIterable&) = delete;
+ template <typename... ArgsAndExceptionState>
AsyncIteratorType* keysForBinding(
ScriptState* script_state,
- std::convertible_to<InitArgs> auto&&... args,
- ExceptionState& exception_state) {
+ ArgsAndExceptionState&&... args_and_exception_state) {
const auto kind = IterationSource::Kind::kKey;
IterationSource* source = CreateIterationSource(
- script_state, kind, std::forward<decltype(args)>(args)...,
- exception_state);
+ script_state, kind,
+ std::forward<ArgsAndExceptionState>(args_and_exception_state)...);
if (!source) {
return nullptr;
}
return MakeGarbageCollected<AsyncIteratorType>(source);
}
+ template <typename... ArgsAndExceptionState>
AsyncIteratorType* valuesForBinding(
ScriptState* script_state,
- std::convertible_to<InitArgs> auto&&... args,
- ExceptionState& exception_state) {
+ ArgsAndExceptionState&&... args_and_exception_state) {
const auto kind = IterationSource::Kind::kValue;
IterationSource* source = CreateIterationSource(
- script_state, kind, std::forward<decltype(args)>(args)...,
- exception_state);
+ script_state, kind,
+ std::forward<ArgsAndExceptionState>(args_and_exception_state)...);
if (!source) {
return nullptr;
}
return MakeGarbageCollected<AsyncIteratorType>(source);
}
+ template <typename... ArgsAndExceptionState>
AsyncIteratorType* entriesForBinding(
ScriptState* script_state,
- std::convertible_to<InitArgs> auto&&... args,
- ExceptionState& exception_state) {
+ ArgsAndExceptionState&&... args_and_exception_state) {
const auto kind = IterationSource::Kind::kKeyValue;
IterationSource* source = CreateIterationSource(
- script_state, kind, std::forward<decltype(args)>(args)...,
- exception_state);
+ script_state, kind,
+ std::forward<ArgsAndExceptionState>(args_and_exception_state)...);
if (!source) {
return nullptr;
}
@@ -274,14 +274,14 @@ class ValueAsyncIterable {
ValueAsyncIterable(const ValueAsyncIterable&) = delete;
ValueAsyncIterable& operator=(const ValueAsyncIterable&) = delete;
+ template <typename... ArgsAndExceptionState>
AsyncIteratorType* valuesForBinding(
ScriptState* script_state,
- std::convertible_to<InitArgs> auto&&... args,
- ExceptionState& exception_state) {
+ ArgsAndExceptionState&&... args_and_exception_state) {
const auto kind = IterationSource::Kind::kValue;
IterationSource* source = CreateIterationSource(
- script_state, kind, std::forward<decltype(args)>(args)...,
- exception_state);
+ script_state, kind,
+ std::forward<ArgsAndExceptionState>(args_and_exception_state)...);
if (!source) {
return nullptr;
}

View File

@@ -1,12 +0,0 @@
--- 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<ui::AXPlatformNodeId>
: std::hash<base::StrongAlias<class ui::AXPlatformNodeIdTag, int32_t>> {};
-} // namespace std
#endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_ID_H_

250
bad-font-gc0.patch Normal file
View File

@@ -0,0 +1,250 @@
Revert the following commit:
commit 886c849ee96e3026d28d7615cdd5af9628a2e5c8
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Tue Feb 20 18:18:04 2024 +0000
[gc] Make UnicodeRangeSet gc'd.
There should be no user-visible behaviour change.
Bug: 41490008
Change-Id: I7f0003b7ff7c464d4ee36442bcff8c63da79b20c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302778
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262789}
--- a/third_party/blink/renderer/core/css/css_font_face.cc
+++ b/third_party/blink/renderer/core/css/css_font_face.cc
@@ -291,7 +291,6 @@ bool CSSFontFace::UpdatePeriod() {
void CSSFontFace::Trace(Visitor* visitor) const {
visitor->Trace(segmented_font_faces_);
visitor->Trace(sources_);
- visitor->Trace(ranges_);
visitor->Trace(font_face_);
}
--- a/third_party/blink/renderer/core/css/css_font_face.h
+++ b/third_party/blink/renderer/core/css/css_font_face.h
@@ -47,8 +47,8 @@ class SimpleFontData;
class CORE_EXPORT CSSFontFace final : public GarbageCollected<CSSFontFace> {
public:
- CSSFontFace(FontFace* font_face, HeapVector<UnicodeRange>&& ranges)
- : ranges_(MakeGarbageCollected<UnicodeRangeSet>(std::move(ranges))),
+ CSSFontFace(FontFace* font_face, Vector<UnicodeRange>& ranges)
+ : ranges_(base::AdoptRef(new UnicodeRangeSet(ranges))),
font_face_(font_face) {
DCHECK(font_face_);
}
@@ -61,7 +61,7 @@ class CORE_EXPORT CSSFontFace final : pu
}
FontFace* GetFontFace() const { return font_face_.Get(); }
- const UnicodeRangeSet* Ranges() { return ranges_.Get(); }
+ scoped_refptr<UnicodeRangeSet> Ranges() { return ranges_; }
void AddSegmentedFontFace(CSSSegmentedFontFace*);
void RemoveSegmentedFontFace(CSSSegmentedFontFace*);
@@ -98,9 +98,9 @@ class CORE_EXPORT CSSFontFace final : pu
private:
void SetLoadStatus(FontFace::LoadStatusType);
+ scoped_refptr<UnicodeRangeSet> ranges_;
HeapHashSet<Member<CSSSegmentedFontFace>> segmented_font_faces_;
HeapDeque<Member<CSSFontFaceSource>> sources_;
- Member<const UnicodeRangeSet> ranges_;
Member<FontFace> font_face_;
};
--- a/third_party/blink/renderer/core/css/font_face.cc
+++ b/third_party/blink/renderer/core/css/font_face.cc
@@ -90,7 +90,7 @@ const CSSValue* ParseCSSValue(const Exec
CSSFontFace* CreateCSSFontFace(FontFace* font_face,
const CSSValue* unicode_range) {
- HeapVector<UnicodeRange> ranges;
+ Vector<UnicodeRange> ranges;
if (const auto* range_list = To<CSSValueList>(unicode_range)) {
unsigned num_ranges = range_list->length();
for (unsigned i = 0; i < num_ranges; i++) {
@@ -100,7 +100,7 @@ CSSFontFace* CreateCSSFontFace(FontFace*
}
}
- return MakeGarbageCollected<CSSFontFace>(font_face, std::move(ranges));
+ return MakeGarbageCollected<CSSFontFace>(font_face, ranges);
}
const CSSValue* ConvertFontMetricOverrideValue(const CSSValue* parsed_value) {
--- a/third_party/blink/renderer/platform/fonts/font_data_for_range_set.h
+++ b/third_party/blink/renderer/platform/fonts/font_data_for_range_set.h
@@ -39,18 +39,16 @@ class SimpleFontData;
class PLATFORM_EXPORT FontDataForRangeSet
: public GarbageCollected<FontDataForRangeSet> {
public:
- explicit FontDataForRangeSet(const SimpleFontData* font_data = nullptr,
- const UnicodeRangeSet* range_set = nullptr)
- : font_data_(font_data), range_set_(range_set) {}
+ explicit FontDataForRangeSet(
+ const SimpleFontData* font_data = nullptr,
+ scoped_refptr<UnicodeRangeSet> range_set = nullptr)
+ : font_data_(font_data), range_set_(std::move(range_set)) {}
FontDataForRangeSet(const FontDataForRangeSet& other);
virtual ~FontDataForRangeSet() = default;
- void Trace(Visitor* visitor) const {
- visitor->Trace(font_data_);
- visitor->Trace(range_set_);
- }
+ void Trace(Visitor* visitor) const { visitor->Trace(font_data_); }
bool Contains(UChar32 test_char) const {
return !range_set_ || range_set_->Contains(test_char);
@@ -58,7 +56,7 @@ class PLATFORM_EXPORT FontDataForRangeSe
bool IsEntireRange() const {
return !range_set_ || range_set_->IsEntireRange();
}
- const UnicodeRangeSet* Ranges() const { return range_set_.Get(); }
+ UnicodeRangeSet* Ranges() const { return range_set_.get(); }
bool HasFontData() const { return font_data_; }
const SimpleFontData* FontData() const { return font_data_.Get(); }
@@ -74,7 +72,7 @@ class PLATFORM_EXPORT FontDataForRangeSe
protected:
Member<const SimpleFontData> font_data_;
- Member<const UnicodeRangeSet> range_set_;
+ scoped_refptr<UnicodeRangeSet> range_set_;
};
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
@@ -508,10 +508,10 @@ const OpenTypeVerticalData& HarfBuzzFace
return *harfbuzz_font_data_->VerticalData();
}
-hb_font_t* HarfBuzzFace::GetScaledFont(const UnicodeRangeSet* range_set,
+hb_font_t* HarfBuzzFace::GetScaledFont(scoped_refptr<UnicodeRangeSet> range_set,
VerticalLayoutCallbacks vertical_layout,
float specified_size) const {
- harfbuzz_font_data_->range_set_ = range_set;
+ harfbuzz_font_data_->range_set_ = std::move(range_set);
harfbuzz_font_data_->UpdateFallbackMetricsAndScale(*platform_data_,
vertical_layout);
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
@@ -66,7 +66,7 @@ class HarfBuzzFace final : public Garbag
// Passing in specified_size in order to control selecting the right value
// from the trak table. If not set, the size of the internal FontPlatformData
// object will be used.
- hb_font_t* GetScaledFont(const UnicodeRangeSet*,
+ hb_font_t* GetScaledFont(scoped_refptr<UnicodeRangeSet>,
VerticalLayoutCallbacks,
float specified_size) const;
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
@@ -32,7 +32,7 @@ struct HarfBuzzFontData final : public G
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
- void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
+ void Trace(Visitor*) const {}
// The vertical origin and vertical advance functions in HarfBuzzFace require
// the ascent and height metrics as fallback in case no specific vertical
@@ -98,7 +98,7 @@ struct HarfBuzzFontData final : public G
SpaceGlyphInOpenTypeTables::kUnknown;
scoped_refptr<OpenTypeVerticalData> vertical_data_;
- Member<const UnicodeRangeSet> range_set_;
+ scoped_refptr<UnicodeRangeSet> range_set_;
};
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
@@ -289,7 +289,7 @@ void RoundHarfBuzzBufferPositions(hb_buf
inline bool ShapeRange(hb_buffer_t* buffer,
const FontFeatures& font_features,
const SimpleFontData* current_font,
- const UnicodeRangeSet* current_font_range_set,
+ scoped_refptr<UnicodeRangeSet> current_font_range_set,
UScriptCode current_run_script,
hb_direction_t direction,
hb_language_t language,
@@ -325,7 +325,7 @@ inline bool ShapeRange(hb_buffer_t* buff
hb_buffer_set_direction(buffer, direction);
hb_font_t* hb_font =
- face->GetScaledFont(current_font_range_set,
+ face->GetScaledFont(std::move(current_font_range_set),
HB_DIRECTION_IS_VERTICAL(direction)
? HarfBuzzFace::kPrepareForVerticalLayout
: HarfBuzzFace::kNoVerticalLayout,
--- a/third_party/blink/renderer/platform/fonts/unicode_range_set.cc
+++ b/third_party/blink/renderer/platform/fonts/unicode_range_set.cc
@@ -31,8 +31,8 @@
namespace blink {
-UnicodeRangeSet::UnicodeRangeSet(HeapVector<UnicodeRange>&& ranges)
- : ranges_(std::move(ranges)) {
+UnicodeRangeSet::UnicodeRangeSet(const Vector<UnicodeRange>& ranges)
+ : ranges_(ranges) {
if (ranges_.empty())
return;
--- a/third_party/blink/renderer/platform/fonts/unicode_range_set.h
+++ b/third_party/blink/renderer/platform/fonts/unicode_range_set.h
@@ -26,12 +26,13 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_UNICODE_RANGE_SET_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_UNICODE_RANGE_SET_H_
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/platform_export.h"
+#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_uchar.h"
+#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
+#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
@@ -55,14 +56,13 @@ struct PLATFORM_EXPORT UnicodeRange fina
UChar32 to_;
};
-class PLATFORM_EXPORT UnicodeRangeSet
- : public GarbageCollected<UnicodeRangeSet> {
+class PLATFORM_EXPORT UnicodeRangeSet : public RefCounted<UnicodeRangeSet> {
+ USING_FAST_MALLOC(UnicodeRangeSet);
+
public:
- explicit UnicodeRangeSet(HeapVector<UnicodeRange>&&);
+ explicit UnicodeRangeSet(const Vector<UnicodeRange>&);
UnicodeRangeSet() = default;
- void Trace(Visitor* visitor) const { visitor->Trace(ranges_); }
-
bool Contains(UChar32) const;
bool IntersectsWith(const String&) const;
bool IsEntireRange() const { return ranges_.empty(); }
@@ -71,8 +71,7 @@ class PLATFORM_EXPORT UnicodeRangeSet
bool operator==(const UnicodeRangeSet& other) const;
private:
- HeapVector<UnicodeRange>
- ranges_; // If empty, represents the whole code space.
+ Vector<UnicodeRange> ranges_; // If empty, represents the whole code space.
};
} // namespace blink

159
bad-font-gc00.patch Normal file
View File

@@ -0,0 +1,159 @@
Revert the following commit:
commit 59daae50fc3c47f7a8dbcc828446fdaa9f8c12c4
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Tue Feb 20 18:35:11 2024 +0000
[gc] Make OpenTypeVerticalData gc'd.
There should be no user-visible behaviour change.
Bug: 41490008
Change-Id: Id93c85a7beb710944e07cff614cff2409c818436
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302893
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262805}
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.cc
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.cc
@@ -308,6 +308,11 @@ SkFont FontPlatformData::CreateSkFont(co
}
#endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_IOS)
+scoped_refptr<OpenTypeVerticalData> FontPlatformData::CreateVerticalData()
+ const {
+ return OpenTypeVerticalData::CreateUnscaled(typeface_);
+}
+
IdentifiableToken FontPlatformData::ComputeTypefaceDigest() const {
DCHECK(typeface_);
int table_count = typeface_->countTables();
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.h
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.h
@@ -59,6 +59,7 @@ typedef const struct __CTFont* CTFontRef
namespace blink {
class HarfBuzzFace;
+class OpenTypeVerticalData;
class PLATFORM_EXPORT FontPlatformData
: public GarbageCollected<FontPlatformData> {
@@ -137,6 +138,8 @@ class PLATFORM_EXPORT FontPlatformData
SkFont CreateSkFont(const FontDescription* = nullptr) const;
+ scoped_refptr<OpenTypeVerticalData> CreateVerticalData() const;
+
// Computes a digest from the typeface. The digest only depends on the
// underlying font itself, and does not vary by the style (size, weight,
// italics, etc). This is aimed at discovering the fingerprinting information
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
@@ -27,10 +27,10 @@
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/platform/fonts/glyph.h"
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
+#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkTypeface.h"
@@ -40,11 +40,14 @@ class SkFont;
namespace blink {
class PLATFORM_EXPORT OpenTypeVerticalData
- : public GarbageCollected<OpenTypeVerticalData> {
- public:
- explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
+ : public RefCounted<OpenTypeVerticalData> {
+ USING_FAST_MALLOC(OpenTypeVerticalData);
- void Trace(Visitor*) const {}
+ public:
+ static scoped_refptr<OpenTypeVerticalData> CreateUnscaled(
+ sk_sp<SkTypeface> typeface) {
+ return base::AdoptRef(new OpenTypeVerticalData(typeface));
+ }
void SetScaleAndFallbackMetrics(float size_per_unit,
float ascent,
@@ -60,6 +63,8 @@ class PLATFORM_EXPORT OpenTypeVerticalDa
float* out_xy_array) const;
private:
+ explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
+
void LoadMetrics(sk_sp<SkTypeface>);
bool HasVORG() const { return !vert_origin_y_.empty(); }
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
@@ -167,7 +167,8 @@ static hb_bool_t HarfBuzzGetGlyphVertica
void* user_data) {
HarfBuzzFontData* hb_font_data =
reinterpret_cast<HarfBuzzFontData*>(font_data);
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
+ hb_font_data->VerticalData();
if (!vertical_data)
return false;
@@ -186,7 +187,8 @@ static hb_position_t HarfBuzzGetGlyphVer
void* user_data) {
HarfBuzzFontData* hb_font_data =
reinterpret_cast<HarfBuzzFontData*>(font_data);
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
+ hb_font_data->VerticalData();
if (!vertical_data) {
return SkiaScalarToHarfBuzzPosition(hb_font_data->height_fallback_);
}
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
@@ -32,10 +32,7 @@ struct HarfBuzzFontData final : public G
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
- void Trace(Visitor* visitor) const {
- visitor->Trace(vertical_data_);
- visitor->Trace(range_set_);
- }
+ void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
// The vertical origin and vertical advance functions in HarfBuzzFace require
// the ascent and height metrics as fallback in case no specific vertical
@@ -70,18 +67,18 @@ struct HarfBuzzFontData final : public G
}
}
- OpenTypeVerticalData* VerticalData() {
+ scoped_refptr<OpenTypeVerticalData> VerticalData() {
if (!vertical_data_) {
DCHECK_NE(ascent_fallback_, kInvalidFallbackMetricsValue);
DCHECK_NE(height_fallback_, kInvalidFallbackMetricsValue);
DCHECK_NE(size_per_unit_, kInvalidFallbackMetricsValue);
vertical_data_ =
- MakeGarbageCollected<OpenTypeVerticalData>(font_.refTypeface());
+ OpenTypeVerticalData::CreateUnscaled(font_.refTypeface());
}
vertical_data_->SetScaleAndFallbackMetrics(size_per_unit_, ascent_fallback_,
height_fallback_);
- return vertical_data_.Get();
+ return vertical_data_;
}
const hb::unique_ptr<hb_font_t> unscaled_font_;
@@ -100,7 +97,7 @@ struct HarfBuzzFontData final : public G
SpaceGlyphInOpenTypeTables space_in_gsub_ =
SpaceGlyphInOpenTypeTables::kUnknown;
- Member<OpenTypeVerticalData> vertical_data_;
+ scoped_refptr<OpenTypeVerticalData> vertical_data_;
Member<const UnicodeRangeSet> range_set_;
};

107
bad-font-gc000.patch Normal file
View File

@@ -0,0 +1,107 @@
Revert the following commit:
commit 5ffa0446f51e34d06dc0539810a8a5d35ec9e3fc
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Thu Feb 22 17:08:22 2024 +0000
[fonts][perf] Explicitly leak SimpleFontDatas via a LRU cache.
This adds a strong LRU cache to FontDataCache to retain the most
recently used fonts.
This covers the case where a large amount of DOM is destroyed, and
previously we'd release all the font related objects if the GC kicked
in.
Speedometer3 appears to peak at ~75 objects in the cache.
Results for different cache sizes:
Cache size: 64 | 32 | 16
Speedometer3: +0.9% | +0.5% | +0%
Bug: 41490008
Change-Id: I131b6a79f246e61e13a7d44dddbc1f9e625ed44a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5314842
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1264027}
--- a/third_party/blink/renderer/platform/fonts/font_data_cache.cc
+++ b/third_party/blink/renderer/platform/fonts/font_data_cache.cc
@@ -36,15 +36,6 @@
namespace blink {
-namespace {
-
-// The maximum number of strong references to retain via the LRU.
-// This explicitly leaks fonts (and related objects) unless under extreme
-// memory pressure where it will be cleared. DO NOT increase unnecessarily.
-const wtf_size_t kMaxSize = 64;
-
-} // namespace
-
const SimpleFontData* FontDataCache::Get(const FontPlatformData* platform_data,
bool subpixel_ascent_descent) {
if (!platform_data)
@@ -64,16 +55,7 @@ const SimpleFontData* FontDataCache::Get
add_result.stored_value->value = MakeGarbageCollected<SimpleFontData>(
platform_data, nullptr, subpixel_ascent_descent);
}
-
- const SimpleFontData* result = add_result.stored_value->value;
-
- // Update our LRU to keep a strong reference to `result`.
- strong_reference_lru_.PrependOrMoveToFirst(result);
- while (strong_reference_lru_.size() > kMaxSize) {
- strong_reference_lru_.pop_back();
- }
-
- return result;
+ return add_result.stored_value->value;
}
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/font_data_cache.h
+++ b/third_party/blink/renderer/platform/fonts/font_data_cache.h
@@ -34,7 +34,6 @@
#include "third_party/blink/renderer/platform/fonts/font_platform_data.h"
#include "third_party/blink/renderer/platform/fonts/simple_font_data.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_linked_hash_set.h"
namespace blink {
@@ -59,29 +58,17 @@ class FontDataCache final {
FontDataCache(const FontDataCache&) = delete;
FontDataCache& operator=(const FontDataCache&) = delete;
- void Trace(Visitor* visitor) const {
- visitor->Trace(cache_);
- visitor->Trace(strong_reference_lru_);
- }
+ void Trace(Visitor* visitor) const { visitor->Trace(cache_); }
const SimpleFontData* Get(const FontPlatformData*,
bool subpixel_ascent_descent = false);
- void Clear() {
- cache_.clear();
- strong_reference_lru_.clear();
- }
+ void Clear() { cache_.clear(); }
private:
HeapHashMap<Member<const FontPlatformData>,
WeakMember<const SimpleFontData>,
FontDataCacheKeyHashTraits>
cache_;
-
- // The above `cache_` is weak, meaning its entries will potentially be
- // cleared if no other references exist.
- // This LRU keeps a small (limited) number of strong references alive so they
- // won't be cleared in the above cache for performance reasons.
- HeapLinkedHashSet<Member<const SimpleFontData>> strong_reference_lru_;
};
} // namespace blink

425
bad-font-gc0000.patch Normal file
View File

@@ -0,0 +1,425 @@
Revert the following commit:
commit cc6c0b2a9e1dbc96f3ebed713dc71960a29dc4f1
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Tue Mar 5 20:27:13 2024 +0000
Reland "[gc] Make FontFamily immutable."
This reverts commit 748ed11510ec5bb09cc8b92f67f1f62964f023fa.
Reason for revert: Previous patch which caused MSAN issue was reapplied.
Original change's description:
> Revert "[gc] Make FontFamily immutable."
>
> This reverts commit ca3d3085d8b01fc74623d639c615fc57842cd26d.
>
> Reason for revert: crrev.com/c/5328767 is the reason for failure on some tests on MSAN. Please see crbug.com/327969288 for more details.
>
> Original change's description:
> > [gc] Make FontFamily immutable.
> >
> > Previously we'd build up font-family lists front to back, but would
> > need to mutate them to do so. Instead just build them backwards.
> >
> > This removes a bunch of problematic APIs (like AppendFamily - which
> > doesn't append), and simplifies the code.
> >
> > This will help avoid atomic write barriers once converted to oilpan.
> >
> > Bug: 41490008
> > Change-Id: Icfcec2d0a1716585cf42985616c02b42b6647943
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5322929
> > Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
> > Reviewed-by: Dominik Röttsches <drott@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1267168}
>
> Bug: 41490008, 327969288
> Change-Id: Ic69a5707d00cc98b97dcae3f4b8207b452ce5cbd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5333950
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
> Owners-Override: Taiyo Mizuhashi <taiyo@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1267674}
Bug: 41490008, 327969288
Change-Id: If1d395e324b0be15488ef5410e9bcdb219bb19c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5344844
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1268654}
--- a/third_party/blink/renderer/core/css/css_font_face.cc
+++ b/third_party/blink/renderer/core/css/css_font_face.cc
@@ -216,8 +216,9 @@ bool CSSFontFace::MaybeLoadFont(const Fo
void CSSFontFace::Load() {
FontDescription font_description;
- font_description.SetFamily(
- FontFamily(font_face_->family(), FontFamily::Type::kFamilyName));
+ FontFamily font_family;
+ font_family.SetFamily(font_face_->family(), FontFamily::Type::kFamilyName);
+ font_description.SetFamily(font_family);
Load(font_description);
}
--- a/third_party/blink/renderer/core/css/font_face_set_document.cc
+++ b/third_party/blink/renderer/core/css/font_face_set_document.cc
@@ -195,10 +195,13 @@ bool FontFaceSetDocument::ResolveFontSty
ComputedStyleBuilder builder =
GetDocument()->GetStyleResolver().CreateComputedStyleBuilder();
- FontDescription default_font_description;
- default_font_description.SetFamily(FontFamily(
+ FontFamily font_family;
+ font_family.SetFamily(
FontFaceSet::DefaultFontFamily(),
- FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily())));
+ FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily()));
+
+ FontDescription default_font_description;
+ default_font_description.SetFamily(font_family);
default_font_description.SetSpecifiedSize(FontFaceSet::kDefaultFontSize);
default_font_description.SetComputedSize(FontFaceSet::kDefaultFontSize);
--- a/third_party/blink/renderer/core/css/font_face_set_worker.cc
+++ b/third_party/blink/renderer/core/css/font_face_set_worker.cc
@@ -84,10 +84,13 @@ bool FontFaceSetWorker::ResolveFontStyle
return false;
}
- FontDescription default_font_description;
- default_font_description.SetFamily(FontFamily(
+ FontFamily font_family;
+ font_family.SetFamily(
FontFaceSet::DefaultFontFamily(),
- FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily())));
+ FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily()));
+
+ FontDescription default_font_description;
+ default_font_description.SetFamily(font_family);
default_font_description.SetSpecifiedSize(FontFaceSet::kDefaultFontSize);
default_font_description.SetComputedSize(FontFaceSet::kDefaultFontSize);
--- a/third_party/blink/renderer/core/css/resolver/font_builder.cc
+++ b/third_party/blink/renderer/core/css/resolver/font_builder.cc
@@ -54,9 +54,11 @@ void FontBuilder::DidChangeWritingMode()
}
FontFamily FontBuilder::StandardFontFamily() const {
+ FontFamily family;
const AtomicString& standard_font_family = StandardFontFamilyName();
- return FontFamily(standard_font_family,
- FontFamily::InferredTypeFor(standard_font_family));
+ family.SetFamily(standard_font_family,
+ FontFamily::InferredTypeFor(standard_font_family));
+ return family;
}
AtomicString FontBuilder::StandardFontFamilyName() const {
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
@@ -379,8 +379,8 @@ FontDescription::FamilyDescription Style
if (const auto* system_font =
DynamicTo<cssvalue::CSSPendingSystemFontValue>(value)) {
- desc.family = FontFamily(system_font->ResolveFontFamily(),
- FontFamily::Type::kFamilyName);
+ desc.family.SetFamily(system_font->ResolveFontFamily(),
+ FontFamily::Type::kFamilyName);
return desc;
}
@@ -410,8 +410,10 @@ FontDescription::FamilyDescription Style
// Take the previous value and wrap it in a `SharedFontFamily` adding to
// the linked list.
if (has_value) {
- next =
- SharedFontFamily::Create(family_name, family_type, std::move(next));
+ scoped_refptr<SharedFontFamily> shared = SharedFontFamily::Create();
+ shared->SetFamily(family_name, family_type);
+ shared->AppendFamily(next);
+ next = shared;
}
family_name = next_family_name;
family_type = is_generic ? FontFamily::Type::kGenericFamily
@@ -442,7 +444,8 @@ FontDescription::FamilyDescription Style
}
#endif
- desc.family = FontFamily(family_name, family_type, std::move(next));
+ desc.family.SetFamily(family_name, family_type);
+ desc.family.AppendFamily(next);
return desc;
}
--- a/third_party/blink/renderer/core/html/canvas/canvas_font_cache.cc
+++ b/third_party/blink/renderer/core/html/canvas/canvas_font_cache.cc
@@ -29,9 +29,11 @@ const int defaultFontSize = 10;
const ComputedStyle* CreateDefaultFontStyle(const Document& document) {
const AtomicString& default_font_family = font_family_names::kSansSerif;
+ FontFamily font_family;
+ font_family.SetFamily(default_font_family,
+ FontFamily::InferredTypeFor(default_font_family));
FontDescription default_font_description;
- default_font_description.SetFamily(FontFamily(
- default_font_family, FontFamily::InferredTypeFor(default_font_family)));
+ default_font_description.SetFamily(font_family);
default_font_description.SetSpecifiedSize(defaultFontSize);
default_font_description.SetComputedSize(defaultFontSize);
ComputedStyleBuilder builder =
--- a/third_party/blink/renderer/core/page/drag_image.cc
+++ b/third_party/blink/renderer/core/page/drag_image.cc
@@ -127,9 +127,11 @@ static Font DeriveDragLabelFont(int size
const AtomicString& family =
LayoutThemeFontProvider::SystemFontFamily(CSSValueID::kNone);
+ FontFamily font_family;
+ font_family.SetFamily(family, FontFamily::InferredTypeFor(family));
+
FontDescription description;
- description.SetFamily(
- FontFamily(family, FontFamily::InferredTypeFor(family)));
+ description.SetFamily(font_family);
description.SetWeight(font_weight);
description.SetSpecifiedSize(size);
description.SetComputedSize(size);
--- a/third_party/blink/renderer/core/paint/embedded_object_painter.cc
+++ b/third_party/blink/renderer/core/paint/embedded_object_painter.cc
@@ -32,9 +32,11 @@ static Font ReplacementTextFont(const Do
const float size = LayoutThemeFontProvider::SystemFontSize(
CSSValueID::kWebkitSmallControl, document);
+ FontFamily font_family;
+ font_family.SetFamily(family, FontFamily::InferredTypeFor(family));
+
FontDescription font_description;
- font_description.SetFamily(
- FontFamily(family, FontFamily::InferredTypeFor(family)));
+ font_description.SetFamily(font_family);
font_description.SetWeight(kBoldWeightValue);
font_description.SetSpecifiedSize(size);
font_description.SetComputedSize(size);
--- a/third_party/blink/renderer/platform/exported/web_font_description.cc
+++ b/third_party/blink/renderer/platform/exported/web_font_description.cc
@@ -49,10 +49,13 @@ WebFontDescription::WebFontDescription(c
}
WebFontDescription::operator FontDescription() const {
+ FontFamily font_family;
+ font_family.SetFamily(family, family_is_generic
+ ? FontFamily::Type::kGenericFamily
+ : FontFamily::Type::kFamilyName);
+
FontDescription desc;
- desc.SetFamily(FontFamily(family, family_is_generic
- ? FontFamily::Type::kGenericFamily
- : FontFamily::Type::kFamilyName));
+ desc.SetFamily(font_family);
desc.SetGenericFamily(
static_cast<FontDescription::GenericFamilyType>(generic_family));
desc.SetSpecifiedSize(size);
--- a/third_party/blink/renderer/platform/fonts/font_description.h
+++ b/third_party/blink/renderer/platform/fonts/font_description.h
@@ -195,6 +195,7 @@ class PLATFORM_EXPORT FontDescription {
FamilyDescription GetFamilyDescription() const {
return FamilyDescription(GenericFamily(), Family());
}
+ FontFamily& FirstFamily() { return family_list_; }
const FontFamily& FirstFamily() const { return family_list_; }
Size GetSize() const {
return Size(KeywordSize(), SpecifiedSize(), IsAbsoluteSize());
@@ -450,6 +451,10 @@ class PLATFORM_EXPORT FontDescription {
return fields_.subpixel_ascent_descent_;
}
+ void SetHashCategory(HashCategory category) {
+ fields_.hash_category_ = category;
+ }
+
HashCategory GetHashCategory() const {
return static_cast<HashCategory>(fields_.hash_category_);
}
--- a/third_party/blink/renderer/platform/fonts/font_fallback_list.cc
+++ b/third_party/blink/renderer/platform/fonts/font_fallback_list.cc
@@ -178,8 +178,9 @@ const FontData* FontFallbackList::GetFon
if (font_selector_) {
// Try the user's preferred standard font.
- FontFamily font_family(font_family_names::kWebkitStandard,
- FontFamily::Type::kGenericFamily);
+ FontFamily font_family;
+ font_family.SetFamily(font_family_names::kWebkitStandard,
+ FontFamily::Type::kGenericFamily);
if (const FontData* data =
font_selector_->GetFontData(font_description, font_family)) {
return data;
--- a/third_party/blink/renderer/platform/fonts/font_family.cc
+++ b/third_party/blink/renderer/platform/fonts/font_family.cc
@@ -49,6 +49,20 @@ bool operator==(const FontFamily& a, con
return true;
}
+wtf_size_t FontFamily::CountNames() const {
+ wtf_size_t count = 0;
+ for (const FontFamily* font_family = this; font_family;
+ font_family = font_family->Next())
+ ++count;
+ return count;
+}
+
+void FontFamily::AppendFamily(AtomicString family_name, Type family_type) {
+ scoped_refptr<SharedFontFamily> appended_family = SharedFontFamily::Create();
+ appended_family->SetFamily(family_name, family_type);
+ AppendFamily(appended_family);
+}
+
String FontFamily::ToString() const {
StringBuilder builder;
builder.Append(family_name_);
--- a/third_party/blink/renderer/platform/fonts/font_family.h
+++ b/third_party/blink/renderer/platform/fonts/font_family.h
@@ -39,18 +39,16 @@ class PLATFORM_EXPORT FontFamily {
DISALLOW_NEW();
public:
- // https://drafts.csswg.org/css-fonts/#font-family-prop
- enum class Type : uint8_t { kFamilyName, kGenericFamily };
-
- FontFamily(const AtomicString& family_name,
- Type family_type,
- scoped_refptr<SharedFontFamily> next = nullptr)
- : family_name_(family_name),
- next_(std::move(next)),
- family_type_(family_type) {}
FontFamily() = default;
~FontFamily();
+ // https://drafts.csswg.org/css-fonts/#font-family-prop
+ enum class Type : uint8_t { kFamilyName, kGenericFamily };
+
+ void SetFamily(const AtomicString& family_name, Type family_type) {
+ family_name_ = family_name;
+ family_type_ = family_type;
+ }
// Return this font family's name. Note that it is never quoted nor escaped.
// For web-exposed serialization, please rely instead on the functions
// ComputedStyleUtils::ValueForFontFamily(const FontFamily&) and
@@ -59,8 +57,13 @@ class PLATFORM_EXPORT FontFamily {
const AtomicString& FamilyName() const { return family_name_; }
bool FamilyIsGeneric() const { return family_type_ == Type::kGenericFamily; }
+ // Returns number of linked `FontFamily` including `this`, so return value is
+ // greater than or equal to 1. When `Next()` is `nullptr`, return value is 1.
+ wtf_size_t CountNames() const;
const FontFamily* Next() const;
+ void AppendFamily(scoped_refptr<SharedFontFamily>);
+ void AppendFamily(AtomicString family_name, Type family_type);
scoped_refptr<SharedFontFamily> ReleaseNext();
bool IsPrewarmed() const { return is_prewarmed_; }
@@ -93,19 +96,12 @@ class PLATFORM_EXPORT SharedFontFamily :
SharedFontFamily(const SharedFontFamily&) = delete;
SharedFontFamily& operator=(const SharedFontFamily&) = delete;
- static scoped_refptr<SharedFontFamily> Create(
- const AtomicString& family_name,
- Type family_type,
- scoped_refptr<SharedFontFamily> next = nullptr) {
- return base::AdoptRef(
- new SharedFontFamily(family_name, family_type, std::move(next)));
+ static scoped_refptr<SharedFontFamily> Create() {
+ return base::AdoptRef(new SharedFontFamily);
}
private:
- SharedFontFamily(const AtomicString& family_name,
- Type family_type,
- scoped_refptr<SharedFontFamily> next)
- : FontFamily(family_name, family_type, std::move(next)) {}
+ SharedFontFamily() = default;
};
PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&);
@@ -125,6 +121,10 @@ inline const FontFamily* FontFamily::Nex
return next_.get();
}
+inline void FontFamily::AppendFamily(scoped_refptr<SharedFontFamily> family) {
+ next_ = std::move(family);
+}
+
inline scoped_refptr<SharedFontFamily> FontFamily::ReleaseNext() {
return std::move(next_);
}
--- a/third_party/blink/renderer/platform/graphics/placeholder_image.cc
+++ b/third_party/blink/renderer/platform/graphics/placeholder_image.cc
@@ -85,18 +85,23 @@ void DrawCenteredIcon(cc::PaintCanvas* c
}
FontDescription CreatePlaceholderFontDescription(float scale_factor) {
- scoped_refptr<SharedFontFamily> arial = SharedFontFamily::Create(
- font_family_names::kArial, FontFamily::Type::kFamilyName);
- scoped_refptr<SharedFontFamily> helvetica = SharedFontFamily::Create(
- font_family_names::kHelvetica, FontFamily::Type::kFamilyName, arial);
- scoped_refptr<SharedFontFamily> helvetica_neue =
- SharedFontFamily::Create(font_family_names::kHelveticaNeue,
- FontFamily::Type::kFamilyName, helvetica);
- FontFamily roboto(font_family_names::kRoboto, FontFamily::Type::kFamilyName,
- helvetica_neue);
-
FontDescription description;
- description.SetFamily(roboto);
+ description.FirstFamily().SetFamily(font_family_names::kRoboto,
+ FontFamily::Type::kFamilyName);
+
+ scoped_refptr<SharedFontFamily> helvetica_neue = SharedFontFamily::Create();
+ helvetica_neue->SetFamily(font_family_names::kHelveticaNeue,
+ FontFamily::Type::kFamilyName);
+ scoped_refptr<SharedFontFamily> helvetica = SharedFontFamily::Create();
+ helvetica->SetFamily(font_family_names::kHelvetica,
+ FontFamily::Type::kFamilyName);
+ scoped_refptr<SharedFontFamily> arial = SharedFontFamily::Create();
+ arial->SetFamily(font_family_names::kArial, FontFamily::Type::kFamilyName);
+
+ helvetica->AppendFamily(std::move(arial));
+ helvetica_neue->AppendFamily(std::move(helvetica));
+ description.FirstFamily().AppendFamily(std::move(helvetica_neue));
+
description.SetGenericFamily(FontDescription::kSansSerifFamily);
description.SetComputedSize(scale_factor * kFontSize);
description.SetWeight(FontSelectionValue(500));
--- a/third_party/blink/renderer/platform/testing/font_test_helpers.cc
+++ b/third_party/blink/renderer/platform/testing/font_test_helpers.cc
@@ -127,9 +127,11 @@ Font CreateTestFont(const AtomicString&
size_t data_size,
float size,
const FontDescription::VariantLigatures* ligatures) {
+ FontFamily family;
+ family.SetFamily(family_name, FontFamily::Type::kFamilyName);
+
FontDescription font_description;
- font_description.SetFamily(
- FontFamily(family_name, FontFamily::Type::kFamilyName));
+ font_description.SetFamily(family);
font_description.SetSpecifiedSize(size);
font_description.SetComputedSize(size);
if (ligatures)
@@ -143,9 +145,11 @@ Font CreateTestFont(const AtomicString&
float size,
const FontDescription::VariantLigatures* ligatures,
void (*init_font_description)(FontDescription*)) {
+ FontFamily family;
+ family.SetFamily(family_name, FontFamily::Type::kFamilyName);
+
FontDescription font_description;
- font_description.SetFamily(
- FontFamily(family_name, FontFamily::Type::kFamilyName));
+ font_description.SetFamily(family);
font_description.SetSpecifiedSize(size);
font_description.SetComputedSize(size);
if (ligatures)

258
bad-font-gc1.patch Normal file
View File

@@ -0,0 +1,258 @@
This is a revert of the commit below. While it doesn't strictly fix any
bugs, it's needed to support bad-font-gc2.patch building.
commit 9a8fc2e22363c954af239c06798bf85a9c928295
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Wed Feb 14 19:35:11 2024 +0000
[gc] Make FontCustomPlatformData gc'd.
There should be no user-visible behaviour change.
Bug: 41490008
Change-Id: I6364bf4c5b5dce9f99d8e2d7e1f84537c5493c33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5293060
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1260637}
--- a/third_party/blink/renderer/core/css/binary_data_font_face_source.cc
+++ b/third_party/blink/renderer/core/css/binary_data_font_face_source.cc
@@ -27,16 +27,13 @@ BinaryDataFontFaceSource::BinaryDataFont
return;
}
probe::FontsUpdated(context, font_face, String(),
- custom_platform_data_.Get());
+ custom_platform_data_.get());
}
-void BinaryDataFontFaceSource::Trace(Visitor* visitor) const {
- visitor->Trace(custom_platform_data_);
- CSSFontFaceSource::Trace(visitor);
-}
+BinaryDataFontFaceSource::~BinaryDataFontFaceSource() = default;
bool BinaryDataFontFaceSource::IsValid() const {
- return custom_platform_data_;
+ return custom_platform_data_.get();
}
SimpleFontData* BinaryDataFontFaceSource::CreateFontData(
--- a/third_party/blink/renderer/core/css/binary_data_font_face_source.h
+++ b/third_party/blink/renderer/core/css/binary_data_font_face_source.h
@@ -16,14 +16,14 @@ class FontCustomPlatformData;
class BinaryDataFontFaceSource final : public CSSFontFaceSource {
public:
BinaryDataFontFaceSource(CSSFontFace*, SharedBuffer*, String&);
- void Trace(Visitor*) const override;
+ ~BinaryDataFontFaceSource() override;
bool IsValid() const override;
private:
SimpleFontData* CreateFontData(const FontDescription&,
const FontSelectionCapabilities&) override;
- Member<const FontCustomPlatformData> custom_platform_data_;
+ scoped_refptr<FontCustomPlatformData> custom_platform_data_;
};
} // namespace blink
--- a/third_party/blink/renderer/core/css/remote_font_face_source.cc
+++ b/third_party/blink/renderer/core/css/remote_font_face_source.cc
@@ -262,7 +262,7 @@ void RemoteFontFaceSource::NotifyFinishe
FontInvalidationReason::kFontFaceLoaded);
if (custom_font_data_) {
probe::FontsUpdated(execution_context, face_->GetFontFace(),
- resource->Url().GetString(), custom_font_data_.Get());
+ resource->Url().GetString(), custom_font_data_.get());
}
}
}
@@ -456,7 +456,6 @@ void RemoteFontFaceSource::BeginLoadIfNe
void RemoteFontFaceSource::Trace(Visitor* visitor) const {
visitor->Trace(face_);
visitor->Trace(font_selector_);
- visitor->Trace(custom_font_data_);
CSSFontFaceSource::Trace(visitor);
FontResourceClient::Trace(visitor);
}
--- a/third_party/blink/renderer/core/css/remote_font_face_source.h
+++ b/third_party/blink/renderer/core/css/remote_font_face_source.h
@@ -43,7 +43,7 @@ class RemoteFontFaceSource final : publi
bool IsPendingDataUrl() const override;
const FontCustomPlatformData* GetCustomPlaftormData() const override {
- return custom_font_data_.Get();
+ return custom_font_data_.get();
}
void BeginLoadIfNeeded() override;
@@ -157,7 +157,7 @@ class RemoteFontFaceSource final : publi
Member<FontSelector> font_selector_;
// |nullptr| if font is not loaded or failed to decode.
- Member<const FontCustomPlatformData> custom_font_data_;
+ scoped_refptr<FontCustomPlatformData> custom_font_data_;
// |nullptr| if font is not loaded or failed to decode.
String url_;
--- a/third_party/blink/renderer/core/loader/resource/font_resource.cc
+++ b/third_party/blink/renderer/core/loader/resource/font_resource.cc
@@ -112,7 +112,7 @@ void FontResource::StartLoadLimitTimersI
kFontLoadWaitLong);
}
-const FontCustomPlatformData* FontResource::GetCustomFontData() {
+scoped_refptr<FontCustomPlatformData> FontResource::GetCustomFontData() {
if (!font_data_ && !ErrorOccurred() && !IsLoading()) {
if (Data()) {
auto decode_start_time = base::TimeTicks::Now();
@@ -225,7 +225,6 @@ void FontResource::AddClearDataObserver(
}
void FontResource::Trace(Visitor* visitor) const {
- visitor->Trace(font_data_);
visitor->Trace(clear_data_observers_);
Resource::Trace(visitor);
}
--- a/third_party/blink/renderer/core/loader/resource/font_resource.h
+++ b/third_party/blink/renderer/core/loader/resource/font_resource.h
@@ -72,7 +72,7 @@ class CORE_EXPORT FontResource final : p
String OtsParsingMessage() const { return ots_parsing_message_; }
- const FontCustomPlatformData* GetCustomFontData();
+ scoped_refptr<FontCustomPlatformData> GetCustomFontData();
// Returns true if the loading priority of the remote font resource can be
// lowered. The loading priority of the font can be lowered only if the
@@ -112,7 +112,7 @@ class CORE_EXPORT FontResource final : p
kMaxValue = kLongLimitExceeded,
};
- Member<FontCustomPlatformData> font_data_;
+ scoped_refptr<FontCustomPlatformData> font_data_;
String ots_parsing_message_;
LoadLimitState load_limit_state_;
bool cors_failed_;
--- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
+++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
@@ -115,7 +115,7 @@ const FontPlatformData* FontCustomPlatfo
const ResolvedFontFeatures& resolved_font_features,
FontOrientation orientation,
const FontVariationSettings* variation_settings,
- const FontPalette* palette) const {
+ const FontPalette* palette) {
DCHECK(base_typeface_);
sk_sp<SkTypeface> return_typeface = base_typeface_;
@@ -304,7 +304,7 @@ String FontCustomPlatformData::FamilyNam
localized_string.fString.size());
}
-FontCustomPlatformData* FontCustomPlatformData::Create(
+scoped_refptr<FontCustomPlatformData> FontCustomPlatformData::Create(
SharedBuffer* buffer,
String& ots_parse_message) {
DCHECK(buffer);
@@ -321,8 +321,8 @@ FontCustomPlatformData* FontCustomPlatfo
if (v8::Isolate* isolate = v8::Isolate::TryGetCurrent()) {
isolate->AdjustAmountOfExternalAllocatedMemory(data_size);
}
- return MakeGarbageCollected<FontCustomPlatformData>(std::move(typeface),
- data_size);
+ return base::AdoptRef(
+ new FontCustomPlatformData(std::move(typeface), data_size));
}
bool FontCustomPlatformData::MayBeIconFont() const {
--- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.h
+++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.h
@@ -39,7 +39,6 @@
#include "third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.h"
#include "third_party/blink/renderer/platform/fonts/resolved_font_features.h"
#include "third_party/blink/renderer/platform/fonts/text_rendering_mode.h"
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
@@ -55,17 +54,16 @@ class FontPlatformData;
class FontVariationSettings;
class PLATFORM_EXPORT FontCustomPlatformData
- : public GarbageCollected<FontCustomPlatformData> {
+ : public RefCounted<FontCustomPlatformData> {
+ USING_FAST_MALLOC(FontCustomPlatformData);
+
public:
- static FontCustomPlatformData* Create(SharedBuffer*,
- String& ots_parse_message);
- FontCustomPlatformData(sk_sp<SkTypeface>, size_t data_size);
+ static scoped_refptr<FontCustomPlatformData> Create(SharedBuffer*,
+ String& ots_parse_message);
FontCustomPlatformData(const FontCustomPlatformData&) = delete;
FontCustomPlatformData& operator=(const FontCustomPlatformData&) = delete;
~FontCustomPlatformData();
- void Trace(Visitor*) const {}
-
// The size argument should come from EffectiveFontSize() and
// adjusted_specified_size should come from AdjustedSpecifiedSize() of
// FontDescription. The latter is needed for correctly applying
@@ -82,7 +80,7 @@ class PLATFORM_EXPORT FontCustomPlatform
const ResolvedFontFeatures& resolved_font_features,
FontOrientation = FontOrientation::kHorizontal,
const FontVariationSettings* = nullptr,
- const FontPalette* = nullptr) const;
+ const FontPalette* = nullptr);
String FamilyNameForInspector() const;
@@ -93,6 +91,7 @@ class PLATFORM_EXPORT FontCustomPlatform
bool MayBeIconFont() const;
private:
+ FontCustomPlatformData(sk_sp<SkTypeface>, size_t data_size);
sk_sp<SkTypeface> base_typeface_;
size_t data_size_;
--- a/third_party/blink/renderer/platform/testing/font_test_helpers.cc
+++ b/third_party/blink/renderer/platform/testing/font_test_helpers.cc
@@ -29,7 +29,7 @@ class TestFontSelector : public FontSele
static TestFontSelector* Create(const uint8_t* data, size_t size) {
scoped_refptr<SharedBuffer> font_buffer = SharedBuffer::Create(data, size);
String ots_parse_message;
- FontCustomPlatformData* font_custom_platform_data =
+ scoped_refptr<FontCustomPlatformData> font_custom_platform_data =
FontCustomPlatformData::Create(font_buffer.get(), ots_parse_message);
if (!font_custom_platform_data)
return nullptr;
@@ -37,17 +37,12 @@ class TestFontSelector : public FontSele
std::move(font_custom_platform_data));
}
- TestFontSelector(FontCustomPlatformData* custom_platform_data)
- : custom_platform_data_(custom_platform_data) {
+ TestFontSelector(scoped_refptr<FontCustomPlatformData> custom_platform_data)
+ : custom_platform_data_(std::move(custom_platform_data)) {
DCHECK(custom_platform_data_);
}
~TestFontSelector() override = default;
- void Trace(Visitor* visitor) const override {
- visitor->Trace(custom_platform_data_);
- FontSelector::Trace(visitor);
- }
-
FontData* GetFontData(const FontDescription& font_description,
const FontFamily&) override {
FontSelectionCapabilities normal_capabilities(
@@ -117,7 +112,7 @@ class TestFontSelector : public FontSele
}
private:
- Member<FontCustomPlatformData> custom_platform_data_;
+ scoped_refptr<FontCustomPlatformData> custom_platform_data_;
};
} // namespace

411
bad-font-gc11.patch Normal file
View File

@@ -0,0 +1,411 @@
Revert the following commit:
commit 2eefeabb12fb7e92f2508116a5ed959c57659be1
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Tue Feb 20 17:40:39 2024 +0000
[gc] Make HarfBuzzFontData & friends gc'd.
Previously we had a HbFontCacheEntry which was used to hold onto the
HarfBuzzFontData, and a hb_font_t.
HarfBuzzFontData is used for holding data specific for various
harfbuzz callbacks, but we can also hold onto the hb_font_t there.
There should be no user-visible behaviour change.
Bug: 41490008
Change-Id: Icaa7ad3b2f75e9807b88014a9a15406cb76eb52e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302175
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262752}
--- a/third_party/blink/renderer/platform/fonts/font_global_context.cc
+++ b/third_party/blink/renderer/platform/fonts/font_global_context.cc
@@ -8,6 +8,7 @@
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
#include "third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h"
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h"
+#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
#include "third_party/blink/renderer/platform/wtf/thread_specific.h"
@@ -50,6 +51,15 @@ FontUniqueNameLookup* FontGlobalContext:
return Get().font_unique_name_lookup_.get();
}
+HarfBuzzFontCache& FontGlobalContext::GetHarfBuzzFontCache() {
+ std::unique_ptr<HarfBuzzFontCache>& global_context_harfbuzz_font_cache =
+ Get().harfbuzz_font_cache_;
+ if (!global_context_harfbuzz_font_cache) {
+ global_context_harfbuzz_font_cache = std::make_unique<HarfBuzzFontCache>();
+ }
+ return *global_context_harfbuzz_font_cache;
+}
+
IdentifiableToken FontGlobalContext::GetOrComputeTypefaceDigest(
const FontPlatformData& source) {
SkTypeface* typeface = source.Typeface();
--- a/third_party/blink/renderer/platform/fonts/font_global_context.h
+++ b/third_party/blink/renderer/platform/fonts/font_global_context.h
@@ -9,7 +9,6 @@
#include "base/types/pass_key.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
-#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/text/layout_locale.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
@@ -34,19 +33,14 @@ class PLATFORM_EXPORT FontGlobalContext
static FontGlobalContext& Get();
static FontGlobalContext* TryGet();
- void Trace(Visitor* visitor) const {
- visitor->Trace(font_cache_);
- visitor->Trace(harfbuzz_font_cache_);
- }
+ void Trace(Visitor* visitor) const { visitor->Trace(font_cache_); }
FontGlobalContext(const FontGlobalContext&) = delete;
FontGlobalContext& operator=(const FontGlobalContext&) = delete;
static inline FontCache& GetFontCache() { return Get().font_cache_; }
- static HarfBuzzFontCache& GetHarfBuzzFontCache() {
- return Get().harfbuzz_font_cache_;
- }
+ static HarfBuzzFontCache& GetHarfBuzzFontCache();
static FontUniqueNameLookup* GetFontUniqueNameLookup();
@@ -62,7 +56,7 @@ class PLATFORM_EXPORT FontGlobalContext
private:
FontCache font_cache_;
- HarfBuzzFontCache harfbuzz_font_cache_;
+ std::unique_ptr<HarfBuzzFontCache> harfbuzz_font_cache_;
std::unique_ptr<FontUniqueNameLookup> font_unique_name_lookup_;
base::HashingLRUCache<SkTypefaceID, IdentifiableToken> typeface_digest_cache_;
base::HashingLRUCache<SkTypefaceID, IdentifiableToken>
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
@@ -64,14 +64,20 @@ namespace blink {
HarfBuzzFace::HarfBuzzFace(const FontPlatformData* platform_data,
uint64_t unique_id)
- : platform_data_(platform_data),
- harfbuzz_font_data_(FontGlobalContext::GetHarfBuzzFontCache().GetOrCreate(
- unique_id,
- platform_data)) {}
+ : platform_data_(platform_data), unique_id_(unique_id) {
+ HbFontCacheEntry* const cache_entry =
+ FontGlobalContext::GetHarfBuzzFontCache().RefOrNew(unique_id_,
+ platform_data);
+ unscaled_font_ = cache_entry->HbFont();
+ harfbuzz_font_data_ = cache_entry->HbFontData();
+}
+
+HarfBuzzFace::~HarfBuzzFace() {
+ FontGlobalContext::GetHarfBuzzFontCache().Remove(unique_id_);
+}
void HarfBuzzFace::Trace(Visitor* visitor) const {
visitor->Trace(platform_data_);
- visitor->Trace(harfbuzz_font_data_);
}
static hb_bool_t HarfBuzzGetGlyph(hb_font_t* hb_font,
@@ -234,17 +240,14 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
hb::unique_ptr<hb_set_t> glyphs(hb_set_create());
- hb_font_t* unscaled_font = harfbuzz_font_data_->unscaled_font_.get();
-
// Check whether computing is needed and compute for gpos/gsub.
if (features & kKerning &&
harfbuzz_font_data_->space_in_gpos_ ==
HarfBuzzFontData::SpaceGlyphInOpenTypeTables::kUnknown) {
- if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font, space)) {
+ if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font_, space))
return false;
- }
// Compute for gpos.
- hb_face_t* face = hb_font_get_face(unscaled_font);
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
DCHECK(face);
harfbuzz_font_data_->space_in_gpos_ =
hb_ot_layout_has_positioning(face) &&
@@ -258,11 +261,10 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
if (features & kLigatures &&
harfbuzz_font_data_->space_in_gsub_ ==
HarfBuzzFontData::SpaceGlyphInOpenTypeTables::kUnknown) {
- if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font, space)) {
+ if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font_, space))
return false;
- }
// Compute for gpos.
- hb_face_t* face = hb_font_get_face(unscaled_font);
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
DCHECK(face);
harfbuzz_font_data_->space_in_gsub_ =
hb_ot_layout_has_substitution(face) &&
@@ -280,14 +282,14 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
}
unsigned HarfBuzzFace::UnitsPerEmFromHeadTable() {
- hb_face_t* face = hb_font_get_face(harfbuzz_font_data_->unscaled_font_.get());
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
return hb_face_get_upem(face);
}
Glyph HarfBuzzFace::HbGlyphForCharacter(UChar32 character) {
hb_codepoint_t glyph = 0;
- HarfBuzzGetNominalGlyph(harfbuzz_font_data_->unscaled_font_.get(),
- harfbuzz_font_data_, character, &glyph, nullptr);
+ HarfBuzzGetNominalGlyph(unscaled_font_, harfbuzz_font_data_, character,
+ &glyph, nullptr);
return glyph;
}
@@ -444,10 +446,9 @@ static hb::unique_ptr<hb_face_t> CreateF
return face;
}
-namespace {
-
-HarfBuzzFontData* CreateHarfBuzzFontData(hb_face_t* face,
- SkTypeface* typeface) {
+static scoped_refptr<HbFontCacheEntry> CreateHbFontCacheEntry(
+ hb_face_t* face,
+ SkTypeface* typeface) {
hb::unique_ptr<hb_font_t> ot_font(hb_font_create(face));
hb_ot_font_set_funcs(ot_font.get());
@@ -466,26 +467,25 @@ HarfBuzzFontData* CreateHarfBuzzFontData
// Creating a sub font means that non-available functions
// are found from the parent.
hb_font_t* const unscaled_font = hb_font_create_sub_font(ot_font.get());
- HarfBuzzFontData* data =
- MakeGarbageCollected<HarfBuzzFontData>(unscaled_font);
+ scoped_refptr<HbFontCacheEntry> cache_entry =
+ HbFontCacheEntry::Create(unscaled_font);
hb_font_set_funcs(unscaled_font,
- HarfBuzzSkiaFontFuncs::Get().GetFunctions(typeface), data,
- nullptr);
- return data;
+ HarfBuzzSkiaFontFuncs::Get().GetFunctions(typeface),
+ cache_entry->HbFontData(), nullptr);
+ return cache_entry;
}
-} // namespace
-
-HarfBuzzFontData* HarfBuzzFontCache::GetOrCreate(
+HbFontCacheEntry* HarfBuzzFontCache::RefOrNew(
uint64_t unique_id,
const FontPlatformData* platform_data) {
const auto& result = font_map_.insert(unique_id, nullptr);
if (result.is_new_entry) {
hb::unique_ptr<hb_face_t> face = CreateFace(platform_data);
result.stored_value->value =
- CreateHarfBuzzFontData(face.get(), platform_data->Typeface());
+ CreateHbFontCacheEntry(face.get(), platform_data->Typeface());
}
- return result.stored_value->value.Get();
+ result.stored_value->value->AddRef();
+ return result.stored_value->value.get();
}
static_assert(
@@ -516,18 +516,17 @@ hb_font_t* HarfBuzzFace::GetScaledFont(s
vertical_layout);
int scale = SkiaScalarToHarfBuzzPosition(platform_data_->size());
- hb_font_t* unscaled_font = harfbuzz_font_data_->unscaled_font_.get();
- hb_font_set_scale(unscaled_font, scale, scale);
+ hb_font_set_scale(unscaled_font_, scale, scale);
// See contended discussion in https://github.com/harfbuzz/harfbuzz/pull/1484
// Setting ptem here is critical for HarfBuzz to know where to lookup spacing
// offset in the AAT trak table, the unit pt in ptem here means "CoreText"
// points. After discussion on the pull request and with Apple developers, the
// meaning of HarfBuzz' hb_font_set_ptem API was changed to expect the
// equivalent of CSS pixels here.
- hb_font_set_ptem(unscaled_font, specified_size > 0 ? specified_size
- : platform_data_->size());
+ hb_font_set_ptem(unscaled_font_, specified_size > 0 ? specified_size
+ : platform_data_->size());
- return unscaled_font;
+ return unscaled_font_;
}
hb_font_t* HarfBuzzFace::GetScaledFont() const {
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
@@ -55,6 +55,7 @@ class HarfBuzzFace final : public Garbag
HarfBuzzFace(const FontPlatformData* platform_data, uint64_t);
HarfBuzzFace(const HarfBuzzFace&) = delete;
HarfBuzzFace& operator=(const HarfBuzzFace&) = delete;
+ ~HarfBuzzFace();
void Trace(Visitor*) const;
@@ -90,7 +91,11 @@ class HarfBuzzFace final : public Garbag
void PrepareHarfBuzzFontData();
Member<const FontPlatformData> platform_data_;
- Member<HarfBuzzFontData> harfbuzz_font_data_;
+ const uint64_t unique_id_;
+ // TODO(crbug.com/1489080): When briefly given MiraclePtr protection,
+ // these members were both found dangling.
+ hb_font_t* unscaled_font_;
+ HarfBuzzFontData* harfbuzz_font_data_;
};
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
@@ -8,8 +8,38 @@
namespace blink {
-void HarfBuzzFontCache::Trace(Visitor* visitor) const {
- visitor->Trace(font_map_);
+HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font)
+ : hb_font_(hb::unique_ptr<hb_font_t>(font)),
+ hb_font_data_(std::make_unique<HarfBuzzFontData>()) {}
+
+HbFontCacheEntry::~HbFontCacheEntry() = default;
+
+scoped_refptr<HbFontCacheEntry> HbFontCacheEntry::Create(hb_font_t* hb_font) {
+ DCHECK(hb_font);
+ return base::AdoptRef(new HbFontCacheEntry(hb_font));
+}
+
+HarfBuzzFontCache::HarfBuzzFontCache() = default;
+HarfBuzzFontCache::~HarfBuzzFontCache() = default;
+
+// See "harfbuzz_face.cc" for |HarfBuzzFontCache::GetOrCreateFontData()|
+// implementation.
+
+void HarfBuzzFontCache::Remove(uint64_t unique_id) {
+ auto it = font_map_.find(unique_id);
+ // TODO(https://crbug.com/1417160): In tests such as FontObjectThreadedTest
+ // that test taking down FontGlobalContext an object may not be found due to
+ // existing issues with refcounting of font objects at thread destruction
+ // time.
+ if (it == font_map_.end()) {
+ return;
+ }
+ DCHECK(!it.Get()->value->HasOneRef());
+ it.Get()->value->Release();
+ if (!it.Get()->value->HasOneRef()) {
+ return;
+ }
+ font_map_.erase(it);
}
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
@@ -6,9 +6,12 @@
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_CACHE_H_
#include "third_party/blink/renderer/platform/fonts/font_metrics.h"
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
-#include "third_party/blink/renderer/platform/heap/member.h"
+#include "third_party/blink/renderer/platform/fonts/unicode_range_set.h"
+
+#include <hb.h>
+#include <hb-cplusplus.hh>
+
+#include <memory>
namespace blink {
@@ -22,21 +25,39 @@ struct HarfBuzzFontData;
// FIXME, crbug.com/609099: We should fix the FontCache to only keep one
// FontPlatformData object independent of size, then consider using this here.
-class HarfBuzzFontCache final {
- DISALLOW_NEW();
+class HbFontCacheEntry : public RefCounted<HbFontCacheEntry> {
+ USING_FAST_MALLOC(HbFontCacheEntry);
+
+ public:
+ static scoped_refptr<HbFontCacheEntry> Create(hb_font_t* hb_font);
+
+ hb_font_t* HbFont() { return hb_font_.get(); }
+ HarfBuzzFontData* HbFontData() { return hb_font_data_.get(); }
+
+ ~HbFontCacheEntry();
+ private:
+ explicit HbFontCacheEntry(hb_font_t* font);
+
+ hb::unique_ptr<hb_font_t> hb_font_;
+ std::unique_ptr<HarfBuzzFontData> hb_font_data_;
+};
+
+class HarfBuzzFontCache final {
public:
- void Trace(Visitor* visitor) const;
- // See "harfbuzz_face.cc" for |HarfBuzzFontCache::GetOrCreateFontData()|
- // implementation.
- HarfBuzzFontData* GetOrCreate(uint64_t unique_id,
- const FontPlatformData* platform_data);
+ HarfBuzzFontCache();
+ ~HarfBuzzFontCache();
+
+ HbFontCacheEntry* RefOrNew(uint64_t unique_id,
+ const FontPlatformData* platform_data);
+ void Remove(uint64_t unique_id);
private:
- HeapHashMap<uint64_t,
- WeakMember<HarfBuzzFontData>,
- IntWithZeroKeyHashTraits<uint64_t>>
- font_map_;
+ using HbFontDataMap = HashMap<uint64_t,
+ scoped_refptr<HbFontCacheEntry>,
+ IntWithZeroKeyHashTraits<uint64_t>>;
+
+ HbFontDataMap font_map_;
};
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
@@ -22,18 +22,15 @@ const unsigned kInvalidFallbackMetricsVa
// The HarfBuzzFontData struct carries user-pointer data for
// |hb_font_t| callback functions/operations. It contains metrics and OpenType
// layout information related to a font scaled to a particular size.
-struct HarfBuzzFontData final : public GarbageCollected<HarfBuzzFontData> {
+struct HarfBuzzFontData final {
+ USING_FAST_MALLOC(HarfBuzzFontData);
+
public:
- explicit HarfBuzzFontData(hb_font_t* unscaled_font)
- : unscaled_font_(hb::unique_ptr<hb_font_t>(unscaled_font)),
- vertical_data_(nullptr),
- range_set_(nullptr) {}
+ HarfBuzzFontData() : vertical_data_(nullptr), range_set_(nullptr) {}
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
- void Trace(Visitor*) const {}
-
// The vertical origin and vertical advance functions in HarfBuzzFace require
// the ascent and height metrics as fallback in case no specific vertical
// layout information is found from the font.
@@ -81,7 +78,6 @@ struct HarfBuzzFontData final : public G
return vertical_data_;
}
- const hb::unique_ptr<hb_font_t> unscaled_font_;
SkFont font_;
// Capture these scaled fallback metrics from FontPlatformData so that a

3715
bad-font-gc2.patch Normal file

File diff suppressed because it is too large Load Diff

38
bad-font-gc3.patch Normal file
View File

@@ -0,0 +1,38 @@
Revert the following commit (to support bad-font-gc2.patch):
commit d4806d20fda56e9bac259fddf10b7439ce749add
Author: Hao Liu <haoliuk@chromium.org>
Date: Mon Mar 18 22:56:31 2024 +0000
Cleanup leftover non-used custom_font_data methods
This is to clean up non-used custom_font_data methods. Their usage has
been deleted in a previous CL.
https://chromium-review.googlesource.com/c/chromium/src/+/5262982/29/third_party/blink/renderer/core/css/css_font_face_source.cc#b95
Change-Id: I90c3ae794a6caf71526c81a56795e95c23cc3fb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368244
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1274525}
--- a/third_party/blink/renderer/core/css/css_custom_font_data.h
+++ b/third_party/blink/renderer/core/css/css_custom_font_data.h
@@ -55,6 +55,7 @@ class CSSCustomFontData final : public C
bool IsLoading() const override { return is_loading_; }
bool IsLoadingFallback() const override { return true; }
+ void ClearFontFaceSource() override { font_face_source_ = nullptr; }
bool IsPendingDataUrl() const override {
return font_face_source_ && font_face_source_->IsPendingDataUrl();
--- a/third_party/blink/renderer/platform/fonts/custom_font_data.h
+++ b/third_party/blink/renderer/platform/fonts/custom_font_data.h
@@ -46,6 +46,7 @@ class PLATFORM_EXPORT CustomFontData : p
virtual bool IsLoading() const { return false; }
virtual bool IsLoadingFallback() const { return false; }
virtual bool ShouldSkipDrawing() const { return false; }
+ virtual void ClearFontFaceSource() {}
virtual bool IsPendingDataUrl() const { return false; }
protected:

View File

@@ -9,8 +9,8 @@
#include "base/time/time_override.h" #include "base/time/time_override.h"
#include "build/build_config.h" #include "build/build_config.h"
--- src/base/BUILD.gn.orig 2025-04-11 12:12:20.504331178 +0200 --- a/base/BUILD.gn 2022-06-30 13:13:20.315537859 +0200
+++ src/base/BUILD.gn 2025-04-11 20:49:30.979616277 +0200 +++ b/base/BUILD.gn 2022-06-30 13:25:39.947410797 +0200
@@ -1,3 +1,8 @@ @@ -1,3 +1,8 @@
+import("//build/config/linux/pkg_config.gni") +import("//build/config/linux/pkg_config.gni")
+ +
@@ -20,19 +20,19 @@
# Copyright 2013 The Chromium Authors # Copyright 2013 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
@@ -797,8 +802,6 @@ component("base") { @@ -826,8 +831,6 @@
"task/updateable_sequenced_task_runner.h", "third_party/cityhash_v103/src/city_v103.cc",
"test/scoped_logging_settings.h", "third_party/cityhash_v103/src/city_v103.h",
"test/spin_wait.h", "third_party/icu/icu_utf.h",
- "third_party/nspr/prtime.cc", - "third_party/nspr/prtime.cc",
- "third_party/nspr/prtime.h", - "third_party/nspr/prtime.h",
"third_party/superfasthash/superfasthash.c",
"thread_annotations.h", "thread_annotations.h",
"threading/hang_watcher.cc", "threading/hang_watcher.cc",
"threading/hang_watcher.h", @@ -1414,6 +1417,7 @@
@@ -1014,6 +1017,7 @@ component("base") {
"//build/config/compiler:prevent_unsafe_narrowing",
"//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wexit_time_destructors",
"//build/config/compiler:wglobal_constructors", "//build/config/compiler:wglobal_constructors",
"//electron/build/config:mas_build",
+ ":system_nspr", + ":system_nspr",
] ]

View File

@@ -0,0 +1,46 @@
From df291ec5472fa14e828633378b8c97a8c7a2e7de Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Wed, 20 Mar 2024 12:38:04 +0000
Subject: [PATCH] IWYU: missing includes in ukm::BitSet
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Usage of uint8_t and std::memcpy require includes.
Bug: 41455655
Change-Id: Ib96b3c3595660fc05d37d61ba9ec36add18eba57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5370063
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Reviewed-by: Cait Phillips <caitkp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1275509}
---
components/ukm/bitset.cc | 2 ++
components/ukm/bitset.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/components/ukm/bitset.cc b/components/ukm/bitset.cc
index 0c4faff95ed29..da83c35aa5c58 100644
--- a/components/ukm/bitset.cc
+++ b/components/ukm/bitset.cc
@@ -4,6 +4,8 @@
#include "components/ukm/bitset.h"
+#include <cstring>
+
#include "base/check_op.h"
namespace ukm {
diff --git a/components/ukm/bitset.h b/components/ukm/bitset.h
index 9b1f88c844ef6..005ce6e329db2 100644
--- a/components/ukm/bitset.h
+++ b/components/ukm/bitset.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_UKM_BITSET_H_
#define COMPONENTS_UKM_BITSET_H_
+#include <cstdint>
#include <string>
#include <vector>

View File

@@ -1,16 +0,0 @@
--- 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 <hwy/base.h>
+
#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;

View File

@@ -0,0 +1,60 @@
--- 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) {

View File

@@ -2,28 +2,28 @@ Partially revert https://github.com/chromium/chromium/commit/c1dc375391403442935
and disable dependent code. This removes `brs` from Accept-Encoding list. and disable dependent code. This removes `brs` from Accept-Encoding list.
This feature does not build with brotli < 1.1 This feature does not build with brotli < 1.1
--- src/net/filter/brotli_source_stream.cc.orig 2025-08-21 17:44:48.616409315 +0200 --- src/net/filter/brotli_source_stream.cc.orig 2023-10-12 17:25:42.094020700 +0200
+++ src/net/filter/brotli_source_stream.cc 2025-08-22 18:23:03.535047458 +0200 +++ src/net/filter/brotli_source_stream.cc 2023-10-12 22:43:53.790708700 +0200
@@ -18,7 +18,6 @@ @@ -13,7 +11,6 @@
#include "base/metrics/histogram_macros.h"
#include "net/base/io_buffer.h" #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/decode.h"
-#include "third_party/brotli/include/brotli/shared_dictionary.h" -#include "third_party/brotli/include/brotli/shared_dictionary.h"
namespace net { namespace net {
@@ -30,21 +29,11 @@ const char kBrotli[] = "BROTLI"; @@ -25,21 +22,11 @@ const char kBrotli[] = "BROTLI";
// Brotli format specification: http://www.ietf.org/id/draft-alakuijala-brotli. // Brotli format specification: http://www.ietf.org/id/draft-alakuijala-brotli.
class BrotliSourceStream : public FilterSourceStream { class BrotliSourceStream : public FilterSourceStream {
public: public:
- explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream, - explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream,
- scoped_refptr<IOBuffer> dictionary = nullptr, - scoped_refptr<IOBuffer> dictionary = nullptr,
- size_t dictionary_size = 0u) - size_t dictionary_size = 0u)
- : FilterSourceStream(SourceStreamType::kBrotli, std::move(upstream)), - : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)),
- dictionary_(std::move(dictionary)), - dictionary_(std::move(dictionary)),
- dictionary_size_(dictionary_size) { - dictionary_size_(dictionary_size) {
+ explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream) + explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream)
+ : FilterSourceStream(SourceStreamType::kBrotli, std::move(upstream)) { + : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)) {
brotli_state_ = brotli_state_ =
BrotliDecoderCreateInstance(AllocateMemory, FreeMemory, this); BrotliDecoderCreateInstance(AllocateMemory, FreeMemory, this);
CHECK(brotli_state_); CHECK(brotli_state_);
@@ -36,17 +36,17 @@ This feature does not build with brotli < 1.1
} }
BrotliSourceStream(const BrotliSourceStream&) = delete; BrotliSourceStream(const BrotliSourceStream&) = delete;
@@ -180,9 +169,6 @@ class BrotliSourceStream : public Filter @@ -176,9 +163,6 @@ class BrotliSourceStream : public Filter
free(&array[-1]); free(&array[-1]);
} }
- const scoped_refptr<IOBuffer> dictionary_; - const scoped_refptr<IOBuffer> dictionary_;
- const size_t dictionary_size_; - const size_t dictionary_size_;
- -
raw_ptr<BrotliDecoderState> brotli_state_; raw_ptr<BrotliDecoderState, DanglingUntriaged> brotli_state_;
DecodingStatus decoding_status_ = DecodingStatus::DECODING_IN_PROGRESS; DecodingStatus decoding_status_ = DecodingStatus::DECODING_IN_PROGRESS;
@@ -204,8 +190,7 @@ std::unique_ptr<FilterSourceStream> Crea @@ -200,8 +184,7 @@ std::unique_ptr<FilterSourceStream> Crea
std::unique_ptr<SourceStream> previous, std::unique_ptr<SourceStream> previous,
scoped_refptr<IOBuffer> dictionary, scoped_refptr<IOBuffer> dictionary,
size_t dictionary_size) { size_t dictionary_size) {

View File

@@ -1,45 +0,0 @@
--- 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() {

View File

@@ -1,422 +0,0 @@
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=<optimized out>,
__closure=<optimized out>) at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1531
#1 partition_alloc::PartitionRoot::FreeNoHooksImmediate (this=<optimized out>, object=<optimized out>, slot_span=<optimized out>, slot_start=<optimized out>, this=<optimized out>, object=<optimized out>, slot_span=<optimized out>, slot_start=<optimized out>)
at ../../base/allocator/partition_allocator/src/partition_alloc/partition_root.h:1531
#2 partition_alloc::PartitionRoot::FreeInline<(partition_alloc::internal::FreeFlags)2> (this=<optimized out>, object=<optimized out>, this=<optimized out>, object=<optimized out>) 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<char, std::char_traits<char>, std::allocator<char> >::_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<char, std::char_traits<char>, std::allocator<char> >::assign (this=<optimized out>, __str=...) at /usr/include/c++/14/bits/basic_string.h:1619
#8 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator= (this=<optimized out>, __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::HashTraits<blink::FontCacheKey>, WTF::HashMapValueTraits<WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> > > >::Store<WTF::KeyValuePair<blink::FontCacheKey, cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> >, blink::FontCacheKey&, blink::FontPlatformData const*&> () at ../../third_party/blink/renderer/platform/wtf/hash_map.h:340
#12 WTF::HashTable<blink::FontCacheKey, WTF::KeyValuePair<blink::FontCacheKey, cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> >, WTF::KeyValuePairExtractor, WTF::HashMapValueTraits<WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> > >, WTF::HashTraits<blink::FontCacheKey>, blink::HeapAllocator>::insert<WTF::HashMapTranslator<WTF::HashTraits<blink::FontCacheKey>, WTF::HashMapValueTraits<WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> > > >, 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<blink::FontCacheKey, cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> >, blink::HeapAllocator>::InlineAdd<blink::FontCacheKey&, blink::FontPlatformData const*&> () at ../../third_party/blink/renderer/core/frame/local_dom_window.cc:141870345
#14 WTF::HashMap<blink::FontCacheKey, cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, WTF::HashTraits<blink::FontCacheKey>, WTF::HashTraits<cppgc::internal::BasicMember<blink::FontPlatformData const, cppgc::internal::WeakMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer> >, blink::HeapAllocator>::insert<blink::FontCacheKey&, blink::FontPlatformData const*&> () 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=<optimized out>, range_data=<optimized out>, segment=..., result=<optimized out>) 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=<optimized out>, 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#37 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#47 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
#50 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector<blink::NGFlexLine, 0u>*, blink::HeapVector<cppgc::internal::BasicMember<blink::LayoutBox, cppgc::internal::StrongMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, 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()<blink::FlexLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#54 CreateAlgorithmAndRun<blink::FlexLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
#57 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector<blink::NGFlexLine, 0u>*, blink::HeapVector<cppgc::internal::BasicMember<blink::LayoutBox, cppgc::internal::StrongMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, 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()<blink::FlexLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#61 CreateAlgorithmAndRun<blink::FlexLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
#64 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector<blink::NGFlexLine, 0u>*, blink::HeapVector<cppgc::internal::BasicMember<blink::LayoutBox, cppgc::internal::StrongMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, 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()<blink::FlexLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#68 CreateAlgorithmAndRun<blink::FlexLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#77 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#90 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#99 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#108 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#118 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#128 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#138 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) at ../../third_party/blink/renderer/core/layout/block_node.cc:523
#141 0x000055f4562235f2 in blink::FlexLayoutAlgorithm::PlaceFlexItems(blink::HeapVector<blink::NGFlexLine, 0u>*, blink::HeapVector<cppgc::internal::BasicMember<blink::LayoutBox, cppgc::internal::StrongMemberTag, cppgc::internal::DijkstraWriteBarrierPolicy, cppgc::internal::DisabledCheckingPolicy, cppgc::internal::CompressedPointer>, 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()<blink::FlexLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#145 CreateAlgorithmAndRun<blink::FlexLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>) 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()<blink::BlockLayoutAlgorithm> () at ../../third_party/blink/renderer/core/layout/block_node.cc:214
#154 CreateAlgorithmAndRun<blink::BlockLayoutAlgorithm, blink::(anonymous namespace)::LayoutWithAlgorithm(const blink::LayoutAlgorithmParams&)::<lambda(Algorithm*)> >(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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, constraint_space=..., break_token=<optimized out>, early_break=<optimized out>, column_spanner_path=<optimized out>) 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=<optimized out>, begin_main_frame_state=std::unique_ptr<cc::BeginMainFrameAndCommitState> = {...}) at ../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h:1002
#283 0x000055f452a8b781 in base::internal::DecayedFunctorTraits<void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >&&>::Invoke<void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain> const&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > > (method=<optimized out>, receiver_ptr=...) at /usr/include/c++/14/bits/unique_ptr.h:191
#284 base::internal::InvokeHelper<true, base::internal::FunctorTraits<void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >&&>, void, 0ul, 1ul>::MakeItSo<void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), std::tuple<base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >>(void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), std::tuple<base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >&&) (
functor=@0x41400589d30: (void (cc::ProxyMain::*)(cc::ProxyMain * const, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >)) 0x55f452a2ef80 <cc::ProxyMain::BeginMainFrame(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >)>, bound=...) at ../../base/functional/bind_internal.h:954
#285 base::internal::Invoker<base::internal::FunctorTraits<void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >&&>, base::internal::BindState<true, true, false, void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >, void ()>::RunImpl<void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), std::tuple<base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >, 0ul, 1ul>(void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), std::tuple<base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >&&, std::integer_sequence<unsigned long, 0ul, 1ul>) (
functor=@0x41400589d30: (void (cc::ProxyMain::*)(cc::ProxyMain * const, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >)) 0x55f452a2ef80 <cc::ProxyMain::BeginMainFrame(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >)>, bound=...) at ../../base/functional/bind_internal.h:1067
#286 base::internal::Invoker<base::internal::FunctorTraits<void (cc::ProxyMain::*&&)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >&&>, base::internal::BindState<true, true, false, void (cc::ProxyMain::*)(std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>, std::unique_ptr<cc::BeginMainFrameAndCommitState, std::default_delete<cc::BeginMainFrameAndCommitState> > >, void ()>::RunOnce(base::internal::BindStateBase*) (base=0x41400589d10) at ../../base/functional/bind_internal.h:980
#287 0x000055f4565b518d in base::OnceCallback<void ()>::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=<optimized out>) at ../../base/task/common/task_annotator.cc:203
#289 0x000055f451ca3130 in base::TaskAnnotator::RunTask<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::<lambda(perfetto::EventContext&)> > (this=0x4140004c200, event_name=..., pending_task=...)
at ../../base/task/common/task_annotator.h:90
#290 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl (this=<optimized out>, 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=<optimized out>) 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=<optimized out>, 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=<optimized out>) 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 <main(int, char**)>, 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 <main(int, char**)>, argc=2, argv=0x7ffefa91c5d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 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 <negyokru@inf.u-szeged.hu>
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 <pvarga@inf.u-szeged.hu>
---
.../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 <optional>
+
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

View File

@@ -1,60 +1,29 @@
--- src/extensions/common/BUILD.gn.orig 2025-05-22 20:15:08.686176429 +0200 Work around this linker error:
+++ src/extensions/common/BUILD.gn 2025-05-24 11:58:30.839954172 +0200
@@ -243,10 +243,6 @@ static_library("common") { [ 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'
"api/commands/commands_handler.h", [ 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<extensions::WebViewGuest>::AsDerivedGuest(guest_view::GuestViewBase*)':
"api/declarative/declarative_constants.cc", [ 9463s] /home/abuild/rpmbuild/BUILD/src/out/Release/../../components/guest_view/browser/guest_view.h:67:(.text+0xdd): undefined reference to `extensions::WebViewGuest::Type'
"api/declarative/declarative_constants.h",
- "api/declarative/declarative_manifest_data.cc", 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.
- "api/declarative/declarative_manifest_data.h",
- "api/declarative/declarative_manifest_handler.cc", --- src/extensions/browser/guest_view/web_view/web_view_guest.cc.old 2023-09-28 10:14:03.660044621 +0200
- "api/declarative/declarative_manifest_handler.h", +++ src/extensions/browser/guest_view/web_view/web_view_guest.cc 2023-09-29 08:05:41.827245244 +0200
"api/declarative_net_request/constants.cc", @@ -285,7 +285,6 @@ std::string WebViewGuest::GetPartitionID
"api/declarative_net_request/constants.h", }
"api/declarative_net_request/dnr_manifest_data.cc",
@@ -266,8 +262,6 @@ static_library("common") { // static
"api/printer_provider/usb_printer_manifest_data.h", -const char WebViewGuest::Type[] = "webview";
"api/printer_provider/usb_printer_manifest_handler.cc", const guest_view::GuestViewHistogramValue WebViewGuest::HistogramValue =
"api/printer_provider/usb_printer_manifest_handler.h", guest_view::GuestViewHistogramValue::kWebView;
- "api/scripts_internal/script_serialization.cc",
- "api/scripts_internal/script_serialization.h", --- src/extensions/browser/guest_view/web_view/web_view_guest.h.old 2023-09-28 10:14:03.660044621 +0200
"api/sockets/sockets_manifest_data.cc", +++ src/extensions/browser/guest_view/web_view/web_view_guest.h 2023-09-29 08:06:13.200529820 +0200
"api/sockets/sockets_manifest_data.h", @@ -49,7 +49,7 @@ class WebViewGuest : public guest_view::
"api/sockets/sockets_manifest_handler.cc", int embedder_process_id,
@@ -378,8 +372,6 @@ static_library("common") { int view_instance_id);
"manifest_handlers/background_info.h",
"manifest_handlers/content_capabilities_handler.cc", - static const char Type[];
"manifest_handlers/content_capabilities_handler.h", + constexpr static const char Type[] = "webview";
- "manifest_handlers/content_scripts_handler.cc", static const guest_view::GuestViewHistogramValue HistogramValue;
- "manifest_handlers/content_scripts_handler.h",
"manifest_handlers/cross_origin_isolation_info.cc", // Returns the WebView partition ID associated with the render process
"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",

View File

@@ -1,28 +0,0 @@
--- 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) {

View File

@@ -1,10 +0,0 @@
--- 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",

43
bundled-minizip.patch Normal file
View File

@@ -0,0 +1,43 @@
--- 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") {

View File

@@ -21,9 +21,11 @@ Subject: [PATCH] Disable various compiler configs
build/config/compiler/BUILD.gn | 114 +++++---------------------------- build/config/compiler/BUILD.gn | 114 +++++----------------------------
1 file changed, 17 insertions(+), 97 deletions(-) 1 file changed, 17 insertions(+), 97 deletions(-)
--- src/build/config/compiler/BUILD.gn.orig 2025-07-19 11:32:29.581980058 +0200 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+++ src/build/config/compiler/BUILD.gn 2025-07-19 16:12:37.505818698 +0200 index d40843b..b92f03b 100644
@@ -310,9 +310,7 @@ config("compiler") { --- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -322,9 +322,7 @@ config("compiler") {
configs += [ configs += [
# See the definitions below. # See the definitions below.
@@ -32,24 +34,8 @@ Subject: [PATCH] Disable various compiler configs
- ":compiler_cpu_abi", - ":compiler_cpu_abi",
":compiler_codegen", ":compiler_codegen",
":compiler_deterministic", ":compiler_deterministic",
":clang_warning_suppression", ]
@@ -338,7 +336,6 @@ config("compiler") { @@ -353,7 +351,12 @@ 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) { if (!is_win) {
# Common POSIX compiler flags setup. # Common POSIX compiler flags setup.
# -------------------------------- # --------------------------------
@@ -63,7 +49,7 @@ Subject: [PATCH] Disable various compiler configs
# Stack protection. ShadowCallStack and Stack protector address the same # Stack protection. ShadowCallStack and Stack protector address the same
# problems. Therefore, we only enable one or the other. Clang advertises SCS as # problems. Therefore, we only enable one or the other. Clang advertises SCS as
@@ -500,10 +501,6 @@ config("compiler") { @@ -494,10 +497,6 @@ config("compiler") {
# Linux/Android/Fuchsia common flags setup. # Linux/Android/Fuchsia common flags setup.
# --------------------------------- # ---------------------------------
if (is_linux || is_chromeos || is_android || is_fuchsia) { if (is_linux || is_chromeos || is_android || is_fuchsia) {
@@ -74,8 +60,64 @@ Subject: [PATCH] Disable various compiler configs
if (!is_clang) { if (!is_clang) {
# Use pipes for communicating between sub-processes. Faster. # Use pipes for communicating between sub-processes. Faster.
@@ -1148,11 +1145,6 @@ config("libcxx_hardening") { @@ -590,55 +589,6 @@ config("compiler") {
defines = [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ] ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
}
- 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" ]
- }
- }
-
# C11/C++11 compiler flags setup.
# ---------------------------
if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
@@ -1070,11 +1020,6 @@ config("compiler") {
defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
} }
- # Enable libstdc++ hardening lightweight assertions. Those have a low - # Enable libstdc++ hardening lightweight assertions. Those have a low
@@ -86,7 +128,7 @@ Subject: [PATCH] Disable various compiler configs
} }
# The BUILDCONFIG file sets this config on targets by default, which means when # The BUILDCONFIG file sets this config on targets by default, which means when
@@ -1218,7 +1210,8 @@ config("thinlto_optimize_max") { @@ -1140,7 +1085,8 @@ config("thinlto_optimize_max") {
# without using everything that "compiler" brings in. Options that # without using everything that "compiler" brings in. Options that
# tweak code generation for a particular CPU do not belong here! # tweak code generation for a particular CPU do not belong here!
# See "compiler_codegen", below. # See "compiler_codegen", below.
@@ -96,17 +138,64 @@ Subject: [PATCH] Disable various compiler configs
cflags = [] cflags = []
ldflags = [] ldflags = []
defines = [] defines = []
@@ -1994,7 +1987,8 @@ config("tot_warnings") { @@ -1523,46 +1469,6 @@ config("compiler_deterministic") {
# 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 }
- # 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.
@@ -1739,7 +1645,8 @@ config("treat_warnings_as_errors") {
# 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. # flags are guaranteed to appear on the compile command line after -Wall.
-config("default_warnings") { -config("default_warnings") {
+config("default_warnings") { } +config("default_warnings") { }
+config("xdefault_warnings") { +config("xdefault_warnings") {
cflags = [] cflags = []
cflags_c = []
cflags_cc = [] cflags_cc = []
ldflags = [] @@ -1983,11 +1890,7 @@ config("chromium_code") {
@@ -2262,11 +2256,7 @@ config("chromium_code") {
defines = [ "_HAS_NODISCARD" ] defines = [ "_HAS_NODISCARD" ]
} }
} else { } else {
@@ -119,7 +208,7 @@ Subject: [PATCH] Disable various compiler configs
# In Chromium code, we define __STDC_foo_MACROS in order to get the # In Chromium code, we define __STDC_foo_MACROS in order to get the
# C99 macros on Mac and Linux. # C99 macros on Mac and Linux.
@@ -2275,24 +2265,6 @@ config("chromium_code") { @@ -1996,24 +1899,6 @@ config("chromium_code") {
"__STDC_FORMAT_MACROS", "__STDC_FORMAT_MACROS",
] ]
@@ -144,15 +233,15 @@ Subject: [PATCH] Disable various compiler configs
if (is_apple) { if (is_apple) {
cflags_objc = [ "-Wimplicit-retain-self" ] cflags_objc = [ "-Wimplicit-retain-self" ]
cflags_objcc = [ "-Wimplicit-retain-self" ] cflags_objcc = [ "-Wimplicit-retain-self" ]
@@ -2451,7 +2423,6 @@ config("no_rtti") { @@ -2159,7 +2044,6 @@ config("no_rtti") {
# to heap-allocated memory are passed over shared library boundaries.
config("export_dynamic") { config("export_dynamic") {
if (is_linux || export_libcxxabi_from_executables) { # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
- ldflags = [ "-rdynamic" ] - ldflags = [ "-rdynamic" ]
} }
} }
@@ -2550,7 +2521,8 @@ config("wexit_time_destructors") { @@ -2247,7 +2131,8 @@ config("wexit_time_destructors") {
# gcc 4.9 and earlier had no way of suppressing this warning without # gcc 4.9 and earlier had no way of suppressing this warning without
# suppressing the rest of them. Here we centralize the identification of # suppressing the rest of them. Here we centralize the identification of
# the gcc 4.9 toolchains. # the gcc 4.9 toolchains.
@@ -162,7 +251,7 @@ Subject: [PATCH] Disable various compiler configs
cflags = [] cflags = []
if (is_clang) { if (is_clang) {
cflags += [ "-Wno-incompatible-pointer-types" ] cflags += [ "-Wno-incompatible-pointer-types" ]
@@ -2667,7 +2639,8 @@ if (is_win) { @@ -2362,7 +2247,8 @@ if (is_win) {
common_optimize_on_cflags += [ "-fno-math-errno" ] common_optimize_on_cflags += [ "-fno-math-errno" ]
} }
@@ -172,17 +261,17 @@ Subject: [PATCH] Disable various compiler configs
if (!is_win) { if (!is_win) {
if (enable_frame_pointers) { if (enable_frame_pointers) {
cflags = [ "-fno-omit-frame-pointer" ] cflags = [ "-fno-omit-frame-pointer" ]
@@ -2708,7 +2681,8 @@ config("default_stack_frames") { @@ -2389,7 +2275,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 # Default "optimization on" config.
-config("optimize") { -config("optimize") {
+config("optimize") { } +config("optimize") { }
+config("xoptimize") { +config("xoptimize") {
if (is_win) { if (is_win) {
# clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for cflags = [ "/O2" ] + common_optimize_on_cflags
# consistency with the other platforms.
@@ -2757,7 +2731,8 @@ config("optimize") { @@ -2430,7 +2317,8 @@ config("optimize") {
} }
# Turn off optimizations. # Turn off optimizations.
@@ -192,19 +281,19 @@ Subject: [PATCH] Disable various compiler configs
if (is_win) { if (is_win) {
cflags = [ cflags = [
"/Od", # Disable optimization. "/Od", # Disable optimization.
@@ -2792,7 +2767,8 @@ config("no_optimize") { @@ -2470,7 +2358,8 @@ config("no_optimize") {
# Turns up the optimization level. Used to explicitly enable -O2 instead of # Turns up the optimization level. On Windows, this implies whole program
# -Os for select targets on platforms that use optimize_for_size. No-op # optimization and link-time code generation which is very expensive and should
# elsewhere. # be used sparingly.
-config("optimize_max") { -config("optimize_max") {
+config("optimize_max") { } +config("optimize_max") { }
+config("xoptimize_max") { +config("xoptimize_max") {
if (is_nacl && is_nacl_irt) { if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config. # The NaCl IRT is a special case and always wants its own config.
# Various components do: # Various components do:
@@ -2825,7 +2801,8 @@ config("optimize_max") { @@ -2503,7 +2392,8 @@ config("optimize_max") {
# #
# TODO(crbug.com/41259697) - rework how all of these configs are related # TODO(crbug.com/621335) - rework how all of these configs are related
# so that we don't need this disclaimer. # so that we don't need this disclaimer.
-config("optimize_speed") { -config("optimize_speed") {
+config("optimize_speed") { } +config("optimize_speed") { }
@@ -212,7 +301,7 @@ Subject: [PATCH] Disable various compiler configs
if (is_nacl && is_nacl_irt) { if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config. # The NaCl IRT is a special case and always wants its own config.
# Various components do: # Various components do:
@@ -2854,7 +2831,8 @@ config("optimize_speed") { @@ -2529,7 +2419,8 @@ config("optimize_speed") {
} }
} }
@@ -222,7 +311,7 @@ Subject: [PATCH] Disable various compiler configs
cflags = [ "-O1" ] + common_optimize_on_cflags cflags = [ "-O1" ] + common_optimize_on_cflags
rustflags = [ "-Copt-level=1" ] rustflags = [ "-Copt-level=1" ]
ldflags = common_optimize_on_ldflags ldflags = common_optimize_on_ldflags
@@ -2985,7 +2963,8 @@ config("win_pdbaltpath") { @@ -2662,7 +2553,8 @@ config("win_pdbaltpath") {
} }
# Full symbols. # Full symbols.
@@ -230,9 +319,9 @@ Subject: [PATCH] Disable various compiler configs
+config("symbols") { cflags = ["-g2"] } +config("symbols") { cflags = ["-g2"] }
+config("xsymbols") { +config("xsymbols") {
rustflags = [] rustflags = []
configs = []
if (is_win) { if (is_win) {
@@ -3159,7 +3138,8 @@ config("symbols") { if (is_clang) {
@@ -2811,7 +2703,8 @@ config("symbols") {
# Minimal symbols. # Minimal symbols.
# This config guarantees to hold symbol for stack trace which are shown to user # This config guarantees to hold symbol for stack trace which are shown to user
# when crash happens in unittests running on buildbot. # when crash happens in unittests running on buildbot.
@@ -242,7 +331,7 @@ Subject: [PATCH] Disable various compiler configs
rustflags = [] rustflags = []
if (is_win) { if (is_win) {
# Functions, files, and line tables only. # Functions, files, and line tables only.
@@ -3244,7 +3224,8 @@ config("minimal_symbols") { @@ -2896,7 +2789,8 @@ config("minimal_symbols") {
# This configuration contains function names only. That is, the compiler is # This configuration contains function names only. That is, the compiler is
# told to not generate debug information and the linker then just puts function # told to not generate debug information and the linker then just puts function
# names in the final debug information. # names in the final debug information.

View File

@@ -0,0 +1,408 @@
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',

View File

@@ -1,68 +0,0 @@
--- 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 <vector>
#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<GeneratedCode, Error> GenerateCode(
base::span<const uint8_t> in,
std::optional<int> min_version) {
- rust::Slice<const uint8_t> 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<int16_t>(min_version.value_or(0));
-
- std::vector<uint8_t> 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<int>(result_width);
- CHECK_EQ(code.data.size(), static_cast<size_t>(code.qr_size * code.qr_size));
- return code;
+ return base::unexpected(Error::kUnknownError);
}
} // namespace qr_code_generator

215
chromium-124-shims.patch Normal file
View File

@@ -0,0 +1,215 @@
diff '--color=auto' -urp src/build/linux/unbundle.orig/absl_flags.gn src/build/linux/unbundle/absl_flags.gn
--- src/build/linux/unbundle.orig/absl_flags.gn
+++ src/build/linux/unbundle/absl_flags.gn
@@ -5,14 +5,36 @@ pkg_config("system_absl_flags") {
packages = [ "absl_flags" ]
}
+pkg_config("absl_flags_config") {
+ packages = [ "absl_flags_config" ]
+}
+
pkg_config("system_absl_flags_parse") {
packages = [ "absl_flags_parse" ]
}
+pkg_config("system_absl_flags_reflection") {
+ packages = [ "absl_flags_reflection" ]
+}
+
pkg_config("system_absl_flags_usage") {
packages = [ "absl_flags_usage" ]
}
+shim_headers("flags_config_shim") {
+ root_path = "."
+ prefix = "absl/flags/"
+ headers = [
+ "config.h",
+ "usage_config.h",
+ ]
+}
+
+source_set("config") {
+ deps = [ ":flags_config_shim" ]
+ public_configs = [ ":absl_flags_config" ]
+}
+
shim_headers("flag_shim") {
root_path = "."
prefix = "absl/flags/"
@@ -38,6 +60,20 @@ source_set("parse") {
public_configs = [ ":system_absl_flags_parse" ]
}
+shim_headers("flags_reflection_shim") {
+ root_path = "."
+ prefix = "absl/flags/"
+ headers = [
+ "internal/registry.h",
+ "reflection.h",
+ ]
+}
+
+source_set("reflection") {
+ deps = [ ":flags_reflection_shim" ]
+ public_configs = [ ":system_absl_flags_reflection" ]
+}
+
shim_headers("usage_shim") {
root_path = "."
prefix = "absl/flags/"
diff '--color=auto' -urp src/build/linux/unbundle.orig/absl_log.gn src/build/linux/unbundle/absl_log.gn
--- src/build/linux/unbundle.orig/absl_log.gn
+++ src/build/linux/unbundle/absl_log.gn
@@ -13,9 +13,22 @@ pkg_config("system_absl_die_if_null") {
packages = [ "absl_die_if_null" ]
}
+pkg_config("system_absl_check") {
+ packages = [ "absl_check" ]
+}
+
pkg_config("system_absl_log") {
packages = [ "absl_log" ]
}
+
+pkg_config("system_absl_log_globals") {
+ packages = [ "absl_log_globals" ]
+}
+
+pkg_config("system_absl_log_initialize") {
+ packages = [ "absl_log_initialize" ]
+}
+
shim_headers("absl_check_shim") {
root_path = "."
prefix = "absl/log/"
@@ -49,6 +62,39 @@ source_set("die_if_null") {
public_configs = [ ":system_absl_die_if_null" ]
}
+shim_headers("check_shim") {
+ root_path = "."
+ prefix = "absl/log/"
+ headers = [ "check.h" ]
+}
+
+source_set("check") {
+ deps = [ ":check_shim" ]
+ public_configs = [ ":system_absl_check" ]
+}
+
+shim_headers("globals_shim") {
+ root_path = "."
+ prefix = "absl/log/"
+ headers = [ "globals.h" ]
+}
+
+source_set("globals") {
+ deps = [ ":globals_shim" ]
+ public_configs = [ ":system_absl_log_globals" ]
+}
+
+shim_headers("initialize_shim") {
+ root_path = "."
+ prefix = "absl/log/"
+ headers = [ "initialize.h" ]
+}
+
+source_set("initialize") {
+ deps = [ ":initialize_shim" ]
+ public_configs = [ ":system_absl_log_initialize" ]
+}
+
shim_headers("log_shim") {
root_path = "."
prefix = "absl/log/"
diff '--color=auto' -urp src/build/linux/unbundle.orig/libwebp.gn src/build/linux/unbundle/libwebp.gn
--- src/build/linux/unbundle.orig/libwebp.gn
+++ src/build/linux/unbundle/libwebp.gn
@@ -33,3 +33,7 @@ source_set("libwebp_webp") {
group("libwebp") {
deps = [ ":libwebp_webp" ]
}
+
+source_set("libwebp_sharpyuv") {
+ # Unused in Chromium. Empty to enable building with old webp which does not have sharpyuv
+}
diff '--color=auto' -urp src/build/linux/unbundle.orig/re2.gn src/build/linux/unbundle/re2.gn
--- src/build/linux/unbundle.orig/re2.gn
+++ src/build/linux/unbundle/re2.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/c++/c++.gni")
+import("//build/config/linux/pkg_config.gni")
import("//build/shim_headers.gni")
assert(!use_custom_libcxx,
@@ -10,6 +11,10 @@ assert(!use_custom_libcxx,
"use_custom_libcxx=true because the library's interface relies on " +
"libstdc++'s std::string and std::vector.")
+pkg_config("re2_config") {
+ packages = [ "re2" ]
+}
+
shim_headers("re2_shim") {
root_path = "src"
headers = [
@@ -23,5 +28,5 @@ shim_headers("re2_shim") {
source_set("re2") {
deps = [ ":re2_shim" ]
- libs = [ "re2" ]
+ public_configs = [ ":re2_config" ]
}
--- src/build/linux/unbundle/absl_container.gn.orig
+++ src/build/linux/unbundle/absl_container.gn
@@ -117,6 +117,8 @@ source_set("flat_hash_map_test") {
}
source_set("flat_hash_set_test") {
}
+source_set("hash_function_defaults_test") {
+}
source_set("inlined_vector_test") {
}
source_set("node_slot_policy_test") {
--- src/build/linux/unbundle/replace_gn_files.py.orig
+++ src/build/linux/unbundle/replace_gn_files.py
@@ -80,6 +80,7 @@ REPLACEMENTS = {
'vulkan_memory_allocator' : 'third_party/vulkan_memory_allocator/BUILD.gn',
'woff2': 'third_party/woff2/BUILD.gn',
'zlib': 'third_party/zlib/BUILD.gn',
+ 'zstd': 'third_party/zstd/BUILD.gn',
}
--- /dev/null
+++ src/build/linux/unbundle/zstd.gn
@@ -0,0 +1,24 @@
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_zstd") {
+ packages = [ "libzstd" ]
+}
+
+shim_headers("zstd_shim") {
+ root_path = "src/lib"
+ headers = [
+ "zstd.h",
+ "zstd_errors.h",
+ ]
+}
+
+source_set("decompress") {
+ deps = [ ":zstd_shim" ]
+ public_configs = [ ":system_zstd" ]
+}
+
+source_set("headers") {
+ deps = [ ":zstd_shim" ]
+ public_configs = [ ":system_zstd" ]
+}

View File

@@ -1,9 +0,0 @@
--- 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" ]
}
}

View File

@@ -1,12 +0,0 @@
--- 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.
#

View File

@@ -1,54 +0,0 @@
--- 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<BMPImageDecoder>(alpha_option, color_behavior,
max_decoded_bytes);
-#if BUILDFLAG(ENABLE_AV1_DECODER)
- } else if (mime_type == "image/avif") {
- decoder = std::make_unique<CrabbyAVIFImageDecoder>(
- alpha_option, high_bit_depth_decoding_option, color_behavior, aux_image,
- max_decoded_bytes, animation_option);
-#endif
}
if (decoder) {

View File

@@ -1,12 +0,0 @@
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.

View File

@@ -1,216 +0,0 @@
--- 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<SkFontMgr> fontmgr_factory(
return SkFontMgr_New_CoreText(nullptr);
#elif BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
sk_sp<SkFontConfigInterface> 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> 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> 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<SkTypeface> MakeTypefaceDefaultFontMgr(sk_sp<SkData> data) {
@@ -50,13 +45,7 @@ sk_sp<SkTypeface> 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<SkTypeface> MakeTypefaceFallback(s
}
#endif
-sk_sp<SkTypeface> MakeTypefaceFontations(sk_sp<SkData> data) {
- return SkTypeface_Make_Fontations(data, SkFontArguments());
-}
-
sk_sp<SkTypeface> MakeVariationsTypeface(
sk_sp<SkData> data,
const WebFontTypefaceFactory::FontInstantiator& instantiator) {
@@ -88,9 +73,6 @@ sk_sp<SkTypeface> 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<SkTypeface> MakeSbixTypeface(
sk_sp<SkTypeface> MakeColrV0Typeface(
sk_sp<SkData> 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<SkTypeface> MakeColrV0VariationsTypeface(
sk_sp<SkData> data,
const WebFontTypefaceFactory::FontInstantiator& instantiator) {
-#if BUILDFLAG(IS_WIN)
- if (DWriteVersionSupportsVariations()) {
return instantiator.make_system(data);
- }
-#endif
- return instantiator.make_fontations(data);
}
sk_sp<SkTypeface> MakeFontationsFallbackPreferred(
sk_sp<SkData> 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

View File

@@ -1,331 +0,0 @@
--- 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<Value> 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<Value::List> 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) {

View File

@@ -21,32 +21,40 @@ Signed-off-by: Marek Behún <kabel@kernel.org>
media/filters/ffmpeg_demuxer.cc | 16 ++++++++++++++++ media/filters/ffmpeg_demuxer.cc | 16 ++++++++++++++++
2 files changed, 20 insertions(+) 2 files changed, 20 insertions(+)
Index: chromium-126.0.6478.8/media/filters/ffmpeg_demuxer.cc Index: electron-17.1.2/media/filters/audio_decoder_unittest.cc
=================================================================== ===================================================================
--- chromium-126.0.6478.8.orig/media/filters/ffmpeg_demuxer.cc --- electron-17.1.2.orig/media/filters/audio_decoder_unittest.cc 2022-03-11 08:49:30.740949416 +0100
+++ chromium-126.0.6478.8/media/filters/ffmpeg_demuxer.cc +++ electron-17.1.2/media/filters/audio_decoder_unittest.cc 2022-03-11 09:17:36.916088893 +0100
@@ -343,11 +343,19 @@ @@ -102,7 +102,11 @@ void SetDiscardPadding(AVPacket* packet,
} }
base::span<const uint8_t> GetSideData(const AVPacket* packet) { // If the timestamp is positive, try to use FFmpeg's discard data.
+#if LIBAVUTIL_VERSION_MAJOR < 57 +#if LIBAVUTIL_VERSION_MAJOR < 57
+ int side_data_size = 0; + int skip_samples_size = 0;
+#else +#else
size_t side_data_size = 0; size_t skip_samples_size = 0;
+#endif +#endif
uint8_t* side_data = av_packet_get_side_data( const uint32_t* skip_samples_ptr =
packet, AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size); reinterpret_cast<const uint32_t*>(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<DecoderBuffer> buffer;
+#if LIBAVUTIL_VERSION_MAJOR < 57 +#if LIBAVUTIL_VERSION_MAJOR < 57
+ return base::span<const uint8_t>(side_data, base::checked_cast<size_t>(side_data_size)); + int side_data_size = 0;
+#else +#else
return base::span<const uint8_t>(side_data, side_data_size); size_t side_data_size = 0;
+#endif +#endif
} uint8_t* side_data = av_packet_get_side_data(
packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { @@ -461,7 +465,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
@@ -474,7 +482,11 @@ packet->size - data_offset);
base::HeapArray<uint8_t>::CopiedFrom(side_data);
} }
+#if LIBAVUTIL_VERSION_MAJOR < 57 +#if LIBAVUTIL_VERSION_MAJOR < 57

View File

@@ -0,0 +1,12 @@
diff --git a/build/linux/unbundle/ffmpeg.gn b/build/linux/unbundle/ffmpeg.gn
index 16e20744706..6a079b32221 100644
--- a/build/linux/unbundle/ffmpeg.gn
+++ b/build/linux/unbundle/ffmpeg.gn
@@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") {
"libavformat",
"libavutil",
]
+ defines = [ "av_stream_get_first_dts(stream)=stream->first_dts" ]
}
buildflag_header("ffmpeg_features") {

75
chromium-vaapi.patch Normal file
View File

@@ -0,0 +1,75 @@
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[];

View File

@@ -1,9 +1,9 @@
--- src/third_party/electron_node/common.gypi.orig 2025-07-19 11:44:59.181882205 +0200 --- src/third_party/electron_node/common.gypi.orig 2024-05-09 09:30:23.202414200 +0000
+++ src/third_party/electron_node/common.gypi 2025-07-19 16:21:44.297731896 +0200 +++ src/third_party/electron_node/common.gypi 2024-05-10 17:53:01.801592000 +0000
@@ -534,15 +534,19 @@ @@ -428,10 +428,15 @@
'ldflags': [ '-pthread' ], 'ldflags': [ '-pthread' ],
}], }],
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi openharmony"', { [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
- 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], - 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
+ # Add some useful flags which need to be specified on all modules anyway. + # 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 + # `-fpic -fno-semantic-interposition` is the best relocation model for code that will live in a dlopened library
@@ -11,19 +11,14 @@
+ # `-fvisibility=hidden` is something we're adding to fix downstream overzealous exports. + # `-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. + # 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': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-fpic', '-fno-semantic-interposition', '-fvisibility=hidden' ],
'cflags_cc': [ 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
'-fno-rtti',
'-fno-exceptions',
- '-fno-strict-aliasing',
'-std=gnu++20',
],
'defines': [ '__STDC_FORMAT_MACROS' ], 'defines': [ '__STDC_FORMAT_MACROS' ],
- 'ldflags': [ '-rdynamic' ], - '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': [ 'target_conditions': [
# The 1990s toolchain on SmartOS can't handle thin archives. # The 1990s toolchain on SmartOS can't handle thin archives.
['_type=="static_library" and OS=="solaris"', { ['_type=="static_library" and OS=="solaris"', {
@@ -720,29 +724,7 @@ @@ -608,29 +613,7 @@
'-Wl,--export-dynamic', '-Wl,--export-dynamic',
], ],
}], }],

View File

@@ -14,6 +14,6 @@ since we compile everything with -fasynchronous-unwind-tables anyway.
- # frames otherwise, even with --call-graph dwarf. - # frames otherwise, even with --call-graph dwarf.
- 'cflags': [ '-fno-omit-frame-pointer' ], - 'cflags': [ '-fno-omit-frame-pointer' ],
- }], - }],
['OS=="linux" or OS=="openharmony"', { ['OS=="linux"', {
'conditions': [ 'conditions': [
['enable_pgo_generate=="true"', { ['enable_pgo_generate=="true"', {

View File

@@ -1,97 +0,0 @@
--- 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",

View File

@@ -1,99 +0,0 @@
--- 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

View File

@@ -0,0 +1,21 @@
--- a/components/crash/core/app/crashpad.cc
+++ b/components/crash/core/app/crashpad.cc
@@ -28,7 +28,7 @@
#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 <absl/base/internal/raw_logging.h>
#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 {
#if BUILDFLAG(IS_IOS)

View File

@@ -69,7 +69,7 @@ EOF
export DEPOT_TOOLS_UPDATE=0 export DEPOT_TOOLS_UPDATE=0
echo ">>>>>> Downloading electron-${ELECTRON_PKGVERSION}" echo ">>>>>> Downloading electron-${ELECTRON_PKGVERSION}"
gclient sync -v --jobs 15 --nohooks --no-history --shallow --revision=v"${ELECTRON_PKGVERSION}" gclient sync -v --jobs $(nproc) --nohooks --no-history --shallow --revision=v"${ELECTRON_PKGVERSION}"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR: gclient sync failed" echo "ERROR: gclient sync failed"
cleanup_and_exit 1 cleanup_and_exit 1
@@ -139,20 +139,12 @@ python3 src/tools/download_optimization_profile.py \
# Needed to get typescript compiler # Needed to get typescript compiler
echo ">>>>>> Download and unpack webui-node-modules tarball for third_party/node" echo ">>>>>> Download and unpack webui-node-modules tarball for third_party/node"
python3 src/third_party/depot_tools/download_from_google_storage.py \ python3 src/third_party/depot_tools/download_from_google_storage.py \
--no_resume --no_auth --bucket chromium-nodejs \ --no_resume --extract --no_auth --bucket chromium-nodejs \
-s src/third_party/node/node_modules.tar.gz.sha1 -s src/third_party/node/node_modules.tar.gz.sha1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR: download_from_google_storage failed" echo "ERROR: download_from_google_storage failed"
cleanup_and_exit 1 cleanup_and_exit 1
fi 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 # we don't need the orig tarball
rm -v src/third_party/node/node_modules.tar.gz rm -v src/third_party/node/node_modules.tar.gz
@@ -174,9 +166,11 @@ echo ">>>>>> Remove bundled libs"
keeplibs=( keeplibs=(
base/third_party/cityhash #Derived code, not vendored dependency. base/third_party/cityhash #Derived code, not vendored dependency.
base/third_party/cityhash_v103 #Derived code, not vendored dep 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/icu #Derived code, not vendored dependency.
base/third_party/superfasthash #Not a shared library. base/third_party/superfasthash #Not a shared library.
base/third_party/symbolize #Derived code, not vendored dependency. 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. base/third_party/xdg_user_dirs #Derived code, not vendored dependency.
chrome/third_party/mozilla_security_manager #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. net/third_party/mozilla_security_manager #Derived code, not vendored dependency.
@@ -186,6 +180,7 @@ keeplibs=(
third_party/abseil-cpp #Leap and fc36 too old. 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 # 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/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/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 #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 third_party/boringssl/src/third_party/fiat #Not in any distro
@@ -218,29 +213,32 @@ keeplibs=(
third_party/devtools-frontend #Javascript code, integral part of chrome 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 #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/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/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
third_party/devtools-frontend/src/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/dom_distiller_js #javascript
#third_party/eigen3 #Used only by tflite which is not used in electron #third_party/eigen3 #Used only by tflite which is not used in electron
third_party/electron_node #Integral part of electron third_party/electron_node #Integral part of electron
third_party/emoji-segmenter #not available as a shared library 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/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/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/hunspell #heavily forked version
third_party/inspector_protocol #integral part of chrome third_party/inspector_protocol #integral part of chrome
third_party/ipcz #not in any distro third_party/ipcz #not in any distro
third_party/jstemplate #javascript
third_party/khronos #Modified to add ANGLE definitions third_party/khronos #Modified to add ANGLE definitions
third_party/leveldatabase #use of private headers third_party/leveldatabase #use of private headers
third_party/libaom #15.6 too old third_party/libaom #15.5 is too old
third_party/libaom/source/libaom/third_party/fastfeat third_party/libaom/source/libaom/third_party/fastfeat
third_party/libaom/source/libaom/third_party/SVT-AV1 third_party/libaom/source/libaom/third_party/SVT-AV1
third_party/libaom/source/libaom/third_party/vector third_party/libaom/source/libaom/third_party/vector
third_party/libaom/source/libaom/third_party/x86inc 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/libgav1 #Usage of private headers (ObuFrameHeader from utils/types.h)
third_party/libsrtp #Needs to be built against boringssl, not openssl third_party/libsrtp #Needs to be built against boringssl, not openssl
third_party/libsync #not yet in any distro 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/liburlpattern #Derived code, not vendored dep.
third_party/libva_protected_content #ChromeOS header not available separately. needed for build. third_party/libva_protected_content #ChromeOS header not available separately. needed for build.
third_party/libvpx #15.5/FC37 too old third_party/libvpx #15.5/FC37 too old
@@ -271,37 +269,36 @@ keeplibs=(
#third_party/pdfium/third_party/skia_shared #Skia is not available as a shared library yet. #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 #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/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/pffft #not in any distro, also heavily patched
third_party/polymer #javascript 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 #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/re2 # fedora too old
third_party/rnnoise #use of private headers 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/skia #integral part of chrome
third_party/speech-dispatcher #Headers for a delay-loaded optional dependency 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/sqlite #heavily forked version
third_party/swiftshader #not available as a shared library 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/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/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/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/swiftshader/third_party/subzero #integral part of swiftshader
#third_party/tflite #Not used by electron, but chrome needs it. #third_party/tflite #Not used by electron, but chrome needs it.
#third_party/tflite/src/third_party/eigen3 #third_party/tflite/src/third_party/eigen3
#third_party/tflite/src/third_party/fft2d #third_party/tflite/src/third_party/fft2d
third_party/vulkan-headers #15.6 too old 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_memory_allocator #not in Factory 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/webgpu-cts #Javascript code. Needed even if you're building chrome without webgpu
third_party/webrtc #Integral part of chrome 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/ooura #derived code, not vendored dep
third_party/webrtc/common_audio/third_party/spl_sqrt_floor #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/fft #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/g711 #derived code, not vendored dep
third_party/webrtc/modules/third_party/g722 #Fork. Original is from spandsp. 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/rtc_base/third_party/sigslot #derived code, not vendored dep third_party/webrtc/rtc_base/third_party/sigslot #derived code, not vendored dep
third_party/webrtc_overrides #Integral part of chrome third_party/webrtc_overrides #Integral part of chrome
third_party/widevine #Integral part of chrome. Needed. third_party/widevine #Integral part of chrome. Needed.
@@ -311,14 +308,14 @@ keeplibs=(
third_party/wayland-protocols/unstable #unknown origin. not in wayland-protocol-devel or elsewhere third_party/wayland-protocols/unstable #unknown origin. not in wayland-protocol-devel or elsewhere
third_party/wuffs #not in any distro third_party/wuffs #not in any distro
third_party/x11proto #derived code, not vendored dep 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 third_party/zlib/google #derived code, not vendored dep
url/third_party/mozilla #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/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/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 build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@@ -326,27 +323,18 @@ if [ $? -ne 0 ]; then
cleanup_and_exit 1 cleanup_and_exit 1
fi fi
# Now remove additional bundled/duplicate libraries in node/deps # Now remove additional bundled/duplicate libraries in node/deps
rm -rf third_party/electron_node/deps/{googletest/{include,src},icu-small,corepack} #292MB and vendored rm -rf third_party/electron_node/deps/{googletest/{include,src},icu-small} #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/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/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/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/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/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 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,include} rm -rvf third_party/electron_node/deps/v8/tools
ln -srv v8/tools -t third_party/electron_node/deps/v8/ 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/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 #Some more chonkers
rm -rf components/test/data #21MB rm -rf components/test/data #21MB
rm -rf docs #30MB rm -rf docs #30MB

View File

@@ -1,11 +0,0 @@
--- 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

View File

@@ -1,39 +0,0 @@
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
});

View File

@@ -144,19 +144,21 @@ author: Michael Gilbert <mgilbert@debian.org>
] ]
data_deps = [ "//testing:test_scripts_shared" ] data_deps = [ "//testing:test_scripts_shared" ]
} }
--- src/tools/gritsettings/resource_ids.spec.orig 2025-04-11 12:29:49.277239656 +0200 --- a/tools/gritsettings/resource_ids.spec
+++ src/tools/gritsettings/resource_ids.spec 2025-04-11 12:30:15.524243417 +0200 +++ b/tools/gritsettings/resource_ids.spec
@@ -1248,10 +1248,6 @@ @@ -755,12 +755,6 @@
"META": {"sizes": {"includes": [20]}}, "content/test/web_ui_mojo_test_resources.grd": {
"includes": [8280], "includes": [7340],
}, },
-
- # This file is generated during the build.
- "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd": { - "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd": {
- "META": {"sizes": {"includes": [20],}}, - "META": {"sizes": {"includes": [20],}},
- "includes": [8300], - "includes": [7360],
- }, - },
"<(SHARED_INTERMEDIATE_DIR)/content/browser/webrtc/resources/resources.grd": { # END content/ section.
"META": {"sizes": {"includes": [20],}},
"includes": [8320], # START "everything else" section.
--- a/content/browser/BUILD.gn --- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -2530,7 +2530,6 @@ source_set("browser") { @@ -2530,7 +2530,6 @@ source_set("browser") {
@@ -164,24 +166,24 @@ author: Michael Gilbert <mgilbert@debian.org>
"//components/vector_icons", "//components/vector_icons",
"//components/webauthn/json", "//components/webauthn/json",
- "//content/browser/tracing:resources", - "//content/browser/tracing:resources",
"//media/mojo/mojom:speech_recognition",
"//ui/base",
] ]
--- 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") { --- a/chrome/chrome_paks.gni
"$root_gen_dir/chrome/web_app_internals_resources.pak", +++ b/chrome/chrome_paks.gni
@@ -190,8 +190,6 @@ template("chrome_extra_paks") {
"$root_gen_dir/chrome/webui_gallery_resources.pak", "$root_gen_dir/chrome/webui_gallery_resources.pak",
"$root_gen_dir/chrome/whats_new_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/browser/tracing/tracing_resources.pak",
- "$root_gen_dir/content/traces_internals_resources.pak", - "$root_gen_dir/content/traces_internals_resources.pak",
] ]
deps += [ deps += [
"//chrome/browser/resources:dev_ui_paks", "//chrome/browser/resources:component_extension_resources",
@@ -241,7 +239,6 @@ template("chrome_extra_paks") { @@ -199,7 +197,6 @@ template("chrome_extra_paks") {
"//chrome/browser/resources/lens/shared:resources", "//chrome/browser/resources/lens/overlay:resources",
"//chrome/browser/resources/search_engine_choice:resources", "//chrome/browser/resources/search_engine_choice:resources",
"//chrome/browser/resources/tabs/tab_group_home:resources", "//content/browser/devtools:devtools_resources",
- "//content/browser/tracing:resources", - "//content/browser/tracing:resources",
] ]
if (is_chrome_branded) { if (is_chrome_branded) {
@@ -313,17 +315,17 @@ author: Michael Gilbert <mgilbert@debian.org>
"//third_party/perfetto/src/trace_processor:trace_processor_shell", "//third_party/perfetto/src/trace_processor:trace_processor_shell",
] ]
data = [ data = [
--- src/electron/build/electron_paks.gni.orig 2025-04-11 12:02:41.243100651 +0200 --- a/electron/electron_paks.gni
+++ src/electron/build/electron_paks.gni 2025-04-11 12:28:19.897748625 +0200 +++ b/electron/electron_paks.gni
@@ -57,7 +57,6 @@ template("electron_extra_paks") { @@ -57,7 +57,6 @@
"$root_gen_dir/chrome/common_resources.pak", "$root_gen_dir/chrome/dev_ui_browser_resources.pak",
"$root_gen_dir/components/components_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/resources/media/media_internals_resources.pak",
- "$root_gen_dir/content/browser/tracing/tracing_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/browser/webrtc/resources/webrtc_internals_resources.pak",
"$root_gen_dir/content/content_resources.pak", "$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/gpu_resources.pak", "$root_gen_dir/content/gpu_resources.pak",
@@ -76,7 +75,6 @@ template("electron_extra_paks") { @@ -73,7 +72,6 @@
"//content/browser/resources/gpu:resources", "//content/browser/resources/gpu:resources",
"//content/browser/resources/media:resources", "//content/browser/resources/media:resources",
"//content/browser/resources/process:resources", "//content/browser/resources/process:resources",

View File

@@ -0,0 +1,10 @@
--- 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") {

View File

@@ -22,9 +22,11 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
chromium/media/media_options.gni | 2 + chromium/media/media_options.gni | 2 +
7 files changed, 52 insertions(+), 27 deletions(-) 7 files changed, 52 insertions(+), 27 deletions(-)
--- src/content/browser/BUILD.gn.orig 2024-12-08 18:44:00.234689649 +0100 diff --git a/chromium/content/browser/BUILD.gn b/chromium/content/browser/BUILD.gn
+++ src/content/browser/BUILD.gn 2024-12-18 12:20:19.753578327 +0100 index 19b45dc1268..67dcd7752d0 100644
@@ -2134,13 +2134,6 @@ source_set("browser") { --- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -1909,11 +1909,6 @@ source_set("browser") {
"sms/user_consent_handler.h", "sms/user_consent_handler.h",
"sms/webotp_service.cc", "sms/webotp_service.cc",
"sms/webotp_service.h", "sms/webotp_service.h",
@@ -32,17 +34,21 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
- "speech/speech_recognition_dispatcher_host.h", - "speech/speech_recognition_dispatcher_host.h",
- "speech/speech_recognition_manager_impl.cc", - "speech/speech_recognition_manager_impl.cc",
- "speech/speech_recognition_manager_impl.h", - "speech/speech_recognition_manager_impl.h",
- "speech/speech_recognition_session.cc",
- "speech/speech_recognition_session.h",
- "speech/speech_recognizer.h", - "speech/speech_recognizer.h",
"speech/speech_synthesis_impl.cc", "speech/speech_synthesis_impl.cc",
"speech/speech_synthesis_impl.h", "speech/speech_synthesis_impl.h",
"speech/tts_controller_impl.cc", "speech/tts_controller_impl.cc",
@@ -3340,13 +3333,6 @@ source_set("browser") { @@ -2956,19 +2951,6 @@ source_set("browser") {
"service_worker/service_worker_usb_delegate_observer.cc", "service_worker/service_worker_usb_delegate_observer.cc",
"service_worker/service_worker_usb_delegate_observer.h", "service_worker/service_worker_usb_delegate_observer.h",
- # Most speech code is non-Android. - # 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.cc",
- "speech/network_speech_recognition_engine_impl.h", - "speech/network_speech_recognition_engine_impl.h",
- "speech/speech_recognition_engine.cc", - "speech/speech_recognition_engine.cc",
@@ -52,18 +58,15 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
"tracing/tracing_ui.cc", "tracing/tracing_ui.cc",
"tracing/tracing_ui.h", "tracing/tracing_ui.h",
@@ -3397,10 +3383,8 @@ source_set("browser") { @@ -2995,7 +2975,6 @@ source_set("browser") {
"//components/soda:constants", ]
"//components/soda:soda",
"//components/soda:utils", deps += [
- "//components/speech:speech", - "//components/speech:speech",
"//components/vector_icons", "//components/vector_icons",
"//components/webauthn/json", "//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" ] deps += [ "//ui/compositor" ]
} }
@@ -101,29 +104,31 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
if ((is_linux || is_chromeos) && use_dbus) { if ((is_linux || is_chromeos) && use_dbus) {
deps += [ "//dbus" ] deps += [ "//dbus" ]
} }
--- src/content/browser/browser_interface_binders.cc.orig 2025-07-19 11:32:34.193979827 +0200 diff --git a/chromium/content/browser/browser_interface_binders.cc b/chromium/content/browser/browser_interface_binders.cc
+++ src/content/browser/browser_interface_binders.cc 2025-07-20 14:51:05.789212478 +0200 index c5a6f0aea88..71d9bf41a71 100644
@@ -62,7 +62,9 @@ --- 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"
#include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/service_worker/service_worker_host.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) +#if BUILDFLAG(ENABLE_WEB_SPEECH)
#include "content/browser/speech/speech_recognition_dispatcher_host.h" #include "content/browser/speech/speech_recognition_dispatcher_host.h"
+#endif +#endif
#include "content/browser/storage_access/storage_access_handle.h" #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.mojom.h"
#include "content/browser/tracing/trace_report/trace_report_internals_ui.h" #include "content/browser/tracing/trace_report/trace_report_internals_ui.h"
@@ -101,7 +103,9 @@ @@ -144,7 +146,9 @@
#include "media/mojo/mojom/media_metrics_provider.mojom.h" #include "third_party/blink/public/mojom/sensor/web_sensor_provider.mojom.h"
#include "media/mojo/mojom/media_player.mojom.h" #include "third_party/blink/public/mojom/sms/webotp_service.mojom.h"
#include "media/mojo/mojom/remoting.mojom.h" #include "third_party/blink/public/mojom/speculation_rules/speculation_rules.mojom.h"
+#if BUILDFLAG(ENABLE_WEB_SPEECH) +#if BUILDFLAG(ENABLE_WEB_SPEECH)
#include "media/mojo/mojom/speech_recognizer.mojom.h" #include "third_party/blink/public/mojom/speech/speech_recognizer.mojom.h"
+#endif +#endif
#include "media/mojo/mojom/video_decode_perf_history.mojom.h" #include "third_party/blink/public/mojom/speech/speech_synthesis.mojom.h"
#include "media/mojo/mojom/video_encoder_metrics_provider.mojom.h" #include "third_party/blink/public/mojom/storage_access/storage_access_handle.mojom.h"
#include "media/mojo/mojom/webrtc_video_perf.mojom.h" #include "third_party/blink/public/mojom/usb/web_usb_service.mojom.h"
@@ -209,7 +213,9 @@ @@ -168,7 +172,9 @@
#else // BUILDFLAG(IS_ANDROID) #else // BUILDFLAG(IS_ANDROID)
#include "content/browser/direct_sockets/direct_sockets_service_impl.h" #include "content/browser/direct_sockets/direct_sockets_service_impl.h"
#include "media/mojo/mojom/renderer_extensions.mojom.h" #include "media/mojo/mojom/renderer_extensions.mojom.h"
@@ -132,22 +137,21 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
+#endif +#endif
#include "third_party/blink/public/mojom/hid/hid.mojom.h" #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/installedapp/installed_app_provider.mojom.h"
#endif // BUILDFLAG(IS_ANDROID) #include "third_party/blink/public/mojom/serial/serial.mojom.h"
@@ -865,11 +871,13 @@ void PopulateFrameBinders(RenderFrameHos @@ -830,10 +836,12 @@ void PopulateFrameBinders(RenderFrameHostImpl* host, mojo::BinderMap* map) {
map->Add<blink::mojom::SharedWorkerConnector>( map->Add<blink::mojom::SharedWorkerConnector>(
base::BindRepeating(&BindSharedWorkerConnector, base::Unretained(host))); base::BindRepeating(&BindSharedWorkerConnector, base::Unretained(host)));
+#if BUILDFLAG(ENABLE_WEB_SPEECH) +#if BUILDFLAG(ENABLE_WEB_SPEECH)
map->Add<media::mojom::SpeechRecognizer>( map->Add<blink::mojom::SpeechRecognizer>(
base::BindRepeating(&SpeechRecognitionDispatcherHost::Create, base::BindRepeating(&SpeechRecognitionDispatcherHost::Create,
host->GetProcess()->GetDeprecatedID(), host->GetProcess()->GetID(), host->GetRoutingID()),
host->GetRoutingID()),
GetIOThreadTaskRunner({})); GetIOThreadTaskRunner({}));
+#endif +#endif
map->Add<blink::mojom::SpeechSynthesis>(base::BindRepeating( map->Add<blink::mojom::SpeechSynthesis>(base::BindRepeating(
&RenderFrameHostImpl::GetSpeechSynthesis, base::Unretained(host))); &RenderFrameHostImpl::GetSpeechSynthesis, base::Unretained(host)));
@@ -1194,6 +1202,7 @@ void PopulateBinderMapWithContext( @@ -1099,6 +1107,7 @@ void PopulateBinderMapWithContext(
#if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
map->Add<blink::mojom::DirectSocketsService>( map->Add<blink::mojom::DirectSocketsService>(
base::BindRepeating(&DirectSocketsServiceImpl::CreateForFrame)); base::BindRepeating(&DirectSocketsServiceImpl::CreateForFrame));
@@ -155,7 +159,7 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
map->Add<media::mojom::SpeechRecognitionContext>(base::BindRepeating( map->Add<media::mojom::SpeechRecognitionContext>(base::BindRepeating(
&EmptyBinderForFrame<media::mojom::SpeechRecognitionContext>)); &EmptyBinderForFrame<media::mojom::SpeechRecognitionContext>));
map->Add<media::mojom::SpeechRecognitionClientBrowserInterface>( map->Add<media::mojom::SpeechRecognitionClientBrowserInterface>(
@@ -1205,6 +1214,7 @@ void PopulateBinderMapWithContext( @@ -1110,6 +1119,7 @@ void PopulateBinderMapWithContext(
map->Add<media::mojom::MediaPlayerObserverClient>(base::BindRepeating( map->Add<media::mojom::MediaPlayerObserverClient>(base::BindRepeating(
&EmptyBinderForFrame<media::mojom::MediaPlayerObserverClient>)); &EmptyBinderForFrame<media::mojom::MediaPlayerObserverClient>));
#endif #endif
@@ -163,11 +167,13 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
#if BUILDFLAG(ENABLE_UNHANDLED_TAP) #if BUILDFLAG(ENABLE_UNHANDLED_TAP)
map->Add<blink::mojom::UnhandledTapNotifier>(base::BindRepeating( map->Add<blink::mojom::UnhandledTapNotifier>(base::BindRepeating(
&EmptyBinderForFrame<blink::mojom::UnhandledTapNotifier>)); &EmptyBinderForFrame<blink::mojom::UnhandledTapNotifier>));
--- src/content/browser/browser_main_loop.cc.orig 2025-07-19 11:32:34.193979827 +0200 diff --git a/chromium/content/browser/browser_main_loop.cc b/chromium/content/browser/browser_main_loop.cc
+++ src/content/browser/browser_main_loop.cc 2025-07-20 14:51:05.789212478 +0200 index aaa752bec61..b3a1ed50d20 100644
@@ -91,7 +91,9 @@ --- 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"
#include "content/browser/screenlock_monitor/screenlock_monitor_device_source.h" #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" #include "content/browser/sms/sms_provider.h"
+#if BUILDFLAG(ENABLE_WEB_SPEECH) +#if BUILDFLAG(ENABLE_WEB_SPEECH)
#include "content/browser/speech/speech_recognition_manager_impl.h" #include "content/browser/speech/speech_recognition_manager_impl.h"
@@ -175,7 +181,7 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
#include "content/browser/speech/tts_controller_impl.h" #include "content/browser/speech/tts_controller_impl.h"
#include "content/browser/startup_data_impl.h" #include "content/browser/startup_data_impl.h"
#include "content/browser/startup_task_runner.h" #include "content/browser/startup_task_runner.h"
@@ -1162,12 +1164,14 @@ void BrowserMainLoop::ShutdownThreadsAnd @@ -1114,12 +1116,14 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() {
midi_service_->Shutdown(); midi_service_->Shutdown();
} }
@@ -190,7 +196,7 @@ Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
TtsControllerImpl::GetInstance()->Shutdown(); TtsControllerImpl::GetInstance()->Shutdown();
@@ -1405,13 +1409,14 @@ void BrowserMainLoop::PostCreateThreadsI @@ -1364,13 +1368,14 @@ void BrowserMainLoop::PostCreateThreadsImpl() {
media_stream_manager_ = media_stream_manager_ =
std::make_unique<MediaStreamManager>(audio_system_.get()); std::make_unique<MediaStreamManager>(audio_system_.get());
} }
@@ -233,16 +239,18 @@ index 3a2e713ccc3..6af5afde20e 100644
{wrf::EnableScriptedSpeechSynthesis, switches::kDisableSpeechSynthesisAPI, {wrf::EnableScriptedSpeechSynthesis, switches::kDisableSpeechSynthesisAPI,
false}, false},
{wrf::EnableSharedWorker, switches::kDisableSharedWorkers, false}, {wrf::EnableSharedWorker, switches::kDisableSharedWorkers, false},
--- src/media/BUILD.gn.orig 2025-07-19 11:32:35.633979930 +0200 diff --git a/chromium/media/BUILD.gn b/chromium/media/BUILD.gn
+++ src/media/BUILD.gn 2025-07-20 14:51:07.213212462 +0200 index 01e0910666e..6ce78127e3f 100644
@@ -61,6 +61,7 @@ buildflag_header("media_buildflags") { --- 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",
"ENABLE_MSE_MPEG2TS_STREAM_PARSER=$enable_mse_mpeg2ts_stream_parser", "ENABLE_MSE_MPEG2TS_STREAM_PARSER=$enable_mse_mpeg2ts_stream_parser",
"PLATFORM_HAS_OPTIONAL_HEVC_DECODE_SUPPORT=$platform_has_optional_hevc_decode_support", "PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT=$platform_has_optional_hevc_support",
"PLATFORM_HAS_OPTIONAL_HEVC_ENCODE_SUPPORT=$platform_has_optional_hevc_encode_support",
+ "ENABLE_WEB_SPEECH=$enable_web_speech", + "ENABLE_WEB_SPEECH=$enable_web_speech",
"USE_ARC_PROTECTED_MEDIA=$use_arc_protected_media", "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_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 diff --git a/chromium/media/media_options.gni b/chromium/media/media_options.gni
index 5667cac61f3..48ea95a99a6 100644 index 5667cac61f3..48ea95a99a6 100644
--- a/media/media_options.gni --- a/media/media_options.gni
@@ -260,9 +268,9 @@ index 5667cac61f3..48ea95a99a6 100644
cgit v1.2.1 cgit v1.2.1
--- src/components/speech/BUILD.gn.orig 2024-12-08 18:34:57.021340049 +0100 --- src/components/speech/BUILD.gn.old 2023-05-13 15:23:05.850506351 +0200
+++ src/components/speech/BUILD.gn 2024-12-18 12:18:14.187490208 +0100 +++ src/components/speech/BUILD.gn 2023-05-14 14:39:12.182694489 +0200
@@ -6,12 +6,6 @@ import("//build/config/features.gni") @@ -4,12 +4,6 @@
source_set("speech") { source_set("speech") {
sources = [ sources = [
@@ -275,11 +283,11 @@ cgit v1.2.1
"downstream_loader.cc", "downstream_loader.cc",
"downstream_loader.h", "downstream_loader.h",
"downstream_loader_client.h", "downstream_loader_client.h",
@@ -27,7 +21,6 @@ source_set("speech") { @@ -24,7 +18,6 @@
"//mojo/public/cpp/system", "//mojo/public/cpp/system",
"//services/network/public/cpp", "//services/network/public/cpp",
"//services/network/public/mojom", "//services/network/public/mojom",
- "//third_party/flac", - "//third_party/flac",
] ]
}
if (!is_android) {

View File

@@ -0,0 +1,10 @@
--- 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"

View File

@@ -0,0 +1,27 @@
--- 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

View File

@@ -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 --- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -1789,8 +1790,9 @@ @@ -1789,8 +1790,9 @@
deps = [ "//third_party/angle:libGLESv2" ]
} deps = [ "//third_party/angle:libGLESv2" ]
} }
- if (!is_chromeos && angle_shared_libvulkan) { - if (!is_chromeos) {
+ source_set("angle_libvulkan_symbols") {} + source_set("angle_libvulkan_symbols") {}
+ if (false) { + if (false) {
extract_symbols("angle_libvulkan_symbols") { extract_symbols("angle_libvulkan_symbols") {
binary = "$root_out_dir/libvulkan.so.1" binary = "$root_out_dir/libvulkan.so.1"
if (current_cpu == "x86") { if (current_cpu == "x86") {
--- src/third_party/vulkan-loader/src/BUILD.gn.orig 2024-12-08 18:37:20.394677662 +0100 --- a/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn
+++ src/third_party/vulkan-loader/src/BUILD.gn 2024-12-18 13:15:54.021404544 +0100 +++ b/third_party/vulkan-deps/vulkan-loader/src/BUILD.gn
@@ -144,7 +144,18 @@ if (!is_android) { @@ -99,7 +99,18 @@
} library_type = "static_library"
} }
- target(library_type, "libvulkan") { - target(library_type, "libvulkan") {
@@ -35,3 +35,4 @@ Do not try to build a private copy of a DLL which is already available on every
sources = [ sources = [
"loader/adapters.h", "loader/adapters.h",
"loader/allocation.c", "loader/allocation.c",

View File

@@ -0,0 +1,17 @@
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<std::string>* GetStreamingSchemes() {
- static base::NoDestructor<std::vector<std::string>> streaming_schemes({
+ static base::NoDestructor<std::vector<std::string>> streaming_schemes{{
url::kHttpsScheme,
url::kHttpScheme
- });
+ }};
return streaming_schemes.get();
}

View File

@@ -0,0 +1,14 @@
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

View File

@@ -0,0 +1,18 @@
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

View File

@@ -0,0 +1,124 @@
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<bool(base::CommandLine command_line,
const base::FilePath& current_directory,
- const std::vector<const uint8_t> additional_data)>;
+ const std::vector<uint8_t> 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<std::string>& argv,
- const std::vector<const uint8_t> additional_data,
+ const std::vector<uint8_t> 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<std::string>& argv,
- const std::vector<const uint8_t> additional_data,
+ const std::vector<uint8_t> 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<std::string> command_line(tokens.begin() + 1, tokens.begin() + 1 + num_args);
- std::vector<const uint8_t> additional_data;
+ std::vector<uint8_t> 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<const uint8_t*>(remaining_args.c_str());
- additional_data = std::vector<const uint8_t>(
+ additional_data = std::vector<uint8_t>(
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<const uint8_t>* parsed_additional_data) {
+ std::vector<uint8_t>* 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<const uint8_t*>(additional_data.c_str());
- *parsed_additional_data = std::vector<const uint8_t>(additional_data_bytes,
+ *parsed_additional_data = std::vector<uint8_t>(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<const uint8_t> additional_data;
+ std::vector<uint8_t> additional_data;
if (!ParseCommandLine(cds, &parsed_command_line, &current_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(base::CommandLine command_line,
const base::FilePath& current_directory,
- const std::vector<const uint8_t> additional_data)>& callback,
+ const std::vector<uint8_t> additional_data)>& callback,
base::CommandLine cmd,
const base::FilePath& cwd,
- const std::vector<const uint8_t> additional_data) {
+ const std::vector<uint8_t> additional_data) {
// Make sure the callback is called after app gets ready.
if (Browser::Get()->is_ready()) {
callback.Run(std::move(cmd), cwd, std::move(additional_data));
@@ -1081,7 +1081,7 @@ std::string App::GetLocaleCountryCode()
void App::OnSecondInstance(base::CommandLine cmd,
const base::FilePath& cwd,
- const std::vector<const uint8_t> additional_data) {
+ const std::vector<uint8_t> additional_data) {
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Value> 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(base::CommandLine cmd,
const base::FilePath& cwd,
- const std::vector<const uint8_t> additional_data);
+ const std::vector<uint8_t> additional_data);
bool HasSingleInstanceLock() const;
bool RequestSingleInstanceLock(gin::Arguments* args);
void ReleaseSingleInstanceLock();

View File

@@ -1,15 +1,15 @@
Index: electron-17.1.0/third_party/electron_node/common.gypi Index: electron-17.1.0/third_party/electron_node/common.gypi
=================================================================== ===================================================================
--- src/third_party/electron_node/common.gypi.orig 2025-03-06 22:25:15.650295769 +0100 --- electron-17.1.0.orig/third_party/electron_node/common.gypi 2022-03-07 17:39:13.557371769 +0100
+++ src/third_party/electron_node/common.gypi 2025-03-07 07:06:10.532421547 +0100 +++ electron-17.1.0/third_party/electron_node/common.gypi 2022-03-09 08:29:08.214665848 +0100
@@ -486,6 +486,10 @@ @@ -405,6 +405,10 @@
'NOMINMAX', 'BUILDING_UV_SHARED=1',
], ],
}], }],
+ [ 'OS in "linux"', { + [ 'OS in "linux"', {
+ 'cflags': [ '-I/usr/include/electron' ], + 'cflags': [ '-I/usr/include/electron' ],
+ 'libraries': [ '-lz' ], + 'libraries': [ '-lz' ],
+ }], + }],
[ 'OS in "linux freebsd openbsd solaris aix os400 openharmony"', { [ 'OS in "linux freebsd openbsd solaris aix os400"', {
'cflags': [ '-pthread' ], 'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ], 'ldflags': [ '-pthread' ],

View File

@@ -0,0 +1,17 @@
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');

3
electron-30.5.0.tar.zst Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85fa505a8c6b0d13e0af3dc2932a99bc556d0172fc1ef73d8fc2f40c80356270
size 588034335

Binary file not shown.

View File

@@ -1,9 +1,5 @@
#!/bin/bash #!/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 set -euo pipefail
name=electron name=electron

View File

@@ -1,8 +1,8 @@
Reducing symbol_level is a kludge and should have no effect on generated code. 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.orig
+++ src/base/BUILD.gn 2024-12-18 12:11:47.597615650 +0100 +++ src/base/BUILD.gn
@@ -2510,11 +2510,6 @@ buildflag_header("debugging_buildflags") @@ -2531,11 +2531,6 @@ buildflag_header("debugging_buildflags")
enable_commandline_sequence_checks = enable_commandline_sequence_checks =
(is_debug || dcheck_always_on) && !is_android (is_debug || dcheck_always_on) && !is_android
@@ -11,15 +11,15 @@ Reducing symbol_level is a kludge and should have no effect on generated code.
- symbol_level > 0, - symbol_level > 0,
- "symbol_level must be set to greater than 0 for source line numbers.") - "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 flags = [
+++ src/build/config/logging.gni 2024-12-18 12:12:08.104531156 +0100 "DCHECK_IS_CONFIGURABLE=$dcheck_is_configurable",
@@ -20,5 +20,5 @@ declare_args() { --- src/build/config/logging.gni.orig
+++ src/build/config/logging.gni
@@ -11,5 +11,5 @@ declare_args() {
enable_log_error_not_reached =
is_chromeos_ash && !(is_debug || dcheck_always_on)
# 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 = symbol_level > 0
+ enable_stack_trace_line_numbers = true + enable_stack_trace_line_numbers = true
} }

View File

@@ -1,11 +0,0 @@
--- 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<std::vector<url::Origin>>
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::vector<url::Origin>>(std::in_place);
}
const net::structured_headers::ParameterizedMember& parameterized_member =
it->second;

View File

@@ -0,0 +1,20 @@
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<net::DrainableIOBuffer> write_buf_;
- scoped_refptr<net::DrainableIOBuffer> read_buf_;
+ ::scoped_refptr<net::DrainableIOBuffer> write_buf_;
+ ::scoped_refptr<net::DrainableIOBuffer> read_buf_;
};
} // namespace webrtc

View File

@@ -1,215 +0,0 @@
From 129f48501a7c3fa4236234f2fa0aee490a845b59 Mon Sep 17 00:00:00 2001
From: Thomas Guilbert <tguilbert@chromium.org>
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 <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Auto-Submit: Thomas Guilbert <tguilbert@chromium.org>
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();

View File

@@ -176,6 +176,33 @@ index 5f257bdfaa6..e1be5aa9a5b 100644
if (frame->sample_rate != sample_rate_ || channels != channels_ || if (frame->sample_rate != sample_rate_ || channels != channels_ ||
frame->format != av_sample_format_) { frame->format != av_sample_format_) {
DLOG(ERROR) << "Unsupported midstream configuration change!" DLOG(ERROR) << "Unsupported midstream configuration change!"
diff --git a/media/filters/audio_file_reader_unittest.cc b/media/filters/audio_file_reader_unittest.cc
index 2aba7927a31..1f45a50cace 100644
--- a/media/filters/audio_file_reader_unittest.cc
+++ b/media/filters/audio_file_reader_unittest.cc
@@ -121,11 +121,11 @@ class AudioFileReaderTest : public testing::Test {
EXPECT_FALSE(reader_->Open());
}
- void RunTestFailingDecode(const char* fn) {
+ void RunTestFailingDecode(const char* fn, int expect_read = 0) {
Initialize(fn);
EXPECT_TRUE(reader_->Open());
std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets;
- EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0);
+ EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read);
}
void RunTestPartialDecode(const char* fn) {
@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) {
}
TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) {
- RunTestFailingDecode("midstream_config_change.mp3");
+ RunTestFailingDecode("midstream_config_change.mp3", 42624);
}
#endif
diff --git a/media/filters/audio_video_metadata_extractor.cc b/media/filters/audio_video_metadata_extractor.cc diff --git a/media/filters/audio_video_metadata_extractor.cc b/media/filters/audio_video_metadata_extractor.cc
index 185819eb936..69ff508c221 100644 index 185819eb936..69ff508c221 100644
--- a/media/filters/audio_video_metadata_extractor.cc --- a/media/filters/audio_video_metadata_extractor.cc
@@ -236,6 +263,19 @@ index 6f231c85729..ca5e5fb927d 100644
frame_length_ = header_plus_packet_size; 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 diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index 6a56c675f7d..4615fdeb3fb 100644 index 6a56c675f7d..4615fdeb3fb 100644
--- a/media/filters/ffmpeg_audio_decoder.cc --- a/media/filters/ffmpeg_audio_decoder.cc
@@ -258,6 +298,20 @@ index 6a56c675f7d..4615fdeb3fb 100644
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED && if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) { config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
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, @@ -403,7 +403,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
if (frame->nb_samples <= 0) if (frame->nb_samples <= 0)
return AVERROR(EINVAL); return AVERROR(EINVAL);

View File

@@ -1,10 +0,0 @@
--- 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 <stdint.h>
#include <optional>
#include <string>
#include <utility>

View File

@@ -0,0 +1,31 @@
From 072b9f3bc340020325cf3dd7bff1991cd22de171 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue, 19 Mar 2024 16:27:55 +0000
Subject: [PATCH] IWYU: missing include for std::optional usage in
first_party_sets_handler_database_helper.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bug: 41455655
Change-Id: Ia644d2e6baa904190d162575dd16264e66ea227e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5377063
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1274977}
---
.../first_party_sets/first_party_sets_handler_database_helper.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/content/browser/first_party_sets/first_party_sets_handler_database_helper.h b/content/browser/first_party_sets/first_party_sets_handler_database_helper.h
index a12af718abda0..92afb98d64ea4 100644
--- a/content/browser/first_party_sets/first_party_sets_handler_database_helper.h
+++ b/content/browser/first_party_sets/first_party_sets_handler_database_helper.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_FIRST_PARTY_SETS_FIRST_PARTY_SETS_HANDLER_DATABASE_HELPER_H_
#include <memory>
+#include <optional>
#include <string>
#include <utility>
#include <vector>

View File

@@ -1,166 +0,0 @@
--- 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",

View File

@@ -1,60 +0,0 @@
--- 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") {

View File

@@ -1,8 +0,0 @@
--- 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") {}

View File

@@ -45,6 +45,18 @@ Use -fpic for code which goes only in dlls (gives smaller code),
":spvtools_include_gen_dirs", ":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 = []
+ cflags = ["-fpic", "-fno-semantic-interposition"] + cflags = ["-fpic", "-fno-semantic-interposition"]
+ asmflags = ["-fpic", "-fno-semantic-interposition"] + asmflags = ["-fpic", "-fno-semantic-interposition"]
@@ -73,26 +85,26 @@ Use -fpic for code which goes only in dlls (gives smaller code),
sources = [ sources = [
"compression_utils_portable.cc", "compression_utils_portable.cc",
"compression_utils_portable.h", "compression_utils_portable.h",
--- src/ui/qt/BUILD.gn.orig 2025-07-19 11:32:45.537979340 +0200 --- src/ui/qt/BUILD.gn.old 2022-12-02 23:49:17.792117400 +0100
+++ src/ui/qt/BUILD.gn 2025-07-19 16:18:57.173759933 +0200 +++ src/ui/qt/BUILD.gn 2022-12-04 14:32:48.407196100 +0100
@@ -39,6 +39,8 @@ source_set("qt_interface") { @@ -43,6 +43,8 @@
# target instead. # target instead.
public = [ "qt_interface.h" ] public = [ "qt_interface.h" ]
sources = [ "qt_interface.cc" ] sources = [ "qt_interface.cc" ]
+ cflags = ["-fpic", "-fno-semantic-interposition"] + cflags = ["-fpic", "-fno-semantic-interposition"]
+ asmflags = ["-fpic", "-fno-semantic-interposition"] + asmflags = ["-fpic", "-fno-semantic-interposition"]
}
# Don't use libc++ modules as this depends on libstdc++. template("qt_shim") {
use_libcxx_modules = false @@ -76,6 +78,8 @@
@@ -102,6 +104,8 @@ template("qt_shim") {
sources += get_target_outputs(":generate_moc" + invoker.qt_version) sources += get_target_outputs(":generate_moc" + invoker.qt_version)
deps += [ ":generate_moc" + invoker.qt_version ] deps += [ ":generate_moc" + invoker.qt_version ]
} }
+ cflags = ["-fpic", "-fno-semantic-interposition"] + cflags = ["-fpic", "-fno-semantic-interposition"]
+ asmflags = ["-fpic", "-fno-semantic-interposition"] + asmflags = ["-fpic", "-fno-semantic-interposition"]
}
# 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 qt_shim("qt5_shim") {
--- src/third_party/abseil-cpp/BUILD.gn.old --- src/third_party/abseil-cpp/BUILD.gn.old
+++ src/third_party/abseil-cpp/BUILD.gn +++ src/third_party/abseil-cpp/BUILD.gn
@@ -132,6 +132,8 @@ config("absl_define_config") { @@ -132,6 +132,8 @@ config("absl_define_config") {

View File

@@ -1,21 +0,0 @@
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("*********************************************************************")
-}

View File

@@ -0,0 +1,32 @@
From 15e24abc1646ad9984923234a041cd0c3b8b1607 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue, 19 Mar 2024 16:21:06 +0000
Subject: [PATCH] IWYU: missing include for usage of std::optional in
gpu_adapter_info.h
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bug: 41455655
Change-Id: I42d6c9f99ea7718fa87267ebcf3368d0f46f5053
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5374260
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1274974}
---
third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h b/third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h
index 70b15d5c055aa..2084afbe6e877 100644
--- a/third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h
+++ b/third_party/blink/renderer/modules/webgpu/gpu_adapter_info.h
@@ -5,6 +5,8 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_GPU_ADAPTER_INFO_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBGPU_GPU_ADAPTER_INFO_H_
+#include <optional>
+
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

View File

@@ -0,0 +1,93 @@
From 5fcaeafcab5460ea65e4a7bdee6589002adf74d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <drott@chromium.org>
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 <moonira@google.com>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
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 <unicode/uchar.h>
#include <unicode/uscript.h>
#include <algorithm>
+#include <hb-cplusplus.hh>
#include <memory>
#include <utility>
@@ -194,33 +195,6 @@ struct ReshapeQueueItem {
: action_(action), start_index_(start), num_characters_(num) {}
};
-template <typename T>
-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<hb_buffer_t> buffer;
+ const hb::unique_ptr<hb_buffer_t> buffer;
FontFeatures font_features;
Deque<ReshapeQueueItem> reshape_queue;
const ShapeOptions options;
@@ -1032,7 +1007,7 @@ void HarfBuzzShaper::GetGlyphData(const
UScriptCode script,
bool is_horizontal,
GlyphDataList& glyphs) {
- HarfBuzzScopedPtr<hb_buffer_t> hb_buffer(hb_buffer_create(), hb_buffer_destroy);
+ hb::unique_ptr<hb_buffer_t> 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,

View File

@@ -0,0 +1,531 @@
From aa2ff2bee16776301bd840a4e18bdebdfb916822 Mon Sep 17 00:00:00 2001
From: Munira Tursunova <moonira@google.com>
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 <drott@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Commit-Queue: Munira Tursunova <moonira@google.com>
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 <hb.h>
#include <hb-subset.h>
+#include <hb-cplusplus.hh>
// clang-format on
#include <memory>
@@ -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<hb_blob_t> MakeBlob(sk_sp<SkData> data) {
+hb::unique_ptr<hb_blob_t> MakeBlob(sk_sp<SkData> data) {
if (!data ||
!base::IsValueInRangeForNumericType<unsigned int, size_t>(data->size()))
- return nullptr;
- return HbScoped<hb_blob_t>(
+ return hb::unique_ptr<hb_blob_t>(nullptr);
+ return hb::unique_ptr<hb_blob_t>(
hb_blob_create(static_cast<const char*>(data->data()),
static_cast<unsigned int>(data->size()),
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
@@ -72,8 +72,9 @@
family_name.c_str());
int ttc_index = 0;
sk_sp<SkData> data = StreamToData(typeface->openStream(&ttc_index));
- HbScoped<hb_face_t> face(hb_face_create(MakeBlob(data).get(), ttc_index));
- HbScoped<hb_subset_input_t> input(hb_subset_input_create_or_fail());
+ hb::unique_ptr<hb_face_t> face(
+ hb_face_create(MakeBlob(data).get(), ttc_index));
+ hb::unique_ptr<hb_subset_input_t> 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<hb_face_t> subset_face(hb_subset_or_fail(face.get(), input.get()));
+ hb::unique_ptr<hb_face_t> 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<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
+ hb::unique_ptr<hb_blob_t> 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 <hb.h>
+#include <hb-cplusplus.hh>
#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<hb_blob_t> table_blob(hb_face_reference_table(face, kCOLRTag));
+ hb::unique_ptr<hb_blob_t> 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<SkData> sk_data) {
- HbScoped<hb_blob_t> font_blob(
+ hb::unique_ptr<hb_blob_t> font_blob(
hb_blob_create(reinterpret_cast<const char*>(sk_data->bytes()),
base::checked_cast<unsigned>(sk_data->size()),
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
- HbScoped<hb_face_t> face(hb_face_create(font_blob.get(), 0));
+ hb::unique_ptr<hb_face_t> 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 <hb.h>
#include <hb-aat.h>
+#include <hb-cplusplus.hh>
// 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<hb_blob_t> morx_blob(
+ hb::unique_ptr<hb_blob_t> morx_blob(
hb_face_reference_table(hb_face, HB_TAG('m', 'o', 'r', 'x')));
- HbScoped<hb_blob_t> mort_blob(
+ hb::unique_ptr<hb_blob_t> 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 <hb.h>
+#include <hb-cplusplus.hh>
#include <hb-ot.h>
// clang-format on
@@ -28,7 +28,7 @@
if (!typeface || !typeface->getTableSize(kCpalTag))
return absl::nullopt;
- HbScoped<hb_face_t> face(HbFaceFromSkTypeface(typeface));
+ hb::unique_ptr<hb_face_t> face(HbFaceFromSkTypeface(typeface));
if (!face || !hb_ot_color_has_palettes(face.get()))
return absl::nullopt;
@@ -49,7 +49,7 @@ absl::optional<uint16_t> OpenTypeCpalLoo
Vector<Color> OpenTypeCpalLookup::RetrieveColorRecords(
sk_sp<SkTypeface> typeface,
unsigned palette_index) {
- HbScoped<hb_face_t> face(HbFaceFromSkTypeface(typeface));
+ hb::unique_ptr<hb_face_t> face(HbFaceFromSkTypeface(typeface));
if (!face) {
return Vector<Color>();
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 <hb.h>
+#include <hb-cplusplus.hh>
#include <hb-ot.h>
// clang-format on
@@ -23,11 +23,11 @@
return output;
sk_sp<SkData> sk_data =
SkData::MakeFromStream(stream.get(), stream->getLength());
- HbScoped<hb_blob_t> blob(
+ hb::unique_ptr<hb_blob_t> blob(
hb_blob_create(reinterpret_cast<const char*>(sk_data->bytes()),
base::checked_cast<unsigned>(sk_data->size()),
HB_MEMORY_MODE_READONLY, nullptr, nullptr));
- HbScoped<hb_face_t> face(hb_face_create(blob.get(), 0));
+ hb::unique_ptr<hb_face_t> face(hb_face_create(blob.get(), 0));
unsigned axes_count = hb_ot_var_get_axis_count(face.get());
std::unique_ptr<hb_ot_var_axis_info_t[]> axes =
std::make_unique<hb_ot_var_axis_info_t[]>(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 <hb.h>
+#include <hb-cplusplus.hh>
#include <hb-ot.h>
// 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<hb_codepoint_t>(-1);
hb_codepoint_t space = kInvalidCodepoint;
- HbScoped<hb_set_t> glyphs(hb_set_create());
+ hb::unique_ptr<hb_set_t> 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<hb_face_t> CreateFace(FontPlatformData* platform_data) {
- HbScoped<hb_face_t> face;
+static hb::unique_ptr<hb_face_t> CreateFace(FontPlatformData* platform_data) {
+ hb::unique_ptr<hb_face_t> face;
sk_sp<SkTypeface> 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_t>(hb_face_create_for_tables(
+ HarfBuzzSkiaGetTable, typeface.get(), nullptr));
}
DCHECK(face);
@@ -415,7 +415,7 @@
static scoped_refptr<HarfBuzzFontData> CreateHarfBuzzFontData(
hb_face_t* face,
SkTypeface* typeface) {
- HbScoped<hb_font_t> ot_font(hb_font_create(face));
+ hb::unique_ptr<hb_font_t> 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<hb_face_t> face = CreateFace(platform_data);
+ hb::unique_ptr<hb_face_t> 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 <hb.h>
+#include <hb-cplusplus.hh>
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<hb_face_t> HbFaceFromSkTypeface(sk_sp<SkTypeface> typeface) {
- HbScoped<hb_face_t> return_face(nullptr);
+hb::unique_ptr<hb_face_t> HbFaceFromSkTypeface(sk_sp<SkTypeface> typeface) {
+ hb::unique_ptr<hb_face_t> 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<hb_blob_t> face_blob(hb_blob_create(
+ hb::unique_ptr<hb_blob_t> face_blob(hb_blob_create(
reinterpret_cast<const char*>(tf_memory),
base::checked_cast<unsigned int>(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<unsigned>(ttc_index) < num_hb_faces) {
- return_face.reset(hb_face_create(face_blob.get(), ttc_index));
+ return_face =
+ hb::unique_ptr<hb_face_t>(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 <hb.h>
+#include <hb-cplusplus.hh>
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<hb_face_t> HbFaceFromSkTypeface(
+PLATFORM_EXPORT hb::unique_ptr<hb_face_t> HbFaceFromSkTypeface(
sk_sp<SkTypeface> 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<hb_font_t>(font)),
+ : hb_font_(hb::unique_ptr<hb_font_t>(font)),
hb_font_data_(std::make_unique<HarfBuzzFontData>()) {}
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 <hb.h>
+#include <hb-cplusplus.hh>
#include <memory>
@@ -39,7 +39,7 @@ class HbFontCacheEntry : public RefCount
private:
explicit HbFontCacheEntry(hb_font_t* font);
- HbScoped<hb_font_t> hb_font_;
+ hb::unique_ptr<hb_font_t> hb_font_;
std::unique_ptr<HarfBuzzFontData> 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 <hb-cplusplus.hh>
+
#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"
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 <hb.h>
-#include <hb-subset.h>
-// clang-format on
-
-#include <memory>
-#include <type_traits>
-
-template <typename T>
-struct always_false : std::false_type {};
-
-template <class T>
-struct HbSpecializedDeleter {
- inline void operator()(T* obj) {
- static_assert(always_false<T>::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<hb_blob_t> 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 <class T>
-using HbScoped = std::unique_ptr<T, HbSpecializedDeleter<T>>;
-
-#define SPECIALIZED_DELETER_FOR_HARFBUZZ_TYPE(TYPE, DESTRUCTOR) \
- template <> \
- struct HbSpecializedDeleter<TYPE> { \
- 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_

View File

@@ -1,227 +0,0 @@
--- 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<SkColor> brand_text_color;
- std::optional<SkColor> 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<std::string> types;
- // The token formats that are supported.
- std::vector<std::string> 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<IdentityProviderData> {
- public:
- IdentityProviderData(const std::string& idp_for_display,
- const IdentityProviderMetadata& idp_metadata,
- const ClientMetadata& client_metadata,
- blink::mojom::RpContext rp_context,
- std::optional<blink::mojom::Format> format,
- const std::vector<IdentityRequestDialogDisclosureField>&
- 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<blink::mojom::Format> format;
- // For which fields should the dialog request permission for (assuming
- // this is for signup).
- std::vector<IdentityRequestDialogDisclosureField> 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>;
-
- ~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<SkColor> brand_text_color;
+ std::optional<SkColor> 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<std::string> types;
+ // The token formats that are supported.
+ std::vector<std::string> 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<IdentityProviderData> {
+ public:
+ IdentityProviderData(const std::string& idp_for_display,
+ const IdentityProviderMetadata& idp_metadata,
+ const ClientMetadata& client_metadata,
+ blink::mojom::RpContext rp_context,
+ std::optional<blink::mojom::Format> format,
+ const std::vector<IdentityRequestDialogDisclosureField>&
+ 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<blink::mojom::Format> format;
+ // For which fields should the dialog request permission for (assuming
+ // this is for signup).
+ std::vector<IdentityRequestDialogDisclosureField> 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>;
+
+ ~IdentityProviderData();
+};
// Represents a federated user account which is used when displaying the FedCM
// account selector.

View File

@@ -1,25 +0,0 @@
--- 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<const {type_name}*, {len(aggregation.elements)}> '
+ res += f'{aggregation.name} =\n'
res += f' std::array<const {type_name}*, {len(aggregation.elements)}>'
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'

View File

@@ -0,0 +1,13 @@
--- src/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc.orig 2024-05-29 12:13:50.205359130 +0200
+++ src/third_party/webrtc/modules/video_coding/codecs/av1/libaom_av1_encoder.cc 2024-05-29 23:55:59.239008160 +0200
@@ -311,8 +311,10 @@ int LibaomAv1Encoder::InitEncode(const V
if (codec_settings->mode == VideoCodecMode::kRealtimeVideo &&
encoder_settings_.GetFrameDropEnabled() && max_consec_frame_drop_ > 0) {
+#ifdef AOM_CTRL_AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR,
max_consec_frame_drop_);
+#endif
}
if (cfg_.g_threads == 8) {

View File

@@ -0,0 +1,33 @@
[154/40125] python3 ../../tools/licenses/licenses.py --target-os=linux --depfile gen/components/resources/about_credits.d credits gen/components/resources/about_credits.html
FAILED: gen/components/resources/about_credits.html
python3 ../../tools/licenses/licenses.py --target-os=linux --depfile gen/components/resources/about_credits.d credits gen/components/resources/about_credits.html
Traceback (most recent call last):
File "/home/abuild/rpmbuild/BUILD/src/out/Release/../../tools/licenses/licenses.py", line 1445, in <module>
sys.exit(main())
^^^^^^
File "/home/abuild/rpmbuild/BUILD/src/out/Release/../../tools/licenses/licenses.py", line 1428, in main
if not GenerateCredits(
^^^^^^^^^^^^^^^^
File "/home/abuild/rpmbuild/BUILD/src/out/Release/../../tools/licenses/licenses.py", line 1069, in GenerateCredits
directory_metadata, _ = ParseDir(path,
^^^^^^^^^^^^^^
File "/home/abuild/rpmbuild/BUILD/src/out/Release/../../tools/licenses/licenses.py", line 670, in ParseDir
if not os.listdir(os.path.join(root, path)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/abuild/rpmbuild/BUILD/src/third_party/angle/src/common/third_party/xxhash'
--- src/tools/licenses/licenses.py.orig 2024-05-29 12:20:01.514877976 +0200
+++ src/tools/licenses/licenses.py 2024-05-29 22:54:04.691863557 +0200
@@ -667,7 +667,10 @@ def ParseDir(path,
return [], []
# gclient creates empty directories for conditionally downloaded submodules.
- if not os.listdir(os.path.join(root, path)):
+ try:
+ if not os.listdir(os.path.join(root, path)):
+ return [], []
+ except FileNotFoundError: #This gets thrown if directory is missing instead of empty.
return [], []
# Get the metadata values, from

View File

@@ -1,36 +0,0 @@
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 <signal.h>
#include <stdint.h>
#include <sys/ioctl.h>

View File

@@ -1,88 +0,0 @@
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",

View File

@@ -1,19 +0,0 @@
--- 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 {

View File

@@ -1,25 +0,0 @@
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",

View File

@@ -1,11 +1,11 @@
Do not ship bundled zlib headers. Electron uses the system zlib, and anyone compiling against it should also. Do not ship bundled zlib headers. Electron uses the system zlib, and anyone compiling against it should also.
--- src/electron/BUILD.gn.orig 2025-04-11 12:02:41.207130337 +0200 --- src/electron/BUILD.gn.orig
+++ src/electron/BUILD.gn 2025-04-11 20:58:52.999468971 +0200 +++ src/electron/BUILD.gn
@@ -1569,7 +1569,6 @@ group("copy_node_headers") { @@ -1582,7 +1582,6 @@ group("copy_node_headers") {
":generate_node_headers", public_deps = header_groups + [
":node_gypi_headers", ":node_gypi_headers",
":node_version_header", ":node_version_header",
- ":zlib_headers", - ":zlib_headers",
] ]
} }

View File

@@ -1,240 +0,0 @@
From ef91595e2fc1f96b7c8eb51bfcc1408a5adaa4a9 Mon Sep 17 00:00:00 2001
From: Rithvik Vibhu <rithvikvibhu@gmail.com>
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 <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
---
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 <vector>
#include <unordered_set>
+#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<int> ParseCaaReply(Environment* en
return Just<int>(ARES_SUCCESS);
}
+Maybe<int> ParseTlsaReply(Environment* env,
+ unsigned char* buf,
+ int len,
+ Local<Array> 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<int>(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<ArrayBuffer> data_ab = ArrayBuffer::New(env->isolate(), data_len);
+ memcpy(data_ab->Data(), data, data_len);
+
+ Local<Object> 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<int>();
+ }
+ }
+
+ ares_dns_record_destroy(dnsrec);
+ return Just<int>(ARES_SUCCESS);
+}
+
Maybe<int> ParseTxtReply(Environment* env,
const unsigned char* buf,
int len,
@@ -945,6 +1013,11 @@ int NsTraits::Send(QueryWrap<NsTraits>*
return ARES_SUCCESS;
}
+int TlsaTraits::Send(QueryWrap<TlsaTraits>* wrap, const char* name) {
+ wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_TLSA);
+ return ARES_SUCCESS;
+}
+
int TxtTraits::Send(QueryWrap<TxtTraits>* wrap, const char* name) {
wrap->AresQuery(name, ARES_CLASS_IN, ARES_REC_TYPE_TXT);
return ARES_SUCCESS;
@@ -1156,6 +1229,14 @@ Maybe<int> AnyTraits::Parse(QueryAnyWrap
}
}
+ /* Parse TLSA records */
+ if (!ParseTlsaReply(env, buf, len, ret).To(&status)) {
+ return Nothing<int>();
+ }
+ if (status != ARES_SUCCESS && status != ARES_ENODATA) {
+ return Just<int>(status);
+ }
+
/* Parse CAA records */
if (!ParseCaaReply(env, buf, len, ret, true).To(&status)) {
return Nothing<int>();
@@ -1339,6 +1420,32 @@ Maybe<int> NsTraits::Parse(QueryNsWrap*
return Just<int>(ARES_SUCCESS);
}
+Maybe<int> TlsaTraits::Parse(QueryTlsaWrap* wrap,
+ const std::unique_ptr<ResponseData>& response) {
+ if (response->is_host) [[unlikely]] {
+ return Just<int>(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<Array> tlsa_records = Array::New(env->isolate());
+ int status;
+ if (!ParseTlsaReply(env, buf, len, tlsa_records).To(&status)) {
+ return Nothing<int>();
+ }
+ if (status != ARES_SUCCESS) {
+ return Just<int>(status);
+ }
+
+ wrap->CallOnComplete(tlsa_records);
+ return Just<int>(ARES_SUCCESS);
+}
+
Maybe<int> TxtTraits::Parse(QueryTxtWrap* wrap,
const std::unique_ptr<ResponseData>& 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") \

View File

@@ -1,31 +0,0 @@
From b85505d450e3a401cf0d13c096abfc75a7932105 Mon Sep 17 00:00:00 2001
From: Ethan Arrowood <ethan@arrowood.dev>
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 <ronagy@icloud.com>
PR-URL: https://github.com/nodejs/node/pull/57640
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
---
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_) {

View File

@@ -1,35 +0,0 @@
From 2be863be08ff9f16eae6bb907388c354c55c3bfc Mon Sep 17 00:00:00 2001
From: Ethan Arrowood <ethan@arrowood.dev>
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 <soyjuanarbol@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
---
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) {

View File

@@ -1,167 +0,0 @@
From c44fa8d0b65d3550157c2fd4b0636fb269764f3e Mon Sep 17 00:00:00 2001
From: theanarkh <theratliter@gmail.com>
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 <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
---
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<int> ParseSoaReply(Environment* env,
}
} // anonymous namespace
-ChannelWrap::ChannelWrap(
- Environment* env,
- Local<Object> object,
- int timeout,
- int tries)
+ChannelWrap::ChannelWrap(Environment* env,
+ Local<Object> 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<Value>& 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<Int32>()->Value();
const int tries = args[1].As<Int32>()->Value();
+ const int max_timeout = args[2].As<Int32>()->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<v8::Object> object,
- int timeout,
- int tries);
+ ChannelWrap(Environment* env,
+ v8::Local<v8::Object> object,
+ int timeout,
+ int tries,
+ int max_timeout);
~ChannelWrap() override;
static void New(const v8::FunctionCallbackInfo<v8::Value>& 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_;
};

View File

@@ -1,155 +0,0 @@
From 8807549ed9f6eaf6842ae56b8ac55ab385951636 Mon Sep 17 00:00:00 2001
From: Aviv Keller <redyetidev@gmail.com>
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 <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
---
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<AnyTraits>* 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<ATraits>* 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<AaaaTraits>* 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<CaaTraits>* 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<CnameTraits>* 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<MxTraits>* 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<NsTraits>* 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<TxtTraits>* 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<SrvTraits>* 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<PtrTraits>* 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<NaptrTraits>* 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<SoaTraits>* 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<Traits>* 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<unsigned char>(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<ResponseData>();

93
node-compiler.patch Normal file
View File

@@ -0,0 +1,93 @@
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
@@ -142,12 +142,6 @@ config("node_lib_config") {
config("node_lib_config") {
include_dirs = [ "src" ]
- cflags = [
- "-Wno-shadow",
- # FIXME(deepak1556): include paths should be corrected,
- # refer https://docs.google.com/presentation/d/1oxNHaVjA9Gn_rTzX6HIpJHP7nXRua_0URXxxJ3oYRq0/edit#slide=id.g71ecd450e_2_702
- "-Wno-microsoft-include",
- ]
configs = [ ":node_features" ]
@@ -250,17 +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",
- ]
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/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 = []

View File

@@ -1,14 +0,0 @@
--- 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<Node, ParentNodeTag, ShadowHostTag>;

View File

@@ -1,78 +0,0 @@
From 02a1505efcf7099498240e83327f7c0d71696f47 Mon Sep 17 00:00:00 2001
From: Carlos Fuentes <me@metcoder.dev>
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 <pimterry@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
---
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
};

View File

@@ -1,27 +0,0 @@
author: Andres Salomon <dilinger@debian.org>
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) {

Some files were not shown because too many files have changed in this diff Show More