From d794c4dce1b3d92eac5afc92c0610edda142ef51 Mon Sep 17 00:00:00 2001 From: Samuel Maddock Date: Wed, 4 Feb 2026 11:44:52 -0500 Subject: [PATCH] fix: enable libc++ ABI flag for trivially copyable std::vector Required for changes introduced in the following CL https://chromium-review.googlesource.com/c/chromium/src/+/7513653 --- .../add_didinstallconditionalfeatures.patch | 2 +- ...ot_depend_on_packed_resource_integrity.patch | 10 +++++----- ...libcxx_abi_unstable_false_for_electron.patch | 17 +++++++++++++---- patches/chromium/can_create_window.patch | 4 ++-- ...arameter_in_script_lifecycle_observers.patch | 2 +- ..._smoothing_css_rule_and_blink_painting.patch | 4 ++-- ...oading_non-standard_schemes_in_iframes.patch | 4 ++-- .../fix_os_crypt_async_cookie_encryption.patch | 2 +- ...opwindowtreehostwin_window_enlargement.patch | 4 ++-- patches/chromium/webview_fullscreen.patch | 2 +- 10 files changed, 30 insertions(+), 21 deletions(-) diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 06af554f6e..3af491886b 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,7 +23,7 @@ index 8077ed85e45e56d6cccb691223216c1f6a94b5ee..dd4cee346f16df703d414bf206bbe6c9 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index befdc51e4a12b4a070d8a39e261761af8aff7af2..eea6cce416f5981f319851d426d2ba8b38a73d72 100644 +index 3bb9a589b1a8b90c5f70e556f44232911eb62d3a..4d2788bf2795326e7094a24fc9551cad9fcebc90 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -4754,6 +4754,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index 2eefd4682c..bb936f12b8 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -33,7 +33,7 @@ index 4a742db71f62f9ac891ceeb0604ca0b99d1d89c1..2c5af6482e2b6905552a05b16d3df0a4 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 5b67ce098fac574095bc43ef2093fc7ad18faa8e..19513affea475c7f1e754c5660343ce46a6c4926 100644 +index 487a055090691fb015465144e6e703cde846adf5..c75d7e336ad00230c2a7852f62c69b8f0cae748d 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -4746,7 +4746,7 @@ static_library("browser") { @@ -46,10 +46,10 @@ index 5b67ce098fac574095bc43ef2093fc7ad18faa8e..19513affea475c7f1e754c5660343ce4 # than here in :chrome_dll. deps += [ "//chrome:packed_resources_integrity_header" ] diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index dc1b04fc560652ad7f26b116fd1906cb54785cd0..93e38aca97c011e12d5c42af222d6a7fef5afcbe 100644 +index 66e2d12af77a88806a194ac5e5a986ae246e19dd..f2e53a896d6567408c4fe12bf36ecdaebdb7f384 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -7711,9 +7711,12 @@ test("unit_tests") { +@@ -7712,9 +7712,12 @@ test("unit_tests") { "//chrome/notification_helper", ] @@ -63,7 +63,7 @@ index dc1b04fc560652ad7f26b116fd1906cb54785cd0..93e38aca97c011e12d5c42af222d6a7f "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:win_unit_tests", -@@ -8680,6 +8683,10 @@ test("unit_tests") { +@@ -8681,6 +8684,10 @@ test("unit_tests") { "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", ] @@ -74,7 +74,7 @@ index dc1b04fc560652ad7f26b116fd1906cb54785cd0..93e38aca97c011e12d5c42af222d6a7f sources += [ # The importer code is not used on Android. "../common/importer/firefox_importer_utils_unittest.cc", -@@ -8737,7 +8744,6 @@ test("unit_tests") { +@@ -8738,7 +8745,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", diff --git a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch index 038970d913..fd989a3c2d 100644 --- a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -3,15 +3,22 @@ From: Charles Kerr Date: Tue, 22 Mar 2022 16:24:44 -0500 Subject: build: make libcxx_abi_unstable false for electron -https://nornagon.medium.com/a-libc-odyssey-973e51649063 +The libc++ C++ standard library uses ABI versioning to control binary +compatibility. ABI version 2 (Chromium's default) enables various +optimizations that break compatibility with system libc++, while ABI +version 1 maintains compatibility needed for native Node.js modules. -See also https://github.com/electron/electron/issues/45810#issuecomment-2691417213. +References: +* https://nornagon.medium.com/a-libc-odyssey-973e51649063 +* https://github.com/electron/electron/issues/45810#issuecomment-2691417213. +* https://libcxx.llvm.org/ABIGuarantees.html +* third_party/libc++/src/include/__configuration/abi.h diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site -index 3cd0af88fd13613216464d31d04e26dbb8f61343..6335536338e1eba8b56055eee31910ecba6a65c4 100644 +index 3cd0af88fd13613216464d31d04e26dbb8f61343..218cfaf258ebc55e4d332c67abd02b5b1ad2ba19 100644 --- a/buildtools/third_party/libc++/__config_site +++ b/buildtools/third_party/libc++/__config_site -@@ -18,7 +18,9 @@ +@@ -18,7 +18,11 @@ // _LIBCPP_ABI_NAMESPACE to a shorter value. #define _LIBCPP_ABI_NAMESPACE __Cr @@ -19,6 +26,8 @@ index 3cd0af88fd13613216464d31d04e26dbb8f61343..6335536338e1eba8b56055eee31910ec +#define _LIBCPP_ABI_VERSION 1 +#define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_ARRAY +#define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_STRING_VIEW ++#define _LIBCPP_ABI_TRIVIALLY_COPYABLE_BIT_ITERATOR ++#define _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL #define _LIBCPP_ABI_FORCE_ITANIUM 0 #define _LIBCPP_ABI_FORCE_MICROSOFT 0 diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index b6e96a9800..1107e60b70 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,7 +9,7 @@ potentially prevent a window from being created. TODO(loc): this patch is currently broken. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 80130a74bd9e84c2b83ed8ec5631b9ed30a117b9..4549db0a10360e38ce6b16bb9961a814f7afe44b 100644 +index 4ea4d47084d39f0a165a3a2948ab3ed291f01c47..f7eaca99d21f707e9e139e65bf7c69c6359cece3 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc @@ -10003,6 +10003,7 @@ void RenderFrameHostImpl::CreateNewWindow( @@ -170,7 +170,7 @@ index 6a72c7925222ed8a11830b68718d7973629a6d2c..a6f0447b6ede476162f555d951f346b0 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 128ea8cf67c56e9dfcc57a3e0c4eca9a573d6240..befdc51e4a12b4a070d8a39e261761af8aff7af2 100644 +index 1981118e714a0360b38f1bee7f81dbab20c48341..3bb9a589b1a8b90c5f70e556f44232911eb62d3a 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -6846,6 +6846,10 @@ WebView* RenderFrameImpl::CreateNewWindow( diff --git a/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch b/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch index 6ed412eb0b..50cdd2ba54 100644 --- a/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch +++ b/patches/chromium/chore_expose_isolate_parameter_in_script_lifecycle_observers.patch @@ -34,7 +34,7 @@ index dd4cee346f16df703d414bf206bbe6c9f4b1f796..5565f5a9259bd7da0722080bf01b3415 virtual void DidClearWindowObject() {} virtual void DidChangeScrollOffset() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index eea6cce416f5981f319851d426d2ba8b38a73d72..b82037d1fee4f61e0ead15319ce85782133675c0 100644 +index 4d2788bf2795326e7094a24fc9551cad9fcebc90..1b560c64976b184ec86be25bc6949bb9141cc44f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -4760,10 +4760,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures( diff --git a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch index e4c94c3ee8..dc0e4599e5 100644 --- a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch +++ b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch @@ -202,7 +202,7 @@ index 19cda703154dab9397827ab6ea66c2ca446c644d..dd5943c511886f4e39b2e7f10e67e60f return result; } diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index 5e6b319816315832a115c8dd3a10bb143d9c3f0d..35af7753e15ca91c307cfeb9f88665fbb44acbcf 100644 +index 83ebf4a21a9d42b307a8a2108e118174d6d62f0e..160b3828d38f55734740cc07d6f851099922f70b 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn @@ -1669,6 +1669,8 @@ component("platform") { @@ -313,7 +313,7 @@ index 18f283e625101318ee14b50e6e765dfd1c9a1a44..44a3a55974c9e4b9e715574075f25661 auto DrawAsSinglePath = [&]() { diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -index 0ad36d0a85cb6d6d2763fe52926f1799acd9115f..68752c0090fe0087563ec7b92f3a668145198a35 100644 +index add134dd9f197069e36c6355e7c83ce060461b7d..50fc6bc67fa1edcfff786f2c98b3fe67381b6189 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 @@ -214,6 +214,10 @@ diff --git a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch index 1b5a3de163..02adc03444 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -28,10 +28,10 @@ The patch should be removed in favor of either: Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index 2a7ab7d77b680219a0540c3a5ffe5ffe60b1e9bf..34ab8ace3c28c0028a9983db451754300c27e85c 100644 +index 39f86bf7117adcbaa11c147dfe07981279cb0265..673d89a63bd34bc0535a488c8449686ba3e7d5e6 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -11680,6 +11680,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { +@@ -11683,6 +11683,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() { target_rph_id); } diff --git a/patches/chromium/fix_os_crypt_async_cookie_encryption.patch b/patches/chromium/fix_os_crypt_async_cookie_encryption.patch index 25da34ba34..486d37a5dd 100644 --- a/patches/chromium/fix_os_crypt_async_cookie_encryption.patch +++ b/patches/chromium/fix_os_crypt_async_cookie_encryption.patch @@ -17,7 +17,7 @@ Revert "Reland "Port net::CookieCryptoDelegate to os_crypt async"" This reverts commit f01b115c7e21a09cc762f65bf7fd9c6ea9d9d0f8. diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 19513affea475c7f1e754c5660343ce46a6c4926..a9b0f3061429f09e5ee6f233c13a6402b4ab0d67 100644 +index c75d7e336ad00230c2a7852f62c69b8f0cae748d..8e80ebd537871b204f254a4468996350b8f4f231 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -716,6 +716,8 @@ static_library("browser") { diff --git a/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch b/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch index d3b0dc0a42..56336f3f4e 100644 --- a/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch +++ b/patches/chromium/revert_views_remove_desktopwindowtreehostwin_window_enlargement.patch @@ -10,10 +10,10 @@ on Windows. We should refactor our code so that this patch isn't necessary. diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json -index 886ef3665019761b6fcbb3901b48e0d8a7b3df32..a55f9efb18dbdcaa3b69b9f5f3550d6c2b4e86a9 100644 +index ee61a8860e6acc7dec1daa6f49ce32e5ac97c64d..94b5774c1e22208d5dc5627da945454d7926fd7e 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json -@@ -26583,6 +26583,21 @@ +@@ -26563,6 +26563,21 @@ ] } ], diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 205ad63278..8cff7a4456 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -15,7 +15,7 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 4549db0a10360e38ce6b16bb9961a814f7afe44b..ff8d0b7cbe0360eaf3c6570b4505ab696230f44c 100644 +index f7eaca99d21f707e9e139e65bf7c69c6359cece3..aeb8fb48210a6ce267464c3a780cd0a34ae1595d 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc @@ -9110,6 +9110,17 @@ void RenderFrameHostImpl::EnterFullscreen(