Browse Source

chore: bump chromium to 131.0.6762.0 (main) (#44117)

* chore: bump chromium in DEPS to 131.0.6756.0

* chore: update disable_hidden.patch

no code changes; just handling upstream context shear

https://chromium-review.googlesource.com/c/chromium/src/+/5887019

* chore: update feat_expose_raw_response_headers_from_urlloader.patch

Factor out URLLoader's URLRequest configuration into a helper

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/5902254

* chore: update fix_disabling_background_throttling_in_compositor.patch

no manual changes; patch applied with fuzz 1

* chore: e patches all

* 5882129: Fix basic auth issues for sub frame and sub resources | https://chromium-review.googlesource.com/c/chromium/src/+/5882129

- Add `is_request_for_navigation` param to
  ElectronBrowserClient::CreateLoginDelegate().

- Propagate the flag as another undocumented property
  in the app.login Event's authenticationResponseDetails object

- Side cleanup: also in CreateLoginDelegate(), use upstream's name
  for the `is_request_for_main_frame` param, renamed back in
  https://chromium-review.googlesource.com/c/chromium/src/+/3256171

* 5875189: [FSA] Check for DANGEROUS extension types when creating a new file. | https://chromium-review.googlesource.com/c/chromium/src/+/5875189

* chore: node ./script/gen-libc++-filenames.js

* chore: bump chromium in DEPS to 131.0.6758.0

* chore: bump chromium in DEPS to 131.0.6760.0

* chore: update patches

* [A11y] Remove Accessibility Object Model (AOM)

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5896593

* chore: bump chromium in DEPS to 131.0.6762.0

* [heap] Remove deprecated V8 flag

Refs https://chromium-review.googlesource.com/c/v8/v8/+/5904046

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
Co-authored-by: deepak1556 <[email protected]>
electron-roller[bot] 6 months ago
parent
commit
bcbc8d3bb2
40 changed files with 195 additions and 114 deletions
  1. 1 1
      DEPS
  2. 2 3
      filenames.libcxx.gni
  3. 1 1
      patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch
  4. 2 2
      patches/chromium/add_didinstallconditionalfeatures.patch
  5. 2 2
      patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch
  6. 1 1
      patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch
  7. 8 8
      patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch
  8. 10 10
      patches/chromium/can_create_window.patch
  9. 2 2
      patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch
  10. 1 1
      patches/chromium/crash_allow_setting_more_options.patch
  11. 5 4
      patches/chromium/disable_hidden.patch
  12. 3 3
      patches/chromium/disable_unload_metrics.patch
  13. 3 3
      patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch
  14. 15 13
      patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch
  15. 1 1
      patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch
  16. 5 5
      patches/chromium/fix_disabling_background_throttling_in_compositor.patch
  17. 1 1
      patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch
  18. 2 2
      patches/chromium/fix_restore_original_resize_performance_on_macos.patch
  19. 4 4
      patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch
  20. 3 3
      patches/chromium/frame_host_manager.patch
  21. 1 1
      patches/chromium/gritsettings_resource_ids.patch
  22. 6 6
      patches/chromium/mas_avoid_private_macos_api_usage.patch.patch
  23. 1 1
      patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch
  24. 2 2
      patches/chromium/printing.patch
  25. 2 2
      patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
  26. 4 4
      patches/chromium/refactor_expose_file_system_access_blocklist.patch
  27. 7 7
      patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch
  28. 3 3
      patches/chromium/resource_file_conflict.patch
  29. 2 2
      patches/chromium/webview_fullscreen.patch
  30. 2 2
      patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch
  31. 1 0
      patches/node/.patches
  32. 59 0
      patches/node/cli_remove_deprecated_v8_flag.patch
  33. 5 3
      shell/browser/electron_browser_client.cc
  34. 2 1
      shell/browser/electron_browser_client.h
  35. 7 0
      shell/browser/file_system_access/file_system_access_permission_context.cc
  36. 3 0
      shell/browser/file_system_access/file_system_access_permission_context.h
  37. 8 4
      shell/browser/login_handler.cc
  38. 4 2
      shell/browser/login_handler.h
  39. 4 2
      shell/browser/net/url_loader_network_observer.cc
  40. 0 2
      shell/common/gin_converters/content_converter.cc

+ 1 - 1
DEPS

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
 
 vars = {
   'chromium_version':
-    '131.0.6754.0',
+    '131.0.6762.0',
   'node_version':
     'v20.18.0',
   'nan_version':

+ 2 - 3
filenames.libcxx.gni

@@ -24,7 +24,6 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__algorithm/find_if.h",
   "//third_party/libc++/src/include/__algorithm/find_if_not.h",
   "//third_party/libc++/src/include/__algorithm/find_segment_if.h",
-  "//third_party/libc++/src/include/__algorithm/fold.h",
   "//third_party/libc++/src/include/__algorithm/for_each.h",
   "//third_party/libc++/src/include/__algorithm/for_each_n.h",
   "//third_party/libc++/src/include/__algorithm/for_each_segment.h",
@@ -99,6 +98,7 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__algorithm/ranges_find_if.h",
   "//third_party/libc++/src/include/__algorithm/ranges_find_if_not.h",
   "//third_party/libc++/src/include/__algorithm/ranges_find_last.h",
+  "//third_party/libc++/src/include/__algorithm/ranges_fold.h",
   "//third_party/libc++/src/include/__algorithm/ranges_for_each.h",
   "//third_party/libc++/src/include/__algorithm/ranges_for_each_n.h",
   "//third_party/libc++/src/include/__algorithm/ranges_generate.h",
@@ -538,6 +538,7 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__memory/allocator_arg_t.h",
   "//third_party/libc++/src/include/__memory/allocator_destructor.h",
   "//third_party/libc++/src/include/__memory/allocator_traits.h",
+  "//third_party/libc++/src/include/__memory/array_cookie.h",
   "//third_party/libc++/src/include/__memory/assume_aligned.h",
   "//third_party/libc++/src/include/__memory/auto_ptr.h",
   "//third_party/libc++/src/include/__memory/builtin_new_allocator.h",
@@ -561,7 +562,6 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__memory/unique_temporary_buffer.h",
   "//third_party/libc++/src/include/__memory/uses_allocator.h",
   "//third_party/libc++/src/include/__memory/uses_allocator_construction.h",
-  "//third_party/libc++/src/include/__memory/voidify.h",
   "//third_party/libc++/src/include/__memory_resource/memory_resource.h",
   "//third_party/libc++/src/include/__memory_resource/monotonic_buffer_resource.h",
   "//third_party/libc++/src/include/__memory_resource/polymorphic_allocator.h",
@@ -689,7 +689,6 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__ranges/views.h",
   "//third_party/libc++/src/include/__ranges/zip_view.h",
   "//third_party/libc++/src/include/__split_buffer",
-  "//third_party/libc++/src/include/__std_clang_module",
   "//third_party/libc++/src/include/__std_mbstate_t.h",
   "//third_party/libc++/src/include/__stop_token/atomic_unique_lock.h",
   "//third_party/libc++/src/include/__stop_token/intrusive_list_view.h",

+ 1 - 1
patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch

@@ -20,7 +20,7 @@ index 7de8923518dbfb69fef62d7781f906b30cf62155..7a4310d6d8e85f07f0ae6c97726d909c
  
      case ssl_open_record_error:
 diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
-index 071709f50fb0552fb65ec67d8dc8313baf6f1e1c..e198849996c9b18e892113ac503ba61f2030ca7b 100644
+index 1458b456e5251b058e28c7f935f929af7addbee4..994e1c330255ffcc5212dd69fb77d3044068717c 100644
 --- a/ssl/ssl_lib.cc
 +++ b/ssl/ssl_lib.cc
 @@ -1343,7 +1343,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {

+ 2 - 2
patches/chromium/add_didinstallconditionalfeatures.patch

@@ -23,10 +23,10 @@ index ad0092ef2e13853e4bb8b923481559a043b00ab7..1c2dfd23f18733e21312992877ae1499
                                          int32_t world_id) {}
    virtual void DidClearWindowObject() {}
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index cebf0f03646ebc118be4ff2c7b92b8e9f3e51962..89b3fee2152c95abbbe3114c6e84f4a022abb571 100644
+index 21ecced6578552e30c1a01841053f679355b7729..288f7d591426e970bddd76bc8c4c4610ba36cd02 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -4797,6 +4797,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
+@@ -4800,6 +4800,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
      observer.DidCreateScriptContext(context, world_id);
  }
  

+ 2 - 2
patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch

@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
 https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
 
 diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
-index 2edb0b7c59bbe65d543c65738db0dd5a5b487c23..76d74f86ebdb2b7498cceba0d52728c05e0d9385 100644
+index 28df49366e87d17c831b8f941e30faa19cf36626..d68c58edeb6abec865f6ad051e5da2c0bdc7981d 100644
 --- a/ui/base/clipboard/scoped_clipboard_writer.cc
 +++ b/ui/base/clipboard/scoped_clipboard_writer.cc
-@@ -234,6 +234,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
+@@ -237,6 +237,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
  }
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  

+ 1 - 1
patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch

@@ -51,7 +51,7 @@ index 961e55732d9c3aa5437e9cc6eca7a2c8d06bd335..f0fc8d303dc9de2419d5f5d769657faf
    void SendRendererPreferencesToRenderer(
        const blink::RendererPreferences& preferences);
 diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
-index d752bb307866ced284346efa00964ec993e86e2b..5a78e040a182541d879af3d3c477ae30843c5364 100644
+index 5de852d1bab55804b521e128c48f3013281872f2..e8a74b48864e71597996ef13463a358acecb5b7e 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
 @@ -585,8 +585,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {

+ 8 - 8
patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch

@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
 patch.
 
 diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
-index 751a3087c4a06f9f03373f890b3400621680089d..ea7bf129c8ad67c9c84fc86e972eecfa0a80ad5d 100644
+index b1c18a03ccd05609cd65de028b9861c6c9a71568..f507a8cd4b35f577c5b06712145beaa067a1bb79 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -204,11 +204,16 @@ if (!is_android && !is_mac) {
+@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
            "common/crash_keys.h",
          ]
  
@@ -33,10 +33,10 @@ index 751a3087c4a06f9f03373f890b3400621680089d..ea7bf129c8ad67c9c84fc86e972eecfa
            "//base",
            "//build:branding_buildflags",
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 80a99321a55b5b9c3f9b4dfbaa1c79d8e9bf860d..acb4344a8fd5f943b372fa7e43c3ebe3557bf331 100644
+index 696bb78b317178168d78b9619651cafd1bddd5ac..21262f51f5ebe12b396a453b30f067de00b0f376 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -4526,7 +4526,7 @@ static_library("browser") {
+@@ -4534,7 +4534,7 @@ static_library("browser") {
        ]
      }
  
@@ -46,10 +46,10 @@ index 80a99321a55b5b9c3f9b4dfbaa1c79d8e9bf860d..acb4344a8fd5f943b372fa7e43c3ebe3
        # than here in :chrome_dll.
        deps += [ "//chrome:packed_resources_integrity_header" ]
 diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
-index 66b496b5156f014097f5115985bd4d00fdca4169..bf0852f4c9eaf79c84fb02133a7d83d35567ad48 100644
+index 68129387f96ac7c54b1c762dbb2cc001e929b3f5..da12c25bfd3377862c27c74a343ba2a0d4ff1411 100644
 --- a/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
-@@ -7113,9 +7113,12 @@ test("unit_tests") {
+@@ -6714,9 +6714,12 @@ test("unit_tests") {
        "//chrome/notification_helper",
      ]
  
@@ -63,7 +63,7 @@ index 66b496b5156f014097f5115985bd4d00fdca4169..bf0852f4c9eaf79c84fb02133a7d83d3
        "//chrome//services/util_win:unit_tests",
        "//chrome/app:chrome_dll_resources",
        "//chrome/app:win_unit_tests",
-@@ -8075,6 +8078,10 @@ test("unit_tests") {
+@@ -7671,6 +7674,10 @@ test("unit_tests") {
        "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
      ]
  
@@ -74,7 +74,7 @@ index 66b496b5156f014097f5115985bd4d00fdca4169..bf0852f4c9eaf79c84fb02133a7d83d3
      sources += [
        # The importer code is not used on Android.
        "../common/importer/firefox_importer_utils_unittest.cc",
-@@ -8127,7 +8134,6 @@ test("unit_tests") {
+@@ -7723,7 +7730,6 @@ test("unit_tests") {
      # Non-android deps for "unit_tests" target.
      deps += [
        "../browser/screen_ai:screen_ai_install_state",

+ 10 - 10
patches/chromium/can_create_window.patch

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
 TODO(loc): this patch is currently broken.
 
 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
-index 86c862dd1976a77fcfd70a44ef63839a4b4c70e8..744715d8ecc1ddca8400ae88e115e52797df1ffa 100644
+index ea7a56f9ebab820bc50167d1f6848078d59f4737..e0708cae6968c14f912bac9c8c7ff90344454237 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -9067,6 +9067,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -9104,6 +9104,7 @@ void RenderFrameHostImpl::CreateNewWindow(
            last_committed_origin_, params->window_container_type,
            params->target_url, params->referrer.To<Referrer>(),
            params->frame_name, params->disposition, *params->features,
@@ -66,7 +66,7 @@ index 61ee456a1bfb842aefd8b644ff0ae630a698ef7c..cbf4276337139a81d46fb263bce8f5ee
  
  // Operation result when the renderer asks the browser to create a new window.
 diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
-index 9848ac58da8a0918d04bb4bb6f1d76da36ab8078..491963b39a0140193915480373371f162e2d370f 100644
+index e73432790e5bbd03dc3eb2a2d8c89d77d21430cc..5f60458d39e3554832b63c201e79633cf0219951 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
 @@ -760,6 +760,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -79,7 +79,7 @@ index 9848ac58da8a0918d04bb4bb6f1d76da36ab8078..491963b39a0140193915480373371f16
      bool opener_suppressed,
      bool* no_javascript_access) {
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 2831b0d6a44e1def69f2bc02d7daf0074acca6f4..58fd2cea8a602832e56ac5962fbac57b5adae610 100644
+index 7326a96f8b615e7dd7f5077faab98a6a198209bd..ff16736f47ad642211ee21b44479c5e449acf33f 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -196,6 +196,7 @@ class NetworkService;
@@ -148,10 +148,10 @@ index 294dc13ec8f27875c28b459b56b166f2c8f4a2ff..1a58077807de673e1937f3323c8dc37b
    // typically happens when popups are created.
    virtual void WebContentsCreated(WebContents* source_contents,
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index f6bcea8a136fa3095e536e3b2e74b10d086d41c4..cebf0f03646ebc118be4ff2c7b92b8e9f3e51962 100644
+index 1fd3487243760d5a64bcd27f7022d8d0326bab65..21ecced6578552e30c1a01841053f679355b7729 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -6855,6 +6855,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
+@@ -6858,6 +6858,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
            request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
            GetWebFrame()->IsAdScriptInStack());
  
@@ -163,7 +163,7 @@ index f6bcea8a136fa3095e536e3b2e74b10d086d41c4..cebf0f03646ebc118be4ff2c7b92b8e9
    // moved on send.
    bool is_background_tab =
 diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
-index 91d731a33bb48a9b7432b1139bd52e777d1e1967..d5dc4514f16063314afe1847bb64b0d5e43f5d92 100644
+index 9e564b2be92aefc2b58617de92dd8d519c3c784f..bf096ab972cc945d19473cc1e55f6f7fc9618778 100644
 --- a/content/web_test/browser/web_test_content_browser_client.cc
 +++ b/content/web_test/browser/web_test_content_browser_client.cc
 @@ -520,6 +520,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -176,7 +176,7 @@ index 91d731a33bb48a9b7432b1139bd52e777d1e1967..d5dc4514f16063314afe1847bb64b0d5
      bool opener_suppressed,
      bool* no_javascript_access) {
 diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
-index 00cbe48de3b874215f2896940d71c6ed5bed98b5..8937c40d8bffbf09c8b0c33524086d16dbbee57a 100644
+index 4145d0d32ca1d1f02620a66f2437eaa58954b4d7..3cb5faab3f2e60d919dd7dd76fd320b8c63de84f 100644
 --- a/content/web_test/browser/web_test_content_browser_client.h
 +++ b/content/web_test/browser/web_test_content_browser_client.h
 @@ -92,6 +92,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -210,10 +210,10 @@ index c576ace24e81cc877aa2595d40e0a13a7af9f6a2..210fb97d44c19c29af424cc7b9cb3169
  
  }  // namespace blink
 diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
-index b5c8ad2661fc934eb334adc851d97d663054cdc0..d57e7e6203a36356ea6df0f97d81556d94844eba 100644
+index de0c2fab54859901352196a2e8de48d4b49e5056..ff6abde24c6bc863f721902bb90f47288ff4b543 100644
 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc
 +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
-@@ -2246,6 +2246,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
+@@ -2237,6 +2237,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
    WebWindowFeatures window_features =
        GetWindowFeaturesFromString(features, entered_window);
  

+ 2 - 2
patches/chromium/chore_patch_out_profile_methods_in_profile_selections_cc.patch

@@ -8,11 +8,11 @@ is therefore not a method that will compile given we don't include
 relevant files.
 
 diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc
-index 8444b1666261e46d1509e1941a6ba5cb10c91edd..48165243dfa7adc8d1d1a23ac339dcfd9e394e60 100644
+index 17a24969e3d29080342eff6c288d8e840935b6c0..b703e7069956f8a50f106064c08cb865f676c9a8 100644
 --- a/chrome/browser/profiles/profile_selections.cc
 +++ b/chrome/browser/profiles/profile_selections.cc
 @@ -13,6 +13,7 @@
- #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+ #endif  // BUILDFLAG(IS_CHROMEOS)
  
  bool AreKeyedServicesDisabledForProfileByDefault(const Profile* profile) {
 +#if 0

+ 1 - 1
patches/chromium/crash_allow_setting_more_options.patch

@@ -9,7 +9,7 @@ rate-limiting, compression and global annotations.
 This should be upstreamed.
 
 diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc
-index 0e9fe8892af82d77f8530ead358e820d9b6b3912..43465dd285a99c40f3bc4dca19945fb08060160b 100644
+index 4abce141b758eabd8a16f1cccb0016d5f10c0cae..048a97c807b4249479653cfb70942ec16264d0ee 100644
 --- a/components/crash/core/app/crash_reporter_client.cc
 +++ b/components/crash/core/app/crash_reporter_client.cc
 @@ -145,6 +145,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {

+ 5 - 4
patches/chromium/disable_hidden.patch

@@ -6,15 +6,16 @@ Subject: disable_hidden.patch
 Electron uses this to disable background throttling for hidden windows.
 
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index e309e8b96cd6605fc812fda2ca3c7ece07824e0c..5472056b3731569737df69b62fa7c75c4ffe18a8 100644
+index e309e8b96cd6605fc812fda2ca3c7ece07824e0c..c74c3d2bad9eaea9fe7cab4069222afc4bb77162 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -789,6 +789,9 @@ void RenderWidgetHostImpl::WasHidden() {
+@@ -789,6 +789,10 @@ void RenderWidgetHostImpl::WasHidden() {
      return;
    }
  
-+  if (disable_hidden_)
++  if (disable_hidden_) {
 +    return;
++  }
 +
    RejectPointerLockOrUnlockIfNecessary(
        blink::mojom::PointerLockResult::kWrongDocument);
@@ -34,7 +35,7 @@ index 4ce389437e583f3b0beaac78b4935808ee54c98e..e39e793bc2673d438cdf01aa909d7273
    // |routing_id| must not be MSG_ROUTING_NONE.
    // If this object outlives |delegate|, DetachDelegate() must be called when
 diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
-index 8f6ea685814bb63e734bbca10420b416d0058ed7..d752bb307866ced284346efa00964ec993e86e2b 100644
+index 55548735a1d1072a4d5d3c463a759c0ebf243af9..5de852d1bab55804b521e128c48f3013281872f2 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
 @@ -649,7 +649,7 @@ void RenderWidgetHostViewAura::HideImpl() {

+ 3 - 3
patches/chromium/disable_unload_metrics.patch

@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
 should continue seeking for a real fix.
 
 diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
-index d52afd26b89e97c8324c3692be94c4643bb8d4a6..67525a7fc62e234621eca62f5df49d5d817482e9 100644
+index 2155c1e758d8a7aa0722e2608d62d91b20d1a280..e85bdfe6448d52502d331e93a86d285e33bbf819 100644
 --- a/content/browser/renderer_host/navigator.cc
 +++ b/content/browser/renderer_host/navigator.cc
-@@ -1395,6 +1395,7 @@ void Navigator::RecordNavigationMetrics(
+@@ -1422,6 +1422,7 @@ void Navigator::RecordNavigationMetrics(
              .InMilliseconds());
    }
  
@@ -35,7 +35,7 @@ index d52afd26b89e97c8324c3692be94c4643bb8d4a6..67525a7fc62e234621eca62f5df49d5d
    // If this is a same-process navigation and we have timestamps for unload
    // durations, fill those metrics out as well.
    if (params.unload_start && params.unload_end &&
-@@ -1444,6 +1445,7 @@ void Navigator::RecordNavigationMetrics(
+@@ -1471,6 +1472,7 @@ void Navigator::RecordNavigationMetrics(
           first_before_unload_start_time)
              .InMilliseconds());
    }

+ 3 - 3
patches/chromium/feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch

@@ -199,7 +199,7 @@ index 58985ce62dc569256bad5e94de9c0d125fc470d0..33436784b691c860d58f8b4dfcc6718e
            &SelectFileDialogLinuxKde::OnSelectSingleFolderDialogResponse, this,
            parent));
 diff --git a/ui/shell_dialogs/select_file_dialog_linux_portal.cc b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
-index 61ddcbf7bf57e423099c7d392a19b3ec79b5d03f..920d0610943091f850e44e3e0481abd7fe08f881 100644
+index 1495d07341d8991cf167fd7018c0ef52decc3554..4ee2cab4de9da4e9ae8f64f3b23c9db489b21cd2 100644
 --- a/ui/shell_dialogs/select_file_dialog_linux_portal.cc
 +++ b/ui/shell_dialogs/select_file_dialog_linux_portal.cc
 @@ -44,7 +44,9 @@ constexpr char kMethodStartServiceByName[] = "StartServiceByName";
@@ -222,7 +222,7 @@ index 61ddcbf7bf57e423099c7d392a19b3ec79b5d03f..920d0610943091f850e44e3e0481abd7
  
    if (owning_window) {
      if (auto* root = owning_window->GetRootWindow()) {
-@@ -557,7 +561,9 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
+@@ -550,7 +554,9 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
                       response_handle_token);
  
    if (type == SelectFileDialog::Type::SELECT_UPLOAD_FOLDER) {
@@ -233,7 +233,7 @@ index 61ddcbf7bf57e423099c7d392a19b3ec79b5d03f..920d0610943091f850e44e3e0481abd7
                         l10n_util::GetStringUTF8(
                             IDS_SELECT_UPLOAD_FOLDER_DIALOG_UPLOAD_BUTTON));
    }
-@@ -566,6 +572,8 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
+@@ -559,6 +565,8 @@ void SelectFileDialogLinuxPortal::DialogInfo::AppendOptions(
        type == SelectFileDialog::Type::SELECT_UPLOAD_FOLDER ||
        type == SelectFileDialog::Type::SELECT_EXISTING_FOLDER) {
      AppendBoolOption(&options_writer, kFileChooserOptionDirectory, true);

+ 15 - 13
patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch

@@ -112,18 +112,20 @@ index 3450c15835d8b792f37764f6edc4a4560be435ef..b1034aa141d6121f8e1524fb34a28a04
    string mime_type;
  
 diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
-index 6434cd76b2fc0593448471a63652c0ddc56fe3ed..33b531855e2e7328fc559f10c4ad7b3f7af2e28e 100644
+index 490ccc66460c62eeb16c2b979e01efd54c4e3eb4..d68c15a828a1c16ad3644d7c4c036bf0e544d1b4 100644
 --- a/services/network/url_loader.cc
 +++ b/services/network/url_loader.cc
-@@ -726,6 +726,7 @@ URLLoader::URLLoader(
-         request.trusted_params->allow_cookies_from_browser;
-     include_request_cookies_with_response_ =
-         request.trusted_params->include_request_cookies_with_response;
-+    report_raw_headers_ = request.trusted_params->report_raw_headers;
-   }
- 
-   // Store any cookies passed from the browser process to later attach them to
-@@ -762,7 +763,7 @@ URLLoader::URLLoader(
+@@ -578,6 +578,9 @@ URLLoader::URLLoader(
+           mojo::SimpleWatcher::ArmingPolicy::MANUAL,
+           base::SequencedTaskRunner::GetCurrentDefault()),
+       per_factory_orb_state_(context.GetMutableOrbState()),
++      report_raw_headers_(
++        request.trusted_params &&
++        request.trusted_params->report_raw_headers),
+       devtools_request_id_(request.devtools_request_id),
+       request_mode_(request.mode),
+       request_credentials_mode_(request.credentials_mode),
+@@ -839,7 +842,7 @@ void URLLoader::ConfigureRequest(
          &URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
    }
  
@@ -132,7 +134,7 @@ index 6434cd76b2fc0593448471a63652c0ddc56fe3ed..33b531855e2e7328fc559f10c4ad7b3f
      url_request_->SetResponseHeadersCallback(base::BindRepeating(
          &URLLoader::SetRawResponseHeaders, base::Unretained(this)));
    }
-@@ -1737,6 +1738,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
+@@ -1802,6 +1805,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
    }
  
    response_ = BuildResponseHead();
@@ -153,10 +155,10 @@ index 6434cd76b2fc0593448471a63652c0ddc56fe3ed..33b531855e2e7328fc559f10c4ad7b3f
  
    // Parse and remove the Trust Tokens response headers, if any are expected,
 diff --git a/services/network/url_loader.h b/services/network/url_loader.h
-index 3089be9b39552c8fc03ee97bd90a5f5626f66b26..e70b15cc3683d77e900fce644616da64851bc801 100644
+index c2a638fb6cf1360d8dcbed058ce295a2ef91000d..f80f2848281fd88f08d23a9b4377a29e2d1ba76e 100644
 --- a/services/network/url_loader.h
 +++ b/services/network/url_loader.h
-@@ -680,6 +680,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
+@@ -704,6 +704,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
    std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
        resource_scheduler_request_handle_;
  

+ 1 - 1
patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch

@@ -40,7 +40,7 @@ index 1162861b389f4c580dd058525e30b2f7cab76177..7f851ed44373445722df544f75953760
    // origin of |common_params.url| and/or |common_params.initiator_origin|.
    url::Origin resolved_origin = url::Origin::Resolve(
 diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
-index 37272602835da25fc3b26eedb72d1786af3487fc..6dd8e7f6bd987ecda0d3908e2f66af65f6931682 100644
+index 7de11767815fb58e060ae935ef59e2433dfd4d1f..024ee08507a2392f4482c1c1b3c1048ba3a48acb 100644
 --- a/third_party/blink/renderer/core/loader/document_loader.cc
 +++ b/third_party/blink/renderer/core/loader/document_loader.cc
 @@ -2264,6 +2264,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {

+ 5 - 5
patches/chromium/fix_disabling_background_throttling_in_compositor.patch

@@ -12,10 +12,10 @@ invisible state of the `viz::DisplayScheduler` owned
 by the `ui::Compositor`.
 
 diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
-index f57b0a1be2faab8fb1918b0edf6b470faceeebb1..b56fc755aeb9fd62a2b466d501aa075eae3da2f0 100644
+index 16cc8169d80709f9a6d18401f34582c3f90eba5c..127d18f0183afc96ed648f5508e65d0a5a46fc92 100644
 --- a/ui/compositor/compositor.cc
 +++ b/ui/compositor/compositor.cc
-@@ -345,7 +345,8 @@ void Compositor::SetLayerTreeFrameSink(
+@@ -344,7 +344,8 @@ void Compositor::SetLayerTreeFrameSink(
    if (display_private_) {
      disabled_swap_until_resize_ = false;
      display_private_->Resize(size());
@@ -25,7 +25,7 @@ index f57b0a1be2faab8fb1918b0edf6b470faceeebb1..b56fc755aeb9fd62a2b466d501aa075e
      display_private_->SetDisplayColorSpaces(display_color_spaces_);
      display_private_->SetDisplayColorMatrix(
          gfx::SkM44ToTransform(display_color_matrix_));
-@@ -558,7 +559,9 @@ void Compositor::SetVisible(bool visible) {
+@@ -555,7 +556,9 @@ void Compositor::SetVisible(bool visible) {
    // updated then. We need to call this even if the visibility hasn't changed,
    // for the same reason.
    if (display_private_)
@@ -35,8 +35,8 @@ index f57b0a1be2faab8fb1918b0edf6b470faceeebb1..b56fc755aeb9fd62a2b466d501aa075e
 +        background_throttling_ ? visible : true);
  
    if (changed) {
-     for (auto& observer : observer_list_) {
-@@ -1018,6 +1021,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
+     observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged,
+@@ -1008,6 +1011,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
        host_begin_frame_observer_->GetBoundRemote());
  }
  

+ 1 - 1
patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch

@@ -9,7 +9,7 @@ focus node change via TextInputManager.
 chromium-bug: https://crbug.com/1369605
 
 diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
-index 5a78e040a182541d879af3d3c477ae30843c5364..977a5107ac243ffac3dfb5f524d4432dc7161086 100644
+index e8a74b48864e71597996ef13463a358acecb5b7e..ec0f008b280561158f602f05563fd9a87fba3f97 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
 @@ -3036,6 +3036,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(

+ 2 - 2
patches/chromium/fix_restore_original_resize_performance_on_macos.patch

@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
 vs mobile runtimes.  i.e. restore the old logic only on desktop platforms
 
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index 23fba344bb82ca317db3141ac5def321928bfb4c..89cba17fc2cd46da12cb394b7b728276ffe7ff08 100644
+index c0c9880221704bba85a85e841f7c2ed0ffe482d9..f9cc663212ae493c4cd1861cf57decec5d723152 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -2043,9 +2043,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
+@@ -2044,9 +2044,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
  void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
    // The resize message (which may not happen immediately) will carry with it
    // the screen info as well as the new size (if the screen has changed scale

+ 4 - 4
patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch

@@ -97,10 +97,10 @@ index 72722ddbecb7a006ec407b374c8d75c5054f9574..cb4c93a8356f35e5766e843006161143
                              mojom::blink::WantResultOption,
                              mojom::blink::PromiseResultOption);
 diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
-index 00f8c36d2056be406714dd9816ff837900fae993..968e3e8511a2563373ae0249bd330d58a1779e42 100644
+index b719b08633f5b705aa76283440a9f4d09d7ee472..44e5535f3117ef267f0bddcc34598c4214cdff7e 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
-@@ -973,6 +973,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
+@@ -968,6 +968,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
              std::move(callback).Run(value ? std::move(*value) : base::Value());
            },
            std::move(callback)),
@@ -204,10 +204,10 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706
    const mojom::blink::UserActivationOption user_activation_option_;
    const mojom::blink::LoadEventBlockingOption blocking_option_;
 diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc
-index a9a98852fb0e821fb137edfe840f5a4fe1da4550..619863de9103204a024ec61335fe591a894ec48c 100644
+index 1672a1a8821c3621642ee8265fa54c2f47229113..699d3e30d9ca78dc56d6639511138e0420f89e1b 100644
 --- a/third_party/blink/renderer/core/frame/web_frame_test.cc
 +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc
-@@ -295,6 +295,7 @@ void ExecuteScriptsInMainWorld(
+@@ -291,6 +291,7 @@ void ExecuteScriptsInMainWorld(
        DOMWrapperWorld::kMainWorldId, sources, user_gesture,
        mojom::blink::EvaluationTiming::kSynchronous,
        mojom::blink::LoadEventBlockingOption::kDoNotBlock, std::move(callback),

+ 3 - 3
patches/chromium/frame_host_manager.patch

@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
 Allows embedder to intercept site instances created by chromium.
 
 diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
-index 52a933c1068083bb5d5f26eef4e77f8bc6b904b8..8b79682b2e8bfe52251afb68e426b421c4707718 100644
+index 5b38f2caad8e093e44e3231f3a13c3976b15da10..b1c61e7f860decb254c837fb6a05573f39769bd9 100644
 --- a/content/browser/renderer_host/render_frame_host_manager.cc
 +++ b/content/browser/renderer_host/render_frame_host_manager.cc
-@@ -4524,6 +4524,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -4535,6 +4535,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      request->ResetStateForSiteInstanceChange();
    }
  
@@ -20,7 +20,7 @@ index 52a933c1068083bb5d5f26eef4e77f8bc6b904b8..8b79682b2e8bfe52251afb68e426b421
  }
  
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 58fd2cea8a602832e56ac5962fbac57b5adae610..9f270bd973d1fc97b0040d0ad80da815f30ca8dd 100644
+index ff16736f47ad642211ee21b44479c5e449acf33f..e721bde4eba6cc28bcff0f7df1b6d55aea18eb5d 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -337,6 +337,11 @@ class CONTENT_EXPORT ContentBrowserClient {

+ 1 - 1
patches/chromium/gritsettings_resource_ids.patch

@@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch
 Add electron resources file to the list of resource ids generation.
 
 diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
-index 1ba8251e598caba26760ff4397c14eb079ae1194..e6f2bfdd45d037a9b615d3735fb733f508c38ad2 100644
+index 6cdb46db1feaead6031a2ca51d46168649e98499..ba3c9dcc304cc000cf08d695ba6d750f6aa1ad59 100644
 --- a/tools/gritsettings/resource_ids.spec
 +++ b/tools/gritsettings/resource_ids.spec
 @@ -1355,6 +1355,11 @@

+ 6 - 6
patches/chromium/mas_avoid_private_macos_api_usage.patch.patch

@@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
 system priority.
 
 diff --git a/base/BUILD.gn b/base/BUILD.gn
-index 373e250254e7f7dc9c2d40549549b1b8751d8fe0..68ace763b9040277e0a5306a03a7fc4736210bc5 100644
+index aa1654d428420e99bdce3abf3140f764d73e7c48..3d989d0d38ec85b44f89a525cda922e636aa3ce9 100644
 --- a/base/BUILD.gn
 +++ b/base/BUILD.gn
 @@ -1036,6 +1036,7 @@ component("base") {
@@ -689,7 +689,7 @@ index 9f48c905f4abbb0f2e184299a915232cf6a0f6b0..83e1af29e9b035e54b447941d55b95eb
  
    defines = []
 diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
-index 2ac766d0149f0405b3fcad0ec1b6e0685ed3658c..2fc827605b134a3bf24438b42405f70a819dbd9b 100644
+index 27ab1bc3f30877a498ce5061babe6005e6d4678c..d6a03a5725d2f1eb7d4d3e4f8ce2b42ff0725a24 100644
 --- a/content/renderer/BUILD.gn
 +++ b/content/renderer/BUILD.gn
 @@ -336,6 +336,7 @@ target(link_target_type, "renderer") {
@@ -771,7 +771,7 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
  
  }  // namespace content
 diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
-index 2cfb947c33e8479467b4aae213ee58b16fd42326..d235cf3d40a5804b7681160cf0c6ed4c4843c0d3 100644
+index 3788cc19ac4abf84ad856a15b94f88fb4fdec00d..26a601565370e0ae4479eea7207e58dedef38e14 100644
 --- a/content/test/BUILD.gn
 +++ b/content/test/BUILD.gn
 @@ -638,6 +638,7 @@ static_library("test_support") {
@@ -798,7 +798,7 @@ index 2cfb947c33e8479467b4aae213ee58b16fd42326..d235cf3d40a5804b7681160cf0c6ed4c
    ]
  
    if (!(is_chromeos_ash && target_cpu == "arm64" && current_cpu == "arm")) {
-@@ -3211,6 +3214,7 @@ test("content_unittests") {
+@@ -3206,6 +3209,7 @@ test("content_unittests") {
      "//ui/latency:test_support",
      "//ui/shell_dialogs:shell_dialogs",
      "//ui/webui:test_support",
@@ -1782,10 +1782,10 @@ index 35b71abc95f83bb01dba3f69e2d69a026840b7a2..6a2ff6768f16e503657cdb7ff6be7587
    // Query the display's refresh rate.
    if (@available(macos 12.0, *)) {
 diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
-index c0a85b2cfc69a4f358ae03c65e774cdc45085bf6..27d77dfed33c69ede2b5a0326e763cb6c87200ef 100644
+index c95b3ce1e1e7b87aab25cf596eb34eea6590db68..0336b2332d8274bd5fe71e4506d3de7b15830576 100644
 --- a/ui/gfx/BUILD.gn
 +++ b/ui/gfx/BUILD.gn
-@@ -333,6 +333,12 @@ component("gfx") {
+@@ -335,6 +335,12 @@ component("gfx") {
      "//ui/base:ui_data_pack",
    ]
  

+ 1 - 1
patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch

@@ -10,7 +10,7 @@ an about:blank check to this area.
 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
 
 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
-index e2da85a2a7719f77eea3209a47dca58bd9512a4c..c8ac1186d8e226c7357c388d95fa543c5f009008 100644
+index f4bee04daf1ac7c6af12e7cadc7f45d42312a712..49e80ca315d23c0886a11786b36b0acb1d109b3a 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
 @@ -783,8 +783,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(

+ 2 - 2
patches/chromium/printing.patch

@@ -653,7 +653,7 @@ index 3c2fdc9f9a6c60efc4b0afacbfb83eef55917791..8fd9aff538fa03da6c171927c316d4f6
    PrintingFailed(int32 cookie, PrintFailureReason reason);
  
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index 76001bddef2e4662f3f98ecb7439475ea91378aa..06f291bb3ecff3f0948bd671878a4e8d942bbcbb 100644
+index e61e108ceefc53f1727102438a0f1b17d4cbbab6..95792ed1398b574faf5f1c24962ee0997074dd1e 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
 @@ -51,6 +51,7 @@
@@ -817,7 +817,7 @@ index 76001bddef2e4662f3f98ecb7439475ea91378aa..06f291bb3ecff3f0948bd671878a4e8d
  }
  
 diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
-index 14de029740ffbebe06d309651c1a2c007d9fb96b..e9bf9c5bef2a9235260e7d6c8d26d41528e38661 100644
+index 9c91fdf50b38ad437279eaada4359a7a95911d07..8eed4887949d0c30f067d86aaa971ee5aaecd2ca 100644
 --- a/components/printing/renderer/print_render_frame_helper.h
 +++ b/components/printing/renderer/print_render_frame_helper.h
 @@ -251,7 +251,7 @@ class PrintRenderFrameHelper

+ 2 - 2
patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch

@@ -30,10 +30,10 @@ index 76acfee7bee2bc9ab25fc692a0f2485091a39da5..48cba2fbd4e86956197d7b114dcefc4b
    // RenderWidgetHost on the primary main frame, and false otherwise.
    virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index 5472056b3731569737df69b62fa7c75c4ffe18a8..23fba344bb82ca317db3141ac5def321928bfb4c 100644
+index c74c3d2bad9eaea9fe7cab4069222afc4bb77162..c0c9880221704bba85a85e841f7c2ed0ffe482d9 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -1977,6 +1977,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
+@@ -1978,6 +1978,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
    if (view_) {
      view_->UpdateCursor(cursor);
    }

+ 4 - 4
patches/chromium/refactor_expose_file_system_access_blocklist.patch

@@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w
 to upstream this change to Chrome.
 
 diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
-index 65e445220e7afcfa6fbec2c482186923822ad0c5..024fd5e77eb5739c4c83f5f2a9620fe4aa1308bf 100644
+index 50b148bc25badf4d11c084dd279a7794514e0cbb..1cf7708f4ba89778de35f6953ff03df78fc0d4a7 100644
 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 @@ -43,7 +43,6 @@
@@ -147,7 +147,7 @@ index 65e445220e7afcfa6fbec2c482186923822ad0c5..024fd5e77eb5739c4c83f5f2a9620fe4
  // Describes a rule for blocking a directory, which can be constructed
  // dynamically (based on state) or statically (from kBlockedPaths).
 diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
-index f6d36e2068fbe3681dba7b2c84bc7e81c7da6541..4bad4240e784b8fa06205014063020736074d001 100644
+index eaff88d9e4d14040a597b2739574231b6d2d8232..ec614eb4ad6984ebfa3e8360331db2ee8d11050d 100644
 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
 +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h
 @@ -17,12 +17,13 @@
@@ -174,7 +174,7 @@ index f6d36e2068fbe3681dba7b2c84bc7e81c7da6541..4bad4240e784b8fa0620501406302073
  #include "components/enterprise/common/files_scan_data.h"
  #endif
  
-@@ -336,6 +337,123 @@ class ChromeFileSystemAccessPermissionContext
+@@ -338,6 +339,123 @@ class ChromeFileSystemAccessPermissionContext
    // KeyedService:
    void Shutdown() override;
  
@@ -298,7 +298,7 @@ index f6d36e2068fbe3681dba7b2c84bc7e81c7da6541..4bad4240e784b8fa0620501406302073
   protected:
    SEQUENCE_CHECKER(sequence_checker_);
  
-@@ -355,7 +473,7 @@ class ChromeFileSystemAccessPermissionContext
+@@ -357,7 +475,7 @@ class ChromeFileSystemAccessPermissionContext
  
    void PermissionGrantDestroyed(PermissionGrantImpl* grant);
  

+ 7 - 7
patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch

@@ -23,17 +23,17 @@ index 30a7e6a641e7b17a47fb5c66fb44d3d5899b9e78..85764a533585df0abe398758e4fd510c
 +#endif
  }
 diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc
-index a4e6a26e6ce757092771b747be76135deb84cf4a..8444b1666261e46d1509e1941a6ba5cb10c91edd 100644
+index 091deed41ed6ada13e7dfc859c027c1a4e86a007..17a24969e3d29080342eff6c288d8e840935b6c0 100644
 --- a/chrome/browser/profiles/profile_selections.cc
 +++ b/chrome/browser/profiles/profile_selections.cc
-@@ -123,6 +123,7 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const {
+@@ -132,6 +132,7 @@ ProfileSelection ProfileSelections::GetProfileSelection(
+   }
+ #endif  // BUILDFLAG(IS_CHROMEOS)
  
- ProfileSelection ProfileSelections::GetProfileSelection(
-     Profile* profile) const {
 +#if 0
- #if BUILDFLAG(IS_CHROMEOS_ASH)
-   // This check has to be performed before the check on
-   // `profile->IsRegularProfile()` because profiles that are internal ASH
+   // Treat other off the record profiles as Incognito (primary otr) Profiles.
+   if (profile->IsRegularProfile() || profile->IsIncognitoProfile() ||
+       profile_metrics::GetBrowserProfileType(profile) ==
 @@ -148,6 +149,7 @@ ProfileSelection ProfileSelections::GetProfileSelection(
    }
  

+ 3 - 3
patches/chromium/resource_file_conflict.patch

@@ -52,10 +52,10 @@ Some alternatives to this patch:
 None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
 
 diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
-index 3049bfae136860928c25ad9a06fbd82c25084763..751a3087c4a06f9f03373f890b3400621680089d 100644
+index 80026f59664bc242e7f59d1066dd58fb8297eae4..b1c18a03ccd05609cd65de028b9861c6c9a71568 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -1589,7 +1589,7 @@ if (is_chrome_branded && !is_android) {
+@@ -1560,7 +1560,7 @@ if (is_chrome_branded && !is_android) {
    }
  }
  
@@ -64,7 +64,7 @@ index 3049bfae136860928c25ad9a06fbd82c25084763..751a3087c4a06f9f03373f890b340062
    chrome_paks("packed_resources") {
      if (is_mac) {
        output_dir = "$root_gen_dir/repack"
-@@ -1628,6 +1628,12 @@ if (!is_android) {
+@@ -1599,6 +1599,12 @@ if (!is_android) {
    }
  }
  

+ 2 - 2
patches/chromium/webview_fullscreen.patch

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
 `api::WebContents::IsFullscreenForTabOrPending` value.
 
 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
-index 744715d8ecc1ddca8400ae88e115e52797df1ffa..e2da85a2a7719f77eea3209a47dca58bd9512a4c 100644
+index e0708cae6968c14f912bac9c8c7ff90344454237..f4bee04daf1ac7c6af12e7cadc7f45d42312a712 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -8182,6 +8182,17 @@ void RenderFrameHostImpl::EnterFullscreen(
+@@ -8219,6 +8219,17 @@ void RenderFrameHostImpl::EnterFullscreen(
      }
    }
  

+ 2 - 2
patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch

@@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
 patching legacy devtools code.
 
 diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
-index c67f77bd670d76da9b642cc404a85dfbe9844fd6..6f52d67fb8df36f0aefd32b6061ee84342f97739 100644
+index 29e096c4d3c495f62422c5ae7f40a4aa46f27ff7..902179094cce6a4d296f5e026281626697970d76 100644
 --- a/front_end/entrypoints/main/MainImpl.ts
 +++ b/front_end/entrypoints/main/MainImpl.ts
-@@ -757,6 +757,8 @@ export class MainImpl {
+@@ -762,6 +762,8 @@ export class MainImpl {
  globalThis.Main = globalThis.Main || {};
  // @ts-ignore Exported for Tests.js
  globalThis.Main.Main = MainImpl;

+ 1 - 0
patches/node/.patches

@@ -52,3 +52,4 @@ src_use_supported_api_to_get_stalled_tla_messages.patch
 build_don_t_redefine_win32_lean_and_mean.patch
 build_compile_with_c_20_support.patch
 add_v8_taskpirority_to_foreground_task_runner_signature.patch
+cli_remove_deprecated_v8_flag.patch

+ 59 - 0
patches/node/cli_remove_deprecated_v8_flag.patch

@@ -0,0 +1,59 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Omer Katz <[email protected]>
+Date: Thu, 19 Sep 2024 10:50:09 +0200
+Subject: cli: remove deprecated V8 flag
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Remove the `--huge-max-old-generation-size` V8 flag from the
+`NODE_OPTIONS` allowlist. That flag was recently deprecated (it
+currently remains as nop, see crrev.com/c/5831467) and will soon be
+completely removed.
+
+PR-URL: https://github.com/nodejs/node/pull/54761
+Reviewed-By: Richard Lau <[email protected]>
+Reviewed-By: Luigi Pinca <[email protected]>
+Reviewed-By: Michaël Zasso <[email protected]>
+Reviewed-By: Yagiz Nizipli <[email protected]>
+
+diff --git a/doc/api/cli.md b/doc/api/cli.md
+index 8f32a44ad41314dce2e4b58b318e4b5a7530b802..10dc8da655690d1ce020474256b2134fb881fa39 100644
+--- a/doc/api/cli.md
++++ b/doc/api/cli.md
+@@ -2810,7 +2810,6 @@ V8 options that are allowed are:
+ * `--abort-on-uncaught-exception`
+ * `--disallow-code-generation-from-strings`
+ * `--enable-etw-stack-walking`
+-* `--huge-max-old-generation-size`
+ * `--interpreted-frames-native-stack`
+ * `--jitless`
+ * `--max-old-space-size`
+diff --git a/src/node_options.cc b/src/node_options.cc
+index 409c6e3918e3ef7c9d35f87e093cb965cb889dd7..eefdf7a48ed3ddebda3b6771b2d103455d2c8d70 100644
+--- a/src/node_options.cc
++++ b/src/node_options.cc
+@@ -854,11 +854,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
+             "disallow eval and friends",
+             V8Option{},
+             kAllowedInEnvvar);
+-  AddOption("--huge-max-old-generation-size",
+-            "increase default maximum heap size on machines with 16GB memory "
+-            "or more",
+-            V8Option{},
+-            kAllowedInEnvvar);
+   AddOption("--jitless",
+             "disable runtime allocation of executable memory",
+             V8Option{},
+diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js
+index 4d659a7b212441963a8b8be35ad0d44440842380..6f90230a3a2a105b9eb8f5a57eaf94c7cc64215f 100644
+--- a/test/parallel/test-cli-node-options.js
++++ b/test/parallel/test-cli-node-options.js
+@@ -69,7 +69,6 @@ if (common.hasCrypto) {
+ // V8 options
+ expect('--abort_on-uncaught_exception', 'B\n');
+ expect('--disallow-code-generation-from-strings', 'B\n');
+-expect('--huge-max-old-generation-size', 'B\n');
+ expect('--jitless', 'B\n');
+ expect('--max-old-space-size=0', 'B\n');
+ expect('--max-semi-space-size=0', 'B\n');

+ 5 - 3
shell/browser/electron_browser_client.cc

@@ -1649,14 +1649,16 @@ ElectronBrowserClient::CreateLoginDelegate(
     content::WebContents* web_contents,
     content::BrowserContext* browser_context,
     const content::GlobalRequestID& request_id,
-    bool is_main_frame,
+    bool is_request_for_primary_main_frame,
+    bool is_request_for_navigation,
     const GURL& url,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
     bool first_auth_attempt,
     LoginAuthRequiredCallback auth_required_callback) {
   return std::make_unique<LoginHandler>(
-      auth_info, web_contents, is_main_frame, base::kNullProcessId, url,
-      response_headers, first_auth_attempt, std::move(auth_required_callback));
+      auth_info, web_contents, is_request_for_primary_main_frame,
+      is_request_for_navigation, base::kNullProcessId, url, response_headers,
+      first_auth_attempt, std::move(auth_required_callback));
 }
 
 std::vector<std::unique_ptr<blink::URLLoaderThrottle>>

+ 2 - 1
shell/browser/electron_browser_client.h

@@ -284,7 +284,8 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
       content::WebContents* web_contents,
       content::BrowserContext* browser_context,
       const content::GlobalRequestID& request_id,
-      bool is_main_frame,
+      bool is_request_for_primary_main_frame,
+      bool is_request_for_navigation,
       const GURL& url,
       scoped_refptr<net::HttpResponseHeaders> response_headers,
       bool first_auth_attempt,

+ 7 - 0
shell/browser/file_system_access/file_system_access_permission_context.cc

@@ -542,6 +542,13 @@ FileSystemAccessPermissionContext::GetWritePermissionGrant(
   return existing_grant;
 }
 
+bool FileSystemAccessPermissionContext::IsFileTypeDangerous(
+    const base::FilePath& path,
+    const url::Origin& origin) {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+  return false;
+}
+
 bool FileSystemAccessPermissionContext::CanObtainReadPermission(
     const url::Origin& origin) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);

+ 3 - 0
shell/browser/file_system_access/file_system_access_permission_context.h

@@ -77,6 +77,9 @@ class FileSystemAccessPermissionContext
       content::GlobalRenderFrameHostId frame_id,
       base::OnceCallback<void(AfterWriteCheckResult)> callback) override;
 
+  bool IsFileTypeDangerous(const base::FilePath& path,
+                           const url::Origin& origin) override;
+
   bool CanObtainReadPermission(const url::Origin& origin) override;
   bool CanObtainWritePermission(const url::Origin& origin) override;
 

+ 8 - 4
shell/browser/login_handler.cc

@@ -24,7 +24,8 @@ namespace electron {
 LoginHandler::LoginHandler(
     const net::AuthChallengeInfo& auth_info,
     content::WebContents* web_contents,
-    bool is_main_frame,
+    bool is_request_for_primary_main_frame,
+    bool is_request_for_navigation,
     base::ProcessId process_id,
     const GURL& url,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
@@ -36,14 +37,16 @@ LoginHandler::LoginHandler(
   base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
       FROM_HERE,
       base::BindOnce(&LoginHandler::EmitEvent, weak_factory_.GetWeakPtr(),
-                     auth_info, web_contents, is_main_frame, process_id, url,
+                     auth_info, web_contents, is_request_for_primary_main_frame,
+                     is_request_for_navigation, process_id, url,
                      response_headers, first_auth_attempt));
 }
 
 void LoginHandler::EmitEvent(
     net::AuthChallengeInfo auth_info,
     content::WebContents* web_contents,
-    bool is_main_frame,
+    bool is_request_for_primary_main_frame,
+    bool is_request_for_navigation,
     base::ProcessId process_id,
     const GURL& url,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
@@ -67,7 +70,8 @@ void LoginHandler::EmitEvent(
   // These parameters aren't documented, and I'm not sure that they're useful,
   // but we might as well stick 'em on the details object. If it turns out they
   // are useful, we can add them to the docs :)
-  details.Set("isMainFrame", is_main_frame);
+  details.Set("isMainFrame", is_request_for_primary_main_frame);
+  details.Set("isRequestForNavigation", is_request_for_navigation);
   details.Set("firstAuthAttempt", first_auth_attempt);
   details.Set("responseHeaders", response_headers.get());
 

+ 4 - 2
shell/browser/login_handler.h

@@ -24,7 +24,8 @@ class LoginHandler : public content::LoginDelegate {
  public:
   LoginHandler(const net::AuthChallengeInfo& auth_info,
                content::WebContents* web_contents,
-               bool is_main_frame,
+               bool is_request_for_primary_main_frame,
+               bool is_request_for_navigation,
                base::ProcessId process_id,
                const GURL& url,
                scoped_refptr<net::HttpResponseHeaders> response_headers,
@@ -39,7 +40,8 @@ class LoginHandler : public content::LoginDelegate {
  private:
   void EmitEvent(net::AuthChallengeInfo auth_info,
                  content::WebContents* web_contents,
-                 bool is_main_frame,
+                 bool is_request_for_primary_main_frame,
+                 bool is_request_for_navigation,
                  base::ProcessId process_id,
                  const GURL& url,
                  scoped_refptr<net::HttpResponseHeaders> response_headers,

+ 4 - 2
shell/browser/net/url_loader_network_observer.cc

@@ -28,8 +28,10 @@ class LoginHandlerDelegate {
         &LoginHandlerDelegate::OnRequestCancelled, base::Unretained(this)));
 
     login_handler_ = std::make_unique<LoginHandler>(
-        auth_info, nullptr, false, process_id, url, response_headers,
-        first_auth_attempt,
+        auth_info, nullptr /*web_contents*/,
+        false /*is_request_for_primary_main_frame*/,
+        false /*bool is_request_for_navigation*/, process_id, url,
+        response_headers, first_auth_attempt,
         base::BindOnce(&LoginHandlerDelegate::OnAuthCredentials,
                        weak_factory_.GetWeakPtr()));
   }

+ 0 - 2
shell/common/gin_converters/content_converter.cc

@@ -149,8 +149,6 @@ v8::Local<v8::Value> Converter<blink::PermissionType>::ToV8(
   // Not all permissions are currently used by Electron but this will future
   // proof these conversions.
   switch (val) {
-    case blink::PermissionType::ACCESSIBILITY_EVENTS:
-      return StringToV8(isolate, "accessibility-events");
     case blink::PermissionType::AUTOMATIC_FULLSCREEN:
       return StringToV8(isolate, "automatic-fullscreen");
     case blink::PermissionType::AR: