Browse Source

chore: bump chromium to 93.0.4577.15 (14-x-y) (#30029)

* chore: bump chromium in DEPS to 93.0.4567.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4568.0

* chore: bump chromium in DEPS to 93.0.4569.0

* chore: update patches

(cherry picked from commit e710b8ea15f0ec08966e89d37e6ff73414180e6b)

* 3000931: Code health: remove base::ListValue from DevToolsEmbedderMessageDispatcher

https://chromium-review.googlesource.com/c/chromium/src/+/3000931
(cherry picked from commit 44c00b98f27621f6345bcf5d78f3e2649147135b)

* chore: bump chromium in DEPS to 93.0.4570.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4571.0

* chore: update patches

* chore: bump chromium in DEPS to 93.0.4573.0

* chore: bump chromium in DEPS to 93.0.4574.0

* chore: bump chromium in DEPS to 93.0.4575.0

* chore: bump chromium in DEPS to 93.0.4576.0

* chore: bump chromium in DEPS to 93.0.4577.0

* chore: bump chromium in DEPS to 93.0.4577.3

* chore: bump chromium in DEPS to 93.0.4577.4

* 3011898: Reland "Roll src/buildtools/third_party/libc++/trunk/ 8fa879467..79a2e924d (426 commits)"

https://chromium-review.googlesource.com/c/chromium/src/+/3011898
(cherry picked from commit c46148eed8c3ee1e367cd8427cd9b8c0ab1fefe5)

* 2974072: Swap base/stl_util.h to base/cxx17_backports.h in many files.

https://chromium-review.googlesource.com/c/chromium/src/+/2974072
(cherry picked from commit 4d725e44ca9e74849a434c1a31d33d3d7fb0c7ff)

* chore: add missing header

(cherry picked from commit f3993e71ce80a0df1efe88a93f90ffdde3b4908d)

* Reland "Roll src/buildtools/third_party/libc++/trunk/ 8fa879467..79a2e924d (426 commits)"

https://chromium-review.googlesource.com/c/chromium/src/+/2988699
(cherry picked from commit 797723ec838709ddeba0c104e30727ee0b7ac8ca)
(cherry picked from commit 4a325c9b2454fee5bc68b8fcf0d1375c3680a813)

* 2925476: Migrate t/b/{public,renderer}/platform/media to blink ns [4/6]

https://chromium-review.googlesource.com/c/chromium/src/+/2925476
(cherry picked from commit 0930c0ee412eee556b9eac361d9afeda74c92d07)

* 2974074: Remove base/cxx17_backports.h from stl_util.h.

https://chromium-review.googlesource.com/c/chromium/src/+/2974074
(cherry picked from commit a7b53b61f403ed68cbc40f6352e6b8d3ad61dffb)

* fixup: 2974074: Remove base/cxx17_backports.h from stl_util.h.

(cherry picked from commit af5da4dcb152ce34a850765530cc0c83bb1a42c9)

* chore: update patches

* fix: invalid operands compilation error

(cherry picked from commit 6fa6f8acb9857440186bb930575b71d942857c6b)

* 3001416: Fix -Wimplicit-int-float-conversion.

https://chromium-review.googlesource.com/c/chromium/src/+/3001416
(cherry picked from commit b2e9f2212e9f7370c64e790f071e978ba691f91f)

* 3022548: Removing windows.h includes from some base headers

https://chromium-review.googlesource.com/c/chromium/src/+/3022548
(cherry picked from commit 8b481039070fc5ff32edf066129b94c470605c44)

* 3029258: Remove unused JobEventDetails::Type enum values

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

Cherry picked from c15df3a1093df30d7784dfc0c51c5a503889a702

Co-Authored-By: Shelley Vohr <[email protected]>

* 3029185: printing: Use mojom::PrinterType instead of PrinterType

https://chromium-review.googlesource.com/c/chromium/src/+/3029185
(cherry picked from commit d16fab76fb506a1be2bc57e1d2799fb673081cf9)

* Update application_info_win.cc

(cherry picked from commit 6e187f8617fb187db3c7e0c3048f55dc59c15693)

* include windows.h in process_singleton_win.cc

(cherry picked from commit af58ad2d9dac0ab2c3ab315dd06b81bc7744f7ea)

* chore: bump chromium in DEPS to 93.0.4577.8

* chore: update patches

* do not create a new UserScriptManager every time the accessor is called

(cherry picked from commit 24a71035ab1a0d9ad1f10ac1d9fc6ce9af9be4f1)

* chore: Revert "Roll clang llvmorg-13-init-14732-g8a7b5ebf-2 :  llvmorg-13-init-15040-gc10947b5-1"

* chore: remove no longer needed patch

* Update the "py" wheel to a version that is compatible with pytest-6.2.2.

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

* chore: bump chromium in DEPS to 93.0.4577.15

* chore: update patches

* chore: fixup parallel/test-errors-systemerror node test

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <[email protected]>
Co-authored-by: deepak1556 <[email protected]>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: Jeremy Rose <[email protected]>
Co-authored-by: Jeremy Rose <[email protected]>
electron-roller[bot] 3 years ago
parent
commit
de679a181a
77 changed files with 540 additions and 337 deletions
  1. 2 1
      BUILD.gn
  2. 1 1
      DEPS
  3. 1 0
      chromium_src/chrome/browser/process_singleton_win.cc
  4. 28 3
      filenames.libcxx.gni
  5. 1 0
      patches/ReactiveObjC/.patches
  6. 26 0
      patches/ReactiveObjC/chore_explicitly_cast_long_max_to_double.patch
  7. 2 1
      patches/chromium/.patches
  8. 7 7
      patches/chromium/add_didinstallconditionalfeatures.patch
  9. 14 14
      patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch
  10. 6 6
      patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch
  11. 3 3
      patches/chromium/blink_local_frame.patch
  12. 9 9
      patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch
  13. 3 3
      patches/chromium/build_libc_as_static_library.patch
  14. 17 17
      patches/chromium/can_create_window.patch
  15. 12 12
      patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch
  16. 2 2
      patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch
  17. 2 2
      patches/chromium/dcheck.patch
  18. 3 3
      patches/chromium/desktop_media_list.patch
  19. 7 7
      patches/chromium/disable_color_correct_rendering.patch
  20. 3 3
      patches/chromium/disable_hidden.patch
  21. 3 3
      patches/chromium/disable_unload_metrics.patch
  22. 2 2
      patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch
  23. 4 4
      patches/chromium/expose_setuseragent_on_networkcontext.patch
  24. 2 2
      patches/chromium/extend_apply_webpreferences.patch
  25. 2 2
      patches/chromium/feat_add_onclose_to_messageport.patch
  26. 5 5
      patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch
  27. 5 7
      patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch
  28. 4 4
      patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch
  29. 5 5
      patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch
  30. 4 4
      patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch
  31. 1 1
      patches/chromium/fix_properly_honor_printing_page_ranges.patch
  32. 3 3
      patches/chromium/frame_host_manager.patch
  33. 3 3
      patches/chromium/gpu_notify_when_dxdiag_request_fails.patch
  34. 2 2
      patches/chromium/gritsettings_resource_ids.patch
  35. 2 2
      patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
  36. 1 1
      patches/chromium/mas-cfisobjc.patch
  37. 1 1
      patches/chromium/mas-cgdisplayusesforcetogray.patch
  38. 1 1
      patches/chromium/mas_disable_remote_accessibility.patch
  39. 11 11
      patches/chromium/mas_no_private_api.patch
  40. 5 5
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  41. 2 2
      patches/chromium/notification_provenance.patch
  42. 1 1
      patches/chromium/picture-in-picture.patch
  43. 74 55
      patches/chromium/printing.patch
  44. 1 1
      patches/chromium/put_back_deleted_colors_for_autofill.patch
  45. 7 7
      patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
  46. 3 3
      patches/chromium/resource_file_conflict.patch
  47. 82 0
      patches/chromium/revert_roll_clang_llvmorg-13-init-14732-g8a7b5ebf-2.patch
  48. 2 2
      patches/chromium/scroll_bounce_flag.patch
  49. 0 48
      patches/chromium/set_svgimage_page_after_document_install.patch
  50. 5 5
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  51. 29 0
      patches/chromium/update_the_py_wheel_to_a_version_that_is_compatible_with.patch
  52. 4 4
      patches/chromium/web_contents.patch
  53. 2 2
      patches/chromium/webview_cross_drag.patch
  54. 2 2
      patches/chromium/webview_fullscreen.patch
  55. 4 4
      patches/chromium/worker_context_will_destroy.patch
  56. 6 15
      patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch
  57. 1 0
      patches/node/.patches
  58. 68 0
      patches/node/errors_refactor_to_use_more_primordials.patch
  59. 3 3
      patches/v8/build_gn.patch
  60. 4 4
      patches/v8/dcheck.patch
  61. 1 1
      patches/v8/do_not_export_private_v8_symbols_on_windows.patch
  62. 2 2
      patches/v8/export_symbols_needed_for_windows_build.patch
  63. 2 2
      patches/v8/expose_mksnapshot.patch
  64. 1 1
      patches/v8/workaround_an_undefined_symbol_error.patch
  65. 1 1
      script/nan-spec-runner.js
  66. 1 1
      shell/browser/api/electron_api_web_contents.cc
  67. 1 1
      shell/browser/extensions/electron_extension_system.cc
  68. 1 0
      shell/browser/protocol_registry.cc
  69. 4 0
      shell/browser/relauncher.cc
  70. 1 1
      shell/browser/relauncher_win.cc
  71. 1 1
      shell/browser/ui/cocoa/window_buttons_view.mm
  72. 3 2
      shell/browser/ui/inspectable_web_contents.cc
  73. 1 1
      shell/browser/ui/win/jump_list.cc
  74. 1 0
      shell/browser/web_contents_permission_helper.h
  75. 2 1
      shell/common/application_info_win.cc
  76. 1 1
      shell/common/gin_helper/callback.cc
  77. 1 1
      shell/renderer/renderer_client_base.cc

+ 2 - 1
BUILD.gn

@@ -1404,7 +1404,8 @@ dist_zip("hunspell_dictionaries_zip") {
 }
 
 copy("libcxx_headers") {
-  sources = libcxx_headers + libcxx_licenses
+  sources = libcxx_headers + libcxx_licenses +
+            [ "//buildtools/third_party/libc++/__config_site" ]
   outputs = [ "$target_gen_dir/electron_libcxx_include/{{source_root_relative_dir}}/{{source_file_part}}" ]
 }
 

+ 1 - 1
DEPS

@@ -15,7 +15,7 @@ gclient_gn_args = [
 
 vars = {
   'chromium_version':
-    '93.0.4566.0',
+    '93.0.4577.15',
   'node_version':
     'v14.17.0',
   'nan_version':

+ 1 - 0
chromium_src/chrome/browser/process_singleton_win.cc

@@ -4,6 +4,7 @@
 
 #include "chrome/browser/process_singleton.h"
 
+#include <windows.h>
 #include <shellapi.h>
 
 #include "base/base_paths.h"

+ 28 - 3
filenames.libcxx.gni

@@ -13,23 +13,46 @@ libcxx_headers = [
   "//buildtools/third_party/libc++/trunk/include/__functional_base",
   "//buildtools/third_party/libc++/trunk/include/__functional_base_03",
   "//buildtools/third_party/libc++/trunk/include/__hash_table",
+  "//buildtools/third_party/libc++/trunk/include/__iterator/concepts.h",
+  "//buildtools/third_party/libc++/trunk/include/__iterator/incrementable_traits.h",
+  "//buildtools/third_party/libc++/trunk/include/__iterator/iter_move.h",
+  "//buildtools/third_party/libc++/trunk/include/__iterator/iterator_traits.h",
+  "//buildtools/third_party/libc++/trunk/include/__iterator/readable_traits.h",
   "//buildtools/third_party/libc++/trunk/include/__libcpp_version",
   "//buildtools/third_party/libc++/trunk/include/__locale",
+  "//buildtools/third_party/libc++/trunk/include/__memory/addressof.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/allocation_guard.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/allocator.h",
   "//buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h",
-  "//buildtools/third_party/libc++/trunk/include/__memory/base.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/auto_ptr.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/compressed_pair.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/construct_at.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/pointer_safety.h",
   "//buildtools/third_party/libc++/trunk/include/__memory/pointer_traits.h",
-  "//buildtools/third_party/libc++/trunk/include/__memory/utilities.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/raw_storage_iterator.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/temporary_buffer.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_algorithms.h",
+  "//buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h",
   "//buildtools/third_party/libc++/trunk/include/__mutex_base",
   "//buildtools/third_party/libc++/trunk/include/__node_handle",
   "//buildtools/third_party/libc++/trunk/include/__nullptr",
+  "//buildtools/third_party/libc++/trunk/include/__ranges/access.h",
+  "//buildtools/third_party/libc++/trunk/include/__ranges/concepts.h",
+  "//buildtools/third_party/libc++/trunk/include/__ranges/data.h",
+  "//buildtools/third_party/libc++/trunk/include/__ranges/empty.h",
+  "//buildtools/third_party/libc++/trunk/include/__ranges/enable_borrowed_range.h",
+  "//buildtools/third_party/libc++/trunk/include/__ranges/size.h",
+  "//buildtools/third_party/libc++/trunk/include/__ranges/view.h",
   "//buildtools/third_party/libc++/trunk/include/__split_buffer",
-  "//buildtools/third_party/libc++/trunk/include/__sso_allocator",
   "//buildtools/third_party/libc++/trunk/include/__std_stream",
   "//buildtools/third_party/libc++/trunk/include/__string",
   "//buildtools/third_party/libc++/trunk/include/__support/android/locale_bionic.h",
   "//buildtools/third_party/libc++/trunk/include/__support/fuchsia/xlocale.h",
+  "//buildtools/third_party/libc++/trunk/include/__support/ibm/gettod_zos.h",
   "//buildtools/third_party/libc++/trunk/include/__support/ibm/limits.h",
   "//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_aix.h",
+  "//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_zos.h",
   "//buildtools/third_party/libc++/trunk/include/__support/ibm/nanosleep.h",
   "//buildtools/third_party/libc++/trunk/include/__support/ibm/support.h",
   "//buildtools/third_party/libc++/trunk/include/__support/ibm/xlocale.h",
@@ -49,6 +72,7 @@ libcxx_headers = [
   "//buildtools/third_party/libc++/trunk/include/__tree",
   "//buildtools/third_party/libc++/trunk/include/__tuple",
   "//buildtools/third_party/libc++/trunk/include/__undef_macros",
+  "//buildtools/third_party/libc++/trunk/include/__utility/to_underlying.h",
   "//buildtools/third_party/libc++/trunk/include/algorithm",
   "//buildtools/third_party/libc++/trunk/include/any",
   "//buildtools/third_party/libc++/trunk/include/array",
@@ -152,6 +176,7 @@ libcxx_headers = [
   "//buildtools/third_party/libc++/trunk/include/ostream",
   "//buildtools/third_party/libc++/trunk/include/queue",
   "//buildtools/third_party/libc++/trunk/include/random",
+  "//buildtools/third_party/libc++/trunk/include/ranges",
   "//buildtools/third_party/libc++/trunk/include/ratio",
   "//buildtools/third_party/libc++/trunk/include/regex",
   "//buildtools/third_party/libc++/trunk/include/scoped_allocator",

+ 1 - 0
patches/ReactiveObjC/.patches

@@ -1 +1,2 @@
 build_conditionally_import_ext_headers_from_framework_or_from.patch
+chore_explicitly_cast_long_max_to_double.patch

+ 26 - 0
patches/ReactiveObjC/chore_explicitly_cast_long_max_to_double.patch

@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shelley Vohr <[email protected]>
+Date: Thu, 15 Jul 2021 15:53:08 -0400
+Subject: chore: explicitly cast LONG_MAX to double
+
+Fixes a compilation error encountered in Electron as a result of
+Chromium enabling the -Wimplicit-const-int-float-conversion compilation
+flag in https://chromium-review.googlesource.com/c/chromium/src/+/3001416.
+
+Upstreamed at https://github.com/ReactiveCocoa/ReactiveObjC/pull/186.
+
+diff --git a/ReactiveObjC/RACQueueScheduler.m b/ReactiveObjC/RACQueueScheduler.m
+index d9dd189b8fab73f412b2d2fc831041a33368d491..bc6e8d1b5339197c173a1254c0586621dfe5b591 100644
+--- a/ReactiveObjC/RACQueueScheduler.m
++++ b/ReactiveObjC/RACQueueScheduler.m
+@@ -48,8 +48,8 @@ + (dispatch_time_t)wallTimeWithDate:(NSDate *)date {
+ 	double frac = modf(date.timeIntervalSince1970, &seconds);
+ 
+ 	struct timespec walltime = {
+-		.tv_sec = (time_t)fmin(fmax(seconds, LONG_MIN), LONG_MAX),
+-		.tv_nsec = (long)fmin(fmax(frac * NSEC_PER_SEC, LONG_MIN), LONG_MAX)
++		.tv_sec = (time_t)fmin(fmax(seconds, LONG_MIN), (double)LONG_MAX),
++		.tv_nsec = (long)fmin(fmax(frac * NSEC_PER_SEC, LONG_MIN), (double)LONG_MAX)
+ 	};
+ 
+ 	return dispatch_walltime(&walltime, 0);

+ 2 - 1
patches/chromium/.patches

@@ -101,5 +101,6 @@ build_do_not_depend_on_packed_resource_integrity.patch
 don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch
 refactor_restore_base_adaptcallbackforrepeating.patch
 hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
-set_svgimage_page_after_document_install.patch
 add_gin_wrappable_crash_key.patch
+revert_roll_clang_llvmorg-13-init-14732-g8a7b5ebf-2.patch
+update_the_py_wheel_to_a_version_that_is_compatible_with.patch

+ 7 - 7
patches/chromium/add_didinstallconditionalfeatures.patch

@@ -23,10 +23,10 @@ index e24c169444c699f295de2c1f1f42683eeca73436..4675cdccb1876a318a9a0253cdf552bb
                                          int32_t world_id) {}
    virtual void DidClearWindowObject() {}
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index 4dbdc2d4e7c916ed3fd1ed1214bac673220bbec8..9fb54e95510808336effa6ca60a4ce7f2682429a 100644
+index 5f7a44233f04adddf7f5a4cd9b40fc0497961fbc..2ce30e48d579fbd06efb6b8464dce7d483bbd6b3 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -4410,6 +4410,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
+@@ -4420,6 +4420,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
      observer.DidCreateScriptContext(context, world_id);
  }
  
@@ -40,10 +40,10 @@ index 4dbdc2d4e7c916ed3fd1ed1214bac673220bbec8..9fb54e95510808336effa6ca60a4ce7f
                                                 int world_id) {
    for (auto& observer : observers_)
 diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
-index 2dac6465ee3a829e224f00fe6ca08981b728f51d..0eb37a01a5caa291654966b287aca087de6e0bb1 100644
+index 240152022c7d489d81fbadddcb672b02d87443c4..6c8f1e51d646d7925801111ee857af569f28033d 100644
 --- a/content/renderer/render_frame_impl.h
 +++ b/content/renderer/render_frame_impl.h
-@@ -585,6 +585,8 @@ class CONTENT_EXPORT RenderFrameImpl
+@@ -586,6 +586,8 @@ class CONTENT_EXPORT RenderFrameImpl
        blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
    void DidCreateScriptContext(v8::Local<v8::Context> context,
                                int world_id) override;
@@ -67,7 +67,7 @@ index 5e70b0d06e790ad28b647639c0f0a43ab4e6f9cf..6d101dc9c12c9bcbc0993d5ef7ddb8b1
    virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
                                          int32_t world_id) {}
 diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
-index 83b81f4c1fd4232ee5c2b7b1b7b85424164f3acc..bdd4a0031af6f9c2b701979dd469867c018e5753 100644
+index 82750b58500681015be4cd75e9362d235a54c82f..497179aa9b4da053a44513103cdb93fd3fbc94e4 100644
 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 @@ -187,6 +187,7 @@ void LocalWindowProxy::Initialize() {
@@ -123,10 +123,10 @@ index 7ee0cd63a960e1bdb5cc9979827693c5bab7e96d..8486c97f8731ffc77d13e137819a1be8
                                  int32_t world_id) override;
  
 diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
-index 3ca78179b0d262ae2a8f5e5e7b785da78e3c4eb4..02fbe278fcc7d3955ad9e439423737f039274383 100644
+index e405538cf1f520c67bcb72e164c66f4a4859d588..054df6b7718cef2c891eb4d00c95792dde5abd4b 100644
 --- a/third_party/blink/renderer/core/loader/empty_clients.h
 +++ b/third_party/blink/renderer/core/loader/empty_clients.h
-@@ -353,6 +353,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
+@@ -355,6 +355,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
  
    void DidCreateScriptContext(v8::Local<v8::Context>,
                                int32_t world_id) override {}

+ 14 - 14
patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch

@@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView
 This allows us to disable throttling for hidden windows.
 
 diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
-index 7edf048346a2f99ea1aba461861d7775372b4563..2b7eed39bf4a1dbf1b0dec8fd58f9269f791e5df 100644
+index ce54ce5ee0d4f421e34e2ad7c35334b5f608609f..8193988e5e9312dada93a00d38f50931acc57ee9 100644
 --- a/content/browser/renderer_host/render_view_host_impl.cc
 +++ b/content/browser/renderer_host/render_view_host_impl.cc
-@@ -617,6 +617,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
+@@ -628,6 +628,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
    GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
  }
  
@@ -22,10 +22,10 @@ index 7edf048346a2f99ea1aba461861d7775372b4563..2b7eed39bf4a1dbf1b0dec8fd58f9269
    return is_active();
  }
 diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
-index e319cbff63898fe49076844ca3e7a5e8bb8bd164..83439b2b05b79ca02f02767217bb915ba3e51d37 100644
+index 43fb3715553154f261a10bdc2133e66f456f9cd6..7950cc266c525d6e6e12282ac48311e4da1fc418 100644
 --- a/content/browser/renderer_host/render_view_host_impl.h
 +++ b/content/browser/renderer_host/render_view_host_impl.h
-@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
+@@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderViewHostImpl
    bool IsRenderViewLive() override;
    void WriteIntoTrace(perfetto::TracedValue context) override;
  
@@ -61,10 +61,10 @@ index a4e38fd9825fdb2c16f728d8012bb2392cb31dfe..2239f82411d0ba73b95020e18d383850
    // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put
    // it in the same order in the .cc file as it was in the header.
 diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
-index a428fe70d2ca5f21a529e881e41d87f4ba46ed32..8af5470ee168ae49ef3764c28c39e08b3fdbd1a7 100644
+index 8521520bb9ea48686096480700966dabae1de777..a9ef1a5f2ad6882308790cf571a3099815e68f80 100644
 --- a/third_party/blink/public/mojom/page/page.mojom
 +++ b/third_party/blink/public/mojom/page/page.mojom
-@@ -77,4 +77,7 @@ interface PageBroadcast {
+@@ -80,4 +80,7 @@ interface PageBroadcast {
  
    // Sent to whole page, but should only be used by the main frame.
    SetPageBaseBackgroundColor(skia.mojom.SkColor? color);
@@ -73,10 +73,10 @@ index a428fe70d2ca5f21a529e881e41d87f4ba46ed32..8af5470ee168ae49ef3764c28c39e08b
 +  SetSchedulerThrottling(bool allowed);
  };
 diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
-index 04906f28c8e03f1692690713b2ca5c9e3b188236..c4e453bb2dfa1857e73ac4dcc1e202e7a378acf6 100644
+index f54b993e9fb9fedcedef327290c2e5d706c699a7..73874e124e2810f07b72fc094f57c85c0fcf1dbb 100644
 --- a/third_party/blink/public/web/web_view.h
 +++ b/third_party/blink/public/web/web_view.h
-@@ -363,6 +363,7 @@ class WebView {
+@@ -366,6 +366,7 @@ class WebView {
    // Scheduling -----------------------------------------------------------
  
    virtual PageScheduler* Scheduler() const = 0;
@@ -85,10 +85,10 @@ index 04906f28c8e03f1692690713b2ca5c9e3b188236..c4e453bb2dfa1857e73ac4dcc1e202e7
    // Visibility -----------------------------------------------------------
  
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
-index c91848389bebee7e25e8243f1490e1fff6db638a..d0f12dd329ac67e635ce39601b9939ffceddc0c0 100644
+index 2f9022d37ab989ea5bc2946ff6f0aeff22bf9fab..c493aa8366366da89f642d77838169deda8b210a 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
-@@ -3577,6 +3577,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
+@@ -3594,6 +3594,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
    return GetPage()->GetPageScheduler();
  }
  
@@ -102,7 +102,7 @@ index c91848389bebee7e25e8243f1490e1fff6db638a..d0f12dd329ac67e635ce39601b9939ff
  void WebViewImpl::SetVisibilityState(
      mojom::blink::PageVisibilityState visibility_state,
      bool is_initial_state) {
-@@ -3588,7 +3595,8 @@ void WebViewImpl::SetVisibilityState(
+@@ -3605,7 +3612,8 @@ void WebViewImpl::SetVisibilityState(
    }
    GetPage()->SetVisibilityState(visibility_state, is_initial_state);
    GetPage()->GetPageScheduler()->SetPageVisible(
@@ -113,10 +113,10 @@ index c91848389bebee7e25e8243f1490e1fff6db638a..d0f12dd329ac67e635ce39601b9939ff
  
  mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
-index 07afcf4eb67fb5cb51f94ba0055f101481014f8f..f3e9a9fd15ffe4072c8d30a563329efd23c39aa6 100644
+index 97e3d30f1427b56d4711ca358bef74397affa480..faf957547df2a80f4fa267733f6145776a865853 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.h
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.h
-@@ -412,6 +412,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -414,6 +414,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    LocalDOMWindow* PagePopupWindow() const;
  
    PageScheduler* Scheduler() const override;
@@ -124,7 +124,7 @@ index 07afcf4eb67fb5cb51f94ba0055f101481014f8f..f3e9a9fd15ffe4072c8d30a563329efd
    void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
                            bool is_initial_state) override;
    mojom::blink::PageVisibilityState GetVisibilityState() override;
-@@ -838,6 +839,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -845,6 +846,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    // If true, we send IPC messages when |preferred_size_| changes.
    bool send_preferred_size_changes_ = false;
  

+ 6 - 6
patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch

@@ -35,7 +35,7 @@ index 8a1315f7f89588bb21c6d3c21a7de7c07fed9679..51cc790f7e1ba1440a6ffaa56c9e0168
        accelerated_video_decode_enabled(false),
        animation_policy(
 diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
-index c6b92861449ffd929b03971fb62efc18305eb1fe..ce78fe29ab799944c2c3d7b41a0c44b970b11d05 100644
+index a264ef99beb81dd6b1f55c1b0f57f6055b4ab771..ff4d5c5245ba0641b4ef02cdaf5d50be537b709e 100644
 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
 +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
 @@ -23,6 +23,10 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -49,7 +49,7 @@ index c6b92861449ffd929b03971fb62efc18305eb1fe..ce78fe29ab799944c2c3d7b41a0c44b9
        !data.ReadLazyFrameLoadingDistanceThresholdsPx(
            &out->lazy_frame_loading_distance_thresholds_px) ||
        !data.ReadLazyImageLoadingDistanceThresholdsPx(
-@@ -155,6 +159,21 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
+@@ -156,6 +160,21 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
        data.fake_no_alloc_direct_call_for_testing_enabled();
    out->v8_cache_options = data.v8_cache_options();
    out->record_whole_document = data.record_whole_document();
@@ -109,7 +109,7 @@ index 4517bf43c1b80f1aa0f3ba8e67e78b8b91e19f8a..492f6c948af74bb925826a1075e6343f
    // only controls whether or not the "document.cookie" field is properly
    // connected to the backing store, for instance if you wanted to be able to
 diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
-index 0313bac28edf43e84c6e914f85af75fb541bb7ea..6eedfe15cc02b3c1ee531a94d77f8d4e04feb11f 100644
+index 9dbbb581a8876430c3e0a39df1ff655d3ddc6d2d..fd6cbcfa1992a75bf660fb9eb47a9099acb3834f 100644
 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
 +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
 @@ -6,6 +6,7 @@
@@ -120,7 +120,7 @@ index 0313bac28edf43e84c6e914f85af75fb541bb7ea..6eedfe15cc02b3c1ee531a94d77f8d4e
  #include "mojo/public/cpp/bindings/struct_traits.h"
  #include "net/nqe/effective_connection_type.h"
  #include "third_party/blink/public/common/common_export.h"
-@@ -446,6 +447,68 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
+@@ -451,6 +452,68 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
      return r.record_whole_document;
    }
  
@@ -190,7 +190,7 @@ index 0313bac28edf43e84c6e914f85af75fb541bb7ea..6eedfe15cc02b3c1ee531a94d77f8d4e
      return r.cookie_enabled;
    }
 diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
-index 121ea7b186d6cadc0d3a9ebbca64ca9a1563e8f2..a0c29218cf5196a248dc93e76d5a50a242fb0a9c 100644
+index eaecb8c2b7dadaf7650bc8ac85cbad4383035e67..7863c865df17fa95965b5a4e543579bac22af90b 100644
 --- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
 +++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
 @@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom";
@@ -201,7 +201,7 @@ index 121ea7b186d6cadc0d3a9ebbca64ca9a1563e8f2..a0c29218cf5196a248dc93e76d5a50a2
  
  enum PointerType {
    kPointerNone                              = 1,             // 1 << 0
-@@ -213,6 +214,24 @@ struct WebPreferences {
+@@ -214,6 +215,24 @@ struct WebPreferences {
    V8CacheOptions v8_cache_options;
    bool record_whole_document;
  

+ 3 - 3
patches/chromium/blink_local_frame.patch

@@ -49,10 +49,10 @@ index 8bf6b4bc077cc41da5e0e6b13302bc343537c68f..01bddc0bcb7476408023c4cfc042a088
    // its owning reference back to our owning LocalFrame.
    client_->Detached(type);
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
-index 3c99fb90f5b02a3f10f70cd8d1773bedb5b961a2..08e2da6c1f1cbe8ddedd69f5291c089a84347110 100644
+index c0f2ba8de2f770f445e7a85542add2593346ed05..fb26074fa376bba0339269a23d02ddc38e910e3d 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -808,10 +808,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -563,10 +563,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
    }
    DCHECK(!view_ || !view_->IsAttached());
  
@@ -63,7 +63,7 @@ index 3c99fb90f5b02a3f10f70cd8d1773bedb5b961a2..08e2da6c1f1cbe8ddedd69f5291c089a
    if (!Client())
      return false;
  
-@@ -858,6 +854,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -613,6 +609,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
    DCHECK(!view_->IsAttached());
    Client()->WillBeDetached();
  

+ 9 - 9
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 7cf86d58523fad6e9ae2f50ede21a40c8162b4a9..e1be9bec16f2c40d2d300f3f0ea6800a867e95fd 100644
+index e7dda63b94aebaf45cf25af0bc101698d44fc44b..feb624f77466de6bf1ea398dc8274231dac432fa 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -165,11 +165,16 @@ if (!is_android && !is_mac) {
+@@ -164,11 +164,16 @@ if (!is_android && !is_mac) {
          "common/crash_keys.h",
        ]
  
@@ -33,10 +33,10 @@ index 7cf86d58523fad6e9ae2f50ede21a40c8162b4a9..e1be9bec16f2c40d2d300f3f0ea6800a
          "//base",
          "//build:branding_buildflags",
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index afee595b9776d7e80cb3f68bd80e0c5b859a1fca..d103c44367ac09f68757053a55d25378c5ebf452 100644
+index 17e03f58263b5254cec991386536286de3b41600..65fdfcec6894249996fa12b9471362475620cfd7 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -4301,7 +4301,7 @@ static_library("browser") {
+@@ -4306,7 +4306,7 @@ static_library("browser") {
  
      # On Windows, the hashes are embedded in //chrome:chrome_initial rather
      # than here in :chrome_dll.
@@ -46,10 +46,10 @@ index afee595b9776d7e80cb3f68bd80e0c5b859a1fca..d103c44367ac09f68757053a55d25378
      }
  
 diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
-index 5ee912d147e0abba21a1da3829fd562095de2f3a..cee730b37e9aa3f77399a2002985924ba904439e 100644
+index 1625f8917ac257f11f4637ea60eca586ec2492a3..dc0f43e955994fba9dc597c08133a4438ebf1c45 100644
 --- a/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
-@@ -5245,7 +5245,6 @@ test("unit_tests") {
+@@ -5281,7 +5281,6 @@ test("unit_tests") {
      assert(toolkit_views)
      sources += [ "../browser/ui/startup/credential_provider_signin_info_fetcher_win_unittest.cc" ]
      deps += [
@@ -57,7 +57,7 @@ index 5ee912d147e0abba21a1da3829fd562095de2f3a..cee730b37e9aa3f77399a2002985924b
        "//chrome/browser:chrome_process_finder",
        "//chrome/browser/safe_browsing/chrome_cleaner",
        "//chrome/browser/safe_browsing/chrome_cleaner:public",
-@@ -5258,6 +5257,12 @@ test("unit_tests") {
+@@ -5294,6 +5293,12 @@ test("unit_tests") {
        "//components/chrome_cleaner/public/proto",
        "//ui/events/devices:test_support",
      ]
@@ -70,7 +70,7 @@ index 5ee912d147e0abba21a1da3829fd562095de2f3a..cee730b37e9aa3f77399a2002985924b
    }
  
    if (is_win || is_chromeos_ash || is_mac) {
-@@ -5819,7 +5824,6 @@ test("unit_tests") {
+@@ -5858,7 +5863,6 @@ test("unit_tests") {
      }
  
      deps += [
@@ -78,7 +78,7 @@ index 5ee912d147e0abba21a1da3829fd562095de2f3a..cee730b37e9aa3f77399a2002985924b
        "//chrome/browser:cart_db_content_proto",
        "//chrome/browser/media/router:test_support",
        "//chrome/browser/promo_browser_command:mojo_bindings",
-@@ -5854,6 +5858,9 @@ test("unit_tests") {
+@@ -5893,6 +5897,9 @@ test("unit_tests") {
        "//ui/color:test_support",
        "//ui/native_theme:test_support",
      ]

+ 3 - 3
patches/chromium/build_libc_as_static_library.patch

@@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass
 nan tests
 
 diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
-index 0dd09de1ac6474aecf1d5b3086638825df094967..da648d20ec590671ed2afaf0694272cbcc397da1 100644
+index 01d122aa78f15e0c94b1ee8ae54e08dace0aca0d..5ed9952afd4f4331c98ad41b7d79936794056ce8 100644
 --- a/buildtools/third_party/libc++/BUILD.gn
 +++ b/buildtools/third_party/libc++/BUILD.gn
-@@ -32,7 +32,11 @@ config("winver") {
+@@ -41,7 +41,11 @@ config("winver") {
  if (libcxx_is_shared) {
    _libcxx_target_type = "shared_library"
  } else {
@@ -23,7 +23,7 @@ index 0dd09de1ac6474aecf1d5b3086638825df094967..da648d20ec590671ed2afaf0694272cb
  }
  target(_libcxx_target_type, "libc++") {
    # Most things that need to depend on libc++ should do so via the implicit
-@@ -40,6 +44,7 @@ target(_libcxx_target_type, "libc++") {
+@@ -49,6 +53,7 @@ target(_libcxx_target_type, "libc++") {
    # need to explicitly depend on libc++.
    visibility = [
      "//build/config:common_deps",

+ 17 - 17
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 ec108a1471389763cb74c5edaa857f9ac9cf35f9..6dfd547b9e6c4e345af79d4875be95fb6a6d8bb0 100644
+index 01bf04ee4615101070ef14abad57a6a75d8359cc..c57f9f72abe841d31e0dd14924e73cb565e9d226 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -6223,6 +6223,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -6263,6 +6263,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,
@@ -21,10 +21,10 @@ index ec108a1471389763cb74c5edaa857f9ac9cf35f9..6dfd547b9e6c4e345af79d4875be95fb
            &no_javascript_access);
  
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 8eb069f0c29d814d8897589720690c38d3d95730..e590e0959e7aa77f562dc69fc6bd4b2da10ea001 100644
+index ce65fbf4c4e62a1e3e81dbaf9abbb1360551ba9d..26b280ec0aac4d3caf552a94f39f1a1fe798db31 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3777,6 +3777,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -3729,6 +3729,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
    }
    auto* new_contents_impl = new_contents.get();
  
@@ -39,7 +39,7 @@ index 8eb069f0c29d814d8897589720690c38d3d95730..e590e0959e7aa77f562dc69fc6bd4b2d
    new_contents_impl->GetController().SetSessionStorageNamespace(
        partition_id, session_storage_namespace);
  
-@@ -3819,12 +3827,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -3771,12 +3779,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
      AddWebContentsDestructionObserver(new_contents_impl);
    }
  
@@ -53,10 +53,10 @@ index 8eb069f0c29d814d8897589720690c38d3d95730..e590e0959e7aa77f562dc69fc6bd4b2d
                               new_contents_impl, opener, params.target_url,
                               params.referrer.To<Referrer>(), params.disposition,
 diff --git a/content/common/frame.mojom b/content/common/frame.mojom
-index be6f44b67f0d1b302bcbda2afee45fcef8df4ffc..b124bd5ebc5fef4b464309229c5fb155f955810d 100644
+index 192a5084eac3e9426ac8ddc4984b572d55c7a88a..63f53ff39240ea59a03f1a6f9d032444b0e4214d 100644
 --- a/content/common/frame.mojom
 +++ b/content/common/frame.mojom
-@@ -520,6 +520,10 @@ struct CreateNewWindowParams {
+@@ -523,6 +523,10 @@ struct CreateNewWindowParams {
    // The impression associated with the navigation in the new window, if
    // one is specified.
    blink.mojom.Impression? impression;
@@ -68,10 +68,10 @@ index be6f44b67f0d1b302bcbda2afee45fcef8df4ffc..b124bd5ebc5fef4b464309229c5fb155
  
  // 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 0703cbb93d207e8d6529cc6005e5e66091ba03f0..dd18f6b137ae5c724400d4229a2867474824dc56 100644
+index b5022114e4e196f8fc038b4a2079356596696bc0..9a16e8a4d35552712f154dc03df0564d169c377c 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
-@@ -562,6 +562,8 @@ bool ContentBrowserClient::CanCreateWindow(
+@@ -563,6 +563,8 @@ bool ContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -81,7 +81,7 @@ index 0703cbb93d207e8d6529cc6005e5e66091ba03f0..dd18f6b137ae5c724400d4229a286747
      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 6000d0326898e33cdf4b311c88e5400d8be71ed2..7430e483567b227630bc42933820e2d4e5559ed7 100644
+index 799490ac3f7c03cb804ef1151b3b65768a760bc8..8093584705481dee6d4557713773318461a02869 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -160,6 +160,7 @@ class NetworkService;
@@ -150,7 +150,7 @@ index 0574d390dc94aa1d17dfa9db805f846024b7956f..a2a3550272da12eee911a7ef0d9a21dd
    // typically happens when popups are created.
    virtual void WebContentsCreated(WebContents* source_contents,
 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
-index 47c22b08e854b4aab1a169b1194753151b06823b..42d28521717035691839610af491ddb8d4065969 100644
+index 30882aa4a8082a6597e1c8c0c26cc98c4e75bff7..612656c87f3565c5cfa7c0a52feff84a48d7334b 100644
 --- a/content/renderer/render_view_impl.cc
 +++ b/content/renderer/render_view_impl.cc
 @@ -27,6 +27,7 @@
@@ -173,10 +173,10 @@ index 47c22b08e854b4aab1a169b1194753151b06823b..42d28521717035691839610af491ddb8
    // 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 d21606dd0a194a645decdc81a0c1390e0492ded0..c015934debd27937d583269950c2e2d5dc82cd53 100644
+index 60ebbacfabc9b1791426f94f164e4caa7e101ba1..8154d86c25653e318914dd93be535a0a5755f5a2 100644
 --- a/content/web_test/browser/web_test_content_browser_client.cc
 +++ b/content/web_test/browser/web_test_content_browser_client.cc
-@@ -451,6 +451,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
+@@ -453,6 +453,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -186,10 +186,10 @@ index d21606dd0a194a645decdc81a0c1390e0492ded0..c015934debd27937d583269950c2e2d5
      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 c65d30c9187dd275488ed74bcc3a4eb918d2cbce..e4c6c828150e91f555b1b42e1988a1013ab1a1f0 100644
+index c07dcf60d6e329b13b97815bc0027982c3e017d3..a0bf8a3b88986b9ec0aae41b3085a056259a206d 100644
 --- a/content/web_test/browser/web_test_content_browser_client.h
 +++ b/content/web_test/browser/web_test_content_browser_client.h
-@@ -83,6 +83,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
+@@ -85,6 +85,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
                         const std::string& frame_name,
                         WindowOpenDisposition disposition,
                         const blink::mojom::WindowFeatures& features,
@@ -220,10 +220,10 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc
  
  }  // 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 0794b4943b54275033d3b0d563dee8ab37ccb031..e96e1beea473ba276abeee7103dec72f3d33d37b 100644
+index 45756c14985716121f17c5d3cd29f2806dde27eb..61bec75d4a144e094f79053f86173f0e9af96412 100644
 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc
 +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
-@@ -1990,6 +1990,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
+@@ -1991,6 +1991,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
  
    WebWindowFeatures window_features =
        GetWindowFeaturesFromString(features, incumbent_window);

+ 12 - 12
patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch

@@ -140,10 +140,10 @@ index ef84e04d628fb5cdbaf8fbbf84af3bf23e00c522..f1ee0bee5bfd08227a29498f8410d5d3
    }
  
 diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
-index 8a1af8eb8efd51d51e9ea4155dc55a493673a74b..563a95d6ee87d61b086d7aa822a5c547c4bbaf1e 100644
+index 8fdddbadf5e9a202fc20ac9e326a4631f91f4a0d..4d2dc5f30fd7d17adaa6f05aa5a2b23854c543c6 100644
 --- a/chrome/browser/ui/browser.cc
 +++ b/chrome/browser/ui/browser.cc
-@@ -1786,12 +1786,11 @@ bool Browser::IsWebContentsCreationOverridden(
+@@ -1785,12 +1785,11 @@ bool Browser::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -159,7 +159,7 @@ index 8a1af8eb8efd51d51e9ea4155dc55a493673a74b..563a95d6ee87d61b086d7aa822a5c547
  
  WebContents* Browser::CreateCustomWebContents(
 diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
-index ab9c5fb85f83b2ffb04bf21be631d38cfacd8835..6166d92517629ce17b48845f30c2086ce26ceabf 100644
+index 2908b4b70815d02afff0c78c1aa54ab74c79dd83..4c469294529851a975384657567a62ece4d03f37 100644
 --- a/chrome/browser/ui/browser.h
 +++ b/chrome/browser/ui/browser.h
 @@ -803,8 +803,7 @@ class Browser : public TabStripModelObserver,
@@ -264,10 +264,10 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee
    void AddNewContents(content::WebContents* source,
                        std::unique_ptr<content::WebContents> new_contents,
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index d7000889cb90ffaf7eddb01df33b12d768ef71aa..0d18a4b79f72a8b8ad93aecb1ee4fe49a2699aaf 100644
+index 534bd5132267ae883e181e688acf9f68647361fe..5939da8d016b245b9ce322764b90015463c2c2d3 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3725,8 +3725,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -3677,8 +3677,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
  
    if (delegate_ && delegate_->IsWebContentsCreationOverridden(
                         source_site_instance, params.window_container_type,
@@ -362,7 +362,7 @@ index bb90319f768ed2f3a3e530d64bf622de585ce163..d84de1d218267887f6b8624f913438eb
        content::RenderFrameHost* opener,
        content::SiteInstance* source_site_instance,
 diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
-index 533c51eadf822ef69b530c81d57503d0b486214e..63a130af5fc0b8f0d88736c381cbdaa6ec5ae363 100644
+index bfe73ea9811890f3a0175f2b8cd14459fec980c1..fc4a2a879cd4b1914849b5cadba78caf4c16d804 100644
 --- a/fuchsia/engine/browser/frame_impl.cc
 +++ b/fuchsia/engine/browser/frame_impl.cc
 @@ -388,8 +388,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -376,10 +376,10 @@ index 533c51eadf822ef69b530c81d57503d0b486214e..63a130af5fc0b8f0d88736c381cbdaa6
    // can catch bad client behavior while not interfering with normal operation.
    constexpr size_t kMaxPendingWebContentsCount = 10;
 diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h
-index a9e134ba416af9ca27c580892bd1c4599912ec82..39ddf61c9506b6bb12b3fe51e0a1cabacd3ece70 100644
+index e2736c5329d9516fdd417df4dff8039f991e800e..11081373e0d70e7ec366c6917c21db61c4e18cca 100644
 --- a/fuchsia/engine/browser/frame_impl.h
 +++ b/fuchsia/engine/browser/frame_impl.h
-@@ -242,8 +242,7 @@ class FrameImpl : public fuchsia::web::Frame,
+@@ -245,8 +245,7 @@ class FrameImpl : public fuchsia::web::Frame,
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,
@@ -404,10 +404,10 @@ index dd1f6129173a0e19023f4ec9b66c44486b080456..d10468c06f84b59387af0a8fd5bc1c06
          ->options()
          ->block_new_web_contents();
 diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
-index 606f82c4e9708c4099425603b6e8c3e6859f088b..b8a2dfb475c0ca9ae24901ca31bb92f328827bf7 100644
+index aba1ecfde2be3371099bf9c729794b22a8849f02..8919bf1cab7a3bc3faac10ed0d86b9390af009b8 100644
 --- a/ui/views/controls/webview/web_dialog_view.cc
 +++ b/ui/views/controls/webview/web_dialog_view.cc
-@@ -438,8 +438,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
+@@ -426,8 +426,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -418,10 +418,10 @@ index 606f82c4e9708c4099425603b6e8c3e6859f088b..b8a2dfb475c0ca9ae24901ca31bb92f3
      return delegate_->HandleShouldOverrideWebContentsCreation();
    return false;
 diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
-index 978155add287e3ce57ece8db0b142a7154b378b0..7bdfe79c5c77f91cdd59df65761504b1f532b2e4 100644
+index d4d633809610215c589405d20e1137280c55468b..f66a83101c5e5518705c4d23ad963bf0a170241e 100644
 --- a/ui/views/controls/webview/web_dialog_view.h
 +++ b/ui/views/controls/webview/web_dialog_view.h
-@@ -160,8 +160,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
+@@ -155,8 +155,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,

+ 2 - 2
patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch

@@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources.  We need to load these from
 Electrons grit header instead of Chromes
 
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 332ffb9189d134a77f7ada0be1c2f5162365eb53..afee595b9776d7e80cb3f68bd80e0c5b859a1fca 100644
+index 0d81f08e66b1e20f0420b257ac80ca83ca96c23b..17e03f58263b5254cec991386536286de3b41600 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -6458,6 +6458,7 @@ static_library("browser") {
+@@ -6495,6 +6495,7 @@ static_library("browser") {
      deps += [
        "//components/spellcheck/browser",
        "//components/spellcheck/common",

+ 2 - 2
patches/chromium/dcheck.patch

@@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the
 failing checks and allow the rest of the target to have them enabled.
 
 diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
-index 45ffed0f1879ab237b51a03cda7e1168209662de..3952ca42195ad4d201a7aac04908282b98016615 100644
+index a9fd6d67f9eae14034cb68d338af3f26714d9b6a..e29ff71aaae6ef1f758689d2be13a6249fc61f53 100644
 --- a/ui/base/clipboard/clipboard_win.cc
 +++ b/ui/base/clipboard/clipboard_win.cc
-@@ -908,10 +908,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
+@@ -907,10 +907,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
  
  void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
    UINT cf_format = format.ToFormatEtc().cfFormat;

+ 3 - 3
patches/chromium/desktop_media_list.patch

@@ -24,10 +24,10 @@ the implementation in a given frame.
 This patch allows us to get the one-shot effect with the above classes.
 
 diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h
-index d7b52b0d1b8cfb823513303ec0f6322d8dc8d153..f2dbf39f81abfc6fde4064345ab0d222ee98438c 100644
+index 9663606890f30c82500118b8338ced4e84a69423..ff3d103e35c9809d4291942f1bb56a535870aad4 100644
 --- a/chrome/browser/media/webrtc/desktop_media_list.h
 +++ b/chrome/browser/media/webrtc/desktop_media_list.h
-@@ -52,6 +52,9 @@ class DesktopMediaList {
+@@ -49,6 +49,9 @@ class DesktopMediaList {
  
    virtual ~DesktopMediaList() {}
  
@@ -37,7 +37,7 @@ index d7b52b0d1b8cfb823513303ec0f6322d8dc8d153..f2dbf39f81abfc6fde4064345ab0d222
    // Sets time interval between updates. By default list of sources and their
    // thumbnail are updated once per second. If called after StartUpdating() then
    // it will take effect only after the next update.
-@@ -83,6 +86,7 @@ class DesktopMediaList {
+@@ -80,6 +83,7 @@ class DesktopMediaList {
  
    virtual int GetSourceCount() const = 0;
    virtual const Source& GetSource(int index) const = 0;

+ 7 - 7
patches/chromium/disable_color_correct_rendering.patch

@@ -20,7 +20,7 @@ to deal with color spaces. That is being tracked at
 https://crbug.com/634542 and https://crbug.com/711107.
 
 diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
-index 41a143a1cb391b038600ab648bb8ce7d40157297..fa0b01f1420846d4c39a5631304259cc3a06b671 100644
+index 317e9d6467f9b7c2f110f2c7579f693ab997c3e7..faa71c20ad0507fa6203fb642c9d27019bc0c350 100644
 --- a/cc/trees/layer_tree_host_impl.cc
 +++ b/cc/trees/layer_tree_host_impl.cc
 @@ -1799,6 +1799,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -48,7 +48,7 @@ index bd5bcf4a03022869fe610015e882ff1980d8a0e8..a3fdd7ae208719bd10ddf1044a501e44
    // Image Decode Service and raster tiles without images until the decode is
    // ready.
 diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h
-index b7c9b29c0888fa77c0ab7b4701d7ed1f1d91352e..a6684ff01cb36ce0a58f1c3c9473066e4807e0e2 100644
+index e58b4023652785fa8ea47236a5ad7237c7ea6ed2..4ec673ea93410ee00b1af4330fdc8b5267ed6dfa 100644
 --- a/components/viz/common/display/renderer_settings.h
 +++ b/components/viz/common/display/renderer_settings.h
 @@ -24,6 +24,7 @@ class VIZ_COMMON_EXPORT RendererSettings {
@@ -81,7 +81,7 @@ index f919df4d79a1168269c1538ac13a2a944586cf4e..fc34cf5d7dab95e7b6fc0576674b3e2b
        !command_line->HasSwitch(switches::kUIDisablePartialSwap);
  
 diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
-index 2f14ea88d9bba70a0f93bf8507952163226b1191..114379c1065ad2fceba3b46e513048bff2cd1f7a 100644
+index 2cd58b05621c11ccda6163cb471b719015b74379..1911003301766cbf05ce0f0b828b8faf971a1dbc 100644
 --- a/components/viz/service/display/gl_renderer.cc
 +++ b/components/viz/service/display/gl_renderer.cc
 @@ -90,6 +90,9 @@
@@ -222,7 +222,7 @@ index 2f14ea88d9bba70a0f93bf8507952163226b1191..114379c1065ad2fceba3b46e513048bf
  
    gfx::Transform render_matrix;
    render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
-@@ -4488,3 +4500,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
+@@ -4487,3 +4499,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
  GLRenderer::OverlayTexture::~OverlayTexture() = default;
  
  }  // namespace viz
@@ -241,10 +241,10 @@ index 59b34cdb1dc63b8d239cae5397b2a5a4f607bf1c..e2f556532459b1129465ca2b83aa1485
      sandbox::policy::switches::kGpuSandboxAllowSysVShm,
      sandbox::policy::switches::kGpuSandboxFailuresFatal,
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index 65c5fa70ee04fe5285979a93ab67449137dae304..c1192715d78ab9cc4558b398c4fb72a12b1c05cd 100644
+index 224e23ad3584dd4511a4173d632547d4a2ee4e9c..0dbb7fad5c9f3b3889b0825d553992d6fe2745f9 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -216,6 +216,7 @@
+@@ -217,6 +217,7 @@
  #include "ui/accessibility/accessibility_switches.h"
  #include "ui/base/ui_base_switches.h"
  #include "ui/display/display_switches.h"
@@ -252,7 +252,7 @@ index 65c5fa70ee04fe5285979a93ab67449137dae304..c1192715d78ab9cc4558b398c4fb72a1
  #include "ui/gl/gl_switches.h"
  #include "ui/native_theme/native_theme_features.h"
  #include "url/origin.h"
-@@ -3374,6 +3375,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
+@@ -3368,6 +3369,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
    // Propagate the following switches to the renderer command line (along
    // with any associated values) if present in the browser command line.
    static const char* const kSwitchNames[] = {

+ 3 - 3
patches/chromium/disable_hidden.patch

@@ -6,7 +6,7 @@ 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 0d77511c47610b8f54f9ceab2956c069d54bd4d8..a2227fabbafb9a5e162c063d2aaa494f78cdd610 100644
+index c2356a3d97bfe1c8bad4f8ff24944dc0fe65a2b1..a322cbb59322d81b253f3a261fff37b9a89837ce 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
 @@ -769,6 +769,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -20,7 +20,7 @@ index 0d77511c47610b8f54f9ceab2956c069d54bd4d8..a2227fabbafb9a5e162c063d2aaa494f
        blink::mojom::PointerLockResult::kWrongDocument);
  
 diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
-index bdba3cf07542d494c45ef9167642898b196f06cc..db5eb3b795ab2442058dbf16375f5f132a80a61f 100644
+index d082d920c4124b38f1e0358f065ab9b6a18baa76..f966eb89e61a56571d8478f385d5623a119956b5 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
 @@ -855,6 +855,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -34,7 +34,7 @@ index bdba3cf07542d494c45ef9167642898b196f06cc..db5eb3b795ab2442058dbf16375f5f13
    // |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 0e606f2383a3352035b40b25c619695fedbe6125..8f36d0d0ede3b5e87dad5350df5e70dc5c254a31 100644
+index 2e653492a9093053b5966c089779c07e2de5fdca..464b99f528f59b94fdecd80db993e6ede6341671 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
 @@ -594,7 +594,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 a5cb0c1497531a77881b24fc0fad3a8c9c848f1e..60822a341d99dde6341dbe5d481fa50f618cf0ef 100644
+index 8d14c49f2dc83a538118fb478b24e5f687814a04..064af99748a7c45744f45917e2575c531ec2ba00 100644
 --- a/content/browser/renderer_host/navigator.cc
 +++ b/content/browser/renderer_host/navigator.cc
-@@ -1074,6 +1074,7 @@ void Navigator::RecordNavigationMetrics(
+@@ -1092,6 +1092,7 @@ void Navigator::RecordNavigationMetrics(
              .InMilliseconds());
    }
  
@@ -35,7 +35,7 @@ index a5cb0c1497531a77881b24fc0fad3a8c9c848f1e..60822a341d99dde6341dbe5d481fa50f
    // 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 &&
-@@ -1120,6 +1121,7 @@ void Navigator::RecordNavigationMetrics(
+@@ -1138,6 +1139,7 @@ void Navigator::RecordNavigationMetrics(
           first_before_unload_start_time)
              .InMilliseconds());
    }

+ 2 - 2
patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch

@@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
 Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
 
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index 9fb54e95510808336effa6ca60a4ce7f2682429a..196e6277f990776783105b7d3660c1cded1073d2 100644
+index 2ce30e48d579fbd06efb6b8464dce7d483bbd6b3..71f8b79a09ff12482f530e94a0b22503f4a66a65 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -2356,7 +2356,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
+@@ -2355,7 +2355,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
  }
  
  const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {

+ 4 - 4
patches/chromium/expose_setuseragent_on_networkcontext.patch

@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
    DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
  };
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index f513f1c8bc33136f58f7bc3de2bb3590af9a153f..ded56333f882e2975116fe45ba6898c9a589cf93 100644
+index 83fde65c34f12fee6b2ef867f94fdd31252b60cf..c5012949a034f12ca466f5e5e791a1f4569d813f 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -1184,6 +1184,13 @@ void NetworkContext::SetNetworkConditions(
+@@ -1195,6 +1195,13 @@ void NetworkContext::SetNetworkConditions(
                                        std::move(network_conditions));
  }
  
@@ -63,10 +63,10 @@ index 1f09e757f9ac7f9f101066beddbd2f540cfd5b7d..43b461c1fa12ed38975a90a089876200
    void SetEnableReferrers(bool enable_referrers) override;
  #if BUILDFLAG(IS_CHROMEOS_ASH)
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index ebbdeaa440514740b672bbf722c31d58d254cd8f..a9c8d07092579043b176b78401474080423e112a 100644
+index 5dfc30d2feb37f78dd6eac088366a0dc3e1cf8e4..1da7a1d0103057df3b95f472f3b98c22d081fd8c 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -952,6 +952,9 @@ interface NetworkContext {
+@@ -957,6 +957,9 @@ interface NetworkContext {
    SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
                         NetworkConditions? conditions);
  

+ 2 - 2
patches/chromium/extend_apply_webpreferences.patch

@@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
 done in future work.
 
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
-index d0f12dd329ac67e635ce39601b9939ffceddc0c0..fdeb405ada2ecafec58c22966d3b8508e67d8120 100644
+index c493aa8366366da89f642d77838169deda8b210a..7bd00ed55390c3af46c89439cc92736669429e4b 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
 @@ -155,6 +155,7 @@
@@ -23,7 +23,7 @@ index d0f12dd329ac67e635ce39601b9939ffceddc0c0..fdeb405ada2ecafec58c22966d3b8508
  #include "third_party/blink/renderer/platform/graphics/image.h"
  #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
  #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
-@@ -1781,6 +1782,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
+@@ -1794,6 +1795,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
  #if defined(OS_MAC)
    web_view_impl->SetMaximumLegibleScale(
        prefs.default_maximum_page_scale_factor);

+ 2 - 2
patches/chromium/feat_add_onclose_to_messageport.patch

@@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a
 whole bunch more useful!
 
 diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
-index cc07bc2680c8d287369b626efb0889bf8359b863..dac42ab3a11d1a01e948e979f56502e1525e0727 100644
+index c5714d115210488cb531c1e54de540f429636638..6f67b21803fcdc2498ef207878d1541e04822fca 100644
 --- a/third_party/blink/renderer/core/messaging/message_port.cc
 +++ b/third_party/blink/renderer/core/messaging/message_port.cc
-@@ -159,6 +159,7 @@ void MessagePort::close() {
+@@ -161,6 +161,7 @@ void MessagePort::close() {
      Entangle(pipe.TakePort0());
    }
    closed_ = true;

+ 5 - 5
patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch

@@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
 We can remove this patch once it has in some shape been upstreamed.
 
 diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
-index cfacc084fe300f0d2863183723b4126f69b1377a..9278659d6b25b55518d2eee41ac845458358912a 100644
+index 7a09fd387933897025f4ff03ca798811aa5013a6..abebf78242030a2c28d9d6b85b1d87cdaabd4884 100644
 --- a/ui/native_theme/native_theme.cc
 +++ b/ui/native_theme/native_theme.cc
-@@ -136,6 +136,8 @@ absl::optional<SkColor> NativeTheme::GetColorProviderColor(
+@@ -144,6 +144,8 @@ absl::optional<SkColor> NativeTheme::GetColorProviderColor(
  }
  
  bool NativeTheme::ShouldUseDarkColors() const {
@@ -26,7 +26,7 @@ index cfacc084fe300f0d2863183723b4126f69b1377a..9278659d6b25b55518d2eee41ac84545
  }
  
 diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
-index 06c11ef6f03a5de803d9f8d3893d614e763afb16..cd7e6bdbf24c4ee1b5fd0047b83de2c12106d7da 100644
+index 21624242634805ecb1d66b166eb3d569cab479a8..77338dc6a87b88f536ab7ba7d2081dcd8bf48975 100644
 --- a/ui/native_theme/native_theme.h
 +++ b/ui/native_theme/native_theme.h
 @@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -52,7 +52,7 @@ index 06c11ef6f03a5de803d9f8d3893d614e763afb16..cd7e6bdbf24c4ee1b5fd0047b83de2c1
    // Returns a shared instance of the native theme that should be used for web
    // rendering. Do not use it in a normal application context (i.e. browser).
    // The returned object should not be deleted by the caller. This function is
-@@ -573,6 +589,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -577,6 +593,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
    bool forced_colors_ = false;
    PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
    PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
@@ -61,7 +61,7 @@ index 06c11ef6f03a5de803d9f8d3893d614e763afb16..cd7e6bdbf24c4ee1b5fd0047b83de2c1
    SEQUENCE_CHECKER(sequence_checker_);
  
 diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
-index eafe512bc90d967eaadddc2e355c418ecd7dd83a..581de5b8a056dc1d529568e7c4c1f5f48555f579 100644
+index c7b96990129262d3b831006af10e85a208bdc581..d4365a3a7e393d5b7ded6030c256176c2858f8f4 100644
 --- a/ui/native_theme/native_theme_win.cc
 +++ b/ui/native_theme/native_theme_win.cc
 @@ -748,6 +748,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {

+ 5 - 7
patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch

@@ -13,11 +13,11 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
 then refers to the list so that it can correctly determine the data source's settings.
 
 diff --git a/third_party/blink/public/platform/media/multi_buffer_data_source.h b/third_party/blink/public/platform/media/multi_buffer_data_source.h
-index 8bf52b6cb5fe9f253450bd0262c94d95f0072b2e..9aff9afcbd27ce06ea523821b39fa3adfb94a6bf 100644
+index 3a116703a77ef03715c8e3afca77b90205b32d63..e2bfe736c76d2c35ab5a0533b7569d86b22422f6 100644
 --- a/third_party/blink/public/platform/media/multi_buffer_data_source.h
 +++ b/third_party/blink/public/platform/media/multi_buffer_data_source.h
-@@ -30,6 +30,8 @@ class BufferedDataSourceHost;
- class MediaLog;
+@@ -33,6 +33,8 @@ namespace blink {
+ class BufferedDataSourceHost;
  class MultiBufferReader;
  
 +void BLINK_PLATFORM_EXPORT AddStreamingScheme(const char* new_scheme);
@@ -26,7 +26,7 @@ index 8bf52b6cb5fe9f253450bd0262c94d95f0072b2e..9aff9afcbd27ce06ea523821b39fa3ad
  // in-memory sliding window.
  //
 diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
-index d1977cfbc3df216b4c320a452c516e72d6091d5c..dce79179d6465d05feef42543d6bdc911fd368c3 100644
+index 4b37d8de877ad9ff94f11152eefb01117d1afe66..7db4a9c407d18279603c16b3b58f2456cc1e86fa 100644
 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
 +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
 @@ -9,9 +9,11 @@
@@ -41,7 +41,7 @@ index d1977cfbc3df216b4c320a452c516e72d6091d5c..dce79179d6465d05feef42543d6bdc91
  #include "media/base/media_log.h"
  #include "net/base/net_errors.h"
  #include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h"
-@@ -59,10 +61,22 @@ const int kUpdateBufferSizeFrequency = 32;
+@@ -60,8 +62,20 @@ const int kUpdateBufferSizeFrequency = 32;
  // How long to we delay a seek after a read?
  constexpr base::TimeDelta kSeekDelay = base::TimeDelta::FromMilliseconds(20);
  
@@ -55,8 +55,6 @@ index d1977cfbc3df216b4c320a452c516e72d6091d5c..dce79179d6465d05feef42543d6bdc91
 +
  }  // namespace
  
- namespace media {
- 
 +void AddStreamingScheme(const char* new_scheme) {
 +  GetStreamingSchemes()->push_back(new_scheme);
 +}

+ 4 - 4
patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch

@@ -9,10 +9,10 @@ production use cases.  This is unlikely to be upstreamed as the change
 is entirely in //chrome.
 
 diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
-index afe8d213363f61f49a3be323f1f5e8eb8c5a1dd9..191c12c845e18e37ace1935580c859546303fab1 100644
+index 182721f9238683321ef5645d5506d2e88816f45f..31958788b8b2f110ecedcd9f0ba3b8ec2e9342d9 100644
 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
 +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
-@@ -50,6 +50,9 @@ namespace {
+@@ -51,6 +51,9 @@ namespace {
  base::LazyInstance<GURL>::Leaky g_download_url_for_testing =
      LAZY_INSTANCE_INITIALIZER;
  
@@ -22,7 +22,7 @@ index afe8d213363f61f49a3be323f1f5e8eb8c5a1dd9..191c12c845e18e37ace1935580c85954
  // Close the file.
  void CloseDictionary(base::File file) {
    base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
-@@ -270,6 +273,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) {
+@@ -271,6 +274,10 @@ void SpellcheckHunspellDictionary::SetDownloadURLForTesting(const GURL url) {
    g_download_url_for_testing.Get() = url;
  }
  
@@ -33,7 +33,7 @@ index afe8d213363f61f49a3be323f1f5e8eb8c5a1dd9..191c12c845e18e37ace1935580c85954
  GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
    if (g_download_url_for_testing.Get() != GURL())
      return g_download_url_for_testing.Get();
-@@ -277,6 +284,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
+@@ -278,6 +285,9 @@ GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
    std::string bdict_file = dictionary_file_.path.BaseName().MaybeAsASCII();
    DCHECK(!bdict_file.empty());
  

+ 5 - 5
patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch

@@ -567,10 +567,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
 +  Draw(gfx.mojom.Rect damage_rect) => ();
  };
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index 3c226fe6c61f042942ac6c01e08f95209536470b..67a8a6fd29e93268f960d8e3dde19d563877b09a 100644
+index dfb0c89dc7bd8edf5787ddab50c54a847e6a0140..316d970d1327755768fd92d7457d8b9b26804503 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
-@@ -80,6 +80,7 @@ class DisplayPrivate;
+@@ -81,6 +81,7 @@ class DisplayPrivate;
  class ExternalBeginFrameController;
  }  // namespace mojom
  class ContextProvider;
@@ -578,7 +578,7 @@ index 3c226fe6c61f042942ac6c01e08f95209536470b..67a8a6fd29e93268f960d8e3dde19d56
  class HostFrameSinkManager;
  class LocalSurfaceId;
  class RasterContextProvider;
-@@ -136,6 +137,16 @@ class COMPOSITOR_EXPORT ContextFactory {
+@@ -137,6 +138,16 @@ class COMPOSITOR_EXPORT ContextFactory {
    virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
  };
  
@@ -595,7 +595,7 @@ index 3c226fe6c61f042942ac6c01e08f95209536470b..67a8a6fd29e93268f960d8e3dde19d56
  // Compositor object to take care of GPU painting.
  // A Browser compositor object is responsible for generating the final
  // displayable form of pixels comprising a single widget's contents. It draws an
-@@ -171,6 +182,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
+@@ -172,6 +183,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
    // Schedules a redraw of the layer tree associated with this compositor.
    void ScheduleDraw();
  
@@ -605,7 +605,7 @@ index 3c226fe6c61f042942ac6c01e08f95209536470b..67a8a6fd29e93268f960d8e3dde19d56
    // Sets the root of the layer tree drawn by this Compositor. The root layer
    // must have no parent. The compositor's root layer is reset if the root layer
    // is destroyed. NULL can be passed to reset the root layer, in which case the
-@@ -442,6 +456,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
+@@ -443,6 +457,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
  
    std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
  

+ 4 - 4
patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch

@@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
 to users. We should try to upstream this.
 
 diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
-index 9b1c762c66692d552aaec7c2f24b9104cd623fea..f5de73704cfcaa746ddf6970c3bde72e63f29c71 100644
+index e379c4cf966a96ace1bd692cda31bae032f13acf..b800ca0aa616ae347f93156ccef79032f3ea1608 100644
 --- a/content/browser/web_contents/web_contents_impl.h
 +++ b/content/browser/web_contents/web_contents_impl.h
-@@ -1768,10 +1768,12 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
+@@ -1772,10 +1772,12 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
    // outermost frame trees in this WebContents.
    std::vector<RenderFrameHostImpl*> GetOutermostMainFrames();
  
@@ -26,10 +26,10 @@ index 9b1c762c66692d552aaec7c2f24b9104cd623fea..f5de73704cfcaa746ddf6970c3bde72e
    // state into account.
    PageVisibilityState CalculatePageVisibilityState(Visibility visibility) const;
 diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
-index 4d6ba5102935330abc6f2354f4c442ad3a045e09..0afdb3ef00f89cbb2a79b66ed84b829bbbd98ac7 100644
+index 67fb7c487e68af563859e76d4b0f46e44756128a..49189dadc4dba04f789e8b562a11205055231155 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
-@@ -630,6 +630,8 @@ class WebContents : public PageNavigator,
+@@ -631,6 +631,8 @@ class WebContents : public PageNavigator,
        bool stay_hidden,
        bool stay_awake) WARN_UNUSED_RESULT = 0;
  

+ 1 - 1
patches/chromium/fix_properly_honor_printing_page_ranges.patch

@@ -62,7 +62,7 @@ index 9f80fe6f10515849dd02d580db9852e6fbbbaa30..67f5b76a8141857ba02abd806341f06b
    PMPrintSettings print_settings =
        static_cast<PMPrintSettings>([print_info_.get() PMPrintSettings]);
 diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc
-index fe7fc797504dcc7097a3d79a2dab2c18de737048..20c63b1f657f2969850b31eaafdff7e500c60de8 100644
+index 891e9574625bfbaf2a00eeeb54a20834a2a5fa21..4f47ad753c7593c83fdfd832a9d4a53d2094becf 100644
 --- a/printing/printing_context_system_dialog_win.cc
 +++ b/printing/printing_context_system_dialog_win.cc
 @@ -53,14 +53,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings(

+ 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 a46cdea2d328a69efea6c6c730ef5ca3fdf9221b..95a876fbbe3ac6504a2a1e4c7ef3d3781ef1d25b 100644
+index c4563050591664446e906adc86f9e1134b75951b..c8028c5405fc0a5124f67b3e9b5b923f4722d438 100644
 --- a/content/browser/renderer_host/render_frame_host_manager.cc
 +++ b/content/browser/renderer_host/render_frame_host_manager.cc
-@@ -2995,6 +2995,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -3033,6 +3033,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      request->ResetStateForSiteInstanceChange();
    }
  
@@ -20,7 +20,7 @@ index a46cdea2d328a69efea6c6c730ef5ca3fdf9221b..95a876fbbe3ac6504a2a1e4c7ef3d378
  }
  
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 7430e483567b227630bc42933820e2d4e5559ed7..2ebc4de42761242f97f2a9aa40ba0c111a1bf78a 100644
+index 8093584705481dee6d4557713773318461a02869..e07f51020fc2139a9757b8d52bd5f5a002e1c561 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -265,6 +265,11 @@ class CONTENT_EXPORT ContentBrowserClient {

+ 3 - 3
patches/chromium/gpu_notify_when_dxdiag_request_fails.patch

@@ -40,10 +40,10 @@ index 008795fbdc8724931852399704a945563fd0b3f2..6b295d21deebf59a79a205ef2fa8579d
    void UpdateDawnInfo(const std::vector<std::string>& dawn_info_list);
  
 diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
-index 2f10ccb498b2b8f70188bc7599264674978bd9ac..1e7d9336c327e3b47a3dad5053123e9e210d9c75 100644
+index b7ad87a73ce1e7da9ea2a7b2557d97ebe1f84298..cb8197061cb1424d533d17cad3e22cb8b30c0a34 100644
 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
 +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
-@@ -1113,6 +1113,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
+@@ -1108,6 +1108,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
    if (host)
      host->ForceShutdown();
  }
@@ -57,7 +57,7 @@ index 2f10ccb498b2b8f70188bc7599264674978bd9ac..1e7d9336c327e3b47a3dad5053123e9e
  
  void GpuDataManagerImplPrivate::UpdateDawnInfo(
 diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
-index 845792fc94ee7d8cacbbd92e51bb8e5f53cce05a..6daec10d27836cb31ae3ec6c8eae41de05238c1c 100644
+index b4256db01335ec312fd6be0060bc2ad4ee496ae6..b028d8feffe05ef37a8e5f16e35c2da3a5a1cc33 100644
 --- a/content/browser/gpu/gpu_data_manager_impl_private.h
 +++ b/content/browser/gpu/gpu_data_manager_impl_private.h
 @@ -79,6 +79,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {

+ 2 - 2
patches/chromium/gritsettings_resource_ids.patch

@@ -6,10 +6,10 @@ 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 74451c3470babb35f8c204fa204505b9f000455e..4c84e957717cf3ce45abda5e60ceb0d02d61940a 100644
+index 2340bedbe4a5629779a72f2eb5f1b9f550757d1d..2dd75eae38db6529f72422447219c19d5b524d77 100644
 --- a/tools/gritsettings/resource_ids.spec
 +++ b/tools/gritsettings/resource_ids.spec
-@@ -805,6 +805,11 @@
+@@ -813,6 +813,11 @@
      "includes": [3880],
    },
  

+ 2 - 2
patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch

@@ -11,10 +11,10 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
 Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
 
 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
-index c526db84c70c0ccc523ac29cd161139bc3d0ad13..68983f27414cc051f57b3273ca023165054792b5 100755
+index 6b57177276bcc74c2ede0471daac400599128abb..93947d92c483def78f0ebbeb1a6f6921a174237d 100755
 --- a/tools/clang/scripts/update.py
 +++ b/tools/clang/scripts/update.py
-@@ -297,6 +297,8 @@ def main():
+@@ -286,6 +286,8 @@ def main():
        'win32': 'win',
    }
    default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform)

+ 1 - 1
patches/chromium/mas-cfisobjc.patch

@@ -6,7 +6,7 @@ Subject: mas: avoid usage of _CFIsObjC
 Removes usage of the _CFIsObjC private API.
 
 diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
-index e63f0ec0e2e618a4b280a08d14a619e1186e0466..225c6b83515c7b530ac59b1af7ac2194483f0311 100644
+index 622625b0277aa2c4d4456ce2e79a8b28c507121a..18df5fbb790ce1a3f9723cdc3bf0b2684a7d66b2 100644
 --- a/base/mac/foundation_util.mm
 +++ b/base/mac/foundation_util.mm
 @@ -29,12 +29,6 @@

+ 1 - 1
patches/chromium/mas-cgdisplayusesforcetogray.patch

@@ -6,7 +6,7 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray
 Removes usage of the CGDisplayUsesForceToGray private API.
 
 diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
-index 81150290909adbb0c440d752857aa5694f4362f4..b2ceb80f86530ef801239e149aa246f983cd0437 100644
+index 697c81abd428676d13de7c34313134f6333962c3..50c535d93c198b2b0c358550552ea6b3ccd35ef5 100644
 --- a/ui/display/mac/screen_mac.mm
 +++ b/ui/display/mac/screen_mac.mm
 @@ -149,7 +149,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {

+ 1 - 1
patches/chromium/mas_disable_remote_accessibility.patch

@@ -167,7 +167,7 @@ index cdbfdb7b904533c72721e7605ca801b5e79c51fb..23d00ebbd6563a2bee1c79819c3745f5
  
  ///////////////////////////////////////////////////////////////////////////////
 diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
-index 76f3bfb35e2c8dd353115137359921be989945da..8abf05b40427890b9171f0f72800b2a65eced5fd 100644
+index 898f3292fafc7b8fcb4e290c61f5b1395c94376d..47c8dbe3b11420f399cdacaf8390280ba163392f 100644
 --- a/ui/base/BUILD.gn
 +++ b/ui/base/BUILD.gn
 @@ -320,6 +320,13 @@ component("base") {

+ 11 - 11
patches/chromium/mas_no_private_api.patch

@@ -7,10 +7,10 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be
 excluded for people who want to submit their apps to the Mac App store.
 
 diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
-index e3470fdbf945042a16dcb2affb7859607ca4184a..641d0a0e57ef7903ba9577954f85ae62a6dd6d6d 100644
+index c50d742ec575d831b4ae3df0220a189c554ea028..b5129cae74f72238160e5cd435ef1c1e42a49f2a 100644
 --- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm
 +++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
-@@ -273,7 +273,7 @@
+@@ -288,7 +288,7 @@
        return PopulateSize([value sizeValue]);
      }
    }
@@ -19,7 +19,7 @@ index e3470fdbf945042a16dcb2affb7859607ca4184a..641d0a0e57ef7903ba9577954f85ae62
    // AXTextMarker
    if (content::IsAXTextMarker(value)) {
      return PopulateTextPosition(content::AXTextMarkerToAXPosition(value),
-@@ -284,6 +284,7 @@
+@@ -299,6 +299,7 @@
    if (content::IsAXTextMarkerRange(value)) {
      return PopulateTextMarkerRange(value, line_indexer);
    }
@@ -27,7 +27,7 @@ index e3470fdbf945042a16dcb2affb7859607ca4184a..641d0a0e57ef7903ba9577954f85ae62
  
    // AXValue
    if (CFGetTypeID(value) == AXValueGetTypeID()) {
-@@ -401,7 +402,7 @@
+@@ -416,7 +417,7 @@
                      AXMakeConst(affinity));
    return set;
  }
@@ -36,7 +36,7 @@ index e3470fdbf945042a16dcb2affb7859607ca4184a..641d0a0e57ef7903ba9577954f85ae62
  base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange(
      id marker_range,
      const LineIndexer* line_indexer) const {
-@@ -417,7 +418,7 @@
+@@ -432,7 +433,7 @@
                 PopulateTextPosition(ax_range.focus()->Clone(), line_indexer));
    return dict;
  }
@@ -46,10 +46,10 @@ index e3470fdbf945042a16dcb2affb7859607ca4184a..641d0a0e57ef7903ba9577954f85ae62
      NSArray* node_array,
      const LineIndexer* line_indexer) const {
 diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
-index 42800aa884846b1590b1df2b4b8a10d20ce24345..41c7bd66791fb81ea65a0e615bc46317012d058e 100644
+index 1bc15f169aca1a42db0713472eab0791260e0000..007b2b8337b90d549c96d32d8a72629a72ae9337 100644
 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
 +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
-@@ -140,9 +140,11 @@
+@@ -151,9 +151,11 @@
    if (IsBrowserAccessibilityCocoa(target) || IsAXUIElement(target))
      return InvokeForAXElement(target, property_node);
  
@@ -61,7 +61,7 @@ index 42800aa884846b1590b1df2b4b8a10d20ce24345..41c7bd66791fb81ea65a0e615bc46317
  
    if ([target isKindOfClass:[NSArray class]])
      return InvokeForArray(target, property_node);
-@@ -303,6 +305,7 @@
+@@ -329,6 +331,7 @@
        property_name == "AXTextMarkerRangeForUIElement") {  // UIElement
      return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node));
    }
@@ -69,7 +69,7 @@ index 42800aa884846b1590b1df2b4b8a10d20ce24345..41c7bd66791fb81ea65a0e615bc46317
    if (property_name == "AXIndexForTextMarker" ||
        property_name == "AXNextWordEndTextMarkerForTextMarker" ||
        property_name ==
-@@ -313,6 +316,7 @@
+@@ -340,6 +343,7 @@
      return OptionalNSObject::NotNilOrError(
          PropertyNodeToTextMarkerRange(arg_node));
    }
@@ -77,7 +77,7 @@ index 42800aa884846b1590b1df2b4b8a10d20ce24345..41c7bd66791fb81ea65a0e615bc46317
  
    return OptionalNSObject::NotApplicable();
  }
-@@ -384,6 +388,7 @@
+@@ -431,6 +435,7 @@
    return uielement;
  }
  
@@ -85,7 +85,7 @@ index 42800aa884846b1590b1df2b4b8a10d20ce24345..41c7bd66791fb81ea65a0e615bc46317
  id AttributeInvoker::DictNodeToTextMarker(
      const AXPropertyNode& dictnode) const {
    if (!dictnode.IsDict()) {
-@@ -491,6 +496,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) {
+@@ -538,6 +543,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) {
    return OptionalNSObject::NotNilOrError(content::AXTextMarkerFrom(
        cocoa_node, range.focus()->text_offset(), range.focus()->affinity()));
  }

+ 5 - 5
patches/chromium/network_service_allow_remote_certificate_verification_logic.patch

@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
 session.setCertificateVerifyCallback.
 
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index 8dcdcf899ea13be6237f63f425d85eb410c845ff..f513f1c8bc33136f58f7bc3de2bb3590af9a153f 100644
+index a38eeaf6e58af7bf02fe82b035cc8d9726057965..83fde65c34f12fee6b2ef867f94fdd31252b60cf 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
 @@ -117,6 +117,11 @@
@@ -102,7 +102,7 @@ index 8dcdcf899ea13be6237f63f425d85eb410c845ff..f513f1c8bc33136f58f7bc3de2bb3590
  constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
  
  NetworkContext::PendingCertVerify::PendingCertVerify() = default;
-@@ -599,6 +677,13 @@ void NetworkContext::SetClient(
+@@ -612,6 +690,13 @@ void NetworkContext::SetClient(
    client_.Bind(std::move(client));
  }
  
@@ -116,7 +116,7 @@ index 8dcdcf899ea13be6237f63f425d85eb410c845ff..f513f1c8bc33136f58f7bc3de2bb3590
  void NetworkContext::CreateURLLoaderFactory(
      mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -1984,6 +2069,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
+@@ -1996,6 +2081,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
          std::move(cert_verifier));
      cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -157,7 +157,7 @@ index 7ecd11bb762d0ccaa104d0cc198b66db2aed8143..1f09e757f9ac7f9f101066beddbd2f54
    // CertNetFetcher is not used by the current platform, or if the actual
    // net::CertVerifier is instantiated outside of the network service.
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index dfc0478673263810e270184603e88af6e2bcd400..ebbdeaa440514740b672bbf722c31d58d254cd8f 100644
+index 25d6c99d4f6bed4f464b7081e33f2a16b65d3521..5dfc30d2feb37f78dd6eac088366a0dc3e1cf8e4 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
 @@ -189,6 +189,17 @@ struct CTPolicy {
@@ -178,7 +178,7 @@ index dfc0478673263810e270184603e88af6e2bcd400..ebbdeaa440514740b672bbf722c31d58
  // Parameters for constructing a network context.
  struct NetworkContextParams {
    // Name used by memory tools to identify the context.
-@@ -719,6 +730,9 @@ interface NetworkContext {
+@@ -724,6 +735,9 @@ interface NetworkContext {
    // Sets a client for this network context.
    SetClient(pending_remote<NetworkContextClient> client);
  

+ 2 - 2
patches/chromium/notification_provenance.patch

@@ -108,10 +108,10 @@ index b195cb84d8bba3c51b04f8c32cf909d15bf34335..37528715db985d12771ba2dca86dcec8
        const GURL& document_url,
        mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index 43c270f82113e75e77b9a0c9f58901eb87ddfea9..f354e09e070591017510ddf2f96785584da937b1 100644
+index 8135d0ff1d476b06cc24abb010ad988eb880b557..55c4e3c2bb0b353724c6a1a2f6f853705d1ba501 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -2296,7 +2296,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -2301,7 +2301,7 @@ void RenderProcessHostImpl::CreateNotificationService(
      document_url = rfh->GetLastCommittedURL();
  
    storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

+ 1 - 1
patches/chromium/picture-in-picture.patch

@@ -61,7 +61,7 @@ index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9
  #include "ui/base/l10n/l10n_util.h"
  #include "ui/gfx/paint_vector_icon.h"
 diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
-index 2b185ba63ae3b5f2dc3d73d4a7bf6ac331e09361..25eb311ba9054ee65afce166fc1da0c2e1beb8f0 100644
+index 72a70d9e356dc7c5ac80bdc9954a0c03dda809c5..7700d386e39dd511abb1c53cd4871bd51e04cd46 100644
 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
 @@ -16,9 +16,11 @@

+ 74 - 55
patches/chromium/printing.patch

@@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
 This patch also fixes callback for manual user cancellation and success.
 
 diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
-index 7f35eb191c651294fdf3cb14119bd4895bbc437e..6931a992de9c73bc3d40a7e74e4d009aefa236a8 100644
+index bca04dcd90921e508fb0e5c8201265532e42e88f..345547f382c8984ea29483b84475c120aa58e19b 100644
 --- a/chrome/browser/printing/print_job.cc
 +++ b/chrome/browser/printing/print_job.cc
 @@ -350,18 +350,25 @@ void PrintJob::StartPdfToEmfConversion(
@@ -42,11 +42,36 @@ index 7f35eb191c651294fdf3cb14119bd4895bbc437e..6931a992de9c73bc3d40a7e74e4d009a
  
    using RenderMode = PdfRenderSettings::Mode;
    RenderMode mode;
+@@ -499,6 +506,10 @@ void PrintJob::OnNotifyPrintJobEvent(const JobEventDetails& event_details) {
+   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+ 
+   switch (event_details.type()) {
++    case JobEventDetails::USER_INIT_CANCELED: {
++      DCHECK_EQ(event_details.document(), document_.get());
++      break;
++    }
+     case JobEventDetails::FAILED:
+       // No need to cancel since the worker already canceled itself.
+       Stop();
+diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
+index b8b83529be4c7da661032d3b941984c02b978047..98ef6cfad5dc46d9dcb65a0ce506db3729410239 100644
+--- a/chrome/browser/printing/print_job.h
++++ b/chrome/browser/printing/print_job.h
+@@ -242,6 +242,9 @@ class JobEventDetails : public base::RefCountedThreadSafe<JobEventDetails> {
+  public:
+   // Event type.
+   enum Type {
++    // Print... dialog box has been closed with CANCEL button.
++    USER_INIT_CANCELED,
++
+     // A new document started printing.
+     NEW_DOC,
+ 
 diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
-index f2ba13cb21d66c2067264086926341e8490b1b84..29dc7c84c22d9aa7bf0711467fa98b16c89683c1 100644
+index 2824b97e715a493082734d40f62860c8cafa5f34..584d4ef2b73a0f89458224eb134a8d8a2b439995 100644
 --- a/chrome/browser/printing/print_job_worker.cc
 +++ b/chrome/browser/printing/print_job_worker.cc
-@@ -22,7 +22,6 @@
+@@ -21,13 +21,13 @@
  #include "chrome/browser/browser_process.h"
  #include "chrome/browser/chrome_notification_types.h"
  #include "chrome/browser/printing/print_job.h"
@@ -54,15 +79,14 @@ index f2ba13cb21d66c2067264086926341e8490b1b84..29dc7c84c22d9aa7bf0711467fa98b16
  #include "components/crash/core/common/crash_keys.h"
  #include "content/public/browser/browser_task_traits.h"
  #include "content/public/browser/browser_thread.h"
-@@ -30,6 +29,7 @@
+ #include "content/public/browser/notification_service.h"
  #include "content/public/browser/render_frame_host.h"
  #include "content/public/browser/web_contents.h"
- #include "printing/backend/print_backend.h"
 +#include "electron/grit/electron_resources.h"
+ #include "printing/backend/print_backend.h"
+ #include "printing/mojom/print.mojom.h"
  #include "printing/print_job_constants.h"
- #include "printing/printed_document.h"
- #include "printing/printing_utils.h"
-@@ -242,16 +242,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
+@@ -238,16 +238,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
  #endif  // defined(OS_LINUX) && defined(USE_CUPS)
    }
  
@@ -86,8 +110,8 @@ index f2ba13cb21d66c2067264086926341e8490b1b84..29dc7c84c22d9aa7bf0711467fa98b16
 -  GetSettingsDone(std::move(callback), result);
  }
  
- #if BUILDFLAG(IS_CHROMEOS_ASH)
-@@ -267,6 +272,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
+ #if defined(OS_CHROMEOS)
+@@ -263,6 +268,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
  
  void PrintJobWorker::GetSettingsDone(SettingsCallback callback,
                                       PrintingContext::Result result) {
@@ -102,7 +126,7 @@ index f2ba13cb21d66c2067264086926341e8490b1b84..29dc7c84c22d9aa7bf0711467fa98b16
  }
  
 diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
-index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac3936cd29c2 100644
+index 867227684ddba1b1032d7aa4935cbfdca8518309..fbcb81b7dedcf5d9bad949dbf721c0a34a7c8f2b 100644
 --- a/chrome/browser/printing/print_view_manager_base.cc
 +++ b/chrome/browser/printing/print_view_manager_base.cc
 @@ -28,10 +28,10 @@
@@ -181,8 +205,8 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
    DisconnectFromCurrentPrintJob();
  
    // Don't print / print preview crashed tabs.
-@@ -360,7 +371,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
-     return false;
+@@ -364,7 +375,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
+   // go in `ReleasePrintJob()`.
  
    SetPrintingRFH(rfh);
 -  GetPrintRenderFrame(rfh)->PrintRequestedPages();
@@ -197,7 +221,7 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
    return true;
  }
  
-@@ -515,9 +533,9 @@ void PrintViewManagerBase::ScriptedPrintReply(
+@@ -519,9 +537,9 @@ void PrintViewManagerBase::ScriptedPrintReply(
  void PrintViewManagerBase::UpdatePrintingEnabled() {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
    // The Unretained() is safe because ForEachFrame() is synchronous.
@@ -210,7 +234,7 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
  }
  
  void PrintViewManagerBase::NavigationStopped() {
-@@ -631,12 +649,13 @@ void PrintViewManagerBase::DidPrintDocument(
+@@ -635,12 +653,13 @@ void PrintViewManagerBase::DidPrintDocument(
  void PrintViewManagerBase::GetDefaultPrintSettings(
      GetDefaultPrintSettingsCallback callback) {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -225,7 +249,7 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
    content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame();
    auto callback_wrapper =
        base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply,
-@@ -654,12 +673,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -658,12 +677,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
      base::Value job_settings,
      UpdatePrintSettingsCallback callback) {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -240,7 +264,7 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
    if (!job_settings.FindIntKey(kSettingPrinterType)) {
      UpdatePrintSettingsReply(std::move(callback),
                               CreateEmptyPrintPagesParamsPtr(), false);
-@@ -704,7 +724,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
+@@ -708,13 +728,18 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
    PrintManager::PrintingFailed(cookie);
  
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -249,7 +273,6 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
  #endif
  
    ReleasePrinterQuery();
-@@ -716,6 +736,11 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
  }
  
  void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
@@ -261,23 +284,19 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
    base::ThreadTaskRunnerHandle::Get()->PostTask(
        FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
                                  l10n_util::GetStringUTF16(
-@@ -785,9 +810,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
-           content::NotificationService::NoDetails());
+@@ -794,6 +819,11 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
+ #endif
        break;
      }
--    case JobEventDetails::USER_INIT_DONE:
--    case JobEventDetails::DEFAULT_INIT_DONE:
-     case JobEventDetails::USER_INIT_CANCELED: {
++    case JobEventDetails::USER_INIT_CANCELED: {
 +      printing_cancelled_ = true;
 +      ReleasePrintJob();
 +      break;
 +    }
-+    case JobEventDetails::USER_INIT_DONE:
-+    case JobEventDetails::DEFAULT_INIT_DONE: {
-       NOTREACHED();
-       break;
-     }
-@@ -896,8 +925,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
+     case JobEventDetails::JOB_DONE:
+       // Printing is done, we don't need it anymore.
+       // print_job_->is_job_pending() may still be true, depending on the order
+@@ -859,8 +889,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
    DCHECK(!quit_inner_loop_);
    DCHECK(query);
  
@@ -290,7 +309,7 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
  
    // We can't print if there is no renderer.
    if (!web_contents()->GetMainFrame()->GetRenderViewHost() ||
-@@ -918,8 +949,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
+@@ -881,8 +913,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
                          /*source_id=*/"");
  #endif
  
@@ -299,7 +318,7 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
    printing_succeeded_ = false;
    return true;
  }
-@@ -968,14 +997,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -931,14 +961,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
    content::RenderFrameHost* rfh = printing_rfh_;
    printing_rfh_ = nullptr;
  
@@ -324,7 +343,7 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
    // Don't close the worker thread.
    print_job_ = nullptr;
  }
-@@ -1011,7 +1048,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
+@@ -974,7 +1012,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
  }
  
  bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@@ -334,7 +353,7 @@ index e0880a42d5e44a54e1132b868f13ddf9cea67510..c0115c799e7ede23ef6e0003359eac39
  
    if (!cookie) {
 diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
-index b19ee4414584d0e192ea6b4b91b4e2ed59aef51b..e67bf37ca58877639a724589ca911940fd04016e 100644
+index 48e2baa05cdf61ac18d9d5a357833abd07b373b0..21ed887db41c979470f2a72b7a1c1832ad0e7961 100644
 --- a/chrome/browser/printing/print_view_manager_base.h
 +++ b/chrome/browser/printing/print_view_manager_base.h
 @@ -38,6 +38,8 @@ class PrintJob;
@@ -358,7 +377,7 @@ index b19ee4414584d0e192ea6b4b91b4e2ed59aef51b..e67bf37ca58877639a724589ca911940
  
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
    // Prints the document in |print_data| with settings specified in
-@@ -231,9 +236,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
+@@ -230,9 +235,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
    // The current RFH that is printing with a system printing dialog.
    content::RenderFrameHost* printing_rfh_ = nullptr;
  
@@ -388,7 +407,7 @@ index 623659a3c78ce069cbcc83eeccfbc7265437ff01..f02cb6bced9f8382c84f560b5b40c924
    // Tells the RenderFrame to switch the CSS to print media type, render every
    // requested page using the print preview document's frame/node, and then
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a1648065bf8a 100644
+index 868f1706b1b8db28b995cc2dc9fcfefec62b6574..9224b935815f28086ce4df05e3f4c81b6dd92e7f 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
 @@ -38,6 +38,7 @@
@@ -399,7 +418,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
  #include "printing/units.h"
  #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
  #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
-@@ -1175,7 +1176,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
+@@ -1218,7 +1219,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
      if (!weak_this)
        return;
  
@@ -409,16 +428,16 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
      if (!weak_this)
        return;
  
-@@ -1206,7 +1208,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
+@@ -1249,7 +1251,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
    receivers_.Add(this, std::move(receiver));
  }
  
 -void PrintRenderFrameHelper::PrintRequestedPages() {
 +void PrintRenderFrameHelper::PrintRequestedPages(bool silent, base::Value settings) {
    ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
-   if (ipc_nesting_level_ > 1)
+   if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
      return;
-@@ -1221,7 +1223,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
+@@ -1264,7 +1266,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
    // that instead.
    auto plugin = delegate_->GetPdfElement(frame);
  
@@ -427,7 +446,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
  
    if (!render_frame_gone_)
      frame->DispatchAfterPrintEvent();
-@@ -1252,7 +1254,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
+@@ -1295,7 +1297,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
    }
  
    Print(frame, print_preview_context_.source_node(),
@@ -437,8 +456,8 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
    if (!render_frame_gone_)
      print_preview_context_.DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1299,6 +1302,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
-   if (ipc_nesting_level_ > 1)
+@@ -1342,6 +1345,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
+   if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
      return;
  
 +  blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
@@ -446,7 +465,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
    print_preview_context_.OnPrintPreview();
  
    if (print_preview_context_.IsForArc()) {
-@@ -1834,7 +1839,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1878,7 +1883,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
        return;
  
      Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -456,7 +475,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
      // Check if |this| is still valid.
      if (!weak_this)
        return;
-@@ -1849,7 +1855,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1893,7 +1899,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
  void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
                                     const blink::WebNode& node,
@@ -467,7 +486,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
    // If still not finished with earlier print request simply ignore.
    if (prep_frame_view_)
      return;
-@@ -1857,7 +1865,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1901,7 +1909,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
    FrameReference frame_ref(frame);
  
    uint32_t expected_page_count = 0;
@@ -476,7 +495,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
      DidFinishPrinting(FAIL_PRINT_INIT);
      return;  // Failed to init print page settings.
    }
-@@ -1876,8 +1884,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1920,8 +1928,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
          print_pages_params_->params->print_scaling_option;
  
      auto self = weak_ptr_factory_.GetWeakPtr();
@@ -519,7 +538,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -2125,7 +2166,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
+@@ -2169,7 +2210,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
    }
  }
  
@@ -530,7 +549,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
    mojom::PrintPagesParams settings;
    settings.params = mojom::PrintParams::New();
    GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params);
-@@ -2149,12 +2192,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
+@@ -2193,12 +2236,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
    return result;
  }
  
@@ -549,7 +568,7 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
      notify_browser_of_print_failure_ = false;
      GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
      return false;
-@@ -2523,18 +2568,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
+@@ -2569,18 +2614,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
  }
  
  bool PrintRenderFrameHelper::CheckForCancel() {
@@ -570,10 +589,10 @@ index 2427d22d559b6af29174d0d81cce9c88e92e4fbb..eee2cdd283d0d4366225758c90b5a164
  
  bool PrintRenderFrameHelper::PreviewPageRendered(
 diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
-index dd23fe0ad391cff76dd4560795f01749a756e8cf..dc746304213cb9a1f131b7a383e48e8595ac3668 100644
+index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519076e91b9 100644
 --- a/components/printing/renderer/print_render_frame_helper.h
 +++ b/components/printing/renderer/print_render_frame_helper.h
-@@ -231,7 +231,7 @@ class PrintRenderFrameHelper
+@@ -256,7 +256,7 @@ class PrintRenderFrameHelper
        mojo::PendingAssociatedReceiver<mojom::PrintRenderFrame> receiver);
  
    // printing::mojom::PrintRenderFrame:
@@ -582,7 +601,7 @@ index dd23fe0ad391cff76dd4560795f01749a756e8cf..dc746304213cb9a1f131b7a383e48e85
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
    void PrintForSystemDialog() override;
    void SetPrintPreviewUI(
-@@ -298,7 +298,9 @@ class PrintRenderFrameHelper
+@@ -323,7 +323,9 @@ class PrintRenderFrameHelper
    // WARNING: |this| may be gone after this method returns.
    void Print(blink::WebLocalFrame* frame,
               const blink::WebNode& node,
@@ -593,7 +612,7 @@ index dd23fe0ad391cff76dd4560795f01749a756e8cf..dc746304213cb9a1f131b7a383e48e85
  
    // Notification when printing is done - signal tear-down/free resources.
    void DidFinishPrinting(PrintingResult result);
-@@ -307,12 +309,14 @@ class PrintRenderFrameHelper
+@@ -332,12 +334,14 @@ class PrintRenderFrameHelper
  
    // Initialize print page settings with default settings.
    // Used only for native printing workflow.
@@ -611,10 +630,10 @@ index dd23fe0ad391cff76dd4560795f01749a756e8cf..dc746304213cb9a1f131b7a383e48e85
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
    // Set options for print preset from source PDF document.
 diff --git a/printing/printing_context.cc b/printing/printing_context.cc
-index 30fa5344771c7e558ba44177429c551cba3b03e8..29d7e4a020989af699a25f69a4ee5ced70cb70bb 100644
+index 24cf547a45b76705ec4094bec219c53785781059..b81e7bcee4139dbfb4c5211f4164c53b864768bd 100644
 --- a/printing/printing_context.cc
 +++ b/printing/printing_context.cc
-@@ -96,7 +96,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
+@@ -97,7 +97,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
  
  PrintingContext::Result PrintingContext::UpdatePrintSettings(
      base::Value job_settings) {

+ 1 - 1
patches/chromium/put_back_deleted_colors_for_autofill.patch

@@ -62,7 +62,7 @@ index 84848edbbe9de7ef9fe6e2ab0a34d3b9428cde10..5e07980e4793cc3b19140510fb3fd3b2
    OP(kColorId_ThrobberSpinningColor),                                          \
    OP(kColorId_ThrobberWaitingColor),                                           \
 diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
-index a02662fb29ff297a55afdb0d6e2dc336137a749d..eafe512bc90d967eaadddc2e355c418ecd7dd83a 100644
+index 40d441fff4794867f6d3a5bf10d7f6b0d9343716..c7b96990129262d3b831006af10e85a208bdc581 100644
 --- a/ui/native_theme/native_theme_win.cc
 +++ b/ui/native_theme/native_theme_win.cc
 @@ -658,6 +658,18 @@ absl::optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(

+ 7 - 7
patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch

@@ -30,7 +30,7 @@ index 8adadb641055724b4b12e0432e8a0f06a901e04e..104a38d9093dd53b8f2d08c55b207f49
    // RenderWidgetHost on the main frame, and false otherwise.
    virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*);
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index a2227fabbafb9a5e162c063d2aaa494f78cdd610..760ce40cda142529a58c5d156e1d7b76107716d5 100644
+index a322cbb59322d81b253f3a261fff37b9a89837ce..9ccbf2bbcb7f3e4b7d71e09dfbc4cbd2d4ae1aca 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
 @@ -2002,6 +2002,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
@@ -43,10 +43,10 @@ index a2227fabbafb9a5e162c063d2aaa494f78cdd610..760ce40cda142529a58c5d156e1d7b76
  
  void RenderWidgetHostImpl::ShowContextMenuAtPoint(
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index e590e0959e7aa77f562dc69fc6bd4b2da10ea001..d7000889cb90ffaf7eddb01df33b12d768ef71aa 100644
+index 26b280ec0aac4d3caf552a94f39f1a1fe798db31..534bd5132267ae883e181e688acf9f68647361fe 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4337,6 +4337,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
+@@ -4289,6 +4289,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
    return text_input_manager_.get();
  }
  
@@ -59,10 +59,10 @@ index e590e0959e7aa77f562dc69fc6bd4b2da10ea001..d7000889cb90ffaf7eddb01df33b12d7
      RenderWidgetHostImpl* render_widget_host) {
    return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
 diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
-index 46f7b550bdf5cbe260523735db975f9c8b0ba532..9b1c762c66692d552aaec7c2f24b9104cd623fea 100644
+index d76748c0548faf0cf974fdf3befdaf3c1f3ecbd8..e379c4cf966a96ace1bd692cda31bae032f13acf 100644
 --- a/content/browser/web_contents/web_contents_impl.h
 +++ b/content/browser/web_contents/web_contents_impl.h
-@@ -969,6 +969,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
+@@ -964,6 +964,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
        blink::mojom::FrameVisibility visibility) override;
    void SendScreenRects() override;
    TextInputManager* GetTextInputManager() override;
@@ -71,7 +71,7 @@ index 46f7b550bdf5cbe260523735db975f9c8b0ba532..9b1c762c66692d552aaec7c2f24b9104
    bool IsShowingContextMenuOnPage() const override;
    void DidChangeScreenOrientation() override;
 diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
-index bee7ace6ac2c3a7af108904fcdfe3cac3dc852fe..6ad9a7cfec251e814f8d64f025755f24c523d069 100644
+index 264f4fa3ded252c7ed13e12c7a5e196855ef215c..ffc8d299b50634c944e2ab5c93a1bcecf6a67800 100644
 --- a/content/public/browser/web_contents_observer.h
 +++ b/content/public/browser/web_contents_observer.h
 @@ -13,6 +13,7 @@
@@ -82,7 +82,7 @@ index bee7ace6ac2c3a7af108904fcdfe3cac3dc852fe..6ad9a7cfec251e814f8d64f025755f24
  #include "content/public/browser/allow_service_worker_result.h"
  #include "content/public/browser/reload_type.h"
  #include "content/public/browser/render_frame_host.h"
-@@ -460,6 +461,9 @@ class CONTENT_EXPORT WebContentsObserver {
+@@ -462,6 +463,9 @@ class CONTENT_EXPORT WebContentsObserver {
    // Invoked every time the WebContents changes visibility.
    virtual void OnVisibilityChanged(Visibility visibility) {}
  

+ 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 2119244016aa6f28b93d649c5c4866863c913fc1..7cf86d58523fad6e9ae2f50ede21a40c8162b4a9 100644
+index a512d736c1d603680cc0e5bfb42afbd70a799f9a..e7dda63b94aebaf45cf25af0bc101698d44fc44b 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -1527,7 +1527,7 @@ if (is_chrome_branded && !is_android) {
+@@ -1528,7 +1528,7 @@ if (is_chrome_branded && !is_android) {
    }
  }
  
@@ -64,7 +64,7 @@ index 2119244016aa6f28b93d649c5c4866863c913fc1..7cf86d58523fad6e9ae2f50ede21a40c
    chrome_paks("packed_resources") {
      if (is_mac) {
        output_dir = "$root_gen_dir/repack"
-@@ -1555,6 +1555,12 @@ if (!is_android) {
+@@ -1556,6 +1556,12 @@ if (!is_android) {
    }
  }
  

+ 82 - 0
patches/chromium/revert_roll_clang_llvmorg-13-init-14732-g8a7b5ebf-2.patch

@@ -0,0 +1,82 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nico Weber <[email protected]>
+Date: Mon, 12 Jul 2021 18:41:05 +0000
+Subject: Revert "Roll clang llvmorg-13-init-14732-g8a7b5ebf-2 :
+ llvmorg-13-init-15040-gc10947b5-1"
+
+This reverts commit 1745624daa79670ba500e4567b8e9362ead7c441.
+
+Reason for revert: Somewhat speculative, see
+https://bugs.chromium.org/p/chromium/issues/detail?id=1228392
+
+Original change's description:
+> Roll clang llvmorg-13-init-14732-g8a7b5ebf-2 : llvmorg-13-init-15040-gc10947b5-1
+>
+> Ran `tools/clang/scripts/upload_revision.py c10947b5f808af312e9f904096ae1dbaf95ad9f6`.
+>
+> Bug: 1227195
+> Change-Id: I471547ef3d31806b3016b2243ea0098b910cbb12
+> Cq-Include-Trybots: chromium/try:chromeos-amd64-generic-cfi-thin-lto-rel
+> Cq-Include-Trybots: chromium/try:dawn-win10-x86-deps-rel
+> Cq-Include-Trybots: chromium/try:linux-chromeos-dbg
+> Cq-Include-Trybots: chromium/try:linux_angle_deqp_rel_ng
+> Cq-Include-Trybots: chromium/try:linux_chromium_cfi_rel_ng
+> Cq-Include-Trybots: chromium/try:linux_chromium_chromeos_msan_rel_ng
+> Cq-Include-Trybots: chromium/try:linux_chromium_compile_dbg_32_ng
+> Cq-Include-Trybots: chromium/try:linux_chromium_msan_rel_ng
+> Cq-Include-Trybots: chromium/try:mac-arm64-rel,mac_chromium_asan_rel_ng
+> Cq-Include-Trybots: chromium/try:win-asan,win7-rel
+> Cq-Include-Trybots: chromium/try:android-official,fuchsia-official
+> Cq-Include-Trybots: chromium/try:mac-official,linux-official
+> Cq-Include-Trybots: chromium/try:win-official,win32-official
+> Cq-Include-Trybots: chrome/try:iphone-device,ipad-device
+> Cq-Include-Trybots: chrome/try:linux-chromeos-chrome
+> Cq-Include-Trybots: chrome/try:win-chrome,win64-chrome,mac-chrome
+> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3019458
+> Auto-Submit: Nico Weber <[email protected]>
+> Commit-Queue: Hans Wennborg <[email protected]>
+> Reviewed-by: Hans Wennborg <[email protected]>
+> Cr-Commit-Position: refs/heads/master@{#900373}
+
+Bug: 1227195
+Change-Id: Ic48878632e844411eae89b04d78253df08eee6df
+Cq-Include-Trybots: chromium/try:chromeos-amd64-generic-cfi-thin-lto-rel
+Cq-Include-Trybots: chromium/try:dawn-win10-x86-deps-rel
+Cq-Include-Trybots: chromium/try:linux-chromeos-dbg
+Cq-Include-Trybots: chromium/try:linux_angle_deqp_rel_ng
+Cq-Include-Trybots: chromium/try:linux_chromium_cfi_rel_ng
+Cq-Include-Trybots: chromium/try:linux_chromium_chromeos_msan_rel_ng
+Cq-Include-Trybots: chromium/try:linux_chromium_compile_dbg_32_ng
+Cq-Include-Trybots: chromium/try:linux_chromium_msan_rel_ng
+Cq-Include-Trybots: chromium/try:mac-arm64-rel,mac_chromium_asan_rel_ng
+Cq-Include-Trybots: chromium/try:win-asan,win7-rel
+Cq-Include-Trybots: chromium/try:android-official,fuchsia-official
+Cq-Include-Trybots: chromium/try:mac-official,linux-official
+Cq-Include-Trybots: chromium/try:win-official,win32-official
+Cq-Include-Trybots: chrome/try:iphone-device,ipad-device
+Cq-Include-Trybots: chrome/try:linux-chromeos-chrome
+Cq-Include-Trybots: chrome/try:win-chrome,win64-chrome,mac-chrome
+No-Presubmit: true
+No-Tree-Checks: true
+No-Try: true
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3022043
+Auto-Submit: Nico Weber <[email protected]>
+Commit-Queue: Rubber Stamper <[email protected]>
+Bot-Commit: Rubber Stamper <[email protected]>
+Cr-Commit-Position: refs/heads/master@{#900568}
+
+diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
+index 93947d92c483def78f0ebbeb1a6f6921a174237d..23127877b276aefbb443686a8295a42d149768e0 100755
+--- a/tools/clang/scripts/update.py
++++ b/tools/clang/scripts/update.py
+@@ -39,8 +39,8 @@ import zipfile
+ # https://chromium.googlesource.com/chromium/src/+/main/docs/updating_clang.md
+ # Reverting problematic clang rolls is safe, though.
+ # This is the output of `git describe` and is usable as a commit-ish.
+-CLANG_REVISION = 'llvmorg-13-init-15163-g98033fdc'
+-CLANG_SUB_REVISION = 1
++CLANG_REVISION = 'llvmorg-13-init-14732-g8a7b5ebf'
++CLANG_SUB_REVISION = 2
+ 
+ PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION)
+ RELEASE_VERSION = '13.0.0'

+ 2 - 2
patches/chromium/scroll_bounce_flag.patch

@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
 Patch to make scrollBounce option work.
 
 diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
-index 0bc724506b213c5e95972df96b43bf755fc049ad..2426947095205f29352e9f25c0e4d39eadda16cf 100644
+index d372704f462dcc7351796b59b39b4c95d6db84d5..c11f9f72a03e8bdbd03aca30c052722371dd506e 100644
 --- a/content/renderer/render_thread_impl.cc
 +++ b/content/renderer/render_thread_impl.cc
-@@ -1264,7 +1264,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
+@@ -1254,7 +1254,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
  }
  
  bool RenderThreadImpl::IsElasticOverscrollEnabled() {

+ 0 - 48
patches/chromium/set_svgimage_page_after_document_install.patch

@@ -1,48 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fredrik=20S=C3=B6derqvist?= <[email protected]>
-Date: Fri, 9 Jul 2021 08:44:55 +0000
-Subject: Set SVGImage::page_ after document install
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-We can end up having the associated ImageResource call
-SVGImage::ResetAnimation() before the Document has been associated with
-the SVGImage's LocalFrame, but after the link to the initial Document
-was severed, if a GC is triggered within that window and ends up
-collecting the last observer of the ImageResource.
-
-By assigning |SVGImage::page_| after the installing the document, we
-close this hole since SVGImage::RootElement() (called by
-SVGImage::ResetAnimation()) will now observe a null Page and return null
-without attempting to dereference the document.
-
-Bug: 1216190
-Change-Id: I26e08848e5b9bd52e3377841eee35e4acc03d320
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3010140
-Reviewed-by: Stephen Chenney <[email protected]>
-Commit-Queue: Fredrik Söderquist <[email protected]>
-Cr-Commit-Position: refs/heads/master@{#899922}
-
-diff --git a/third_party/blink/renderer/core/svg/graphics/svg_image.cc b/third_party/blink/renderer/core/svg/graphics/svg_image.cc
-index b23ad2192bec4d1cac9d704074d12c9e00d4d2f5..ff2bf69be27f0afcb6a9909e716495e8d4a127ef 100644
---- a/third_party/blink/renderer/core/svg/graphics/svg_image.cc
-+++ b/third_party/blink/renderer/core/svg/graphics/svg_image.cc
-@@ -851,12 +851,15 @@ Image::SizeAvailability SVGImage::DataChanged(bool all_data_received) {
-   // SVG Images are transparent.
-   frame->View()->SetBaseBackgroundColor(Color::kTransparent);
- 
--  page_ = page;
--
-   TRACE_EVENT0("blink", "SVGImage::dataChanged::load");
- 
-   frame->ForceSynchronousDocumentInstall("image/svg+xml", Data());
- 
-+  // Set up our Page reference after installing our document. This avoids
-+  // tripping on a non-existing (null) Document if a GC is triggered during the
-+  // set up and ends up collecting the last owner/observer of this image.
-+  page_ = page;
-+
-   // Intrinsic sizing relies on computed style (e.g. font-size and
-   // writing-mode).
-   frame->GetDocument()->UpdateStyleAndLayoutTree();

+ 5 - 5
patches/chromium/support_mixed_sandbox_with_zygote.patch

@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
 does touch a security-sensitive class.
 
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index f354e09e070591017510ddf2f96785584da937b1..65c5fa70ee04fe5285979a93ab67449137dae304 100644
+index 55c4e3c2bb0b353724c6a1a2f6f853705d1ba501..224e23ad3584dd4511a4173d632547d4a2ee4e9c 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -427,10 +427,18 @@ class RendererSandboxedProcessLauncherDelegate
+@@ -428,10 +428,18 @@ class RendererSandboxedProcessLauncherDelegate
   public:
    RendererSandboxedProcessLauncherDelegate() = default;
  
@@ -44,7 +44,7 @@ index f354e09e070591017510ddf2f96785584da937b1..65c5fa70ee04fe5285979a93ab674491
      const base::CommandLine& browser_command_line =
          *base::CommandLine::ForCurrentProcess();
      base::CommandLine::StringType renderer_prefix =
-@@ -448,6 +456,11 @@ class RendererSandboxedProcessLauncherDelegate
+@@ -449,6 +457,11 @@ class RendererSandboxedProcessLauncherDelegate
    sandbox::policy::SandboxType GetSandboxType() override {
      return sandbox::policy::SandboxType::kRenderer;
    }
@@ -56,7 +56,7 @@ index f354e09e070591017510ddf2f96785584da937b1..65c5fa70ee04fe5285979a93ab674491
  };
  
  #if defined(OS_WIN)
-@@ -459,6 +472,9 @@ class RendererSandboxedProcessLauncherDelegateWin
+@@ -460,6 +473,9 @@ class RendererSandboxedProcessLauncherDelegateWin
                                                bool is_jit_disabled)
        : renderer_code_integrity_enabled_(
              GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) {
@@ -66,7 +66,7 @@ index f354e09e070591017510ddf2f96785584da937b1..65c5fa70ee04fe5285979a93ab674491
      if (is_jit_disabled) {
        dynamic_code_can_be_disabled_ = true;
        return;
-@@ -2009,9 +2025,15 @@ bool RenderProcessHostImpl::Init() {
+@@ -2016,9 +2032,15 @@ bool RenderProcessHostImpl::Init() {
      std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
          std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
              cmd_line.get(), IsJitDisabled());

+ 29 - 0
patches/chromium/update_the_py_wheel_to_a_version_that_is_compatible_with.patch

@@ -0,0 +1,29 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Brian Ryner <[email protected]>
+Date: Thu, 22 Jul 2021 18:54:22 +0000
+Subject: Update the "py" wheel to a version that is compatible with
+ pytest-6.2.2.
+
+Bug: 1231439
+
+Change-Id: Iaf68a72c01aa0efe2a6007a8fc1060afe69598c6
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3044950
+Commit-Queue: Brian Ryner <[email protected]>
+Commit-Queue: Robbie Iannucci <[email protected]>
+Auto-Submit: Brian Ryner <[email protected]>
+Reviewed-by: Robbie Iannucci <[email protected]>
+Cr-Commit-Position: refs/heads/master@{#904417}
+
+diff --git a/.vpython3 b/.vpython3
+index 14faab39343e82ff6706e625f948f97163863bb8..0aeeb03f79bdd6cbfb62a47391f4a996619b0594 100644
+--- a/.vpython3
++++ b/.vpython3
+@@ -204,7 +204,7 @@ wheel <
+ 
+ wheel <
+   name: "infra/python/wheels/py-py2_py3"
+-  version: "version:1.5.3"
++  version: "version:1.10.0"
+ >
+ 
+ wheel <

+ 4 - 4
patches/chromium/web_contents.patch

@@ -9,10 +9,10 @@ is needed for OSR.
 Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
 
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 0d18a4b79f72a8b8ad93aecb1ee4fe49a2699aaf..ffffc4521b9707956a063819a726eac92e87c1aa 100644
+index 5939da8d016b245b9ce322764b90015463c2c2d3..30cb5d15ba0ed7727d6eddcf15f3443069244404 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -2926,6 +2926,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2878,6 +2878,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
    frame_tree_.Init(site_instance.get(), params.renderer_initiated_creation,
                     params.main_frame_name);
  
@@ -25,7 +25,7 @@ index 0d18a4b79f72a8b8ad93aecb1ee4fe49a2699aaf..ffffc4521b9707956a063819a726eac9
    WebContentsViewDelegate* delegate =
        GetContentClient()->browser()->GetWebContentsViewDelegate(this);
  
-@@ -2936,6 +2942,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2888,6 +2894,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
      view_.reset(CreateWebContentsView(this, delegate,
                                        &render_view_host_delegate_view_));
    }
@@ -34,7 +34,7 @@ index 0d18a4b79f72a8b8ad93aecb1ee4fe49a2699aaf..ffffc4521b9707956a063819a726eac9
    CHECK(view_.get());
  
 diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
-index 43105b1caf9a3ee81ae0ecf5b9f13165b7d72222..4d6ba5102935330abc6f2354f4c442ad3a045e09 100644
+index 279d292d965079cc477dab7bd51360dcbb0565ba..67fb7c487e68af563859e76d4b0f46e44756128a 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
 @@ -85,10 +85,13 @@ class BrowserContext;

+ 2 - 2
patches/chromium/webview_cross_drag.patch

@@ -8,10 +8,10 @@ This allows dragging and dropping between <webview>s.
 Originally landed in https://github.com/electron/libchromiumcontent/pull/267
 
 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
-index c6491944fb2364b0a9e6276ac5e786b31c1065b2..0e3b7cc619f7dd2465c8eb7501ab557e59d48c5f 100644
+index 239045e5de72c070b649ddcf21cdfccb0203ff80..c2c6edb69b7eea1077d49671d0a532f9f6181a98 100644
 --- a/content/browser/web_contents/web_contents_view_aura.cc
 +++ b/content/browser/web_contents/web_contents_view_aura.cc
-@@ -789,9 +789,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
+@@ -790,9 +790,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
  
  bool WebContentsViewAura::IsValidDragTarget(
      RenderWidgetHostImpl* target_rwh) const {

+ 2 - 2
patches/chromium/webview_fullscreen.patch

@@ -14,10 +14,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 6dfd547b9e6c4e345af79d4875be95fb6a6d8bb0..66bf5aea4d53e72e9b1f6fb0d7a64290db6c14b7 100644
+index c57f9f72abe841d31e0dd14924e73cb565e9d226..48512a8f96be1ccaab1a4ae19e9d62dafd01bfcc 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -5661,6 +5661,15 @@ void RenderFrameHostImpl::EnterFullscreen(
+@@ -5699,6 +5699,15 @@ void RenderFrameHostImpl::EnterFullscreen(
      notified_instances.insert(parent_site_instance);
    }
  

+ 4 - 4
patches/chromium/worker_context_will_destroy.patch

@@ -26,10 +26,10 @@ index 7ec0901cf6ba2c3b8d8dd69d02f12c1c603f13b8..d8c7a1954d5acc0eb4bb675795038eae
    // An empty URL is returned if the URL is not overriden.
    virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
 diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
-index cb70283baf85185f0332d967d49c7033800f1f8e..e3e45f37ea1b3e732cb85c151fd98ce491e39c47 100644
+index 2ca27e17e9e10a41b67789cad9d1cbb25ba47b2b..fa073fa881abe4c6413e495cd34a4c6bfbb8c027 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -939,6 +939,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
+@@ -942,6 +942,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
    WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
  }
  
@@ -55,10 +55,10 @@ index cb8770a47a808279d7c1999245d19eae3c941a4e..523a489b89735d77a2d44b5f5d327b20
        const blink::WebSecurityOrigin& script_origin) override;
    blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel()
 diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
-index cd2ebc947ed03690d7954b4bf6c1d20ebcfaa81b..401bae87ccfdde9a73c42c6e7a3787734c443190 100644
+index 9d96af5c4c9b5f3b10fca898841258568bc19537..caee6e5b50eaa2c5afc03720ea2f42e919c2dea1 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
-@@ -728,6 +728,7 @@ class BLINK_PLATFORM_EXPORT Platform {
+@@ -727,6 +727,7 @@ class BLINK_PLATFORM_EXPORT Platform {
    virtual void DidStartWorkerThread() {}
    virtual void WillStopWorkerThread() {}
    virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

+ 6 - 15
patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch

@@ -35,10 +35,10 @@ index d8c7a1954d5acc0eb4bb675795038eae0e16bc05..0eee88a106abdc6f232b384265da03e8
    // from the worker thread.
    virtual void WillDestroyWorkerContextOnWorkerThread(
 diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
-index e3e45f37ea1b3e732cb85c151fd98ce491e39c47..7a5046aa9f6d6e8788af0893f6cce46507d31997 100644
+index fa073fa881abe4c6413e495cd34a4c6bfbb8c027..1df74eee844076e44f3b04a478c8e0d7228a062f 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -951,6 +951,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
+@@ -954,6 +954,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
        worker);
  }
  
@@ -65,10 +65,10 @@ index 523a489b89735d77a2d44b5f5d327b20dcbab3fb..842890143c2bc79f2acbf1d6f17cd8ea
    bool AllowScriptExtensionForServiceWorker(
        const blink::WebSecurityOrigin& script_origin) override;
 diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
-index 401bae87ccfdde9a73c42c6e7a3787734c443190..b6edfa6c34e5519e1fcda6a6d402d807f2a26719 100644
+index caee6e5b50eaa2c5afc03720ea2f42e919c2dea1..50a040a52efeef579eec28d66588f5aa6d442322 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
-@@ -728,6 +728,8 @@ class BLINK_PLATFORM_EXPORT Platform {
+@@ -727,6 +727,8 @@ class BLINK_PLATFORM_EXPORT Platform {
    virtual void DidStartWorkerThread() {}
    virtual void WillStopWorkerThread() {}
    virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -78,10 +78,10 @@ index 401bae87ccfdde9a73c42c6e7a3787734c443190..b6edfa6c34e5519e1fcda6a6d402d807
    virtual bool AllowScriptExtensionForServiceWorker(
        const WebSecurityOrigin& script_origin) {
 diff --git a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
-index a52865104b5df3faaf0e861e921c3cd5c4766998..48364b2a48cfb1d80415f3cbf89403bff602e056 100644
+index 8e576c2512fcd28c80bde706c89e497fd105e0d8..ba0266e458a29603c66e2c6aa8a7d0a0912e9de1 100644
 --- a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
-@@ -257,6 +257,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() {
+@@ -256,6 +256,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() {
    V8PerContextData* per_context_data = script_state_->PerContextData();
    ignore_result(per_context_data->ConstructorForType(
        global_scope_->GetWrapperTypeInfo()));
@@ -89,12 +89,3 @@ index a52865104b5df3faaf0e861e921c3cd5c4766998..48364b2a48cfb1d80415f3cbf89403bf
    // Inform V8 that origin trial information is now connected with the context,
    // and V8 can extend the context with origin trial features.
    isolate_->InstallConditionalFeatures(script_state_->GetContext());
-@@ -285,6 +286,8 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() {
-   wrapper_type_info->InstallConditionalFeatures(
-       context, *world_, global_object, v8::Local<v8::Object>(),
-       v8::Local<v8::Function>(), global_interface_template);
-+
-+  Platform::Current()->WorkerScriptReadyForEvaluation(context);
- #endif  // USE_BLINK_V8_BINDING_NEW_IDL_INTERFACE
- }
- 

+ 1 - 0
patches/node/.patches

@@ -34,3 +34,4 @@ src_inline_asynccleanuphookhandle_in_headers.patch
 fix_handle_new_tostring_behavior_in_v8_serdes_test.patch
 node-api_faster_threadsafe_function.patch
 src_remove_extra_semi_after_member_fn.patch
+errors_refactor_to_use_more_primordials.patch

+ 68 - 0
patches/node/errors_refactor_to_use_more_primordials.patch

@@ -0,0 +1,68 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Antoine du Hamel <[email protected]>
+Date: Wed, 18 Nov 2020 10:57:14 +0100
+Subject: errors: refactor to use more primordials
+
+PR-URL: https://github.com/nodejs/node/pull/36167
+Reviewed-By: James M Snell <[email protected]>
+Reviewed-By: Trivikram Kamat <[email protected]>
+(cherry picked from commit 893d8a60cbf7ae3d42655547beb703249b96d895)
+
+diff --git a/lib/internal/errors.js b/lib/internal/errors.js
+index 447db182eb2ee3d8cb8df0bd929a7244bf20ab9d..2abfe5800835dccb83698e93b51ccb3bb7dad0c9 100644
+--- a/lib/internal/errors.js
++++ b/lib/internal/errors.js
+@@ -12,6 +12,7 @@
+ 
+ const {
+   ArrayIsArray,
++  ArrayPrototypeJoin,
+   Error,
+   ErrorCaptureStackTrace,
+   ErrorPrototypeToString,
+@@ -23,7 +24,9 @@ const {
+   ObjectDefineProperty,
+   ObjectKeys,
+   RangeError,
++  ReflectApply,
+   String,
++  StringPrototypeMatch,
+   StringPrototypeStartsWith,
+   Symbol,
+   SymbolFor,
+@@ -78,7 +81,7 @@ const prepareStackTrace = (globalThis, error, trace) => {
+   if (trace.length === 0) {
+     return errorString;
+   }
+-  return `${errorString}\n    at ${trace.join('\n    at ')}`;
++  return `${errorString}\n    at ${ArrayPrototypeJoin(trace, '\n    at ')}`;
+ };
+ 
+ const maybeOverridePrepareStackTrace = (globalThis, error, trace) => {
+@@ -354,10 +357,11 @@ function getMessage(key, args, self) {
+       `Code: ${key}; The provided arguments length (${args.length}) does not ` +
+         `match the required ones (${msg.length}).`
+     );
+-    return msg.apply(self, args);
++    return ReflectApply(msg, self, args);
+   }
+ 
+-  const expectedLength = (msg.match(/%[dfijoOs]/g) || []).length;
++  const expectedLength =
++    (StringPrototypeMatch(msg, /%[dfijoOs]/g) || []).length;
+   assert(
+     expectedLength === args.length,
+     `Code: ${key}; The provided arguments length (${args.length}) does not ` +
+diff --git a/test/parallel/test-errors-systemerror.js b/test/parallel/test-errors-systemerror.js
+index e801871f40af2c2f09215e78ad8196cf4e6b070c..2a20588e75b386e199f4c42d133273a50d29785d 100644
+--- a/test/parallel/test-errors-systemerror.js
++++ b/test/parallel/test-errors-systemerror.js
+@@ -9,7 +9,7 @@ assert.throws(
+   () => { new SystemError(); },
+   {
+     name: 'TypeError',
+-    message: 'Cannot read property \'match\' of undefined'
++    message: 'String.prototype.match called on null or undefined'
+   }
+ );
+ 

+ 3 - 3
patches/v8/build_gn.patch

@@ -9,7 +9,7 @@ necessary for native modules to load.
 Also, some fixes relating to mksnapshot on ARM.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 6189f4e0105c381df05856ceedc6d036baf470a7..4d76cf090c3f3c9add0f1104833642963d4ddbc2 100644
+index 17bab98e8faba556e7711c28f00c70dbefdfa3a4..1074e91c5d9045f7c9872c09c41989ddfa10054f 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -545,7 +545,7 @@ config("internal_config") {
@@ -21,7 +21,7 @@ index 6189f4e0105c381df05856ceedc6d036baf470a7..4d76cf090c3f3c9add0f110483364296
      defines += [ "BUILDING_V8_SHARED" ]
    }
  }
-@@ -5292,7 +5292,7 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -5297,7 +5297,7 @@ if (current_toolchain == v8_generator_toolchain) {
        "src/interpreter/bytecodes.h",
      ]
  
@@ -30,7 +30,7 @@ index 6189f4e0105c381df05856ceedc6d036baf470a7..4d76cf090c3f3c9add0f110483364296
  
      deps = [
        ":v8_libbase",
-@@ -5330,6 +5330,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
+@@ -5335,6 +5335,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
  
      configs = [ ":internal_config" ]
  

+ 4 - 4
patches/v8/dcheck.patch

@@ -6,10 +6,10 @@ Subject: dcheck.patch
 https://github.com/auchenberg/volkswagen
 
 diff --git a/src/api/api.cc b/src/api/api.cc
-index 944535a4748921bfbf9bdcb2e3cc2aa8048e5278..875d238c1da429cc4ba007c7e90a2d1e07196169 100644
+index 84295e5cde0b2828d965b423e088793864ce29db..63aed17828461e5491904f368ef914edc370fa4c 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -8788,7 +8788,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
+@@ -8798,7 +8798,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
  }
  
  void Isolate::PerformMicrotaskCheckpoint() {
@@ -19,10 +19,10 @@ index 944535a4748921bfbf9bdcb2e3cc2aa8048e5278..875d238c1da429cc4ba007c7e90a2d1e
    isolate->default_microtask_queue()->PerformCheckpoint(this);
  }
 diff --git a/src/heap/heap.cc b/src/heap/heap.cc
-index 05dda00b56740b3ca0d5f5ced276cbbb6abe9f22..509e1f6a67f5b17df0e6e65e807c92a00abe00d5 100644
+index a4c0e4a728dc474c958014c148f0b9dce77218d5..b8d453270cb27940782079064049afe61d792db4 100644
 --- a/src/heap/heap.cc
 +++ b/src/heap/heap.cc
-@@ -5874,9 +5874,9 @@ void Heap::DeinitSharedSpaces() {
+@@ -5945,9 +5945,9 @@ void Heap::DeinitSharedSpaces() {
  void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
                                   GCType gc_type, void* data) {
    DCHECK_NOT_NULL(callback);

+ 1 - 1
patches/v8/do_not_export_private_v8_symbols_on_windows.patch

@@ -12,7 +12,7 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
 contain any standard C++ library exports (e.g. `std::ostringstream`).
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 321212be9127b1f892a30a51c6a0c3fe3d7ca394..ab5c79ec47ca24fb87fa76cb1c020a6177ce7dca 100644
+index c75c0d42411f9731d9ff914abfbf93a7cf35d205..778e8331433e8ea3047b3b31558995079e067547 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -545,6 +545,10 @@ config("internal_config") {

+ 2 - 2
patches/v8/export_symbols_needed_for_windows_build.patch

@@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build
 These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
 
 diff --git a/src/objects/objects.h b/src/objects/objects.h
-index 7be9c731e8a5ef2908cb617ece2096fb5f39c4fb..a5ab83832aa9824fb1ff1c5b59ea14120934d436 100644
+index 9ca08df61248e287d21e6554a9a53e46134bf84f..ea9b9167f268d268d26c1fb3d5e910a8baf96c22 100644
 --- a/src/objects/objects.h
 +++ b/src/objects/objects.h
-@@ -848,7 +848,7 @@ enum class KeyCollectionMode {
+@@ -855,7 +855,7 @@ enum class KeyCollectionMode {
  // Utility superclass for stack-allocated objects that must be updated
  // on gc.  It provides two ways for the gc to update instances, either
  // iterating or updating after gc.

+ 2 - 2
patches/v8/expose_mksnapshot.patch

@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
 Needed in order to target mksnapshot for mksnapshot zip.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 4d76cf090c3f3c9add0f1104833642963d4ddbc2..321212be9127b1f892a30a51c6a0c3fe3d7ca394 100644
+index 1074e91c5d9045f7c9872c09c41989ddfa10054f..c75c0d42411f9731d9ff914abfbf93a7cf35d205 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -5304,7 +5304,6 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -5309,7 +5309,6 @@ if (current_toolchain == v8_generator_toolchain) {
  
  if (current_toolchain == v8_snapshot_toolchain) {
    v8_executable("mksnapshot") {

+ 1 - 1
patches/v8/workaround_an_undefined_symbol_error.patch

@@ -12,7 +12,7 @@ By moving some functions out of the the arm64-assembler header file,
 this error no longer seems to happen.
 
 diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
-index 07bb66383df58f6f49c6a17f5e41680596daf214..4eb9c1c2fa362a449edad7840f339c3080bbe35f 100644
+index bf39a2e416702f5409c343f770f731d37aeb0a49..d562eaae0681f3c866644b1569efb145b671f63f 100644
 --- a/src/codegen/arm64/assembler-arm64.cc
 +++ b/src/codegen/arm64/assembler-arm64.cc
 @@ -3629,6 +3629,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,

+ 1 - 1
script/nan-spec-runner.js

@@ -38,7 +38,7 @@ async function main () {
   const cxxflags = [
     '-std=c++14',
     '-nostdinc++',
-    '-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS', // needed by next line
+    `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++')}"`,
     `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++', 'trunk', 'include')}"`,
     `-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++abi', 'trunk', 'include')}"`,
     '-fPIC'

+ 1 - 1
shell/browser/api/electron_api_web_contents.cc

@@ -2516,7 +2516,7 @@ void WebContents::Print(gin::Arguments* args) {
   // We don't want to allow the user to enable these settings
   // but we need to set them or a CHECK is hit.
   settings.SetIntKey(printing::kSettingPrinterType,
-                     static_cast<int>(printing::PrinterType::kLocal));
+                     static_cast<int>(printing::mojom::PrinterType::kLocal));
   settings.SetBoolKey(printing::kSettingShouldPrintSelectionOnly, false);
   settings.SetBoolKey(printing::kSettingRasterizePdf, false);
 

+ 1 - 1
shell/browser/extensions/electron_extension_system.cc

@@ -143,7 +143,7 @@ ServiceWorkerManager* ElectronExtensionSystem::service_worker_manager() {
 }
 
 UserScriptManager* ElectronExtensionSystem::user_script_manager() {
-  return new UserScriptManager(browser_context_);
+  return user_script_manager_.get();
 }
 
 StateStore* ElectronExtensionSystem::state_store() {

+ 1 - 0
shell/browser/protocol_registry.cc

@@ -7,6 +7,7 @@
 #include <memory>
 #include <utility>
 
+#include "base/stl_util.h"
 #include "content/public/browser/web_contents.h"
 #include "shell/browser/electron_browser_context.h"
 #include "shell/browser/net/asar/asar_url_loader_factory.h"

+ 4 - 0
shell/browser/relauncher.cc

@@ -8,6 +8,10 @@
 #include <utility>
 #include <vector>
 
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
 #include "base/files/file_util.h"
 #include "base/logging.h"
 #include "base/path_service.h"

+ 1 - 1
shell/browser/relauncher_win.cc

@@ -110,7 +110,7 @@ void RelauncherSynchronizeWithParent() {
   // Notify the parent process that it can quit now.
   StringType name = internal::GetWaitEventName(process.Pid());
   base::win::ScopedHandle wait_event(
-      ::CreateEventW(NULL, TRUE, FALSE, name.c_str()));
+      CreateEvent(NULL, TRUE, FALSE, name.c_str()));
   ::SetEvent(wait_event.Get());
 
   // Wait for parent process to quit.

+ 1 - 1
shell/browser/ui/cocoa/window_buttons_view.mm

@@ -4,9 +4,9 @@
 
 #include "shell/browser/ui/cocoa/window_buttons_view.h"
 
+#include "base/cxx17_backports.h"
 #include "base/i18n/rtl.h"
 #include "base/logging.h"
-#include "base/stl_util.h"
 #include "ui/gfx/mac/coordinate_conversion.h"
 
 namespace {

+ 3 - 2
shell/browser/ui/inspectable_web_contents.cc

@@ -908,8 +908,9 @@ void InspectableWebContents::HandleMessageFromDevToolsFrontend(
     params = &empty_params;
   }
   int id = message.FindIntKey(kFrontendHostId).value_or(0);
-  base::ListValue* params_list = nullptr;
-  params->GetAsList(&params_list);
+  std::vector<base::Value> params_list;
+  if (params)
+    params_list = std::move(*params).TakeList();
   embedder_message_dispatcher_->Dispatch(
       base::BindRepeating(&InspectableWebContents::SendMessageAck,
                           weak_factory_.GetWeakPtr(), id),

+ 1 - 1
shell/browser/ui/win/jump_list.cc

@@ -6,8 +6,8 @@
 
 #include <propkey.h>  // for PKEY_* constants
 
+#include "base/cxx17_backports.h"
 #include "base/logging.h"
-#include "base/stl_util.h"
 #include "base/win/scoped_co_mem.h"
 #include "base/win/scoped_propvariant.h"
 #include "base/win/win_util.h"

+ 1 - 0
shell/browser/web_contents_permission_helper.h

@@ -5,6 +5,7 @@
 #ifndef SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_
 #define SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_
 
+#include "base/values.h"
 #include "content/public/browser/media_stream_request.h"
 #include "content/public/browser/permission_type.h"
 #include "content/public/browser/web_contents_user_data.h"

+ 2 - 1
shell/common/application_info_win.cc

@@ -82,7 +82,8 @@ bool IsRunningInDesktopBridgeImpl() {
       initialize_get_package_family_name = false;
       HMODULE kernel32_base = GetModuleHandle(L"Kernel32.dll");
       if (!kernel32_base) {
-        NOTREACHED() << " " << __FUNCTION__ << "(): Can't open Kernel32.dll";
+        NOTREACHED() << std::string(" ") << std::string(__FUNCTION__)
+                     << std::string("(): Can't open Kernel32.dll");
         return false;
       }
 

+ 1 - 1
shell/common/gin_helper/callback.cc

@@ -4,7 +4,7 @@
 
 #include "shell/common/gin_helper/callback.h"
 
-#include "base/stl_util.h"
+#include "base/cxx17_backports.h"
 #include "content/public/browser/browser_thread.h"
 #include "gin/dictionary.h"
 

+ 1 - 1
shell/renderer/renderer_client_base.cc

@@ -131,7 +131,7 @@ RendererClientBase::RendererClientBase() {
   std::vector<std::string> streaming_schemes_list =
       ParseSchemesCLISwitch(command_line, switches::kStreamingSchemes);
   for (const std::string& scheme : streaming_schemes_list)
-    media::AddStreamingScheme(scheme.c_str());
+    blink::AddStreamingScheme(scheme.c_str());
   // Parse --secure-schemes=scheme1,scheme2
   std::vector<std::string> secure_schemes_list =
       ParseSchemesCLISwitch(command_line, switches::kSecureSchemes);