Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nodejs-electron for openSUSE:Factory 
checked in at 2023-10-20 23:18:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs-electron (Old)
 and      /work/SRC/openSUSE:Factory/.nodejs-electron.new.1945 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nodejs-electron"

Fri Oct 20 23:18:18 2023 rev:84 rq:1119085 version:27.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs-electron/nodejs-electron.changes  
2023-10-17 20:24:42.822684170 +0200
+++ 
/work/SRC/openSUSE:Factory/.nodejs-electron.new.1945/nodejs-electron.changes    
    2023-10-20 23:20:58.295724230 +0200
@@ -1,0 +2,57 @@
+Thu Oct 19 16:43:42 UTC 2023 - Bruno Pitrus <brunopit...@hotmail.com>
+
+- New upstream release 27.0.1
+  * Updated Chromium to 118.0.5993.89.
+  * Fixed an issue where calling loadURL during some webContents url loading 
events could crash.
+  * Fixed an issue where fully occluded windows would return an empty image 
from webContents.capturePage()
+  * Fixed some redundant permission dialogs while screen sharing on Wayland.
+- Fix typo installing icon file to wrong folder.
+
+-------------------------------------------------------------------
+Thu Oct 19 04:28:56 UTC 2023 - Bruno Pitrus <brunopit...@hotmail.com>
+
+- Update to 27.0.0:
+  * ABI break: NODE_MODULE_VERSION is now 118
+  * Chromium 118.0.5993.32
+  * Node 18.17.1
+  * V8 11.8
+  * The deprecated color scheme changed events in systemPreferences have been 
removed.
+  * The systemPreferences.getAppLevelAppearance, 
systemPreferences.setAppLevelAppearance and 
systemPreferences.appLevelAppearance APIs have been removed,
+    as well as the alternate-selected-control-text value for 
systemPreferences.getColor.
+  * see https://www.electronjs.org/blog/electron-27-0 and 
https://www.electronjs.org/blog/electron-26-0 for new features
+- Drop upstreamed patches
+  * absl-uint128-do-not-assume-abi.patch
+  * cpu-missing-uint8_t.patch
+  * electron-24-components-missing-headers.patch
+  * mojom-python3.12-imp.patch
+  * re2-11-StringPiece.patch
+  * swiftshader-llvm17.patch
+- (Fedora) switch to bundled avif as Chromium no longer builds with avif 0.x
+  * drop avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch
+  * drop avif_image_decoder-libavif-1-mode.patch
+  * drop avif_image_decoder-repetitionCount-clli.patch
+- Drop no longer relevant chromium-86-fix-vaapi-on-intel.patch
+- (Leap and Fedora) reverse upstream changes to build with re2 10
+  * replace-StringPiece-with-string_view.patch
+- (Fedora <39) reverse upstream changes to build with icu 71
+  * v8-icu73-alt_calendar.patch
+  * v8-icu73-simple-case-folding.patch
+- Reverse upstream changes to build against old brotli
+  * brotli-remove-shared-dictionary.patch
+- Add patches to fix build errors
+  * absl-make_unique-missing-include.patch
+  * autofill_i18n_parsing_expressions-constexpr.patch
+  * chromium-117-blink-BUILD-mnemonic.patch
+  * decoder_buffer_side_data-missing-uint8_t.patch
+  * disable-tests.patch
+  * keyboard_util-gcc12-invalid-constexpr.patch
+  * kwallet_dbus-missing-uint8_t.patch
+  * material_color_utilities-tones-missing-round.patch
+  * page_content_annotations_common-remove-tflite.patch
+  * partition_root-attribute.patch
+  * perfetto-numeric_storage-double_t.patch
+  * sensor_reading-missing-int64_t-size_t.patch
+  * simple_font_data-freetype-include.patch
+  * utf_string_conversion_utils-missing-numeric_limits.patch
+
+-------------------------------------------------------------------

Old:
----
  absl-uint128-do-not-assume-abi.patch
  avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch
  avif_image_decoder-libavif-1-mode.patch
  avif_image_decoder-repetitionCount-clli.patch
  chromium-86-fix-vaapi-on-intel.patch
  cpu-missing-uint8_t.patch
  electron-24-components-missing-headers.patch
  electron-25.9.1.tar.zst
  mojom-python3.12-imp.patch
  re2-11-StringPiece.patch
  swiftshader-llvm17.patch

New:
----
  absl-make_unique-missing-include.patch
  autofill_i18n_parsing_expressions-constexpr.patch
  brotli-remove-shared-dictionary.patch
  chromium-117-blink-BUILD-mnemonic.patch
  decoder_buffer_side_data-missing-uint8_t.patch
  disable-tests.patch
  electron-27.0.1.tar.zst
  keyboard_util-gcc12-invalid-constexpr.patch
  kwallet_dbus-missing-uint8_t.patch
  material_color_utilities-tones-missing-round.patch
  page_content_annotations_common-remove-tflite.patch
  partition_root-attribute.patch
  perfetto-numeric_storage-double_t.patch
  replace-StringPiece-with-string_view.patch
  sensor_reading-missing-int64_t-size_t.patch
  simple_font_data-freetype-include.patch
  utf_string_conversion_utils-missing-numeric_limits.patch
  v8-icu73-alt_calendar.patch
  v8-icu73-simple-case-folding.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nodejs-electron.spec ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.535988396 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.539988542 +0200
@@ -22,7 +22,7 @@
 
 %define mod_name electron
 # https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
-%define abi_version 116
+%define abi_version 118
 
 # Do not provide libEGL.so, etc…
 %define __provides_exclude ^lib.*\\.so.*$
@@ -108,6 +108,11 @@
 %bcond_without system_nghttp2
 
 
+%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700
+%bcond_without system_avif
+%else
+%bcond_with system_avif
+%endif
 
 
 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500 || 0%{?fedora}
@@ -126,13 +131,11 @@
 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700 || 0%{?fedora}
 %bcond_without harfbuzz_5
 %bcond_without link_vulkan
-%bcond_without system_avif
 %bcond_without ffmpeg_5
 %bcond_without system_spirv
 %else
 %bcond_with harfbuzz_5
 %bcond_with link_vulkan
-%bcond_with system_avif
 %bcond_with ffmpeg_5
 %bcond_with system_spirv
 %endif
@@ -145,6 +148,12 @@
 %bcond_with system_vpx
 %endif
 
+%if 0%{?suse_version} || 0%{?fedora} >= 39
+%bcond_without icu_73
+%else
+%bcond_with icu_73
+%endif
+
 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150600
 %bcond_without system_yuv
 %else
@@ -186,6 +195,12 @@
 %bcond_with abseil_2023
 %endif
 
+%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150700
+%bcond_without re2_11
+%else
+%bcond_with re2_11
+%endif
+
 %else
 %bcond_with system_abseil
 %endif
@@ -206,7 +221,7 @@
 
 
 Name:           nodejs-electron
-Version:        25.9.1
+Version:        27.0.1
 Release:        0
 Summary:        Build cross platform desktop apps with JavaScript, HTML, and 
CSS
 License:        AFL-2.0 AND Apache-2.0 AND blessing AND BSD-2-Clause AND 
BSD-3-Clause AND BSD-Protection AND BSD-Source-Code AND bzip2-1.0.6 AND IJG AND 
ISC AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND MIT AND MIT-CMU AND 
MIT-open-group AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND 
MPL-2.0 AND OpenSSL AND SGI-B-2.0 AND SUSE-Public-Domain AND X11
@@ -229,12 +244,11 @@
 # and against harfbuzz 4
 Source415:      harfbuzz-replace-chromium-scoped-type.patch
 Source416:      harfbuzz-replace-HbScopedPointer.patch
-
-
-#Reverse upstream changes to build against system libavif.
-#All of this patch is dead code, so it can be reversed unconditionally.
-Source420:      avif_image_decoder-AVIF_PIXEL_FORMAT_COUNT.patch
-
+# and icu 71
+Source417:      v8-icu73-alt_calendar.patch
+Source418:      v8-icu73-simple-case-folding.patch
+# and re2 10
+Source430:      replace-StringPiece-with-string_view.patch
 
 
 # PATCHES for openSUSE-specific things
@@ -243,7 +257,6 @@
 Patch3:         gcc-enable-lto.patch
 Patch6:         chromium-vaapi.patch
 Patch7:         chromium-91-java-only-allowed-in-android-builds.patch
-Patch9:         chromium-86-fix-vaapi-on-intel.patch
 # Always disable use_thin_lto which is an lld feature
 Patch21:        electron-13-fix-use-thin-lto.patch
 # Fix common.gypi to include /usr/include/electron
@@ -265,6 +278,7 @@
 Patch78:        rdynamic.patch
 Patch79:        v8-hide-private-symbols.patch
 Patch80:        icon.patch
+Patch81:        disable-tests.patch
 
 # PATCHES to use system libs
 Patch1000:      do-not-build-libvulkan.so.patch
@@ -294,6 +308,7 @@
 Patch1077:      system-wayland.patch
 Patch1078:      system-simdutf.patch
 
+
 # PATCHES to fix interaction with third-party software
 Patch2004:      chromium-gcc11.patch
 Patch2010:      chromium-93-ffmpeg-4.4.patch
@@ -325,10 +340,13 @@
 %endif
 Patch2034:      swiftshader-LLVMJIT-AddressSanitizerPass-dead-code-remove.patch
 Patch2035:      RenderFrameHostImpl-use-after-free.patch
-Patch2036:      avif_image_decoder-libavif-1-mode.patch
 Patch2037:      abseil-remove-unused-targets.patch
-Patch2038:      avif_image_decoder-repetitionCount-clli.patch
 Patch2039:      vulkan_memory_allocator-upgrade.patch
+# https://github.com/electron/electron/pull/40032
+Patch2040:      build-without-extensions.patch
+Patch2041:      chromium-117-blink-BUILD-mnemonic.patch
+Patch2042:      brotli-remove-shared-dictionary.patch
+Patch2043:      keyboard_util-gcc12-invalid-constexpr.patch
 
 # PATCHES that should be submitted upstream verbatim or near-verbatim
 Patch3016:      chromium-98-EnumTable-crash.patch
@@ -345,23 +363,25 @@
 Patch3096:      remove-date-reproducible-builds.patch
 Patch3106:      vulkan_memory_allocator-vk_mem_alloc-missing-snprintf.patch
 Patch3121:      services-network-optional-explicit-constructor.patch
-Patch3202:      mojom-python3.12-imp.patch
 # 
https://src.fedoraproject.org/rpms/qt6-qtwebengine/blob/rawhide/f/Partial-migration-from-imp-to-importlib.patch
 Patch3203:      Partial-migration-from-imp-to-importlib.patch
-Patch3204:      re2-11-StringPiece.patch
-Patch3205:      electron-24-components-missing-headers.patch
-Patch3206:      cpu-missing-uint8_t.patch
-Patch3207:      absl-uint128-do-not-assume-abi.patch
 Patch3208:      mojo_ukm_recorder-missing-WrapUnique.patch
 Patch3209:      electron_browser_context-missing-variant.patch
 Patch3210:      electron_api_app-GetPathConstant-non-constexpr.patch
-# https://github.com/electron/electron/pull/40032
-Patch3211:      build-without-extensions.patch
-Patch3212:      swiftshader-llvm17.patch
 Patch3213:      
CVE-2023-38552-node-integrity-checks-according-to-policies.patch
 Patch3214:      CVE-2023-39333-node-create_dynamic_module-code-injection.patch
 Patch3215:      CVE-2023-45143-undici-cookie-leakage.patch
-
+Patch3216:      partition_root-attribute.patch
+Patch3217:      sensor_reading-missing-int64_t-size_t.patch
+Patch3218:      material_color_utilities-tones-missing-round.patch
+Patch3219:      utf_string_conversion_utils-missing-numeric_limits.patch
+Patch3220:      kwallet_dbus-missing-uint8_t.patch
+Patch3221:      page_content_annotations_common-remove-tflite.patch
+Patch3222:      decoder_buffer_side_data-missing-uint8_t.patch
+Patch3223:      absl-make_unique-missing-include.patch
+Patch3224:      autofill_i18n_parsing_expressions-constexpr.patch
+Patch3225:      simple_font_data-freetype-include.patch
+Patch3226:      perfetto-numeric_storage-double_t.patch
 
 
 %if %{with clang}
@@ -527,6 +547,11 @@
 BuildRequires:  pkgconfig(harfbuzz) >= 5
 %endif
 BuildRequires:  pkgconfig(icu-i18n) >= 71
+%if %{with icu_73}
+BuildRequires:  pkgconfig(icu-i18n) >= 73
+%else
+BuildRequires:  pkgconfig(icu-i18n) >= 71
+%endif
 BuildRequires:  pkgconfig(jsoncpp)
 BuildRequires:  pkgconfig(krb5)
 %if %{with ffmpeg_5}
@@ -539,7 +564,8 @@
 BuildRequires:  pkgconfig(libavutil)
 %endif
 %if %{with system_avif}
-BuildRequires:  pkgconfig(libavif) >= 0.10
+# Needs avifRGBImage::maxThreads
+BuildRequires:  pkgconfig(libavif) >= 1
 %endif
 BuildRequires:  pkgconfig(libbrotlidec)
 BuildRequires:  pkgconfig(libbrotlienc)
@@ -591,6 +617,9 @@
 #re2-11 has abseil as a public dependency. The headers collide with the 
bundled ones, causing linker errors.
 BuildRequires:  cmake(re2) < 11
 %endif
+%if %{with system_abseil} && %{with re2_11}
+BuildRequires:  cmake(re2) >= 11
+%endif
 %if %{with system_spirv}
 %if 0%{?suse_version}
 BuildRequires:  spirv-headers
@@ -709,14 +738,18 @@
 patch -R -p1 < %SOURCE416
 %endif
 
+%if %{without icu_73}
+patch -R -p1 < %SOURCE417
+patch -R -p1 < %SOURCE418
+%endif
 
 
 # This one depends on an ffmpeg nightly, reverting unconditionally.
 patch -R -p1 < %SOURCE401
 
-# This one is dead code, we cen revert it even when using bundled avif.
-patch -R -p1 < %SOURCE420
-
+%if %{without system_abseil} || (%{with system_abseil} || %{without re2_11})
+patch -R -p1 < %SOURCE430
+%endif
 
 # Link system wayland-protocols-devel into where chrome expects them
 mkdir -p third_party/wayland/src
@@ -1182,6 +1215,17 @@
 myconf_gn+=" use_bundled_weston=false"
 myconf_gn+=" enable_component_updater=false"
 myconf_gn+=" enable_lens_desktop=false"
+myconf_gn+=' enable_bound_session_credentials=false'
+myconf_gn+=' enable_chrome_notifications=false'
+myconf_gn+=' enable_message_center=false'
+
+#FIXME: possibly enable this when skia gets built with rust code by default.
+#Need to patch in optflags and possibly FFI LTO hacks (see signal-desktop 
package for how it's done)
+myconf_gn+=' enable_rust=false'
+
+#See net/base/features.cc. It's not enabled yet.
+#FIXME: enable this and add shims to build with system zstd when it's enabled
+myconf_gn+=' disable_zstd_filter=true'
 
 myconf_gn+=' chrome_root_store_supported=false'
 myconf_gn+=' chrome_root_store_optional=false'
@@ -1220,7 +1264,6 @@
 
 
 myconf_gn+=" disable_fieldtrial_testing_config=true"
-myconf_gn+=" use_gnome_keyring=false"
 myconf_gn+=" use_unofficial_version_number=false"
 myconf_gn+=" use_lld=false"
 
@@ -1346,7 +1389,7 @@
 
 install -pm 0755 %{SOURCE10} %{buildroot}%{_bindir}/%{mod_name}
 sed -i 's[XXXLIBDIRXXX[%{_libdir}[g' %{buildroot}%{_bindir}/%{mod_name}
-install -pvDm644 electron/default_app/icon.png 
%{buildroot}%{_datadir}/icons/hicolor/1024x1024/%{mod_name}.png
+install -pvDm644 electron/default_app/icon.png 
%{buildroot}%{_datadir}/icons/hicolor/1024x1024/apps/%{mod_name}.png
 
 install -pvDm644 electron/shell/browser/resources/win/extracted-0.png 
%{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{mod_name}.png
 install -pvDm644 electron/shell/browser/resources/win/extracted-1.png 
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{mod_name}.png

++++++ CVE-2023-45143-undici-cookie-leakage.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.599990731 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.603990877 +0200
@@ -39,5 +39,5 @@
 +        request.headersList.delete('host')
        }
        if (request.body != null) {
-         assert(request.body.source);
+         assert(request.body.source != null);
 

++++++ abseil-remove-unused-targets.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.627991753 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.631991899 +0200
@@ -2,15 +2,16 @@
 
 --- src/third_party/abseil-cpp/BUILD.gn.old
 +++ src/third_party/abseil-cpp/BUILD.gn
-@@ -61,7 +61,6 @@
+@@ -61,8 +61,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:nullability",
 -    "//third_party/abseil-cpp/absl/base:prefetch",
      "//third_party/abseil-cpp/absl/cleanup",
      "//third_party/abseil-cpp/absl/container:btree",
      "//third_party/abseil-cpp/absl/container:fixed_array",
-@@ -76,15 +76,11 @@
+@@ -78,21 +76,16 @@ group("absl_component_deps") {
      "//third_party/abseil-cpp/absl/functional:bind_front",
      "//third_party/abseil-cpp/absl/functional:function_ref",
      "//third_party/abseil-cpp/absl/hash",
@@ -26,16 +27,35 @@
      "//third_party/abseil-cpp/absl/status",
      "//third_party/abseil-cpp/absl/status:statusor",
      "//third_party/abseil-cpp/absl/strings",
-@@ -194,16 +190,9 @@
+     "//third_party/abseil-cpp/absl/strings:cord",
+     "//third_party/abseil-cpp/absl/strings:str_format",
+-    "//third_party/abseil-cpp/absl/strings:string_view",
+     "//third_party/abseil-cpp/absl/synchronization",
+     "//third_party/abseil-cpp/absl/time",
+     "//third_party/abseil-cpp/absl/types:optional",
+@@ -191,7 +184,6 @@ if (build_with_chromium) {
+         "absl/algorithm:algorithm_test",
+         "absl/algorithm:container_test",
+         "absl/base:config_test",
+-        "absl/base:nullability_test",
+         "absl/base:prefetch_test",
+         "absl/cleanup:cleanup_test",
+ 
+@@ -200,21 +192,10 @@ if (build_with_chromium) {
+         "absl/container:common_policy_traits_test",
          "absl/container:inlined_vector_test",
          "absl/container:node_slot_policy_test",
+-        "absl/container:raw_hash_set_allocator_test",
          "absl/container:sample_element_size_test",
 -        "absl/crc:crc32c_test",
 -        "absl/crc:crc_cord_state_test",
 -        "absl/crc:crc_memcpy_test",
 -        "absl/crc:non_temporal_memcpy_test",
 -        "absl/debugging:stacktrace_test",
+-        "absl/flags:flag_test",
          "absl/functional:any_invocable_test",
+-        "absl/functional:function_ref_test",
+-        "absl/hash:hash_instantiated_test",
          "absl/hash:hash_test",
          "absl/hash:low_level_hash_test",
 -        "absl/log:absl_check_test",
@@ -43,15 +63,26 @@
          "absl/log:die_if_null_test",
          "absl/log:flags_test",
          "absl/log:globals_test",
-@@ -217,7 +207,6 @@
+@@ -226,18 +207,13 @@ if (build_with_chromium) {
+         "absl/log:log_streamer_test",
+         "absl/log:scoped_mock_log_test",
+         "absl/log:stripping_test",
+-        "absl/log/internal:fnmatch_test",
          "absl/log/internal:stderr_log_sink_test",
          "absl/memory:memory_test",
          "absl/meta:type_traits_test",
 -        "absl/numeric:int128_test",
          "absl/profiling:exponential_biased_test",
          "absl/profiling:periodic_sampler_test",
+-        "absl/status:status_test",
          "absl/status:statusor_test",
-@@ -234,7 +223,6 @@
+         "absl/strings:ascii_test",
+-        "absl/strings:char_formatting_test",
+-        "absl/strings:charset_test",
+         "absl/strings:cord_buffer_test",
+         "absl/strings:cord_data_edge_test",
+         "absl/strings:cord_rep_btree_navigator_test",
+@@ -250,16 +226,11 @@ if (build_with_chromium) {
          "absl/strings:cordz_test",
          "absl/strings:cordz_update_scope_test",
          "absl/strings:cordz_update_tracker_test",
@@ -59,15 +90,13 @@
          "absl/strings:match_test",
          "absl/strings:str_replace_test",
          "absl/strings:string_view_test",
-@@ -249,9 +237,6 @@
-         "absl/strings:match_test",
-         "absl/strings:str_replace_test",
-         "absl/strings:string_view_test",
 -        "absl/synchronization:kernel_timeout_internal_test",
 -        "absl/synchronization:waiter_test",
 -        "absl/time:time_test",
          "absl/types:optional_test",
          "absl/types:variant_test",
+-        "absl/utility:if_constexpr_test",
          "//third_party/googletest:gtest_main",
-
+       ]
+     }
 

++++++ absl-make_unique-missing-include.patch ++++++
>From 3ca837f4fa0ca0e493f75eaa40d0989aae0c669e Mon Sep 17 00:00:00 2001
From: David Benjamin <david...@chromium.org>
Date: Wed, 13 Sep 2023 15:02:18 +0000
Subject: [PATCH] Fix some IWYU issues around absl APIs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

These files were relying on internal absl includes to pull in
absl::make_unique and absl::WrapUnique. The former can just be
std::make_unique which requires no extra includes. The latter has a base
version, so let's just use that until/unless we ever decide to align on
the absl one.

Bug: 1373619
Change-Id: I157104a415ae71bd268556b7bf601d46661d85e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4858866
Reviewed-by: Ben Kelly <wanderv...@chromium.org>
Reviewed-by: Robert Kaplow <rkap...@chromium.org>
Code-Coverage: findit-for...@appspot.gserviceaccount.com 
<findit-for...@appspot.gserviceaccount.com>
Reviewed-by: Sébastien Lalancette <seblalance...@chromium.org>
Commit-Queue: David Benjamin <david...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1196004}
---
 .../browser/commands/mac_key_rotation_command_unittest.cc      | 3 ++-
 .../common/service_worker/service_worker_router_evaluator.cc   | 2 +-
 .../service_worker/controller_service_worker_connector.cc      | 2 +-
 services/metrics/public/cpp/mojo_ukm_recorder.cc               | 3 ++-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command_unittest.cc
 
b/chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command_unittest.cc
index 884db50bc66e42c..83680ebb9f6d955 100644
--- 
a/chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command_unittest.cc
+++ 
b/chrome/browser/enterprise/connectors/device_trust/key_management/browser/commands/mac_key_rotation_command_unittest.cc
@@ -7,6 +7,7 @@
 #include <string>
 #include <utility>
 
+#include "base/memory/ptr_util.h"
 #include "base/memory/raw_ptr.h"
 #include "base/memory/scoped_refptr.h"
 #include "base/test/task_environment.h"
@@ -88,7 +89,7 @@ class MacKeyRotationCommandTest : public testing::Test {
         std::move(mock_network_delegate),
         std::move(mock_persistence_delegate)));
 
-    rotation_command_ = absl::WrapUnique(
+    rotation_command_ = base::WrapUnique(
         new MacKeyRotationCommand(test_shared_loader_factory_));
   }
 
diff --git a/content/common/service_worker/service_worker_router_evaluator.cc 
b/content/common/service_worker/service_worker_router_evaluator.cc
index cfb6f36d75953f8..0084051a4854969 100644
--- a/content/common/service_worker/service_worker_router_evaluator.cc
+++ b/content/common/service_worker/service_worker_router_evaluator.cc
@@ -446,7 +446,7 @@ 
ServiceWorkerRouterEvaluator::~ServiceWorkerRouterEvaluator() = default;
 
 void ServiceWorkerRouterEvaluator::Compile() {
   for (const auto& r : rules_.rules) {
-    std::unique_ptr<RouterRule> rule = absl::make_unique<RouterRule>();
+    std::unique_ptr<RouterRule> rule = std::make_unique<RouterRule>();
     if (!rule->SetRule(r)) {
       return;
     }
diff --git 
a/content/renderer/service_worker/controller_service_worker_connector.cc 
b/content/renderer/service_worker/controller_service_worker_connector.cc
index e3b5036cb12df1b..86acf848de369aa 100644
--- a/content/renderer/service_worker/controller_service_worker_connector.cc
+++ b/content/renderer/service_worker/controller_service_worker_connector.cc
@@ -36,7 +36,7 @@ 
ControllerServiceWorkerConnector::ControllerServiceWorkerConnector(
       base::Unretained(this)));
   if (router_rules) {
     router_evaluator_ =
-        
absl::make_unique<content::ServiceWorkerRouterEvaluator>(*router_rules);
+        std::make_unique<content::ServiceWorkerRouterEvaluator>(*router_rules);
     CHECK(router_evaluator_->IsValid());
     if (remote_cache_storage) {
       cache_storage_.Bind(std::move(remote_cache_storage));
diff --git a/services/metrics/public/cpp/mojo_ukm_recorder.cc 
b/services/metrics/public/cpp/mojo_ukm_recorder.cc
index bb97a43c82c1c82..9ff817b89858f05 100644
--- a/services/metrics/public/cpp/mojo_ukm_recorder.cc
+++ b/services/metrics/public/cpp/mojo_ukm_recorder.cc
@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "base/functional/bind.h"
+#include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/notreached.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
@@ -17,7 +18,7 @@ namespace ukm {
 
 std::unique_ptr<ukm::MojoUkmRecorder> MojoUkmRecorder::Create(
     mojom::UkmRecorderFactory& factory) {
-  return absl::WrapUnique(new MojoUkmRecorder(factory));
+  return base::WrapUnique(new MojoUkmRecorder(factory));
 }
 
 MojoUkmRecorder::MojoUkmRecorder(mojom::UkmRecorderFactory& factory) {

++++++ autofill_i18n_parsing_expressions-constexpr.patch ++++++
>From 3a05767c2bbba5ee75c9adf0a5971258405520a8 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdap...@igalia.com>
Date: Mon, 18 Sep 2023 17:18:31 +0000
Subject: [PATCH] GCC: workaround constexpr and raw_ptr issues in autofill
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

First, we workaround the problem with some constexpr destructors
declared to use default implementation, that are not properly
resolved when used.

Then, apparently GCC cannot resolve raw_ptr to a constexpr.

Bug: 819294
Change-Id: I7746e059a288a3250e8126b87bde5f96c3832199
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4866025
Commit-Queue: José Dapena Paz <jdap...@igalia.com>
Reviewed-by: Dominic Battre <bat...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1197890}
---
 ...tofill_i18n_parsing_expression_components.h | 18 +++++++++++++-----
 .../autofill_i18n_parsing_expressions.h        |  2 +-
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git 
a/components/autofill/core/browser/data_model/autofill_i18n_parsing_expression_components.h
 
b/components/autofill/core/browser/data_model/autofill_i18n_parsing_expression_components.h
index fcc3f168bf23100..2609de2f4284fda 100644
--- 
a/components/autofill/core/browser/data_model/autofill_i18n_parsing_expression_components.h
+++ 
b/components/autofill/core/browser/data_model/autofill_i18n_parsing_expression_components.h
@@ -39,7 +39,7 @@ class AutofillParsingProcess {
   AutofillParsingProcess(const AutofillParsingProcess& other) = delete;
   AutofillParsingProcess& operator=(const AutofillParsingProcess& right) =
       delete;
-  virtual ~AutofillParsingProcess() = default;
+  virtual constexpr ~AutofillParsingProcess() = default;
 
   // Parses `value` and returns the extracted field type matches.
   virtual ValueParsingResults Parse(std::string_view value) const = 0;
@@ -60,7 +60,7 @@ class Decomposition : public AutofillParsingProcess {
         anchor_end_(anchor_end) {}
   Decomposition(const Decomposition&) = delete;
   Decomposition& operator=(const Decomposition&) = delete;
-  ~Decomposition() override = default;
+  constexpr ~Decomposition() override;
 
   ValueParsingResults Parse(std::string_view value) const override;
 
@@ -70,6 +70,8 @@ class Decomposition : public AutofillParsingProcess {
   const bool anchor_end_ = true;
 };
 
+constexpr Decomposition::~Decomposition() = default;
+
 // A DecompositionCascade enables us to try one Decomposition after the next
 // until we have found a match. It can be fitted with a condition to only use 
it
 // in case the condition is fulfilled. The lack of a condition is expressed by
@@ -84,7 +86,7 @@ class DecompositionCascade : public AutofillParsingProcess {
       : condition_regex_(condition_regex), alternatives_(alternatives) {}
   DecompositionCascade(const DecompositionCascade&) = delete;
   DecompositionCascade& operator=(const DecompositionCascade&) = delete;
-  ~DecompositionCascade() override = default;
+  constexpr ~DecompositionCascade() override;
 
   ValueParsingResults Parse(std::string_view value) const override;
 
@@ -93,6 +95,8 @@ class DecompositionCascade : public AutofillParsingProcess {
   const base::span<const AutofillParsingProcess* const> alternatives_;
 };
 
+constexpr DecompositionCascade::~DecompositionCascade() = default;
+
 // An ExtractPart parsing process attempts to match a string to a
 // parsing expression, and then extracts the captured field type values. It can
 // be fitted with a condition to only use it in case the condition is 
fulfilled.
@@ -110,7 +114,7 @@ class ExtractPart : public AutofillParsingProcess {
 
   ExtractPart(const ExtractPart&) = delete;
   ExtractPart& operator=(const ExtractPart&) = delete;
-  ~ExtractPart() override = default;
+  constexpr ~ExtractPart() override;
 
   ValueParsingResults Parse(std::string_view value) const override;
 
@@ -119,6 +123,8 @@ class ExtractPart : public AutofillParsingProcess {
   const std::string_view parsing_regex_;
 };
 
+constexpr ExtractPart::~ExtractPart() = default;
+
 // Unlike for a DecompositionCascade, ExtractParts does not follow the "the
 // first match wins" principle but applies all matching attempts in sequence so
 // the last match wins. This also enables extracting different data (e.g. an
@@ -134,7 +140,7 @@ class ExtractParts : public AutofillParsingProcess {
       : condition_regex_(condition_regex), pieces_(pieces) {}
   ExtractParts(const ExtractParts&) = delete;
   ExtractParts& operator=(const ExtractParts&) = delete;
-  ~ExtractParts() override = default;
+  constexpr ~ExtractParts() override;
 
   ValueParsingResults Parse(std::string_view value) const override;
 
@@ -143,6 +149,8 @@ class ExtractParts : public AutofillParsingProcess {
   const base::span<const ExtractPart* const> pieces_;
 };
 
+constexpr ExtractParts::~ExtractParts() = default;
+
 }  // namespace autofill::i18n_model_definition
 
 #endif  // 
COMPONENTS_AUTOFILL_CORE_BROWSER_DATA_MODEL_AUTOFILL_I18N_PARSING_EXPRESSION_COMPONENTS_H_
diff --git 
a/components/autofill/core/browser/data_model/autofill_i18n_parsing_expressions.h
 
b/components/autofill/core/browser/data_model/autofill_i18n_parsing_expressions.h
index af0c4b0e9086602..02b1a240ec9d5a4 100644
--- 
a/components/autofill/core/browser/data_model/autofill_i18n_parsing_expressions.h
+++ 
b/components/autofill/core/browser/data_model/autofill_i18n_parsing_expressions.h
@@ -174,7 +174,7 @@ constexpr ExtractParts kExtractParts_7 = ExtractParts("", 
kExtractParts_7_Pieces
 
 // A lookup map for parsing expressions for countries and field types.
 constexpr auto kAutofillParsingRulesMap =
-    base::MakeFixedFlatMap<CountryAndFieldType, raw_ptr<const 
AutofillParsingProcess>>({
+    base::MakeFixedFlatMap<CountryAndFieldType, const 
AutofillParsingProcess*>({
       {{"BR", NAME_FULL}, &kDecompositionCascade_3},
       {{"BR", ADDRESS_HOME_STREET_LOCATION}, &kDecompositionList[8]},
       {{"BR", ADDRESS_HOME_SUBPREMISE}, &kExtractParts_0},

++++++ brotli-remove-shared-dictionary.patch ++++++
Partially revert 
https://github.com/chromium/chromium/commit/c1dc375391403442935f1305f5a9782dd1c33f3a
This feature has no real-world use and inhibits build with old brotli

--- src/net/filter/brotli_source_stream.cc.orig 2023-10-12 17:25:42.094020700 
+0200
+++ src/net/filter/brotli_source_stream.cc      2023-10-12 22:43:53.790708700 
+0200
@@ -13,7 +11,6 @@
 #include "base/metrics/histogram_macros.h"
 #include "net/base/io_buffer.h"
 #include "third_party/brotli/include/brotli/decode.h"
-#include "third_party/brotli/include/brotli/shared_dictionary.h"
 
 namespace net {
 
@@ -25,20 +22,10 @@ const char kBrotli[] = "BROTLI";
 // Brotli format specification: http://www.ietf.org/id/draft-alakuijala-brotli.
 class BrotliSourceStream : public FilterSourceStream {
  public:
-  explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream,
-                              scoped_refptr<IOBuffer> dictionary = nullptr,
-                              size_t dictionary_size = 0u)
-      : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)),
-        dictionary_(std::move(dictionary)),
-        dictionary_size_(dictionary_size) {
+  explicit BrotliSourceStream(std::unique_ptr<SourceStream> upstream)
+      : FilterSourceStream(SourceStream::TYPE_BROTLI, std::move(upstream)) {
     brotli_state_ =
         BrotliDecoderCreateInstance(AllocateMemory, FreeMemory, this);
-    if (dictionary_) {
-      BROTLI_BOOL result = BrotliDecoderAttachDictionary(
-          brotli_state_, BROTLI_SHARED_DICTIONARY_RAW, dictionary_size_,
-          reinterpret_cast<const unsigned char*>(dictionary_->data()));
-      CHECK(result);
-    }
     CHECK(brotli_state_);
   }
 
@@ -176,9 +163,6 @@ class BrotliSourceStream : public Filter
     free(&array[-1]);
   }
 
-  const scoped_refptr<IOBuffer> dictionary_;
-  const size_t dictionary_size_;
-
   raw_ptr<BrotliDecoderState, DanglingUntriaged> brotli_state_;
 
   DecodingStatus decoding_status_ = DecodingStatus::DECODING_IN_PROGRESS;
@@ -200,8 +184,7 @@ std::unique_ptr<FilterSourceStream> Crea
     std::unique_ptr<SourceStream> previous,
     scoped_refptr<IOBuffer> dictionary,
     size_t dictionary_size) {
-  return std::make_unique<BrotliSourceStream>(
-      std::move(previous), std::move(dictionary), dictionary_size);
+  return nullptr;
 }
 
 }  // namespace net

++++++ build-without-extensions.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.679993650 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.683993796 +0200
@@ -1,393 +1,11 @@
-From 1e668a95cb15dd3b8c0a2ab5826e6c9e6e8c6c98 Mon Sep 17 00:00:00 2001
-From: Shelley Vohr <shelley.v...@gmail.com>
-Date: Thu, 28 Sep 2023 12:06:13 +0200
-Subject: [PATCH 1/3] fix: ENABLE_EXTENSIONS -> ENABLE_ELECTRON_EXTENSIONS
+Work around this linker error:
 
----
- shell/browser/electron_browser_client.cc      |  6 +++---
- shell/browser/hid/electron_hid_delegate.cc    |  9 +++++----
- shell/browser/plugins/plugin_utils.cc         |  6 +++---
- shell/browser/usb/electron_usb_delegate.cc    | 20 +++++++++----------
- .../print_render_frame_helper_delegate.cc     | 14 ++++++-------
- shell/renderer/renderer_client_base.cc        | 16 +++++++--------
- 6 files changed, 36 insertions(+), 35 deletions(-)
+[ 9463s] 
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 
obj/electron/chromium_src/chrome/extension_navigation_ui_data.o: warning: 
relocation against `_ZN10extensions12WebViewGuest4TypeE' in read-only section 
`.text'
+[ 9463s] 
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 
obj/electron/chromium_src/chrome/extension_navigation_ui_data.o: in function 
`guest_view::GuestView<extensions::WebViewGuest>::AsDerivedGuest(guest_view::GuestViewBase*)':
+[ 9463s] 
/home/abuild/rpmbuild/BUILD/src/out/Release/../../components/guest_view/browser/guest_view.h:67:(.text+0xdd):
 undefined reference to `extensions::WebViewGuest::Type'
 
-diff --git a/shell/browser/electron_browser_client.cc 
b/shell/browser/electron_browser_client.cc
-index 1428fdfad3b4e..7d89d513199ef 100644
---- a/electron/shell/browser/electron_browser_client.cc
-+++ b/electron/shell/browser/electron_browser_client.cc
-@@ -1220,12 +1220,12 @@ void ElectronBrowserClient::
-   protocol_registry->RegisterURLLoaderFactories(factories,
-                                                 false /* allow_file_access 
*/);
- 
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   factories->emplace(
-       extensions::kExtensionScheme,
-       extensions::CreateExtensionServiceWorkerScriptURLLoaderFactory(
-           browser_context));
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- }
- 
- bool ElectronBrowserClient::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
-@@ -1473,7 +1473,7 @@ void ElectronBrowserClient::
-           },
-           &render_frame_host));
- #endif
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   associated_registry.AddInterface<extensions::mojom::LocalFrameHost>(
-       base::BindRepeating(
-           [](content::RenderFrameHost* render_frame_host,
-diff --git a/shell/browser/hid/electron_hid_delegate.cc 
b/shell/browser/hid/electron_hid_delegate.cc
-index 0fef6977e96aa..5900b16412177 100644
---- a/electron/shell/browser/hid/electron_hid_delegate.cc
-+++ b/electron/shell/browser/hid/electron_hid_delegate.cc
-@@ -11,6 +11,7 @@
- #include "base/containers/contains.h"
- #include "chrome/common/chrome_features.h"
- #include "content/public/browser/web_contents.h"
-+#include "electron/buildflags/buildflags.h"
- #include "services/device/public/cpp/hid/hid_switches.h"
- #include "shell/browser/electron_permission_manager.h"
- #include "shell/browser/hid/hid_chooser_context.h"
-@@ -19,9 +20,9 @@
- #include "shell/browser/web_contents_permission_helper.h"
- #include "third_party/blink/public/common/permissions/permission_utils.h"
- 
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- #include "extensions/common/constants.h"
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- 
- namespace {
- 
-@@ -128,14 +129,14 @@ bool ElectronHidDelegate::IsFidoAllowedForOrigin(
- 
- bool ElectronHidDelegate::IsServiceWorkerAllowedForOrigin(
-     const url::Origin& origin) {
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   // WebHID is only available on extension service workers with feature flag
-   // enabled for now.
-   if (base::FeatureList::IsEnabled(
-           features::kEnableWebHidOnExtensionServiceWorker) &&
-       origin.scheme() == extensions::kExtensionScheme)
-     return true;
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   return false;
- }
- 
-diff --git a/shell/browser/plugins/plugin_utils.cc 
b/shell/browser/plugins/plugin_utils.cc
-index b3c7490e9d871..2b569d4ec419a 100644
---- a/electron/shell/browser/plugins/plugin_utils.cc
-+++ b/electron/shell/browser/plugins/plugin_utils.cc
-@@ -9,11 +9,11 @@
- #include "base/containers/contains.h"
- #include "base/values.h"
- #include "content/public/common/webplugininfo.h"
--#include "extensions/buildflags/buildflags.h"
-+#include "electron/buildflags/buildflags.h"
- #include "url/gurl.h"
- #include "url/origin.h"
- 
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- #include "extensions/browser/extension_registry.h"
- #include "extensions/browser/extension_util.h"
- #include "extensions/common/constants.h"
-@@ -36,7 +36,7 @@ base::flat_map<std::string, std::string>
- PluginUtils::GetMimeTypeToExtensionIdMap(
-     content::BrowserContext* browser_context) {
-   base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   std::vector<std::string> allowed_extension_ids =
-       MimeTypesHandler::GetMIMETypeAllowlist();
-   // Go through the white-listed extensions and try to use them to intercept
-diff --git a/shell/browser/usb/electron_usb_delegate.cc 
b/shell/browser/usb/electron_usb_delegate.cc
-index 8bb5726cf5fcd..72dc42486cc4e 100644
---- a/electron/shell/browser/usb/electron_usb_delegate.cc
-+++ b/electron/shell/browser/usb/electron_usb_delegate.cc
-@@ -13,7 +13,7 @@
- #include "base/scoped_observation.h"
- #include "content/public/browser/render_frame_host.h"
- #include "content/public/browser/web_contents.h"
--#include "extensions/buildflags/buildflags.h"
-+#include "electron/buildflags/buildflags.h"
- #include "services/device/public/mojom/usb_enumeration_options.mojom.h"
- #include "shell/browser/electron_permission_manager.h"
- #include "shell/browser/usb/usb_chooser_context.h"
-@@ -21,7 +21,7 @@
- #include "shell/browser/usb/usb_chooser_controller.h"
- #include "shell/browser/web_contents_permission_helper.h"
- 
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- #include "base/containers/fixed_flat_set.h"
- #include "chrome/common/chrome_features.h"
- #include "extensions/browser/extension_registry.h"
-@@ -41,7 +41,7 @@ electron::UsbChooserContext* GetChooserContext(
-       browser_context);
- }
- 
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- // These extensions can claim the smart card USB class and automatically gain
- // permissions for devices that have an interface with this class.
- constexpr auto kSmartCardPrivilegedExtensionIds =
-@@ -65,12 +65,12 @@ bool DeviceHasInterfaceWithClass(
-   }
-   return false;
- }
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- 
- bool IsDevicePermissionAutoGranted(
-     const url::Origin& origin,
-     const device::mojom::UsbDeviceInfo& device_info) {
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   // Note: The `DeviceHasInterfaceWithClass()` call is made after checking the
-   // origin, since that method call is expensive.
-   if (origin.scheme() == extensions::kExtensionScheme &&
-@@ -79,7 +79,7 @@ bool IsDevicePermissionAutoGranted(
-                                   device::mojom::kUsbSmartCardClass)) {
-     return true;
-   }
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- 
-   return false;
- }
-@@ -251,14 +251,14 @@ ElectronUsbDelegate::GetContextObserver(
- 
- bool ElectronUsbDelegate::IsServiceWorkerAllowedForOrigin(
-     const url::Origin& origin) {
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   // WebUSB is only available on extension service workers for now.
-   if (base::FeatureList::IsEnabled(
-           features::kEnableWebUsbOnExtensionServiceWorker) &&
-       origin.scheme() == extensions::kExtensionScheme) {
-     return true;
-   }
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   return false;
- }
- 
-diff --git a/shell/renderer/printing/print_render_frame_helper_delegate.cc 
b/shell/renderer/printing/print_render_frame_helper_delegate.cc
-index c104cb145d5fd..d857ea5f824fc 100644
---- a/electron/shell/renderer/printing/print_render_frame_helper_delegate.cc
-+++ b/electron/shell/renderer/printing/print_render_frame_helper_delegate.cc
-@@ -7,15 +7,15 @@
- #include <utility>
- 
- #include "content/public/renderer/render_frame.h"
--#include "extensions/buildflags/buildflags.h"
-+#include "electron/buildflags/buildflags.h"
- #include "third_party/blink/public/web/web_element.h"
- #include "third_party/blink/public/web/web_local_frame.h"
- 
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- #include "chrome/common/pdf_util.h"
- #include "extensions/common/constants.h"
- #include 
"extensions/renderer/guest_view/mime_handler_view/post_message_support.h"
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
- 
- namespace electron {
- 
-@@ -26,14 +26,14 @@ 
PrintRenderFrameHelperDelegate::~PrintRenderFrameHelperDelegate() = default;
- // Return the PDF object element if |frame| is the out of process PDF 
extension.
- blink::WebElement PrintRenderFrameHelperDelegate::GetPdfElement(
-     blink::WebLocalFrame* frame) {
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   if (frame->Parent() &&
-       IsPdfInternalPluginAllowedOrigin(frame->Parent()->GetSecurityOrigin())) 
{
-     auto plugin_element = frame->GetDocument().QuerySelector("embed");
-     DCHECK(!plugin_element.IsNull());
-     return plugin_element;
-   }
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   return blink::WebElement();
- }
- 
-@@ -43,7 +43,7 @@ bool PrintRenderFrameHelperDelegate::IsPrintPreviewEnabled() 
{
- 
- bool PrintRenderFrameHelperDelegate::OverridePrint(
-     blink::WebLocalFrame* frame) {
--#if BUILDFLAG(ENABLE_EXTENSIONS)
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   auto* post_message_support =
-       extensions::PostMessageSupport::FromWebLocalFrame(frame);
-   if (post_message_support) {
-@@ -56,7 +56,7 @@ bool PrintRenderFrameHelperDelegate::OverridePrint(
-     
post_message_support->PostMessageFromValue(base::Value(std::move(message)));
-     return true;
-   }
--#endif  // BUILDFLAG(ENABLE_EXTENSIONS)
-+#endif  // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   return false;
- }
- 
-diff --git a/shell/renderer/renderer_client_base.cc 
b/shell/renderer/renderer_client_base.cc
-index b80ba7a487394..d456d414f1c29 100644
---- a/electron/shell/renderer/renderer_client_base.cc
-+++ b/electron/shell/renderer/renderer_client_base.cc
-@@ -235,14 +235,6 @@ void RendererClientBase::RenderThreadStarted() {
-   
extensions::ExtensionsRendererClient::Set(extensions_renderer_client_.get());
- 
-   thread->AddObserver(extensions_renderer_client_->GetDispatcher());
--#endif
--
--#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
--  spellcheck_ = std::make_unique<SpellCheck>(this);
--#endif
--
--  blink::WebCustomElement::AddEmbedderCustomElementName("webview");
--  blink::WebCustomElement::AddEmbedderCustomElementName("browserplugin");
- 
-   WTF::String extension_scheme(extensions::kExtensionScheme);
-   // Extension resources are HTTP-like and safe to expose to the fetch API. 
The
-@@ -255,6 +247,14 @@ void RendererClientBase::RenderThreadStarted() {
-       extension_scheme);
-   blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
-       extension_scheme);
-+#endif
-+
-+#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
-+  spellcheck_ = std::make_unique<SpellCheck>(this);
-+#endif
-+
-+  blink::WebCustomElement::AddEmbedderCustomElementName("webview");
-+  blink::WebCustomElement::AddEmbedderCustomElementName("browserplugin");
- 
-   std::vector<std::string> fetch_enabled_schemes =
-       ParseSchemesCLISwitch(command_line, switches::kFetchSchemes);
+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.
 
-From 1b3f3a130397f7145271026f8e0fc720151d6d7c Mon Sep 17 00:00:00 2001
-From: Shelley Vohr <shelley.v...@gmail.com>
-Date: Thu, 28 Sep 2023 12:11:45 +0200
-Subject: [PATCH 2/3] fix: extension guard fixes
-
----
- shell/browser/electron_browser_client.cc | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/shell/browser/electron_browser_client.cc 
b/shell/browser/electron_browser_client.cc
-index 7d89d513199ef..9626d7a4270bf 100644
---- a/electron/shell/browser/electron_browser_client.cc
-+++ b/electron/shell/browser/electron_browser_client.cc
-@@ -57,7 +57,7 @@
- #include "crypto/crypto_buildflags.h"
- #include "electron/buildflags/buildflags.h"
- #include "electron/shell/common/api/api.mojom.h"
--#include "extensions/browser/api/messaging/messaging_api_message_filter.h"
-+#include "extensions/browser/extension_navigation_ui_data.h"
- #include "mojo/public/cpp/bindings/binder_map.h"
- #include "net/ssl/ssl_cert_request_info.h"
- #include "ppapi/buildflags/buildflags.h"
-@@ -114,6 +114,7 @@
- #include "shell/common/options_switches.h"
- #include "shell/common/platform_util.h"
- #include "shell/common/thread_restrictions.h"
-+#include 
"third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
- #include "third_party/blink/public/common/loader/url_loader_throttle.h"
- #include "third_party/blink/public/common/tokens/tokens.h"
- #include "third_party/blink/public/common/web_preferences/web_preferences.h"
-@@ -147,6 +148,7 @@
- #include "content/public/browser/child_process_security_policy.h"
- #include "content/public/browser/file_url_loader.h"
- #include "content/public/browser/web_ui_url_loader_factory.h"
-+#include "extensions/browser/api/messaging/messaging_api_message_filter.h"
- #include "extensions/browser/api/mime_handler_private/mime_handler_private.h"
- #include "extensions/browser/api/web_request/web_request_api.h"
- #include "extensions/browser/browser_context_keyed_api_factory.h"
-@@ -154,7 +156,6 @@
- #include "extensions/browser/extension_host.h"
- #include "extensions/browser/extension_message_filter.h"
- #include "extensions/browser/extension_navigation_throttle.h"
--#include "extensions/browser/extension_navigation_ui_data.h"
- #include "extensions/browser/extension_prefs.h"
- #include "extensions/browser/extension_protocols.h"
- #include "extensions/browser/extension_registry.h"
-@@ -172,7 +173,6 @@
- #include "shell/browser/extensions/electron_extension_message_filter.h"
- #include "shell/browser/extensions/electron_extension_system.h"
- #include "shell/browser/extensions/electron_extension_web_contents_observer.h"
--#include 
"third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
- #endif
- 
- #if BUILDFLAG(ENABLE_PLUGINS)
-@@ -1413,9 +1413,10 @@ void 
ElectronBrowserClient::OverrideURLLoaderFactoryParams(
-       factory_params->disable_web_security = true;
-     }
-   }
--
-+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-   extensions::URLLoaderFactoryManager::OverrideURLLoaderFactoryParams(
-       browser_context, origin, is_for_isolated_world, factory_params);
-+#endif
- }
- 
- void ElectronBrowserClient::
-
-From 4986472bab8bd1caaa42ddb6a3501d64a467d01d Mon Sep 17 00:00:00 2001
-From: Shelley Vohr <shelley.v...@gmail.com>
-Date: Thu, 28 Sep 2023 14:05:24 +0200
-Subject: [PATCH 3/3] chore: fix linker errors
-
----
- chromium_src/BUILD.gn | 28 ++++++++++++++++++++++++++++
- 1 file changed, 28 insertions(+)
-
-diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn
-index 24a0b75401807..de47d024a882a 100644
---- a/electron/chromium_src/BUILD.gn
-+++ b/electron/chromium_src/BUILD.gn
-@@ -338,6 +338,34 @@ static_library("chrome") {
-         "//components/pdf/renderer",
-       ]
-     }
-+  } else {
-+    # These are required by the webRequest module.
-+    sources += [
-+      "//extensions/browser/api/declarative_net_request/request_action.cc",
-+      "//extensions/browser/api/declarative_net_request/request_action.h",
-+      "//extensions/browser/api/web_request/form_data_parser.cc",
-+      "//extensions/browser/api/web_request/form_data_parser.h",
-+      "//extensions/browser/api/web_request/upload_data_presenter.cc",
-+      "//extensions/browser/api/web_request/upload_data_presenter.h",
-+      "//extensions/browser/api/web_request/web_request_api_constants.cc",
-+      "//extensions/browser/api/web_request/web_request_api_constants.h",
-+      "//extensions/browser/api/web_request/web_request_info.cc",
-+      "//extensions/browser/api/web_request/web_request_info.h",
-+      "//extensions/browser/api/web_request/web_request_resource_type.cc",
-+      "//extensions/browser/api/web_request/web_request_resource_type.h",
-+      "//extensions/browser/extension_api_frame_id_map.cc",
-+      "//extensions/browser/extension_api_frame_id_map.h",
-+      "//extensions/browser/extension_navigation_ui_data.cc",
-+      "//extensions/browser/extension_navigation_ui_data.h",
-+      "//extensions/browser/extensions_browser_client.cc",
-+      "//extensions/browser/extensions_browser_client.h",
-+      "//extensions/browser/guest_view/web_view/web_view_renderer_state.cc",
-+      "//extensions/browser/guest_view/web_view/web_view_renderer_state.h",
-+    ]
-+
-+    public_deps += [
-+      
"//extensions/browser/api/declarative_net_request/flat:extension_ruleset",
-+    ]
-   }
- 
-   if (!is_mas_build) {
 --- src/extensions/browser/guest_view/web_view/web_view_guest.cc.old   
2023-09-28 10:14:03.660044621 +0200
 +++ src/extensions/browser/guest_view/web_view/web_view_guest.cc       
2023-09-29 08:05:41.827245244 +0200
 @@ -285,9 +285,6 @@ std::string WebViewGuest::GetPartitionID

++++++ chromium-102-compiler.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.699994380 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.699994380 +0200
@@ -46,15 +46,16 @@
 +    # ANY BUGS DUE TO ALIASING SHOULD BE FIXED IN CODE, AND THE PATCHES SENT 
UPSTREAM!
 +    # cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
  
-     # Stack protection.
-     if (is_apple) {
-@@ -432,9 +435,6 @@
+     # Stack protection. ShadowCallStack and Stack protector address the same
+     # problems. Therefore, we only enable one or the other. Clang advertises 
SCS as
+@@ -432,10 +435,6 @@
    # Linux/Android/Fuchsia common flags setup.
    # ---------------------------------
    if (is_linux || is_chromeos || is_android || is_fuchsia) {
 -    asmflags += [ "-fPIC" ]
 -    cflags += [ "-fPIC" ]
 -    ldflags += [ "-fPIC" ]
+-    rustflags += [ "-Crelocation-model=pic" ]
  
      if (!is_clang) {
        # Use pipes for communicating between sub-processes. Faster.
@@ -183,7 +184,7 @@
  
      if (treat_warnings_as_errors) {
        # Turn rustc warnings into the "deny" lint level, which produce compiler
-@@ -1618,16 +1552,6 @@
+@@ -1618,23 +1552,6 @@
        "__STDC_FORMAT_MACROS",
      ]
  
@@ -194,7 +195,14 @@
 -      # Non-chromium code is not guaranteed to compile cleanly with
 -      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
 -      # disabled, so only do that for Release build.
--      defines += [ "_FORTIFY_SOURCE=2" ]
+-      fortify_level = "2"
+-
+-      # ChromeOS supports a high-quality _FORTIFY_SOURCE=3 implementation
+-      # with a few custom glibc patches. Use that if it's available.
+-      if (is_chromeos_ash) {
+-        fortify_level = "3"
+-      }
+-      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
 -    }
 -
      if (is_apple) {
@@ -295,9 +303,9 @@
 -config("minimal_symbols") {
 +config("minimal_symbols") { cflags = ["-g1"] }
 +config("xminimal_symbols") {
+   rustflags = []
    if (is_win) {
      # Functions, files, and line tables only.
-     cflags = []
 @@ -2470,7 +2403,8 @@
  # This configuration contains function names only. That is, the compiler is
  # told to not generate debug information and the linker then just puts 
function

++++++ chromium-117-blink-BUILD-mnemonic.patch ++++++
[  332s] ERROR at //third_party/blink/renderer/core/BUILD.gn:1697:14: 
Assignment had no effect.
[  332s]   mnemonic = "ELOC_PROTO"
[  332s]              ^-----------
[  332s] You set the variable "mnemonic" here and it was unused before it went
[  332s] out of scope.
[  332s] See //BUILD.gn:1166:7: which caused the file to be included.
[  332s]       "//third_party/blink/renderer/core:gen_files_for_web_tests",
[  332s]       ^----------------------------------------------------------

Index: chromium-117.0.5938.22/third_party/blink/renderer/core/BUILD.gn
===================================================================
--- chromium-117.0.5938.22.orig/third_party/blink/renderer/core/BUILD.gn
+++ chromium-117.0.5938.22/third_party/blink/renderer/core/BUILD.gn
@@ -1694,8 +1694,6 @@ action_foreach("element_locator_test_pro
   python_path_root = "${root_out_dir}/pyproto"
   python_path_proto = 
"${python_path_root}/third_party/blink/renderer/core/lcp_critical_path_predictor"
 
-  mnemonic = "ELOC_PROTO"
-
   source_dir = "lcp_critical_path_predictor/test_proto"
   sources = rebase_path([ "lcp_image_id.asciipb" ], "", source_dir)
 

++++++ chromium-93-ffmpeg-4.4.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.723995256 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.727995402 +0200
@@ -37,33 +37,13 @@
    const uint32_t* skip_samples_ptr =
        reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
            packet, AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
-Index: electron-17.1.2/media/filters/ffmpeg_demuxer.cc
+Index: chromium-118.0.5993.18/media/filters/ffmpeg_demuxer.cc
 ===================================================================
---- electron-17.1.2.orig/media/filters/ffmpeg_demuxer.cc       2022-03-11 
08:49:30.744949436 +0100
-+++ electron-17.1.2/media/filters/ffmpeg_demuxer.cc    2022-03-11 
09:17:36.916088893 +0100
-@@ -404,11 +404,19 @@ void FFmpegDemuxerStream::EnqueuePacket(
-   scoped_refptr<DecoderBuffer> buffer;
- 
-   if (type() == DemuxerStream::TEXT) {
-+#if LIBAVUTIL_VERSION_MAJOR < 57
-+    int id_size = 0;
-+#else
-     size_t id_size = 0;
-+#endif
-     uint8_t* id_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
- 
-+#if LIBAVUTIL_VERSION_MAJOR < 57
-+    int settings_size = 0;
-+#else
-     size_t settings_size = 0;
-+#endif
-     uint8_t* settings_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
- 
-@@ -420,7 +428,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
-     buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
-                                      side_data.data(), side_data.size());
+--- 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(
+     // TODO(crbug.com/1471504): This is now broken without side data; remove.
+     buffer = DecoderBuffer::CopyFrom(packet->data, packet->size);
    } else {
 +#if LIBAVUTIL_VERSION_MAJOR < 57
 +    int side_data_size = 0;
@@ -73,7 +53,7 @@
      uint8_t* side_data = av_packet_get_side_data(
          packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
  
-@@ -481,7 +493,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
+@@ -461,7 +465,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
                                         packet->size - data_offset);
      }
  

++++++ chromium-gcc11.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.747996131 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.747996131 +0200
@@ -3,13 +3,13 @@
 --- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/db/column.cc 
2022-03-07 17:28:24.814737660 +0100
 +++ electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc      
2022-03-09 08:25:10.346569313 +0100
 @@ -14,6 +14,7 @@
+  * See the License for the specific language governing permissions and
   * limitations under the License.
   */
- 
 +#include <limits>
  #include "src/trace_processor/db/column.h"
  
- #include "src/trace_processor/db/compare.h"
+ #include "perfetto/base/logging.h"
 Index: electron-17.1.0/ui/gtk/gtk_key_bindings_handler.cc
 ===================================================================
 --- electron-17.1.0.orig/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc    
2022-03-07 17:20:31.788817015 +0100

++++++ chromium-vaapi.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.763996715 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.767996861 +0200
@@ -3,7 +3,7 @@
 --- 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[] = {
-      FEATURE_VALUE_TYPE(device::features::kWebXrSharedBuffers)},
+ #endif
  #endif  // BUILDFLAG(IS_ANDROID)
  #endif  // ENABLE_VR
 -#if BUILDFLAG(IS_CHROMEOS_ASH)

++++++ crashpad-use-system-abseil.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.783997445 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.783997445 +0200
@@ -1,16 +1,18 @@
 --- a/components/crash/core/app/crashpad.cc
 +++ b/components/crash/core/app/crashpad.cc
-@@ -28,7 +28,7 @@
- #include "build/build_config.h"
+@@ -28,8 +28,8 @@
  #include "build/chromeos_buildflags.h"
  #include "components/crash/core/app/crash_reporter_client.h"
+ #include "components/crash/core/common/crash_key.h"
 -#include "third_party/abseil-cpp/absl/base/internal/raw_logging.h"
+-#include "third_party/abseil-cpp/absl/types/optional.h"
 +#include <absl/base/internal/raw_logging.h>
++#include <absl/types/optional.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/common/crash_key.h"  // nogncheck
+ #include "components/crash/core/app/crash_export_thunks.h"
  #endif
  
 +#if ABSL_LTS_RELEASE_VERSION < 20230000

++++++ create_tarball.sh ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.803998175 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.803998175 +0200
@@ -172,7 +172,6 @@
     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/libXNVCtrl #Not in 15.4
-    third_party/angle/src/third_party/systeminfo #Derived code, not vendored 
dep.
     third_party/angle/src/third_party/volk #replacement vulkan loader. Drop it 
when Leap has new enough libvulkan
     third_party/blink #Integral part of chrome
     third_party/boringssl #Factory has an ancient version, but upstream seems 
to have gave up on making it a shared library
@@ -201,12 +200,14 @@
     third_party/crashpad/crashpad/third_party/zlib #Derived code, not vendored 
dependency.
     third_party/crc32c #Not in Leap
     third_party/cros_system_api #Integral part of Chrome. Needed.
+    third_party/d3 #javascript
     third_party/dav1d #Leap and fc36 too old
     third_party/dawn #Integral part of chrome, Needed even if you're building 
chrome without webgpu
     third_party/dawn/third_party/gn/webgpu-cts #Integral part of chrome, 
Needed even if you're building chrome without webgpu
     third_party/devtools-frontend #Javascript code, integral part of chrome
     third_party/devtools-frontend/src/front_end/third_party #various 
javascript code compiled into chrome, see README.md
     
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
+    
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
     
third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n # 
javascript
     third_party/devtools-frontend/src/third_party/i18n #javascript
     third_party/devtools-frontend/src/third_party/typescript #Chromium added 
code
@@ -276,6 +277,7 @@
     third_party/private-join-and-compute #not in any distro, also heavily 
patched
     third_party/private_membership #derived code, not vendored dep
     third_party/protobuf #Heavily forked. Apparently was officially 
unbundlable back in the GYP days, and may be again in the future.
+    third_party/puffin #integral part of chrome
     third_party/rnnoise #use of private headers
     third_party/shell-encryption #not available on any distro, also heavily 
patched
     third_party/skia #integral part of chrome

++++++ decoder_buffer_side_data-missing-uint8_t.patch ++++++
>From c72d1bc32d577ca75e3d3b8f8531883b82a07fe7 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Wed, 4 Oct 2023 16:25:15 +0000
Subject: [PATCH] IWYU: add stdint.h in media::DecoderBufferSideData

Bug: 957519
Change-Id: Iadcc8dd48af52f4238a09797386fb0cfc3c061d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4909837
Reviewed-by: Mark Foltz <mfo...@chromium.org>
Auto-Submit: Stephan Hartmann <sth...@googlemail.com>
Commit-Queue: Mark Foltz <mfo...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1205299}
---
 media/base/decoder_buffer_side_data.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/media/base/decoder_buffer_side_data.h 
b/media/base/decoder_buffer_side_data.h
index 216fb60f708c7d1..17f7e0f82f9ddd2 100644
--- a/media/base/decoder_buffer_side_data.h
+++ b/media/base/decoder_buffer_side_data.h
@@ -5,6 +5,8 @@
 #ifndef MEDIA_BASE_DECODER_BUFFER_SIDE_DATA_H_
 #define MEDIA_BASE_DECODER_BUFFER_SIDE_DATA_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "media/base/media_export.h"

++++++ disable-catapult.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.823998904 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.827999051 +0200
@@ -148,13 +148,13 @@
 +++ b/tools/gritsettings/resource_ids.spec
 @@ -755,12 +755,6 @@
    "content/test/web_ui_mojo_test_resources.grd": {
-     "includes": [3840],
+     "includes": [6340],
    },
 -
 -  # This file is generated during the build.
 -  "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd": 
{
 -    "META": {"sizes": {"includes": [20],}},
--    "includes": [3860],
+-    "includes": [6360],
 -  },
    # END content/ section.
  
@@ -162,9 +162,9 @@
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
 @@ -2530,7 +2530,6 @@ source_set("browser") {
-     deps += [
        "//components/speech:speech",
        "//components/vector_icons",
+       "//components/webauthn/json",
 -      "//content/browser/tracing:resources",
      ]
    }
@@ -180,8 +180,8 @@
        deps += [
          "//chrome/browser/resources:component_extension_resources",
 @@ -198,7 +297,6 @@ template("chrome_extra_paks") {
-         "//chrome/browser/resources/webui_gallery:resources",
-         "//chrome/browser/resources/whats_new:resources",
+         "//chrome/browser/resources:component_extension_resources",
+         "//chrome/browser/resources:dev_ui_paks",
          "//content/browser/devtools:devtools_resources",
 -        "//content/browser/tracing:resources",
        ]
@@ -190,17 +190,17 @@
 --- a/content/shell/BUILD.gn
 +++ b/content/shell/BUILD.gn
 @@ -458,11 +458,6 @@ repack("pak") {
-     "//ui/strings",
-   ]
+     sources += [ "$root_gen_dir/content/webxr_internals_resources.pak" ]
+   }
  
 -  if (!is_android) {
 -    deps += [ "//content/browser/tracing:resources" ]
 -    sources += [ 
"$root_gen_dir/content/browser/tracing/tracing_resources.pak" ]
 -  }
 -
-   if (shell_use_toolkit_views) {
-     deps += [ "//ui/views/resources" ]
-     sources +=
+   if (is_ios) {
+     sources += [
+       "$root_gen_dir/device/bluetooth/strings/bluetooth_strings_en-US.pak",
 --- a/content/browser/tracing/BUILD.gn
 +++ /dev/null
 @@ -1,39 +0,0 @@
@@ -333,9 +333,9 @@
 -      "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
        
"$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak",
        "$root_gen_dir/content/content_resources.pak",
-       "$root_gen_dir/content/dev_ui_content_resources.pak",
+       "$root_gen_dir/content/gpu_resources.pak",
 @@ -73,7 +72,6 @@
-       "//content:dev_ui_content_resources",
+       "//content:content_resources",
        "//content/browser/resources/gpu:resources",
        "//content/browser/resources/media:resources",
 -      "//content/browser/tracing:resources",

++++++ disable-tests.patch ++++++
--- a/components/update_client/BUILD.gn
+++ b/components/update_client/BUILD.gn
@@ -308,8 +308,6 @@ source_set("unit_tests") {
     "//third_party/puffin:libpuffpatch",
     "//third_party/re2",
   ]
-
-  data_deps = [ 
"//components/test/data/update_client/puffin_patch_test:puffin_patch_test_files"
 ]
 }
 
 fuzzer_test("update_client_protocol_serializer_fuzzer") {
--- a/third_party/puffin/BUILD.gn
+++ b/third_party/puffin/BUILD.gn
@@ -115,7 +115,6 @@ executable("puffin_unittest") {
     "src/unittest_common.cc",
     "src/utils_unittest.cc",
   ]
-  data_deps = [ 
"//components/test/data/update_client/puffin_patch_test:puffin_patch_test_files"
 ]
   deps = [
     ":libpuffdiff",
     ":libpuffpatch",

++++++ disable-webspeech.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.847999780 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.851999926 +0200
@@ -39,8 +39,8 @@
      "speech/speech_synthesis_impl.h",
      "speech/tts_controller_impl.cc",
 @@ -2956,17 +2951,6 @@ source_set("browser") {
-       "serial/serial_service.cc",
-       "serial/serial_service.h",
+       "service_worker/service_worker_usb_delegate_observer.cc",
+       "service_worker/service_worker_usb_delegate_observer.h",
  
 -      # Most speech code is non-Android.
 -      "speech/endpointer/endpointer.cc",
@@ -62,8 +62,8 @@
      deps += [
 -      "//components/speech:speech",
        "//components/vector_icons",
+       "//components/webauthn/json",
      ]
-   }
 @@ -3108,6 +3083,37 @@ source_set("browser") {
      deps += [ "//ui/compositor" ]
    }

++++++ electron-16-system-node-headers.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.876000801 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.880000948 +0200
@@ -10,7 +10,7 @@
 +        'cflags': [ '-I/usr/include/electron' ],
 +        'libraries': [ '-lz' ],
 +      }],
-       [ 'OS in "linux freebsd openbsd solaris aix"', {
+       [ 'OS in "linux freebsd openbsd solaris aix os400"', {
          'cflags': [ '-pthread' ],
          'ldflags': [ '-pthread' ],
 

++++++ electron-16-webpack-fix-openssl-3.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.892001386 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.896001532 +0200
@@ -3,8 +3,8 @@
 --- 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('fs');
- const path = require('path');
+ 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

++++++ electron_browser_context-missing-variant.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.936002991 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.940003137 +0200
@@ -6,6 +6,6 @@
  #include <string>
 +#include <variant>
  #include <vector>
- 
+ #include "base/memory/raw_ptr.h"
  #include "base/memory/weak_ptr.h"
 

++++++ fpic.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.964004013 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.964004013 +0200
@@ -95,16 +95,16 @@
 +  asmflags = ["-fpic", "-fno-semantic-interposition"]
  }
  
- if (!use_sysroot) {
+ template("qt_shim") {
 @@ -76,6 +78,8 @@
-     sources += get_target_outputs(":generate_moc")
-     deps += [ ":generate_moc" ]
+       sources += get_target_outputs(":generate_moc" + invoker.qt_version)
+       deps += [ ":generate_moc" + invoker.qt_version ]
+     }
++    cflags = ["-fpic", "-fno-semantic-interposition"]
++    asmflags = ["-fpic", "-fno-semantic-interposition"]
    }
-+  cflags = ["-fpic", "-fno-semantic-interposition"]
-+  asmflags = ["-fpic", "-fno-semantic-interposition"]
  }
- 
- component("qt") {
+ qt_shim("qt5_shim") {
 --- src/third_party/abseil-cpp/BUILD.gn.old
 +++ src/third_party/abseil-cpp/BUILD.gn
 @@ -132,6 +132,8 @@ config("absl_define_config") {

++++++ harfbuzz-replace-chromium-scoped-type.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:05.984004743 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:05.988004888 +0200
@@ -16,18 +16,6 @@
 Cr-Commit-Position: refs/heads/main@{#1054692}
 ---
 
-diff --git a/components/paint_preview/DEPS b/components/paint_preview/DEPS
-index bcc6288..28f2c7a 100644
---- a/components/paint_preview/DEPS
-+++ b/components/paint_preview/DEPS
-@@ -3,7 +3,6 @@
-   "+components/memory_pressure",
-   "+mojo/public/cpp",
-   "+third_party/harfbuzz-ng/src/src",
--  "+third_party/harfbuzz-ng/utils/hb_scoped.h",
-   "+third_party/skia/include/core",
-   "+ui/gfx/geometry",
- ]
 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
@@ -212,6 +200,15 @@
  
    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

++++++ keyboard_util-gcc12-invalid-constexpr.patch ++++++
--- src/electron/shell/common/keyboard_util.cc.old      2023-10-13 
11:02:01.473687300 +0200
+++ src/electron/shell/common/keyboard_util.cc  2023-10-17 19:48:01.405809100 
+0200
@@ -18,7 +18,7 @@ namespace {
 using CodeAndShiftedChar =
     std::pair<ui::KeyboardCode, absl::optional<char16_t>>;
 
-constexpr CodeAndShiftedChar KeyboardCodeFromKeyIdentifier(
+CodeAndShiftedChar KeyboardCodeFromKeyIdentifier(
     base::StringPiece str) {
 #if BUILDFLAG(IS_MAC)
   constexpr auto CommandOrControl = ui::VKEY_COMMAND;

++++++ kwallet_dbus-missing-uint8_t.patch ++++++
>From f5a9fd5f3d237bad08f33b3744cd897956324fc6 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Wed, 4 Oct 2023 15:49:33 +0000
Subject: [PATCH] IWYU: add stdint.h for uint8_t in KWalletDBus

Bug: 957519
Change-Id: I07319849f15c23d4a15cf7b8d4ebae5199a86894
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4909840
Commit-Queue: Lei Zhang <thes...@chromium.org>
Reviewed-by: Lei Zhang <thes...@chromium.org>
Auto-Submit: Stephan Hartmann <sth...@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#1205285}
---
 components/os_crypt/sync/kwallet_dbus.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/components/os_crypt/sync/kwallet_dbus.h 
b/components/os_crypt/sync/kwallet_dbus.h
index af2648394dd5e04..6e6cd4209c64fee 100644
--- a/components/os_crypt/sync/kwallet_dbus.h
+++ b/components/os_crypt/sync/kwallet_dbus.h
@@ -5,6 +5,8 @@
 #ifndef COMPONENTS_OS_CRYPT_SYNC_KWALLET_DBUS_H_
 #define COMPONENTS_OS_CRYPT_SYNC_KWALLET_DBUS_H_
 
+#include <stdint.h>
+
 #include <string>
 #include <vector>
 

++++++ material_color_utilities-tones-missing-round.patch ++++++
--- src/third_party/material_color_utilities/src/cpp/palettes/tones.cc.old      
2023-10-11 11:30:46.080385500 +0200
+++ src/third_party/material_color_utilities/src/cpp/palettes/tones.cc  
2023-10-11 21:04:10.234128500 +0200
@@ -16,6 +16,7 @@
 
 #include "cpp/palettes/tones.h"
 
+#include <cmath>
 #include "cpp/cam/cam.h"
 #include "cpp/cam/hct.h"
 

++++++ page_content_annotations_common-remove-tflite.patch ++++++
>From 26d375ba32c401f284385fbe6e2aa1faa8bdf47b Mon Sep 17 00:00:00 2001
From: Sophie Chang <sophiech...@chromium.org>
Date: Fri, 13 Oct 2023 19:44:18 +0000
Subject: [PATCH] Clean up unused function that was including tflite support in 
a non-tflite gated header

Bug: 1429503
Change-Id: I6db6c2bf2818ce5d1f926c35343e58c4db7487d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4938857
Commit-Queue: Sophie Chang <sophiech...@chromium.org>
Reviewed-by: Robert Ogden <robertog...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1209620}
---

diff --git 
a/components/optimization_guide/core/page_content_annotations_common.h 
b/components/optimization_guide/core/page_content_annotations_common.h
index d2649b9..4447a83 100644
--- a/components/optimization_guide/core/page_content_annotations_common.h
+++ b/components/optimization_guide/core/page_content_annotations_common.h
@@ -14,7 +14,6 @@
 #include "components/optimization_guide/core/page_content_annotation_type.h"
 #include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/abseil-cpp/absl/types/variant.h"
-#include 
"third_party/tflite_support/src/tensorflow_lite_support/cc/task/processor/proto/embedding.pb.h"
 
 namespace optimization_guide {
 
@@ -122,17 +121,12 @@
 class PageContentAnnotationsResult {
   // The various type of results.
   typedef float ContentVisibilityScore;
-  typedef tflite::task::processor::EmbeddingResult TextEmbeddingResult;
 
  public:
   // Creates a result for a content visibility annotation.
   static PageContentAnnotationsResult CreateContentVisibilityScoreResult(
       const ContentVisibilityScore& score);
 
-  // Creates a result for a text embedding annotation.
-  static PageContentAnnotationsResult CreateTextEmbeddingResult(
-      const TextEmbeddingResult& embedding);
-
   PageContentAnnotationsResult(const PageContentAnnotationsResult&);
   PageContentAnnotationsResult& operator=(const PageContentAnnotationsResult&);
   ~PageContentAnnotationsResult();

++++++ partition_alloc-no-lto.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:06.072007953 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:06.076008099 +0200
@@ -2,8 +2,8 @@
 
 --- src/base/allocator/partition_allocator/BUILD.gn.old        2022-10-01 
13:53:03.367797474 +0200
 +++ src/base/allocator/partition_allocator/BUILD.gn    2022-10-05 
14:23:53.999860356 +0200
-@@ -51,6 +51,30 @@
-   }
+@@ -51,6 +51,33 @@
+   _add_configs += [ "//build/config/compiler:no_optimize" ]
  }
  
 +if (use_starscan) {
@@ -23,6 +23,9 @@
 +  } else if (current_cpu == "arm64") {
 +    assert(pcscan_stack_supported)
 +    sources = [ "starscan/stack/asm/arm64/push_registers_asm.cc" ]
++  } else if (current_cpu == "riscv64") {
++    assert(pcscan_stack_supported)
++    sources = [ "starscan/stack/asm/riscv64/push_registers_asm.cc" ]
 +  } else {
 +    assert(!pcscan_stack_supported)
 +    # To support a trampoline for another arch, please refer to 
v8/src/heap/base.
@@ -31,11 +34,12 @@
 +}
 +
  component("partition_alloc") {
-   sources = [
-     "address_pool_manager.cc",
-@@ -262,21 +278,9 @@
+   public_deps = [
+     ":allocator_base",
+@@ -262,24 +278,9 @@
      }
    }
++  deps = [ ":allocator_base" ]
    if (use_starscan) {
 -    if (current_cpu == "x64") {
 -      assert(pcscan_stack_supported)
@@ -49,20 +53,22 @@
 -    } else if (current_cpu == "arm64") {
 -      assert(pcscan_stack_supported)
 -      sources += [ "starscan/stack/asm/arm64/push_registers_asm.cc" ]
+-    } else if (current_cpu == "riscv64") {
+-      assert(pcscan_stack_supported)
+-      sources += [ "starscan/stack/asm/riscv64/push_registers_asm.cc" ]
 -    } else {
 -      # To support a trampoline for another arch, please refer to 
v8/src/heap/base.
 -      assert(!pcscan_stack_supported)
-+    deps = []
-+    if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" 
|| current_cpu == "arm64") {
++    if (current_cpu == "x64" || current_cpu == "x86" || current_cpu == "arm" 
|| current_cpu == "arm64" || current_cpu == "riscv64") {
 +      deps += [ ":partition_alloc_asm" ]
      }
    }
-   public_deps = [
+   if (use_freelist_pool_offsets) {
 @@ -289,7 +295,6 @@
      ":partition_alloc_implementation",
      ":memory_tagging",
    ]
--  deps = []
+-  deps = [ ":allocator_base" ]
    public_configs = []
    if (is_android) {
      # tagging.cc requires __arm_mte_set_* functions.

++++++ partition_root-attribute.patch ++++++
>From 3c2c77cff5f7965d6ef3b55a18400533f640b0e1 Mon Sep 17 00:00:00 2001
From: Ivan Murashov <ivan.muras...@lge.com>
Date: Fri, 8 Sep 2023 15:43:18 +0000
Subject: [PATCH] GCC: Put attributes before function name in partition_root.h

By GCC attributes are not allowed to be placed after function name
in a function definition. This breaks compilation in GCC.

The error example:
base/allocator/partition_allocator/partition_alloc_forward.h:80:27:
error: attributes are not allowed on a function-definition
base/allocator/partition_allocator/partition_root.h:467:7:
note: in expansion of macro 'PA_MALLOC_ALIGNED'

Bug: 819294
Change-Id: Ife233d6fe7c2bab0cd503dad5c284879d896936d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4853717
Reviewed-by: Bartek Nowierski <bart...@chromium.org>
Commit-Queue: Ivan Murashov <ivan.muras...@lge.com>
Cr-Commit-Position: refs/heads/main@{#1194132}
---
 .../partition_allocator/partition_root.h      | 44 +++++++++----------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/base/allocator/partition_allocator/partition_root.h 
b/base/allocator/partition_allocator/partition_root.h
index d4b2e6c5d23fd12..ff681854ba00850 100644
--- a/base/allocator/partition_allocator/partition_root.h
+++ b/base/allocator/partition_allocator/partition_root.h
@@ -462,15 +462,15 @@ struct PA_ALIGNAS(64) 
PA_COMPONENT_EXPORT(PARTITION_ALLOC) PartitionRoot {
   // increasing cache footprint). Set PA_NOINLINE on the "basic" top-level
   // functions to mitigate that for "vanilla" callers.
   template <unsigned int flags = 0>
-  PA_NOINLINE PA_MALLOC_FN void* Alloc(size_t requested_size,
-                                       const char* type_name)
-      PA_MALLOC_ALIGNED {
+  PA_NOINLINE PA_MALLOC_FN PA_MALLOC_ALIGNED void* Alloc(
+      size_t requested_size,
+      const char* type_name) {
     return AllocInline<flags>(requested_size, type_name);
   }
   template <unsigned int flags = 0>
-  PA_ALWAYS_INLINE PA_MALLOC_FN void* AllocInline(size_t requested_size,
-                                                  const char* type_name)
-      PA_MALLOC_ALIGNED {
+  PA_ALWAYS_INLINE PA_MALLOC_FN PA_MALLOC_ALIGNED void* AllocInline(
+      size_t requested_size,
+      const char* type_name) {
     static_assert((flags & AllocFlags::kNoHooks) == 0);  // Internal only.
     return AllocInternal<flags>(requested_size, internal::PartitionPageSize(),
                                 type_name);
@@ -482,10 +482,10 @@ struct PA_ALIGNAS(64) 
PA_COMPONENT_EXPORT(PARTITION_ALLOC) PartitionRoot {
   // alignment, otherwise a sub-optimal allocation strategy is used to
   // guarantee the higher-order alignment.
   template <unsigned int flags>
-  PA_ALWAYS_INLINE PA_MALLOC_FN void* AllocInternal(size_t requested_size,
-                                                    size_t slot_span_alignment,
-                                                    const char* type_name)
-      PA_MALLOC_ALIGNED;
+  PA_ALWAYS_INLINE PA_MALLOC_FN PA_MALLOC_ALIGNED void* AllocInternal(
+      size_t requested_size,
+      size_t slot_span_alignment,
+      const char* type_name);
   // Same as |Alloc()|, but bypasses the allocator hooks.
   //
   // This is separate from Alloc() because other callers of
@@ -496,15 +496,15 @@ struct PA_ALIGNAS(64) PA_COMPONENT_EXPOR
   // for the malloc() case, the compiler correctly removes the branch, since
   // this is marked |PA_ALWAYS_INLINE|.
   template <unsigned int flags = 0>
-  PA_ALWAYS_INLINE PA_MALLOC_FN void* AllocNoHooks(size_t requested_size,
-                                                   size_t slot_span_alignment)
-      PA_MALLOC_ALIGNED;
+  PA_ALWAYS_INLINE PA_MALLOC_FN PA_MALLOC_ALIGNED void* AllocNoHooks(
+      size_t requested_size,
+      size_t slot_span_alignment);
   // Deprecated compatibility method.
   // TODO(mikt): remove this once all third party usage is gone.
-  PA_ALWAYS_INLINE PA_MALLOC_FN void* AllocWithFlags(unsigned int flags,
+  PA_ALWAYS_INLINE PA_MALLOC_FN PA_MALLOC_ALIGNED void* 
AllocWithFlags(unsigned int flags,
                                                      size_t requested_size,
                                                      const char* type_name)
-      PA_MALLOC_ALIGNED {
+       {
     // These conditional branching should be optimized away.
     if (flags == (AllocFlags::kReturnNull)) {
       return AllocInline<AllocFlags::kReturnNull>(requested_size, type_name);
@@ -520,28 +520,28 @@ struct PA_ALIGNAS(64) PA_COMPONENT_EXPOR
   }
 
   template <unsigned int flags = 0>
-  PA_NOINLINE void* Realloc(void* ptr,
-                            size_t new_size,
-                            const char* type_name) PA_MALLOC_ALIGNED {
+  PA_NOINLINE PA_MALLOC_ALIGNED void* Realloc(void* ptr,
+                                              size_t new_size,
+                                              const char* type_name) {
     return ReallocInline<flags>(ptr, new_size, type_name);
   }
   template <unsigned int flags = 0>
-  PA_ALWAYS_INLINE void* ReallocInline(void* ptr,
-                                       size_t new_size,
-                                       const char* type_name) 
PA_MALLOC_ALIGNED;
+  PA_ALWAYS_INLINE PA_MALLOC_ALIGNED void* ReallocInline(void* ptr,
+                                                         size_t new_size,
+                                                         const char* 
type_name);
   // Overload that may return nullptr if reallocation isn't possible. In this
   // case, |ptr| remains valid.
-  PA_NOINLINE void* TryRealloc(void* ptr,
-                               size_t new_size,
-                               const char* type_name) PA_MALLOC_ALIGNED {
+  PA_NOINLINE PA_MALLOC_ALIGNED void* TryRealloc(void* ptr,
+                                                 size_t new_size,
+                                                 const char* type_name) {
     return ReallocInline<AllocFlags::kReturnNull>(ptr, new_size, type_name);
   }
   // Deprecated compatibility method.
   // TODO(mikt): remove this once all third party usage is gone.
-  PA_NOINLINE void* ReallocWithFlags(unsigned int flags,
+  PA_NOINLINE PA_MALLOC_ALIGNED void* ReallocWithFlags(unsigned int flags,
                                      void* ptr,
                                      size_t new_size,
-                                     const char* type_name) PA_MALLOC_ALIGNED {
+                                     const char* type_name) {
     PA_CHECK(flags == AllocFlags::kReturnNull);
     return ReallocInline<AllocFlags::kReturnNull>(ptr, new_size, type_name);
   }

++++++ pdfium-fix-system-libs.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:06.096008829 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:06.100008975 +0200
@@ -11,8 +11,8 @@
 --- 
chromium-77.0.3865.10/third_party/pdfium/core/fpdfapi/page/BUILD.gn.system-openjpeg
        2019-08-06 13:58:27.000000000 +0200
 +++ chromium-77.0.3865.10/third_party/pdfium/core/fpdfapi/page/BUILD.gn        
2019-08-17 23:49:04.913234649 +0200
 @@ -105,6 +105,8 @@ jumbo_source_set("page") {
+     "../parser",
    ]
-   configs += [ "../../../:pdfium_strict_config" ]
    deps = [
 +    "../../../third_party:libopenjpeg2",
 +    "../../../third_party:lcms2",

++++++ perfetto-numeric_storage-double_t.patch ++++++
Fix inconsistent type alias use
On linux ix86, `double_t` evaluates to `long double`. This contradicts the 
`double` expected below.

--- 
src/third_party/perfetto/src/trace_processor/db/storage/numeric_storage.cc.old  
    2023-10-13 11:25:09.719946900 +0200
+++ src/third_party/perfetto/src/trace_processor/db/storage/numeric_storage.cc  
2023-10-14 23:54:10.728423000 +0200
@@ -29,7 +29,7 @@ namespace storage {
 namespace {
 
 // All viable numeric values for ColumnTypes.
-using NumericValue = std::variant<uint32_t, int32_t, int64_t, double_t>;
+using NumericValue = std::variant<uint32_t, int32_t, int64_t, double>;
 
 // Using the fact that binary operators in std are operators() of classes, we
 // can wrap those classes in variants and use them for std::visit in

++++++ replace-StringPiece-with-string_view.patch ++++++
++++ 966 lines (skipped)

++++++ sensor_reading-missing-int64_t-size_t.patch ++++++
>From e3cec7e4af731f27b39773671a9951ebcb97a0d1 Mon Sep 17 00:00:00 2001
From: Ivan Murashov <ivan.muras...@lge.com>
Date: Wed, 6 Sep 2023 19:40:47 +0000
Subject: [PATCH] IWYU: Add includes for size_t and int64_t usage into
 sensor_reading.h

Otherwise build fails when building with use_custom_libcxx=false.
The errors example:
services/device/public/cpp/generic_sensor/sensor_reading.h:17:40:
error: use of undeclared identifier 'int64_t'
services/device/public/cpp/generic_sensor/sensor_reading.h:35:5:
error: unknown type name 'int64_t'
services/device/public/cpp/generic_sensor/sensor_reading.h:58:20:
error: unknown type name 'size_t'; did you mean 'std::size_t'?

Bug: 957519
Change-Id: Iec9bb821eb6284cf38d93c1cec90846e2f615fab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4838935
Reviewed-by: Reilly Grant <reil...@chromium.org>
Commit-Queue: Ivan Murashov <ivan.muras...@lge.com>
Cr-Commit-Position: refs/heads/main@{#1193203}
---
 services/device/public/cpp/generic_sensor/sensor_reading.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/services/device/public/cpp/generic_sensor/sensor_reading.h 
b/services/device/public/cpp/generic_sensor/sensor_reading.h
index 7df8278649a233e..c653bec632cc69a 100644
--- a/services/device/public/cpp/generic_sensor/sensor_reading.h
+++ b/services/device/public/cpp/generic_sensor/sensor_reading.h
@@ -5,6 +5,9 @@
 #ifndef SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_
 #define SERVICES_DEVICE_PUBLIC_CPP_GENERIC_SENSOR_SENSOR_READING_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <type_traits>
 
 namespace device {

++++++ services-network-optional-explicit-constructor.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:06.144010580 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:06.148010726 +0200
@@ -18,7 +18,7 @@
  }
 --- 
src/services/network/first_party_sets/first_party_sets_access_delegate.cc.old   
   2023-03-24 11:21:23.454841767 +0100
 +++ src/services/network/first_party_sets/first_party_sets_access_delegate.cc  
2023-03-24 14:41:19.809786588 +0100
-@@ -95,7 +95,7 @@
+@@ -95,11 +95,11 @@
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  
    if (!enabled_)
@@ -26,5 +26,23 @@
 +    return {FirstPartySetsAccessDelegate::EntriesResult()};
  
    if (!ready_event_.has_value()) {
+     if (!wait_for_init_) {
+-      return {{}};
++      return {FirstPartySetsAccessDelegate::EntriesResult()};
+     }
      // base::Unretained() is safe because `this` owns `pending_queries_` and
+     // `pending_queries_` will not run the enqueued callbacks after `this` is
+diff --git a/services/network/first_party_sets/first_party_sets_manager.cc 
b/services/network/first_party_sets/first_party_sets_manager.cc
+index 68306f7e32db445..2ffd2a8be03efcf 100644
+--- a/services/network/first_party_sets/first_party_sets_manager.cc
++++ b/services/network/first_party_sets/first_party_sets_manager.cc
+@@ -117,7 +117,7 @@ FirstPartySetsManager::FindEntries(
+ 
+   if (!sets_.has_value()) {
+     if (!wait_for_init_) {
+-      return {{}};
++      return FirstPartySetsManager::EntriesResult();
+     }
+     EnqueuePendingQuery(base::BindOnce(
+         &FirstPartySetsManager::FindEntriesAndInvoke,
 

++++++ simple_font_data-freetype-include.patch ++++++
>From ed354d00aeda84693611b14baa56a287557a26b5 Mon Sep 17 00:00:00 2001
From: Munira Tursunova <moon...@google.com>
Date: Tue, 12 Sep 2023 11:54:48 +0000
Subject: [PATCH] Add check for use_system_freetype when importing private
 freetype header
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In [0] the include of private freetype header was added, which caused
build breakage when use_system_freetype=true, see [1].

This CL fixes the breakage by introducing USE_SYSTEM_FREETYPE build flag.

[0] https://chromium-review.googlesource.com/c/chromium/src/+/4717485
[1] 
https://chromium-review.googlesource.com/c/chromium/src/+/4717485/comments/cdfca7b9_8e61b2e0

Bug: 1429581
Change-Id: I7f7de4cdb2dc46092a91a47d766bedb58ddccb7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4843428
Commit-Queue: Munira Tursunova <moon...@google.com>
Reviewed-by: Dominik Röttsches <dr...@chromium.org>
Reviewed-by: Rick Byers <rby...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1195323}
---
 third_party/BUILD.gn                                 |  6 ++++++
 third_party/blink/renderer/platform/BUILD.gn         |  1 +
 .../renderer/platform/fonts/simple_font_data.cc      | 12 +++++++++++-
 3 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 7b086f95413ffd0..4ce797ebad72211 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -2,6 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import("//build/buildflag_header.gni")
 import("//build/config/features.gni")
 import("//build/config/freetype/freetype.gni")
 import("//third_party/harfbuzz-ng/harfbuzz.gni")
@@ -65,3 +66,8 @@ component("freetype_harfbuzz") {
     public_deps += [ "//third_party/harfbuzz-ng:harfbuzz_source" ]
   }
 }
+
+buildflag_header("freetype_buildflags") {
+  header = "freetype_buildflags.h"
+  flags = [ "USE_SYSTEM_FREETYPE=$use_system_freetype" ]
+}
diff --git a/third_party/blink/renderer/platform/BUILD.gn 
b/third_party/blink/renderer/platform/BUILD.gn
index 591d2f939605b01..f6a2cd2168d1ee5 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1717,6 +1717,7 @@ component("platform") {
     "//services/viz/public/cpp/gpu",
     "//skia",
     "//skia:skcms",
+    "//third_party:freetype_buildflags",
     "//third_party:freetype_harfbuzz",
     "//third_party/abseil-cpp:absl",
     "//third_party/blink/public:image_resources",
diff --git a/third_party/blink/renderer/platform/fonts/simple_font_data.cc 
b/third_party/blink/renderer/platform/fonts/simple_font_data.cc
index abe06f35c14a5e0..b2bfd88f0d85db5 100644
--- a/third_party/blink/renderer/platform/fonts/simple_font_data.cc
+++ b/third_party/blink/renderer/platform/fonts/simple_font_data.cc
@@ -48,7 +48,7 @@
 #include "third_party/blink/renderer/platform/wtf/math_extras.h"
 #include "third_party/blink/renderer/platform/wtf/text/character_names.h"
 #include "third_party/blink/renderer/platform/wtf/text/unicode.h"
-#include "third_party/freetype/src/src/autofit/afws-decl.h"
+#include "third_party/freetype_buildflags.h"
 #include "third_party/skia/include/core/SkFontMetrics.h"
 #include "third_party/skia/include/core/SkPath.h"
 #include "third_party/skia/include/core/SkTypeface.h"
@@ -57,12 +57,22 @@
 #include "ui/gfx/geometry/skia_conversions.h"
 #include "v8/include/v8.h"
 
+#if !BUILDFLAG(USE_SYSTEM_FREETYPE)
+#include "third_party/freetype/src/src/autofit/afws-decl.h"
+#endif
+
 namespace blink {
 
 constexpr float kSmallCapsFontSizeMultiplier = 0.7f;
 constexpr float kEmphasisMarkFontSizeMultiplier = 0.5f;
+
+#if !BUILDFLAG(USE_SYSTEM_FREETYPE)
 constexpr int32_t kFontObjectsMemoryConsumption =
     std::max(sizeof(AF_LatinMetricsRec), sizeof(AF_CJKMetricsRec));
+#else
+// sizeof(AF_LatinMetricsRec) = 2128
+constexpr int32_t kFontObjectsMemoryConsumption = 2128;
+#endif
 
 SimpleFontData::SimpleFontData(const FontPlatformData& platform_data,
                                scoped_refptr<CustomFontData> custom_data,

++++++ system-pydeps.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:06.184012040 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:06.184012040 +0200
@@ -136,4 +136,26 @@
        sources = sources_list
        public_deps = parser_deps
        outputs = []
+--- src/third_party/blink/renderer/build/scripts/scripts.gni.old
++++ src/third_party/blink/renderer/build/scripts/scripts.gni
+@@ -19,7 +19,6 @@ scripts_for_json5_files = [
+   # dependency for whole jinja2 package
+   "//third_party/jinja2/__init__.py",
+   "//third_party/markupsafe/__init__.py",  # jinja2 dep
+-  "//third_party/pyjson5/src/json5/__init__.py",
+   "$_scripts_dir/blinkbuild/name_style_converter.py",
+   "$_scripts_dir/hasher.py",
+   "$_scripts_dir/json5_generator.py",
+--- 
src/third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps.old
++++ 
src/third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps
+@@ -1,9 +1,5 @@
+ # Generated by running:
+ #   build/print_python_deps.py --root 
third_party/blink/renderer/bindings/scripts --output 
third_party/blink/renderer/bindings/scripts/generate_event_interface_names.pydeps
 third_party/blink/renderer/bindings/scripts/generate_event_interface_names.py
+-../../../../pyjson5/src/json5/__init__.py
+-../../../../pyjson5/src/json5/lib.py
+-../../../../pyjson5/src/json5/parser.py
+-../../../../pyjson5/src/json5/version.py
+ ../../build/scripts/blinkbuild/__init__.py
+ ../../build/scripts/blinkbuild/name_style_converter.py
+ generate_event_interface_names.py
 

++++++ system-simdutf.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:06.200012624 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:06.200012624 +0200
@@ -1,31 +1,36 @@
---- src/third_party/electron_node/BUILD.gn.old 2023-10-12 09:14:14.490589900 
+0000
-+++ src/third_party/electron_node/BUILD.gn     2023-10-15 07:18:47.581489100 
+0000
-@@ -44,6 +44,7 @@ declare_args() {
-   # Allows downstream packagers (eg. Linux distributions) to build Electron 
against system shared libraries.
-   use_system_cares = false
-   use_system_nghttp2 = false
-+  use_system_simdutf = false
-   use_system_llhttp = false
-   use_system_histogram = false
+--- src/third_party/electron_node/deps/simdutf/BUILD.gn.old    2023-10-13 
11:35:11.896370000 +0200
++++ src/third_party/electron_node/deps/simdutf/BUILD.gn        2023-10-17 
19:29:35.882793400 +0200
+@@ -1,15 +1,26 @@
++declare_args() {
++ use_system_simdutf = false
++}
++
+ config("simdutf_config") {
++ if(use_system_simdutf) {
++  libs = ["simdutf"]
++ } else {
+   include_dirs = [ "." ]
++ }
  }
-@@ -211,7 +212,6 @@ component("node_lib") {
-     ":node_js2c",
-     "deps/googletest:gtest",
-     "deps/base64",
--    "deps/simdutf",
-     "deps/uvwasi",
-     "//third_party/zlib",
-     "//third_party/brotli:dec",
-@@ -248,6 +248,11 @@ component("node_lib") {
-   } else {
-     deps += [ "deps/histogram" ]
-   }
-+  if (use_system_simdutf) {
-+    libs += [ "simdutf" ]
-+  } else {
-+    deps += [ "deps/simdutf" ]
-+  }
-   frameworks = []
+ 
+ static_library("simdutf") {
++ if(!use_system_simdutf) {
+   include_dirs = [ "." ]
+   sources = [
+     "simdutf.cpp",
+   ]
++ }
+ 
+   public_configs = [ ":simdutf_config" ]
+ 
++ if(!use_system_simdutf) {
    cflags_cc = [
-     "-Wno-deprecated-declarations",
+     "-Wno-ambiguous-reversed-operator",
+     "-Wno-c++98-compat-extra-semi",
+@@ -17,4 +28,5 @@ static_library("simdutf") {
+     "-Wno-unused-const-variable",
+     "-Wno-unused-function",
+   ]
++ }
+ }
 

++++++ utf_string_conversion_utils-missing-numeric_limits.patch ++++++
>From a79de88754003cabac28c28c32ffabcdc1575ede Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Wed, 4 Oct 2023 18:16:59 +0000
Subject: [PATCH] IWYU: add limits for std::numeric_limits in
 utf_string_conversion_utils

Bug: 957519
Change-Id: Id50c855cc2a5af4121c60fb0a1aa98f63650e1a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4911077
Reviewed-by: Daniel Cheng <dch...@chromium.org>
Commit-Queue: Daniel Cheng <dch...@chromium.org>
Auto-Submit: Stephan Hartmann <sth...@googlemail.com>
Cr-Commit-Position: refs/heads/main@{#1205344}
---
 base/strings/utf_string_conversion_utils.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/base/strings/utf_string_conversion_utils.h 
b/base/strings/utf_string_conversion_utils.h
index 230da76eab2f2d1..01b5347e047f4b4 100644
--- a/base/strings/utf_string_conversion_utils.h
+++ b/base/strings/utf_string_conversion_utils.h
@@ -11,6 +11,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <limits>
 #include <string>
 
 #include "base/base_export.h"

++++++ v8-hide-private-symbols.patch ++++++
--- /var/tmp/diff_new_pack.4QEqtu/_old  2023-10-20 23:21:06.232013791 +0200
+++ /var/tmp/diff_new_pack.4QEqtu/_new  2023-10-20 23:21:06.236013937 +0200
@@ -3,20 +3,23 @@
 
 --- src/v8/src/base/macros.h.old       2023-09-29 08:54:55.701965801 +0200
 +++ src/v8/src/base/macros.h   2023-10-03 11:54:02.305086047 +0200
-@@ -399,11 +399,15 @@ bool is_inbounds(float_t v) {
+@@ -399,13 +399,18 @@ bool is_inbounds(float_t v) {
  
  // Setup for Linux shared library export.
  #if V8_HAS_ATTRIBUTE_VISIBILITY
 +#if defined(HIDE_PRIVATE_SYMBOLS)
 +#define V8_EXPORT_PRIVATE __attribute__((visibility("hidden")))
++#define V8_EXPORT_ENUM V8_EXPORT_PRIVATE
 +#else
  #ifdef BUILDING_V8_SHARED
  #define V8_EXPORT_PRIVATE __attribute__((visibility("default")))
+ #define V8_EXPORT_ENUM V8_EXPORT_PRIVATE
  #else
  #define V8_EXPORT_PRIVATE
+ #define V8_EXPORT_ENUM
  #endif
 +#endif  // HIDE_PRIVATE_SYMBOLS
  #else
  #define V8_EXPORT_PRIVATE
- #endif
+ #define V8_EXPORT_ENUM
 

++++++ v8-icu73-alt_calendar.patch ++++++
>From d9715adf895e9acfbaf17ae05b18f2b2467ca322 Mon Sep 17 00:00:00 2001
From: Frank Tang <ft...@chromium.org>
Date: Tue, 20 Jun 2023 15:12:47 -0700
Subject: [PATCH] [Intl] rm alt_calendar hack post ICU 73-1

Also need to bump up the required ICU version.

Bug: v8:14086
Change-Id: I52a53fcd201f3272aa712123fc00c54d0b762d53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4628805
Reviewed-by: Shu-yu Guo <s...@chromium.org>
Commit-Queue: Frank Tang <ft...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#88431}
---
 src/objects/intl-objects.h            |  2 +-
 src/objects/js-date-time-format-inl.h |  2 --
 src/objects/js-date-time-format.cc    | 30 +++++++--------------------
 src/objects/js-date-time-format.h     |  2 --
 src/objects/js-date-time-format.tq    |  8 -------
 5 files changed, 8 insertions(+), 36 deletions(-)

diff --git a/src/objects/intl-objects.h b/src/objects/intl-objects.h
index 4339673d566..b628cf686f3 100644
--- a/v8/src/objects/intl-objects.h
+++ b/v8/src/objects/intl-objects.h
@@ -21,7 +21,7 @@
 #include "unicode/locid.h"
 #include "unicode/uversion.h"
 
-#define V8_MINIMUM_ICU_VERSION 71
+#define V8_MINIMUM_ICU_VERSION 73
 
 namespace U_ICU_NAMESPACE {
 class BreakIterator;
diff --git a/src/objects/js-date-time-format-inl.h 
b/src/objects/js-date-time-format-inl.h
index 8c93a8eeb63..fefe081f8f5 100644
--- a/v8/src/objects/js-date-time-format-inl.h
+++ b/v8/src/objects/js-date-time-format-inl.h
@@ -28,8 +28,6 @@ ACCESSORS(JSDateTimeFormat, icu_simple_date_format,
           Tagged<Managed<icu::DateIntervalFormat>>,
           kIcuDateIntervalFormatOffset)
 
-BOOL_ACCESSORS(JSDateTimeFormat, flags, alt_calendar, AltCalendarBit::kShift)
-
 inline void JSDateTimeFormat::set_hour_cycle(HourCycle hour_cycle) {
   int hints = flags();
   hints = HourCycleBits::update(hints, hour_cycle);
diff --git a/src/objects/js-date-time-format.cc 
b/src/objects/js-date-time-format.cc
index 62d6fdcb935..6aae75c8de8 100644
--- a/v8/src/objects/js-date-time-format.cc
+++ b/v8/src/objects/js-date-time-format.cc
@@ -530,8 +530,7 @@ Handle<Object> JSDateTimeFormat::TimeZoneId(Isolate* 
isolate,
 
 namespace {
 Handle<String> GetCalendar(Isolate* isolate,
-                           const icu::SimpleDateFormat& simple_date_format,
-                           bool is_alt_calendar = false) {
+                           const icu::SimpleDateFormat& simple_date_format) {
   // getType() returns legacy calendar type name instead of LDML/BCP47 calendar
   // key values. intl.js maps them to BCP47 values for key "ca".
   // TODO(jshin): Consider doing it here, instead.
@@ -542,17 +541,9 @@ Handle<String> GetCalendar(Isolate* isolate,
   // and
   // http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/calendar.xml
   if (calendar_str == "gregorian") {
-    if (is_alt_calendar) {
-      calendar_str = "iso8601";
-    } else {
-      calendar_str = "gregory";
-    }
+    calendar_str = "gregory";
   } else if (calendar_str == "ethiopic-amete-alem") {
     calendar_str = "ethioaa";
-  } else if (calendar_str == "islamic") {
-    if (is_alt_calendar) {
-      calendar_str = "islamic-rgsa";
-    }
   }
   return isolate->factory()->NewStringFromAsciiChecked(calendar_str.c_str());
 }
@@ -567,8 +558,7 @@ Handle<Object> GetTimeZone(Isolate* isolate,
 Handle<String> JSDateTimeFormat::Calendar(
     Isolate* isolate, Handle<JSDateTimeFormat> date_time_format) {
   return GetCalendar(isolate,
-                     *(date_time_format->icu_simple_date_format()->raw()),
-                     date_time_format->alt_calendar());
+                     *(date_time_format->icu_simple_date_format()->raw()));
 }
 
 Handle<Object> JSDateTimeFormat::TimeZone(
@@ -2328,9 +2318,6 @@ MaybeHandle<JSDateTimeFormat> JSDateTimeFormat::New(
     icu_locale.setUnicodeKeywordValue("ca", calendar_str.get(), status);
     DCHECK(U_SUCCESS(status));
   }
-  bool alt_calendar =
-      strstr(icu_locale.getName(), "calendar=iso8601") != nullptr ||
-      strstr(icu_locale.getName(), "calendar=islamic-rgsa") != nullptr;
 
   if (numbering_system_str != nullptr &&
       Intl::IsValidNumberingSystem(numbering_system_str.get())) {
@@ -2640,7 +2627,6 @@ MaybeHandle<JSDateTimeFormat> JSDateTimeFormat::New(
     date_time_format->set_time_style(time_style);
   }
   date_time_format->set_hour_cycle(dateTimeFormatHourCycle);
-  date_time_format->set_alt_calendar(alt_calendar);
   date_time_format->set_locale(*locale_str);
   date_time_format->set_icu_locale(*managed_locale);
   date_time_format->set_icu_simple_date_format(*managed_format);
@@ -2742,10 +2728,8 @@ MaybeHandle<JSArray> FormatToPartsWithTemporalSupport(
   DateTimeValueRecord x_record;
   MAYBE_ASSIGN_RETURN_ON_EXCEPTION_VALUE(
       isolate, x_record,
-      HandleDateTimeValue(
-          isolate, *format,
-          GetCalendar(isolate, *format, date_time_format->alt_calendar()), x,
-          method_name),
+      HandleDateTimeValue(isolate, *format, GetCalendar(isolate, *format), x,
+                          method_name),
       Handle<JSArray>());
 
   return FormatMillisecondsByKindToArray(isolate, *format, x_record.kind,
@@ -3070,8 +3054,8 @@ MaybeHandle<T> FormatRangeCommonWithTemporalSupport(
   // 6. Let x be ? HandleDateTimeValue(dateTimeFormat, x).
   icu::SimpleDateFormat* icu_simple_date_format =
       date_time_format->icu_simple_date_format()->raw();
-  Handle<String> date_time_format_calendar = GetCalendar(
-      isolate, *icu_simple_date_format, date_time_format->alt_calendar());
+  Handle<String> date_time_format_calendar =
+      GetCalendar(isolate, *icu_simple_date_format);
   DateTimeValueRecord x_record;
   MAYBE_ASSIGN_RETURN_ON_EXCEPTION_VALUE(
       isolate, x_record,
diff --git a/src/objects/js-date-time-format.h 
b/src/objects/js-date-time-format.h
index cdf87c2268a..ceebcc5e8f9 100644
--- a/v8/src/objects/js-date-time-format.h
+++ b/v8/src/objects/js-date-time-format.h
@@ -150,8 +150,6 @@ class JSDateTimeFormat
   DECL_ACCESSORS(icu_simple_date_format, Managed<icu::SimpleDateFormat>)
   DECL_ACCESSORS(icu_date_interval_format, Managed<icu::DateIntervalFormat>)
 
-  DECL_BOOLEAN_ACCESSORS(alt_calendar)
-
   DECL_PRINTER(JSDateTimeFormat)
 
   TQ_OBJECT_CONSTRUCTORS(JSDateTimeFormat)
diff --git a/src/objects/js-date-time-format.tq 
b/src/objects/js-date-time-format.tq
index ef0584e7901..6fab20c71d1 100644
--- a/v8/src/objects/js-date-time-format.tq
+++ b/v8/src/objects/js-date-time-format.tq
@@ -10,14 +10,6 @@ bitfield struct JSDateTimeFormatFlags extends uint31 {
   hour_cycle: HourCycle: 3 bit;
   date_style: DateTimeStyle: 3 bit;
   time_style: DateTimeStyle: 3 bit;
-  // ICU report the same type "gregorian" for both "gregorian" calendar and
-  // "iso8601" calendar and the same type "islamic" for both "islamic" and
-  // "islamic-rgsa" calendar. We use the alt_calendar bit to distinguish 
between
-  // them. When the type is "gregorian" and the alt_calendar bit is set, it is
-  // "iso8601", otherwise the true "gregorian" calendar. While the type is
-  // "islamic" and the alt_calendar bit is set, it is "islamic-rgsa" calendar,
-  // otherwise "islamic" calendar.
-  alt_calendar: bool: 1bit;
 }
 
 extern class JSDateTimeFormat extends JSObject {

++++++ v8-icu73-simple-case-folding.patch ++++++
>From 572b80f2e906a826a499c4c5561b90b97a687f0e Mon Sep 17 00:00:00 2001
From: pthier <pth...@chromium.org>
Date: Tue, 18 Jul 2023 16:27:28 +0200
Subject: [PATCH] [regexp] Remove special handling for simple case folding

ICU 73 introduced creating closures using simple case folding.
We can directly use this method instead of our own special handling where 
simple case folding (required by JS spec) differs from full case
folding (the previously only supported mode in ICU).

Bug: v8:13377
Change-Id: I42bbcc37fe5c1f33a1d6c36f0d4ceb18a67a9b43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4694009
Commit-Queue: Patrick Thier <pth...@chromium.org>
Reviewed-by: Jakob Linke <jgru...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89024}
---
 src/regexp/gen-regexp-special-case.cc | 48 ---------------------------
 src/regexp/regexp-ast.h               |  6 ----
 src/regexp/regexp-compiler-tonode.cc  | 24 +-------------
 src/regexp/regexp-parser.cc           |  2 +-
 src/regexp/special-case.h             | 10 ------
 5 files changed, 2 insertions(+), 88 deletions(-)

diff --git a/src/regexp/gen-regexp-special-case.cc 
b/src/regexp/gen-regexp-special-case.cc
index 55618f11783..86f6b212c93 100644
--- a/v8/src/regexp/gen-regexp-special-case.cc
+++ b/v8/src/regexp/gen-regexp-special-case.cc
@@ -9,7 +9,6 @@
 
 #include "src/base/strings.h"
 #include "src/regexp/special-case.h"
-#include "unicode/usetiter.h"
 
 namespace v8 {
 namespace internal {
@@ -127,52 +126,6 @@ void PrintSpecial(std::ofstream& out) {
   PrintSet(out, "SpecialAddSet", special_add);
 }
 
-void PrintUnicodeSpecial(std::ofstream& out) {
-  icu::UnicodeSet non_simple_folding;
-  icu::UnicodeSet current;
-  UErrorCode status = U_ZERO_ERROR;
-  // Look at all characters except white spaces.
-  icu::UnicodeSet interestingCP(u"[^[:White_Space:]]", status);
-  CHECK_EQ(status, U_ZERO_ERROR);
-  icu::UnicodeSetIterator iter(interestingCP);
-  while (iter.next()) {
-    UChar32 c = iter.getCodepoint();
-    current.set(c, c);
-    current.closeOver(USET_CASE_INSENSITIVE).removeAllStrings();
-    CHECK(!current.isBogus());
-    // Remove characters from the closeover that have a simple case folding.
-    icu::UnicodeSet toRemove;
-    icu::UnicodeSetIterator closeOverIter(current);
-    while (closeOverIter.next()) {
-      UChar32 closeOverChar = closeOverIter.getCodepoint();
-      UChar32 closeOverSCF = u_foldCase(closeOverChar, U_FOLD_CASE_DEFAULT);
-      if (closeOverChar != closeOverSCF) {
-        toRemove.add(closeOverChar);
-      }
-    }
-    CHECK(!toRemove.isBogus());
-    current.removeAll(toRemove);
-
-    // The current character and its simple case folding are also always OK.
-    UChar32 scf = u_foldCase(c, U_FOLD_CASE_DEFAULT);
-    current.remove(c);
-    current.remove(scf);
-
-    // If there are any characters remaining, they were added due to full case
-    // foldings and shouldn't match the current charcter according to the spec.
-    if (!current.isEmpty()) {
-      // Ensure that the character doesn't have a simple case folding.
-      // Otherwise the current approach of simply removing the character from
-      // the set before calling closeOver won't work.
-      CHECK_EQ(c, scf);
-      non_simple_folding.add(c);
-    }
-  }
-  CHECK(!non_simple_folding.isBogus());
-
-  PrintSet(out, "UnicodeNonSimpleCloseOverSet", non_simple_folding);
-}
-
 void WriteHeader(const char* header_filename) {
   std::ofstream out(header_filename);
   out << std::hex << std::setfill('0') << std::setw(4);
@@ -193,7 +146,6 @@ void WriteHeader(const char* header_filename) {
       << "namespace internal {\n\n";
 
   PrintSpecial(out);
-  PrintUnicodeSpecial(out);
 
   out << "\n"
       << "}  // namespace internal\n"
diff --git a/src/regexp/regexp-ast.h b/src/regexp/regexp-ast.h
index e7453ad3f8f..8e3bb12fce2 100644
--- a/v8/src/regexp/regexp-ast.h
+++ b/v8/src/regexp/regexp-ast.h
@@ -134,12 +134,6 @@ class CharacterRange {
   static void AddUnicodeCaseEquivalents(ZoneList<CharacterRange>* ranges,
                                         Zone* zone);
 
-#ifdef V8_INTL_SUPPORT
-  // Creates the closeOver of the given UnicodeSet, removing all
-  // characters/strings that can't be derived via simple case folding.
-  static void UnicodeSimpleCloseOver(icu::UnicodeSet& set);
-#endif  // V8_INTL_SUPPORT
-
   bool Contains(base::uc32 i) const { return from_ <= i && i <= to_; }
   base::uc32 from() const { return from_; }
   base::uc32 to() const { return to_; }
diff --git a/src/regexp/regexp-compiler-tonode.cc 
b/src/regexp/regexp-compiler-tonode.cc
index 5ff16ee71d2..9c83e2332e8 100644
--- a/v8/src/regexp/regexp-compiler-tonode.cc
+++ b/v8/src/regexp/regexp-compiler-tonode.cc
@@ -423,27 +423,6 @@ RegExpNode* UnanchoredAdvance(RegExpCompiler* compiler,
 
 }  // namespace
 
-#ifdef V8_INTL_SUPPORT
-// static
-void CharacterRange::UnicodeSimpleCloseOver(icu::UnicodeSet& set) {
-  // Remove characters for which closeOver() adds full-case-folding equivalents
-  // because we should work only with simple case folding mappings.
-  icu::UnicodeSet non_simple = icu::UnicodeSet(set);
-  non_simple.retainAll(RegExpCaseFolding::UnicodeNonSimpleCloseOverSet());
-  set.removeAll(non_simple);
-
-  set.closeOver(USET_CASE_INSENSITIVE);
-  // Full case folding maps single characters to multiple characters.
-  // Those are represented as strings in the set. Remove them so that
-  // we end up with only simple and common case mappings.
-  set.removeAllStrings();
-
-  // Add characters that have non-simple case foldings again (they match
-  // themselves).
-  set.addAll(non_simple);
-}
-#endif  // V8_INTL_SUPPORT
-
 // static
 void CharacterRange::AddUnicodeCaseEquivalents(ZoneList<CharacterRange>* 
ranges,
                                                Zone* zone) {
@@ -465,8 +444,7 @@ void 
CharacterRange::AddUnicodeCaseEquivalents(ZoneList<CharacterRange>* ranges,
   }
   // Clear the ranges list without freeing the backing store.
   ranges->Rewind(0);
-
-  UnicodeSimpleCloseOver(set);
+  set.closeOver(USET_SIMPLE_CASE_INSENSITIVE);
   for (int i = 0; i < set.getRangeCount(); i++) {
     ranges->Add(Range(set.getRangeStart(i), set.getRangeEnd(i)), zone);
   }
diff --git a/src/regexp/regexp-parser.cc b/src/regexp/regexp-parser.cc
index 76ca02bf240..730dfb9da86 100644
--- a/v8/src/regexp/regexp-parser.cc
+++ b/v8/src/regexp/regexp-parser.cc
@@ -1897,7 +1897,7 @@ bool LookupPropertyValueName(UProperty property,
       ExtractStringsFromUnicodeSet(set, result_strings, flags, zone);
     }
     const bool needs_case_folding = IsUnicodeSets(flags) && 
IsIgnoreCase(flags);
-    if (needs_case_folding) CharacterRange::UnicodeSimpleCloseOver(set);
+    if (needs_case_folding) set.closeOver(USET_SIMPLE_CASE_INSENSITIVE);
     set.removeAllStrings();
     if (negate) set.complement();
     for (int i = 0; i < set.getRangeCount(); i++) {
diff --git a/src/regexp/special-case.h b/src/regexp/special-case.h
index c80b94e976a..753c9231ede 100644
--- a/v8/src/regexp/special-case.h
+++ b/v8/src/regexp/special-case.h
@@ -71,21 +71,11 @@ namespace internal {
 // another character. Characters that match no other characters in
 // their equivalence class are added to IgnoreSet. Characters that
 // match at least one other character are added to SpecialAddSet.
-//
-// For unicode ignoreCase ("iu" and "iv"),
-// UnicodeSet::closeOver(USET_CASE_INSENSITIVE) adds all characters that are in
-// the same equivalence class. This includes characaters that are in the same
-// equivalence class using full case folding. According to the spec, only
-// simple case folding shall be considered. We therefore create
-// UnicodeNonSimpleCloseOverSet containing all characters for which
-// UnicodeSet::closeOver adds characters that are not simple case folds. This
-// set should be used similar to IgnoreSet described above.
 
 class RegExpCaseFolding final : public AllStatic {
  public:
   static const icu::UnicodeSet& IgnoreSet();
   static const icu::UnicodeSet& SpecialAddSet();
-  static const icu::UnicodeSet& UnicodeNonSimpleCloseOverSet();
 
   // This implements ECMAScript 2020 21.2.2.8.2 (Runtime Semantics:
   // Canonicalize) step 3, which is used to determine whether

Reply via email to