From 9d0e6d09f0be0abbeae46dd3d66afd96d2daacaa Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 18:01:07 -0400 Subject: [PATCH] chore: bump chromium to 119.0.6043.0 (main) (#40045) * chore: bump chromium in DEPS to 119.0.6036.0 * chore: bump chromium in DEPS to 119.0.6037.0 * chore: bump chromium in DEPS to 119.0.6039.0 * chore: bump chromium in DEPS to 119.0.6041.0 * chore: update chromium patches * 4765230: Move //content/browser/renderer_host/event_with_latency_info.h to //content/common/input | https://chromium-review.googlesource.com/c/chromium/src/+/4765230 * 4890325: ScopedRunLoopTimeout: add custom timeout callback handler for testing | https://chromium-review.googlesource.com/c/chromium/src/+/4890325 * chore: update all patches * chore: bump chromium in DEPS to 119.0.6043.0 * 4898682: [api] Add Error.cause to V8 API https://chromium-review.googlesource.com/c/v8/v8/+/4898682 * 4837192: Plumb origin through for drags. https://chromium-review.googlesource.com/c/chromium/src/+/4837192 * Prevent content analysis on web pages that don't accept drag and drop. https://chromium-review.googlesource.com/c/chromium/src/+/4814086 * Make getting displayed notifications work with notification attribution. https://chromium-review.googlesource.com/c/chromium/src/+/4738935 * 4898682: [api] Add Error.cause to V8 API https://chromium-review.googlesource.com/c/v8/v8/+/4898682 * lib,test: do not hardcode Buffer.kMaxLength https://github.com/nodejs/node/pull/49876 * chore: remove Goma warning from mksnapshot_args * 4776412: Remove Windows-specific wstring variants of StringPrintf() etc. https://chromium-review.googlesource.com/c/chromium/src/+/4776412 * [dPWA] Prevent WebAppInstallInfo from being included on Android https://chromium-review.googlesource.com/c/chromium/src/+/4886594 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: VerteDinde Co-authored-by: John Kleinschmidt --- .circleci/config/base.yml | 1 + DEPS | 2 +- appveyor-woa.yml | 2 +- appveyor.yml | 2 +- chromium_src/BUILD.gn | 1 + ...lectron_deps_to_license_credits_file.patch | 2 +- ...er_to_linuxui_getwindowframeprovider.patch | 10 +- ..._scheduler_throttling_per_renderview.patch | 6 +- patches/chromium/blink_local_frame.patch | 2 +- .../build_add_electron_tracing_category.patch | 4 +- ...build_disable_partition_alloc_on_mac.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 18 +- ...ld_config_in_the_required_components.patch | 38 ++--- patches/chromium/can_create_window.patch | 20 +-- ...d_buildflag_guard_around_new_include.patch | 6 +- ..._introduce_blocking_api_for_electron.patch | 8 +- ...screationoverridden_with_full_params.patch | 6 +- ...e_browser_v8_snapshot_file_name_fuse.patch | 14 +- .../custom_protocols_plzserviceworker.patch | 8 +- .../disable_color_correct_rendering.patch | 6 +- .../disable_compositor_recycling.patch | 4 +- patches/chromium/disable_hidden.patch | 8 +- ...xpose_setuseragent_on_networkcontext.patch | 6 +- ...egenerationcheckcallbackinmainthread.patch | 2 +- .../extend_apply_webpreferences.patch | 2 +- ..._registry_to_multibuffer_data_source.patch | 2 +- ...screen_rendering_with_viz_compositor.patch | 6 +- ...etdefersloading_on_webdocumentloader.patch | 6 +- ...ding_non-standard_schemes_in_iframes.patch | 8 +- ...level_aura_window_in_webcontentsimpl.patch | 6 +- ...x_harden_blink_scriptstate_maybefrom.patch | 8 +- ...ingshelper_behind_branding_buildflag.patch | 14 +- ...board_hides_on_input_blur_in_webview.patch | 10 +- ..._properly_honor_printing_page_ranges.patch | 2 +- ...from_localframe_requestexecutescript.patch | 14 +- ...t_menu_item_when_opened_via_keyboard.patch | 4 +- patches/chromium/frame_host_manager.patch | 4 +- .../gin_enable_disable_v8_platform.patch | 6 +- ...gpu_notify_when_dxdiag_request_fails.patch | 2 +- .../chromium/gritsettings_resource_ids.patch | 4 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- .../mas_disable_remote_accessibility.patch | 22 +-- ...emote_certificate_verification_logic.patch | 8 +- .../chromium/notification_provenance.patch | 16 +- patches/chromium/picture-in-picture.patch | 2 +- patches/chromium/printing.patch | 32 ++-- ...r_changes_to_the_webcontentsobserver.patch | 8 +- ...pose_hostimportmoduledynamically_and.patch | 10 +- ...store_base_adaptcallbackforrepeating.patch | 8 +- .../render_widget_host_view_base.patch | 9 +- patches/chromium/resource_file_conflict.patch | 6 +- .../support_mixed_sandbox_with_zygote.patch | 2 +- patches/chromium/web_contents.patch | 2 +- patches/chromium/webview_cross_drag.patch | 8 +- patches/chromium/webview_fullscreen.patch | 6 +- .../worker_context_will_destroy.patch | 4 +- ...feat_add_hook_to_notify_script_ready.patch | 4 +- ...bals_to_allow_patching_devtools_dock.patch | 4 +- patches/node/.patches | 2 + ...st_do_not_hardcode_buffer_kmaxlength.patch | 156 ++++++++++++++++++ ...src_adapt_to_v8_exception_api_change.patch | 38 +++++ patches/v8/build_gn.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 4 +- shell/browser/browser_win.cc | 12 +- .../platform_notification_service.cc | 4 + .../platform_notification_service.h | 3 + shell/browser/osr/osr_web_contents_view.cc | 6 +- shell/browser/osr/osr_web_contents_view.h | 4 +- shell/browser/relauncher_win.cc | 4 +- shell/common/gin_helper/error_thrower.cc | 2 +- shell/common/gin_helper/error_thrower.h | 4 +- 71 files changed, 446 insertions(+), 232 deletions(-) create mode 100644 patches/node/lib_test_do_not_hardcode_buffer_kmaxlength.patch create mode 100644 patches/node/src_adapt_to_v8_exception_api_change.patch diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 01bb6eff1a..aa8ebf26dc 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -775,6 +775,7 @@ step-mksnapshot-build: &step-mksnapshot-build fi sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args + sed $SEDOPTION '/The gn arg use_goma=true .*/d' out/Default/mksnapshot_args if [ "`uname`" != "Darwin" ]; then if [ "$TARGET_ARCH" == "arm" ]; then electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot diff --git a/DEPS b/DEPS index 12521b6898..f6c2735847 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '119.0.6029.0', + '119.0.6043.0', 'node_version': 'v18.18.0', 'nan_version': diff --git a/appveyor-woa.yml b/appveyor-woa.yml index 0371fc54c3..076fd5552e 100644 --- a/appveyor-woa.yml +++ b/appveyor-woa.yml @@ -160,7 +160,7 @@ for: - gn desc out/Default v8:run_mksnapshot_default args > out/Default/default_mksnapshot_args # Remove unused args from mksnapshot_args - ps: >- - Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') } | Set-Content out/Default/mksnapshot_args + Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') -And -not $_.Contains('The gn arg use_goma=true') } | Set-Content out/Default/mksnapshot_args - ninja -C out/Default electron:electron_mksnapshot_zip - cd out\Default - 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S diff --git a/appveyor.yml b/appveyor.yml index 0a46dd78dc..f780cd1b13 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -158,7 +158,7 @@ for: - gn desc out/Default v8:run_mksnapshot_default args > out/Default/default_mksnapshot_args # Remove unused args from mksnapshot_args - ps: >- - Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') } | Set-Content out/Default/mksnapshot_args + Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') -And -not $_.Contains('The gn arg use_goma=true') } | Set-Content out/Default/mksnapshot_args - ninja -C out/Default electron:electron_mksnapshot_zip - cd out\Default - 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index e18007f5f1..26e32c8aaf 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -220,6 +220,7 @@ static_library("chrome") { "//chrome/browser/win/icon_reader_service.h", ] public_deps += [ + "//chrome/browser/web_applications/proto", "//chrome/services/util_win:lib", "//components/webapps/common:mojo_bindings", ] diff --git a/patches/chromium/add_electron_deps_to_license_credits_file.patch b/patches/chromium/add_electron_deps_to_license_credits_file.patch index f00302dc81..e6de4d8711 100644 --- a/patches/chromium/add_electron_deps_to_license_credits_file.patch +++ b/patches/chromium/add_electron_deps_to_license_credits_file.patch @@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron are included in `LICENSES.chromium.html` diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py -index e0e9996e78046fb626198beccbd08f20fc3b574d..90ad87295c197db4853056b0650e6f769de67b9d 100755 +index 9535c354a29fb5f5e98fdc60edeff2bdac40d69f..b9dcbe91ca6fd16d1d53cec6a589116ba7f7797d 100755 --- a/tools/licenses/licenses.py +++ b/tools/licenses/licenses.py @@ -413,6 +413,31 @@ SPECIAL_CASES = { diff --git a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch index 7a617422ab..f08ca67a0e 100644 --- a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch +++ b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch @@ -8,10 +8,10 @@ decorations in maximized mode where needed, preventing empty space caused by decoration shadows and rounded titlebars around the window while maximized. diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc -index f315a30f882c17623e1f33bcd90ff8d9ae11f4c4..b22a8d627935f5554cfb524bcf5d5d8948f38f2f 100644 +index a91b303e77f4b5b47742d12749eb70d857e0badf..284174aa697b3379863e0aa440b5d03c6b06f8e3 100644 --- a/ui/gtk/gtk_ui.cc +++ b/ui/gtk/gtk_ui.cc -@@ -517,12 +517,13 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { +@@ -523,12 +523,13 @@ std::unique_ptr GtkUi::CreateNavButtonProvider() { return std::make_unique(); } @@ -31,10 +31,10 @@ index f315a30f882c17623e1f33bcd90ff8d9ae11f4c4..b22a8d627935f5554cfb524bcf5d5d89 } diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h -index c257b869f0c790f8af1f29d42e5ceb9e40344d8a..5184aa47dda70beb2f66e6227b17b632970a5a33 100644 +index 8ae3369be0b628ce94eeb067b2be9f3ace31eccb..520de739d2f6f63757c15bf738c9c09b71c2a479 100644 --- a/ui/gtk/gtk_ui.h +++ b/ui/gtk/gtk_ui.h -@@ -108,7 +108,7 @@ class GtkUi : public ui::LinuxUiAndTheme { +@@ -109,7 +109,7 @@ class GtkUi : public ui::LinuxUiAndTheme { bool PreferDarkTheme() const override; void SetDarkTheme(bool dark) override; std::unique_ptr CreateNavButtonProvider() override; @@ -43,7 +43,7 @@ index c257b869f0c790f8af1f29d42e5ceb9e40344d8a..5184aa47dda70beb2f66e6227b17b632 private: using TintMap = std::map; -@@ -208,6 +208,8 @@ class GtkUi : public ui::LinuxUiAndTheme { +@@ -200,6 +200,8 @@ class GtkUi : public ui::LinuxUiAndTheme { // while Chrome is running. std::unique_ptr solid_frame_provider_; std::unique_ptr transparent_frame_provider_; diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index 838ae4126f..369180fd29 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,7 +6,7 @@ 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 631d43c65168bbc3843c5c848aee65ab9c0f761d..c0fea3501857bcbb2bdbc44e8852852579a7ee16 100644 +index 914e4cdd97154c2f0986f85b0ca5e48fbd518160..d1ce82f3137dc8de3722c6406b63c47fe878e68e 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc @@ -716,6 +716,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { @@ -99,7 +99,7 @@ index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152 // 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 1043f13dd1d47ba58e2cf5311d2ed2387ba97b14..fd48c793a0d447a4a6777f94c5b580fdf9b5b2d9 100644 +index acb43e9f5471ef78a260e76b3d0086f323e88235..31c22cd29208ef2ea1d02394b613ada32863db68 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -2407,6 +2407,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( @@ -113,7 +113,7 @@ index 1043f13dd1d47ba58e2cf5311d2ed2387ba97b14..fd48c793a0d447a4a6777f94c5b580fd bool storing_in_bfcache = new_state->is_in_back_forward_cache && !old_state->is_in_back_forward_cache; bool restoring_from_bfcache = !new_state->is_in_back_forward_cache && -@@ -3875,20 +3879,34 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3883,20 +3887,34 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index bd1ce05b9c..703c09f2c6 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -49,7 +49,7 @@ index e0ce2a1bcbef7ece6b320adf820ba49148a66fd7..6aefdcfc226089ab3ae149b75ebdc86b // 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 18d82b682d55a814e09a15724284738d1d18a570..0b39ef4e60da3d82b55c4093a02fcbb29a8205d0 100644 +index 2782ad135f843c1b61dfd0882f000e627b4d59a4..bb6e6804a49c10e5d0238aea61e4676a9dcfb72d 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -665,10 +665,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index a0946bab1d..47134fa900 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index 292e5ce4922b37a642233a70672d777f5ec6143a..2da2d79a05b0fbb4c53a21136cf47f51635afa03 100644 +index 2f9a9813f863caa8f444bbcf64806826f5a8febb..ca6eaa5e0925936a3e6a4343c7b992b6a3e045ed 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -80,6 +80,8 @@ +@@ -81,6 +81,8 @@ X("drm") \ X("drmcursor") \ X("dwrite") \ diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch index 7a5a29fff3..bf6d5b1089 100644 --- a/patches/chromium/build_disable_partition_alloc_on_mac.patch +++ b/patches/chromium/build_disable_partition_alloc_on_mac.patch @@ -9,7 +9,7 @@ and can be removed when the crash in fork is resolved. Related issue: https://github.com/electron/electron/issues/32718 diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni -index 622af2267251b3161f500e10ec667c184139285a..0c1a4e12483838ae3cbfb425173d8cd892eeee94 100644 +index a6306a0e042d9fa58568d690fdc76f973782299f..72e47348b644d49e1f63b0693fad01df3bb24f01 100644 --- a/build_overrides/partition_alloc.gni +++ b/build_overrides/partition_alloc.gni @@ -46,7 +46,7 @@ _disable_partition_alloc_everywhere = diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index b76c8a9397..ce742b878d 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -11,7 +11,7 @@ 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 200379c8f6c933f3877fc4c6b983ca64214b8d9e..d76d319cbd13f94d204fb60f0d8f564557a6fa08 100644 +index dcf02923c21e1c4c292eb800f6325e4bb764c823..8738860b44f179685198d2c0b9729fccbf6ebd6c 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -199,11 +199,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 200379c8f6c933f3877fc4c6b983ca64214b8d9e..d76d319cbd13f94d204fb60f0d8f5645 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 6d8f1e64934d8f2598300da2c15c1eb3b5386c10..7e682a8e229f250133ea7b12eac0f76576d9f657 100644 +index a214247d2c25052ef2f6aae8104cd27e6658f638..42bc2f85197ce52f861229f671144ed62892ae8e 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4777,7 +4777,7 @@ static_library("browser") { +@@ -4793,7 +4793,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 6d8f1e64934d8f2598300da2c15c1eb3b5386c10..7e682a8e229f250133ea7b12eac0f765 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index dad0cc292bcba8a25bb2c22576e35d4cb3ad2b53..9ae021a1ac9c4ef46be8b4477096454d68f97834 100644 +index 3742394f9fd091bfcdb72259272862e7e389dc31..dedc8d445bf76365eaa1aea4e83f25cb0f44b5f2 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -6880,7 +6880,6 @@ test("unit_tests") { +@@ -6892,7 +6892,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index dad0cc292bcba8a25bb2c22576e35d4cb3ad2b53..9ae021a1ac9c4ef46be8b4477096454d "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:win_unit_tests", -@@ -6901,6 +6900,10 @@ test("unit_tests") { +@@ -6913,6 +6912,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index dad0cc292bcba8a25bb2c22576e35d4cb3ad2b53..9ae021a1ac9c4ef46be8b4477096454d ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -7880,7 +7883,6 @@ test("unit_tests") { +@@ -7896,7 +7899,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index dad0cc292bcba8a25bb2c22576e35d4cb3ad2b53..9ae021a1ac9c4ef46be8b4477096454d "//chrome/browser/apps:icon_standardizer", "//chrome/browser/apps/app_service", "//chrome/browser/apps/app_service:app_registry_cache_waiter", -@@ -7966,6 +7968,10 @@ test("unit_tests") { +@@ -7982,6 +7984,10 @@ test("unit_tests") { "//ui/webui/resources/js/browser_command:mojo_bindings", ] @@ -86,4 +86,4 @@ index dad0cc292bcba8a25bb2c22576e35d4cb3ad2b53..9ae021a1ac9c4ef46be8b4477096454d + data += [ "//ash/components/arc/test/data/icons/" ] - if (include_js2gtest_tests) { + if (include_js2gtest_tests && is_chromeos_ash) { diff --git a/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch b/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch index 771d77d0cd..619b294d66 100644 --- a/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch +++ b/patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch @@ -6,10 +6,10 @@ Subject: build: only use the mas build config in the required components Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts diff --git a/base/BUILD.gn b/base/BUILD.gn -index 7e4a65e66eca9d81d0685217fc73a118b2b75283..1dad6963be69578634dd55dbe0fd28a49f99b00e 100644 +index 4a227a6c54c92efa72247128b789ed47961c6299..ab7e276b842f0df7f281d9a75ee268d5fb66f6dc 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1033,6 +1033,7 @@ component("base") { +@@ -1032,6 +1032,7 @@ component("base") { "//build/config/compiler:prevent_unsafe_narrowing", "//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wglobal_constructors", @@ -42,7 +42,7 @@ index c4bca6fca7c990222b0bf65087d14b21b01c1b5f..b95e2f3824ac4a029fb98a8d7e24f47e if (is_win) { diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn -index 0625f07f317de46af619fdb279be78d9ecdc0029..5897820839d6d57ada22a83fe753e3a6b3d752de 100644 +index 0369b1efab3783c0c61e086f82b3724772e4dff0..11a35c9f611fba4f5313994e41a440658cbe040a 100644 --- a/components/remote_cocoa/app_shim/BUILD.gn +++ b/components/remote_cocoa/app_shim/BUILD.gn @@ -16,6 +16,7 @@ component("app_shim") { @@ -54,10 +54,10 @@ index 0625f07f317de46af619fdb279be78d9ecdc0029..5897820839d6d57ada22a83fe753e3a6 "alert.h", "alert.mm", diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 5d0bae2eb27d6ed90ac83932630954e4376e62b5..1b6c54a5a859ff95db87c133c423182dee047a20 100644 +index 3029fda279a6e2062115ac7fc7ade32e4a3aecd2..a76eb15b7498e13933331f221d8b7314c9004131 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -336,6 +336,7 @@ viz_component("service") { +@@ -337,6 +337,7 @@ viz_component("service") { "frame_sinks/external_begin_frame_source_mac.h", ] } @@ -65,7 +65,7 @@ index 5d0bae2eb27d6ed90ac83932630954e4376e62b5..1b6c54a5a859ff95db87c133c423182d } if (is_android || use_ozone) { -@@ -594,6 +595,7 @@ viz_source_set("unit_tests") { +@@ -595,6 +596,7 @@ viz_source_set("unit_tests") { "display_embedder/software_output_device_mac_unittest.mm", ] frameworks = [ "IOSurface.framework" ] @@ -74,10 +74,10 @@ index 5d0bae2eb27d6ed90ac83932630954e4376e62b5..1b6c54a5a859ff95db87c133c423182d if (is_win) { diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 0647eaaf0a1991ef7861d105b74222b70401a856..2de832c1c5d4b4492d7b8aabaf403151ba29cb5b 100644 +index 75d8a3fa0083a82587ba6d429286764db37ba84d..7643533c471d0ccbcc8a38dfc050bad1e41fe130 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -59,6 +59,7 @@ source_set("browser") { +@@ -51,6 +51,7 @@ source_set("browser") { "//content:content_implementation", "//v8:external_startup_data", ] @@ -86,10 +86,10 @@ index 0647eaaf0a1991ef7861d105b74222b70401a856..2de832c1c5d4b4492d7b8aabaf403151 libs = [] frameworks = [] diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index 9c9f6d58a8e5c1ed14eb60c722667d1a24d2c6fa..34979dbbd84da86db079b423967ab8b775b47c52 100644 +index 0c72e7f246f3d0b46c4902dfbe0f9ec647e47c26..bd2afdf7630f4b3f5f2b99fe8d1bd226d3c7c6e0 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn -@@ -176,6 +176,7 @@ source_set("common") { +@@ -182,6 +182,7 @@ source_set("common") { "//content:content_implementation", "//build/config:precompiled_headers", ] @@ -110,7 +110,7 @@ index 5ab406dbebe5c159c6e209f8844bf6fabd47199f..224c45b7bff3c4073c70bbd8bdc1fd1c public_deps = [ diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index 77b0b977f21a9ceb7efc4c46bfc24e410352a88e..48380262ae5a993f5355a2f7d2a44b06b90b48e4 100644 +index e08104a1a983176406483d97f8affa0c88b33a7a..a41b409ce8f08e20375504b324df7e1e75f6684d 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn @@ -484,6 +484,7 @@ static_library("test_support") { @@ -122,7 +122,7 @@ index 77b0b977f21a9ceb7efc4c46bfc24e410352a88e..48380262ae5a993f5355a2f7d2a44b06 public_deps = [ diff --git a/content/web_test/BUILD.gn b/content/web_test/BUILD.gn -index 5fcb135fdcdee5022e5caed46dece4e304495bfe..83cc95b1086b0619be019d7b797f3395910884b7 100644 +index 5cd75b5bd5dcf31b6a589f69c1086b429c533923..924b5205cd38a80db38d505d8fd9263da77bf3af 100644 --- a/content/web_test/BUILD.gn +++ b/content/web_test/BUILD.gn @@ -145,6 +145,8 @@ static_library("web_test_browser") { @@ -132,8 +132,8 @@ index 5fcb135fdcdee5022e5caed46dece4e304495bfe..83cc95b1086b0619be019d7b797f3395 + configs += ["//electron/build/config:mas_build"] + if (is_mac) { - sources += [ - "browser/web_test_browser_main_platform_support_mac.mm", + sources += [ "browser/web_test_shell_platform_delegate_mac.mm" ] + } else if (toolkit_views && !is_castos) { diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn index 003a2504dd6810160924065e3acd65e6703fdcba..d9e0c2e88d55fe82c6ae98aef0adecf01d88a4fc 100644 --- a/device/bluetooth/BUILD.gn @@ -159,10 +159,10 @@ index 090bbd6f03c5749aaf763dac9e52c776f366c33d..5143231f5b3c95f55bf12aaedf253781 if (is_ios) { sources += [ "image_transport_surface_ios.mm" ] diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 6f6ba6a4043444199cc143f0c1ee8b42a60e682e..56574109aac1e04b1bc8a8e91cdc14c58133f10b 100644 +index e938775a9f4eccc31a6bc616cd25d45660d563cd..e232fff1f156844ba4c2919112f26bae9e1867c6 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -208,6 +208,7 @@ source_set("audio") { +@@ -206,6 +206,7 @@ source_set("audio") { "CoreMedia.framework", ] weak_frameworks = [ "ScreenCaptureKit.framework" ] # macOS 13.0 @@ -212,7 +212,7 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980 source_set("sandbox_unittests") { diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn -index ea945ef532688367a86f2858f6b03f4b571acdc4..9286ef801349aeef8e9234a6f5e5f0390812cbf8 100644 +index 77c1ee82fc5cca302148445fb6f2f975bb41c23e..90ab237f45e751b95b061146bb3f3f9a87763c1d 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn @@ -309,6 +309,7 @@ component("core") { @@ -249,7 +249,7 @@ index 4e23c38763184840a393589b3f55dcabb0db8121..e4ad30d0d7acecdca3a22fe05935a340 if (use_atk) { diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 80ca25f1b7d3562d29a76fe725f54eca7ce179f2..76232879cb6454f433907ab71b10ddaf047e82fe 100644 +index 88b443dab9a3e485a3a99bf7cfd5c726c762cbe1..be7b6d48dde6d4d1b3ecb69153f81348f00f6632 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -359,6 +359,7 @@ component("base") { @@ -261,7 +261,7 @@ index 80ca25f1b7d3562d29a76fe725f54eca7ce179f2..76232879cb6454f433907ab71b10ddaf if (is_apple) { diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn -index aa23981d491053ee7d75775bedc1f7d76147e8bf..4ccd2566616a274c02fe8aeb90538da449986c42 100644 +index a8c6d49637a53961d1e16521ae569c3f03fd1e8a..b36e64816bb296e53479c5666ab418fdebfde4e4 100644 --- a/ui/display/BUILD.gn +++ b/ui/display/BUILD.gn @@ -67,6 +67,10 @@ component("display") { diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index a5e8f3e6b0..0fe687375b 100644 --- a/patches/chromium/can_create_window.patch +++ b/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 0f934bfba1f3a3813bac78846785b2ea8acf3c21..9cd412fb6f4a87a7145a59881dce80dd4b50f435 100644 +index f9295c24641e9a7322f088c869d90423bcd36991..5ea6972f03fd450272de52c84f783be9113608bc 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -8086,6 +8086,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -8101,6 +8101,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index 0f934bfba1f3a3813bac78846785b2ea8acf3c21..9cd412fb6f4a87a7145a59881dce80dd &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index c500f6507c2d9298cdeba10cdf12c27f3a34c4d8..6cbca31bca51095b2301c9926910139b53548a9d 100644 +index 355f0d796d3c6f0481a1a807b4f22113e09c8029..6354e6152d281d06fcd85c61b76d836bd5043e1a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4395,6 +4395,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4371,6 +4371,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( auto* new_contents_impl = new_contents.get(); @@ -37,7 +37,7 @@ index c500f6507c2d9298cdeba10cdf12c27f3a34c4d8..6cbca31bca51095b2301c9926910139b // If the new frame has a name, make sure any SiteInstances that can find // this named frame have proxies for it. Must be called after // SetSessionStorageNamespace, since this calls CreateRenderView, which uses -@@ -4436,12 +4442,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4412,12 +4418,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -66,10 +66,10 @@ index e1d6dffca2e718f9e9b67525a1fe09abedfe077c..702fa0c351eada9c6de5d25f3ef2375d // 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 ecbd03ae61018dd356d94fb74492b5afd3b981f5..4859728250617e59f64bfa84d8ea82d11a6ed30b 100644 +index 5733e6d1ea77f85c428df07eb444391447b79e80..89eccdb2e2f429fb1a9c3d2994fd03bdda45ccb8 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -702,6 +702,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -708,6 +708,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -79,10 +79,10 @@ index ecbd03ae61018dd356d94fb74492b5afd3b981f5..4859728250617e59f64bfa84d8ea82d1 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 049ab9f00d12d3cb6fbf1438f9cf5efd2d8af35e..bf33334c13c42251052b9d07cd7c0411332d6a19 100644 +index 8b4b26ed9f976438754c5ada0bd6193cf02891a5..48f2887b6c7181aae3d4cc6a87578d4f876ee79f 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -173,6 +173,7 @@ class NetworkService; +@@ -177,6 +177,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -90,7 +90,7 @@ index 049ab9f00d12d3cb6fbf1438f9cf5efd2d8af35e..bf33334c13c42251052b9d07cd7c0411 } // namespace network namespace sandbox { -@@ -1117,6 +1118,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1128,6 +1129,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, diff --git a/patches/chromium/chore_add_buildflag_guard_around_new_include.patch b/patches/chromium/chore_add_buildflag_guard_around_new_include.patch index 49ab244fc1..c4740e54f6 100644 --- a/patches/chromium/chore_add_buildflag_guard_around_new_include.patch +++ b/patches/chromium/chore_add_buildflag_guard_around_new_include.patch @@ -9,10 +9,10 @@ This is an experimental commit; but if it's successful, This patch should be upstreamed and then removed from electron's code. diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h -index f8b023f2f568cd47aca68fd8da53978e6142bc4b..c3985361cb6d4c52c32c8a75902acfd93f5b2b58 100644 +index b8583874ec98cdadf2f9cc6ed5e378068fe462cd..95562238ba617e870a65ca7d080eae7b3ee9f298 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h -@@ -42,7 +42,6 @@ +@@ -43,7 +43,6 @@ #include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h" #include "chrome/common/buildflags.h" #include "components/infobars/core/infobar_container.h" @@ -20,7 +20,7 @@ index f8b023f2f568cd47aca68fd8da53978e6142bc4b..c3985361cb6d4c52c32c8a75902acfd9 #include "components/user_education/common/feature_promo_controller.h" #include "components/user_education/common/feature_promo_handle.h" #include "components/webapps/browser/banners/app_banner_manager.h" -@@ -61,6 +60,10 @@ +@@ -62,6 +61,10 @@ #include "ui/views/widget/widget_observer.h" #include "ui/views/window/client_view.h" diff --git a/patches/chromium/chore_introduce_blocking_api_for_electron.patch b/patches/chromium/chore_introduce_blocking_api_for_electron.patch index aee6e32072..2abae257c2 100644 --- a/patches/chromium/chore_introduce_blocking_api_for_electron.patch +++ b/patches/chromium/chore_introduce_blocking_api_for_electron.patch @@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor of explicitly adding ScopedAllowBlocking calls as friends. diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d75993310cb7dcb 100644 +index b0bd783057a77a6752729105c5ca9d12f5b14ab0..2b665e4f96d4a86fc77ffa1ddf4b83e0efd8130e 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -135,6 +135,7 @@ class KeyStorageLinux; @@ -18,7 +18,7 @@ index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d759933 class Profile; class ProfileImpl; class ScopedAllowBlockingForProfile; -@@ -274,6 +275,9 @@ class BackendImpl; +@@ -275,6 +276,9 @@ class BackendImpl; class InFlightIO; bool CleanupDirectorySync(const base::FilePath&); } // namespace disk_cache @@ -28,7 +28,7 @@ index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d759933 namespace enterprise_connectors { class LinuxKeyRotationCommand; } // namespace enterprise_connectors -@@ -560,6 +564,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking { +@@ -561,6 +565,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking { friend class ::DesktopNotificationBalloon; friend class ::FirefoxProfileLock; friend class ::GaiaConfig; @@ -36,7 +36,7 @@ index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d759933 friend class ::ProfileImpl; friend class ::ScopedAllowBlockingForProfile; friend class ::StartupTabProviderImpl; -@@ -598,6 +603,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking { +@@ -599,6 +604,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking { friend class crosapi::LacrosThreadTypeDelegate; friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847 friend class drive::FakeDriveService; diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 91db255193..164ebbd0ce 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -80,7 +80,7 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 1518859aa0dd50480795d7859ee516af43fcc487..795ce4320b2fd2274cb6ca891f6f718a5abd444a 100644 +index 9ba202563436566aa63897b9e702e131b4353664..2fc17060004f81ba3e4d203700c5a8b4d8a1e575 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1885,12 +1885,11 @@ bool Browser::IsWebContentsCreationOverridden( @@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7 void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index cab32460f2da655fa65675a64cef0a04106f3876..864835dc83c51e8d67a6a6d2da32e1fb2fffb23d 100644 +index 4eb6047128a5cfdd1c6e62adbae7f662c477b6f1..0be596bc2bd91b0f3e76e76f329c0e8d6c2ec928 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4302,8 +4302,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4278,8 +4278,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, diff --git a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch index 9ff34322a8..21b00f902d 100644 --- a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62..3f114945c77452e2998825f795afc7ee450e69d7 100644 +index c5b68291a9632e8820721de5513ed682c65a175c..5b6c92952de30bb9a80b9595ab57344323484eea 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -39,6 +39,7 @@ @@ -18,7 +18,7 @@ index 0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62..3f114945c77452e2998825f795afc7ee #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/task/single_thread_task_runner.h" -@@ -252,8 +253,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { +@@ -254,8 +255,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { #endif @@ -33,7 +33,7 @@ index 0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62..3f114945c77452e2998825f795afc7ee #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) base::FileDescriptorStore& file_descriptor_store = base::FileDescriptorStore::GetInstance(); -@@ -282,11 +288,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, +@@ -284,11 +290,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, #endif // V8_USE_EXTERNAL_STARTUP_DATA @@ -48,7 +48,7 @@ index 0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62..3f114945c77452e2998825f795afc7ee #endif // V8_USE_EXTERNAL_STARTUP_DATA } -@@ -966,7 +973,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { +@@ -969,7 +976,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { return TerminateForFatalInitializationError(); #endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE) @@ -102,10 +102,10 @@ index c891c5649a6ae76c9f0f988359649ece0e8ac1d9..54e30c4dd82042c283e36cae767dcdd7 friend class ContentClientCreator; friend class ContentClientInitializer; diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 67b6b7ab4194d831a38429789dba269ddec7cbc9..35114fabe0156f48bd0f0a8adfa409e4ee06363a 100644 +index 7b9a1f6ab9c32415b0ecc7be3017227f58c2547a..3d2f9832312919ca6b650d18efa36d78b7319665 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -542,8 +542,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, +@@ -541,8 +541,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, #if defined(V8_USE_EXTERNAL_STARTUP_DATA) @@ -115,7 +115,7 @@ index 67b6b7ab4194d831a38429789dba269ddec7cbc9..35114fabe0156f48bd0f0a8adfa409e4 if (g_mapped_snapshot) { // TODO(crbug.com/802962): Confirm not loading different type of snapshot // files in a process. -@@ -552,10 +551,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { +@@ -551,10 +550,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { base::MemoryMappedFile::Region file_region; base::File file = diff --git a/patches/chromium/custom_protocols_plzserviceworker.patch b/patches/chromium/custom_protocols_plzserviceworker.patch index 1875a86225..89acfc462d 100644 --- a/patches/chromium/custom_protocols_plzserviceworker.patch +++ b/patches/chromium/custom_protocols_plzserviceworker.patch @@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511 diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc -index 49ed9f95ba4053b5330a54223c6b43b9b3ff5aad..bdcac528395ee8a6218b796c8556e701bd30ddf1 100644 +index d8d68ec1ca1da4c6a14f2cacc3b0cec60b96ed7c..08ac09937dda4d8950b5086abac637afeb3daaba 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc -@@ -1889,6 +1889,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1886,6 +1886,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( loader_factory_bundle_info = context()->loader_factory_bundle_for_update_check()->Clone(); @@ -38,7 +38,7 @@ index 49ed9f95ba4053b5330a54223c6b43b9b3ff5aad..bdcac528395ee8a6218b796c8556e701 if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig( browser_context(), scope)) { // If this is a Service Worker for a WebUI, the WebUI's URLDataSource -@@ -1908,9 +1928,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1905,9 +1925,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeScheme) && scope.scheme_piece() == kChromeUIScheme) { config->RegisterURLDataSource(browser_context()); @@ -49,7 +49,7 @@ index 49ed9f95ba4053b5330a54223c6b43b9b3ff5aad..bdcac528395ee8a6218b796c8556e701 .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory( browser_context(), kChromeUIScheme, base::flat_set())); -@@ -1918,9 +1936,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1915,9 +1933,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeUntrusted) && scope.scheme_piece() == kChromeUIUntrustedScheme) { config->RegisterURLDataSource(browser_context()); diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 8d8e493545..be10324f61 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/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 0cecd6ec1f4df330be91034d8874b33615f174fb..a64522c74ac567c98f1ef630f8a6ecbc4009f2ad 100644 +index 2f7c2546d8543d7b296e214c524c95dc290539ca..5a917617ec583ef4ae7a4eebbc43eeb67694a956 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -1868,6 +1868,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( @@ -81,7 +81,7 @@ index e4deb71ea3afa1ef9d6ddac9c61f5916ff608514..d2e6854ac2aaa3cc83c0b72ebc03193b !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 77a5695f93e91d50cb57eebd56e53ebad62033ff..a043c585453f5a286ec770b6e1e34de0afcbc06f 100644 +index 3cc40e4b0183bf8f6861a6d1240df7d2972362a9..7468b1ec1b4c4e7f29baef2fc2decd2ec692351c 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -93,7 +93,7 @@ index 77a5695f93e91d50cb57eebd56e53ebad62033ff..a043c585453f5a286ec770b6e1e34de0 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 9bfb6a027cfba013069ceff4addb29d3fbedb5ce..374b3843a0126b1a4cbb44db113a9b3aeae4d203 100644 +index 20351961220004528837f16b5d858481f0b788aa..5f8e6a9e2d85611fa4bbfe62ecec4431905a9c4f 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -3279,6 +3279,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index ef6dbbd82d..86556a77de 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 3fb6ed640ee9d857f19b4d60b12047133e68f920..0e035eae2094ef5351e4a35dc6ccc9866efe43ba 100644 +index d9888a6c4bc5b6e6a386aeebd035cdc7a626e40c..9ea8e79e142a03cf7b5d101ae795594df137ca30 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -557,7 +557,11 @@ +@@ -558,7 +558,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 1eaad7b7e5..79b2b1801f 100644 --- a/patches/chromium/disable_hidden.patch +++ b/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 1f3efcc9f982f0fe70c9080cb8fe742a5ecb6287..7bd2cdfab5e0f0cfea19f198a4f62456b1fb830e 100644 +index 7a99c04fcf5bba1eafab94bd7d2b5ee9c58d4d85..80224052d4a3c195eabeadfb0d8863a2cf31b6e2 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -801,6 +801,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,10 +20,10 @@ index 1f3efcc9f982f0fe70c9080cb8fe742a5ecb6287..7bd2cdfab5e0f0cfea19f198a4f62456 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 cd75eee211a8ea7242420cc1ba47784d55c3fb5d..76956dd92fcde059f2c928d604d465997c6ff4f0 100644 +index 5c042eea04022ed4e74b5b4796e60de7bbb4137e..9ba426de189921774e47e6e5b4763bae602f6532 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -907,6 +907,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -905,6 +905,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl void UpdateBrowserControlsState(cc::BrowserControlsState constraints, cc::BrowserControlsState current, bool animate); @@ -31,7 +31,7 @@ index cd75eee211a8ea7242420cc1ba47784d55c3fb5d..76956dd92fcde059f2c928d604d46599 + bool disable_hidden_ = false; void StartDragging(blink::mojom::DragDataPtr drag_data, - blink::DragOperationsMask drag_operations_mask, + const url::Origin& source_origin, 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 98746fea627ab5319cd9b66e203738a270e27f17..b7d50b6286ac90ab06089f75f0b9d0b7b02bbf6c 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 2756ad6964..41e106ab3f 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,7 +33,7 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 33963405e7367bf5df4df6457c2889fa59eae653..b40079171970e27603ea8650892b43cf92119455 100644 +index 04a0a7a581f2daafc8929e61fcc6980e6070c3b2..d1911725facdcf32edd75ba6463068685b43ba2c 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -1558,6 +1558,13 @@ void NetworkContext::SetNetworkConditions( @@ -63,10 +63,10 @@ index 9bd43e9e373b74f2f8fcc8f12ab0e0c38927dfcb..0112afaa651e75af56abe5ca51b11d9b void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CHROMEOS) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index b678694478f62fc096bb2f79a1982492a0b9a228..fe994600df0ca42d3a6eb668ed127eb6538001a3 100644 +index 05b77489e5dc30194d90c7e01b2342906af73d5d..8a0ed8bca1bd58c9750be7a2469cf674574cc241 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1233,6 +1233,9 @@ interface NetworkContext { +@@ -1232,6 +1232,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); diff --git a/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch b/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch index 0210f044e8..93d9a9016e 100644 --- a/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch +++ b/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch @@ -6,7 +6,7 @@ Subject: expose V8Initializer::CodeGenerationCheckCallbackInMainThread This is needed to blend Blink and Node's policy for code generation policy. diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index 314b9db617af0353f8876139f2439e7cc3f2b020..69009e2055ac8d952bc4e75b04f6f86967641149 100644 +index 0a476b423cb4271d0a4ba2ea118c44cfcae8c3c8..9af71550493e372f3be34d0e8ad03ab2ae0413f0 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc @@ -422,8 +422,9 @@ TrustedTypesCodeGenerationCheck(v8::Local context, diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index f99e412519..307da6fe9f 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/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 fd48c793a0d447a4a6777f94c5b580fdf9b5b2d9..8c14bfc9f0a6ad2bd314b653d4f993eda1e87348 100644 +index 31c22cd29208ef2ea1d02394b613ada32863db68..4292381e56519a338c4de654c6cf0e02b7025de7 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -165,6 +165,7 @@ diff --git a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch index 2ab28fef37..fdb6236561 100644 --- a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch +++ b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch @@ -65,7 +65,7 @@ index 2b5c5f059159865cb84a7efcefe47cd788d5f5ee..1627649fb5085c637cde556074b242c4 void MultiBufferDataSource::SetReader(MultiBufferReader* reader) { diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h -index 29ca8efb5994ccb5b65d2762088dd53e0583cb72..c533149f567731e6bb6ed2d94dcffd03346f7f87 100644 +index 8d6408c7ebe7d216c9d81332e8db32ff9e223f90..5174ddd895345b90d8181136fd4325550541a2d0 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h @@ -33,6 +33,8 @@ namespace blink { diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 0d3a3ccd87..2b19d7220c 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -87,10 +87,10 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 6e360b9a82555293f1a162a00f28a6d24f939c11..5d0bae2eb27d6ed90ac83932630954e4376e62b5 100644 +index d3a1ba02c09245b063720749dd52c015bdf71efb..3029fda279a6e2062115ac7fc7ade32e4a3aecd2 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -142,6 +142,8 @@ viz_component("service") { +@@ -143,6 +143,8 @@ viz_component("service") { "display_embedder/skia_output_surface_impl_on_gpu_debug_capture.h", "display_embedder/skia_render_copy_results.cc", "display_embedder/skia_render_copy_results.h", @@ -514,7 +514,7 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf waiting_on_draw_ack_ = true; diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -index 479c65c0ecf51d9b8e20e8b39eae4d9e62576b94..3d3634695888ada5569ffb04388e2b9b85c4ccfb 100644 +index 1864388f93ae8c1be079af20988066d8f9d30629..9df25eb94d9862fda7ea743a5a1ae777ce787e4f 100644 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc @@ -97,7 +97,8 @@ RootCompositorFrameSinkImpl::Create( diff --git a/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch b/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch index 7dcf57b73c..7435a39861 100644 --- a/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch +++ b/patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch @@ -7,7 +7,7 @@ This allows embedders to call SetDefersLoading without reaching into Blink inter This might be upstreamable? diff --git a/third_party/blink/public/web/web_document_loader.h b/third_party/blink/public/web/web_document_loader.h -index ff1948e649fffdc92a2db0e736c99bf4e8c06514..b165201b273c8fa9de8e66fe8ef7bfc28eee0850 100644 +index 0960ab9c8361222cd4acf554e04dc3fc124d714e..524c7cf9032a249a30cc726019266ecddacac070 100644 --- a/third_party/blink/public/web/web_document_loader.h +++ b/third_party/blink/public/web/web_document_loader.h @@ -38,6 +38,7 @@ @@ -28,10 +28,10 @@ index ff1948e649fffdc92a2db0e736c99bf4e8c06514..b165201b273c8fa9de8e66fe8ef7bfc2 // Returns the http referrer of original request which initited this load. diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h -index 8328adb3dfcdea728bb845355cb548059a0d5a4f..242530b7a53e4836315283ad4c9079ad7f7b24a1 100644 +index f6b1dc84c58ee94d1aed49f25494bcb64aa0c52c..dbca796070f2bc2aa29fedf6ccb96bdc66b31e8b 100644 --- a/third_party/blink/renderer/core/loader/document_loader.h +++ b/third_party/blink/renderer/core/loader/document_loader.h -@@ -304,7 +304,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected, +@@ -307,7 +307,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected, absl::optional soft_navigation_heuristics_task_id); diff --git a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch index 308a561fa6..88710dfde4 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -23,7 +23,7 @@ Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index a33c756df6452d826456b960e6c01defec01f5fa..835371453953b8058e6e63070d3a2ce5e66beaa7 100644 +index 3fd2f30e7cf18ee0deccb78907d596dac30c310f..62f49e166dc86fdab9b163ea58d391c60ea38415 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc @@ -799,6 +799,12 @@ GetOriginForURLLoaderFactoryUncheckedWithDebugInfo( @@ -40,10 +40,10 @@ index a33c756df6452d826456b960e6c01defec01f5fa..835371453953b8058e6e63070d3a2ce5 // origin of |common_params.url| and/or |common_params.initiator_origin|. return std::make_pair( diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc -index 19147a610d752996d2749a047648f69761975a48..abe8c00a25967162917ecc546fc75a48559e745e 100644 +index de9a6d9f6921b91fb20930d61a7a4466b6642777..fe8838648bfc1fa4ad4d8d5491d3d7329de3607a 100644 --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -2043,6 +2043,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() { +@@ -2054,6 +2054,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() { scoped_refptr DocumentLoader::CalculateOrigin( Document* owner_document) { scoped_refptr origin; @@ -54,7 +54,7 @@ index 19147a610d752996d2749a047648f69761975a48..abe8c00a25967162917ecc546fc75a48 StringBuilder debug_info_builder; if (origin_to_commit_) { // Origin to commit is specified by the browser process, it must be taken -@@ -2090,6 +2094,10 @@ scoped_refptr DocumentLoader::CalculateOrigin( +@@ -2101,6 +2105,10 @@ scoped_refptr DocumentLoader::CalculateOrigin( debug_info_builder.Append(", url="); debug_info_builder.Append(owner_document->Url().BaseAsString()); debug_info_builder.Append(")"); diff --git a/patches/chromium/fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch b/patches/chromium/fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch index 37f8514744..91e06955fc 100644 --- a/patches/chromium/fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch +++ b/patches/chromium/fix_handle_no_top_level_aura_window_in_webcontentsimpl.patch @@ -14,10 +14,10 @@ can potentially be upstreamed but it's likely that the better fix for this is to update our OSR code which is several years outdated. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 81c64d21b8da5daae656d63dfde9536988af2cfb..6d0cfd67c0ebb157b0c440e76d52a35ee411df69 100644 +index 73cf38cf0846bf224b4e01434b2bcf1875c3e782..91ca97624a1a5a67cd4a7ea7d78393e7041eefe9 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3889,6 +3889,8 @@ void WebContentsImpl::Restore() { +@@ -3866,6 +3866,8 @@ void WebContentsImpl::Restore() { void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) { aura::Window* window = GetTopLevelNativeWindow(); @@ -26,7 +26,7 @@ index 81c64d21b8da5daae656d63dfde9536988af2cfb..6d0cfd67c0ebb157b0c440e76d52a35e // TODO(isandrk, crbug.com/1466855): This API function currently works only on // Aura platforms (Win/Lin/CrOS/Fuchsia), make it also work on Mac. -@@ -3903,7 +3905,7 @@ void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) { +@@ -3880,7 +3882,7 @@ void WebContentsImpl::SetWindowShowState(ui::WindowShowState state) { ui::WindowShowState WebContentsImpl::GetWindowShowState() { aura::Window* window = GetTopLevelNativeWindow(); diff --git a/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch b/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch index 8af443435c..c72b3c3404 100644 --- a/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch +++ b/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch @@ -86,10 +86,10 @@ index 7ff8785cd64c1264a88f91f7bd3292c6943f58ea..bc14ad8cab9fa3ec45bcb9f670b19897 // Cut the reference from ScriptState to V8 context. diff --git a/third_party/blink/renderer/platform/bindings/script_state.h b/third_party/blink/renderer/platform/bindings/script_state.h -index 7109852950cde0a6553000421faacefb39366b41..79be73cb660839d6074b11cd7491dc3d5e876345 100644 +index 8be11a1315b02747c9132bd1b9e0cb7589467db8..d75a5db82a5347bd63def93f03793de90f91c4d0 100644 --- a/third_party/blink/renderer/platform/bindings/script_state.h +++ b/third_party/blink/renderer/platform/bindings/script_state.h -@@ -178,7 +178,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { +@@ -181,7 +181,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { static ScriptState* MaybeFrom(v8::Local context) { DCHECK(!context.IsEmpty()); if (context->GetNumberOfEmbedderDataFields() <= @@ -102,8 +102,8 @@ index 7109852950cde0a6553000421faacefb39366b41..79be73cb660839d6074b11cd7491dc3d + ScriptState::kScriptStateTagPtr) { return nullptr; } - return From(context); -@@ -249,9 +254,15 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { + ScriptState* script_state = +@@ -256,9 +261,15 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected { static void SetCreateCallback(CreateCallback); friend class ScriptStateImpl; diff --git a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch index b93b1296f4..7d3535e9a2 100644 --- a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch +++ b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch @@ -9,7 +9,7 @@ to support content settings UI. The support pulls in chrome content settings and UI code which are not valid in the scope of Electron. diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc -index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288fef6adb6 100644 +index 4775cbbac9ccf5011d48df7042fbb6c8f454dec2..df9c7917391952b133d9a37fdbe61d85cc5ab845 100644 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc @@ -19,8 +19,10 @@ @@ -23,7 +23,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288 #include "third_party/blink/public/common/features.h" #include "ui/views/view.h" #endif // !BUILDFLAG(IS_ANDROID) -@@ -316,7 +318,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() { +@@ -337,7 +339,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() { video_web_contents_observer_.reset(); pip_window_controller_->Close(false /* should_pause_video */); pip_window_controller_ = nullptr; @@ -32,7 +32,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288 auto_pip_setting_helper_.reset(); #endif // !BUILDFLAG(IS_ANDROID) } -@@ -327,8 +329,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() { +@@ -348,8 +350,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() { // contents, so we only need to forget the controller here when user closes // the parent web contents with the PiP window open. document_web_contents_observer_.reset(); @@ -43,7 +43,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288 if (pip_window_controller_) pip_window_controller_ = nullptr; } -@@ -350,6 +354,7 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -371,6 +375,7 @@ PictureInPictureWindowManager::GetOverlayView( return nullptr; } @@ -51,7 +51,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288 auto* const web_contents = pip_window_controller_->GetWebContents(); auto* auto_pip_tab_helper = -@@ -372,6 +377,8 @@ PictureInPictureWindowManager::GetOverlayView( +@@ -393,6 +398,8 @@ PictureInPictureWindowManager::GetOverlayView( } return overlay_view; @@ -61,7 +61,7 @@ index af52cf29d64e5abe495f41887daad21cf3018ec4..2fb50cfbd7053a5469fd7f7ea6062288 #endif // !BUILDFLAG(IS_ANDROID) diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h -index a3acf948f1460c31341f4f1291f5a8ad9ca85d3a..a9488cfe10f5dff1e64af1206a1f0c99ad8925f4 100644 +index 85ae9fb9f969709c35c27ac1235e5bdc48e2084a..a2adddb3ec8c72a2ff1a3739a1792868a6f89ffc 100644 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h @@ -11,6 +11,7 @@ @@ -82,7 +82,7 @@ index a3acf948f1460c31341f4f1291f5a8ad9ca85d3a..a9488cfe10f5dff1e64af1206a1f0c99 namespace views { class View; -@@ -214,7 +217,9 @@ class PictureInPictureWindowManager { +@@ -238,7 +241,9 @@ class PictureInPictureWindowManager { #if !BUILDFLAG(IS_ANDROID) std::unique_ptr document_web_contents_observer_; diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch index 6d2abc54a9..56bbd172b5 100644 --- a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -15,10 +15,10 @@ node does not change in this case. chromium-bug: https://crbug.com/1369605 diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc -index 454033207ee52358ead79e16682b4aeb95cb0d71..a7650faa1ab1494e792814d2fa3af26988d4d95f 100644 +index 96f7a459fca45f2d8c260d2de52b298afc1afd1c..9a57593c8059eecd75e84bcf4453010acaec4568 100644 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc -@@ -1046,6 +1046,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties( +@@ -1045,6 +1045,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties( return viz::ScopedSurfaceIdAllocator(std::move(allocation_task)); } @@ -32,7 +32,7 @@ index 454033207ee52358ead79e16682b4aeb95cb0d71..a7650faa1ab1494e792814d2fa3af269 if (!text_input_manager_) return ui::TEXT_INPUT_TYPE_NONE; diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h -index 648896b13ad4f811fdd196bd2fe5bdf62e7154ab..e2e3b414e73052b2b5b8e443ded18ae3f18fd916 100644 +index c403b82eeb27b6538dbfad0655796492a790bd0b..95b639e111df972db64afebb4d281438691fce1f 100644 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.h +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h @@ -184,6 +184,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame @@ -45,10 +45,10 @@ index 648896b13ad4f811fdd196bd2fe5bdf62e7154ab..e2e3b414e73052b2b5b8e443ded18ae3 // RenderFrameMetadataProvider::Observer implementation. void OnRenderFrameMetadataChangedBeforeActivation( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index a0114fd97e5721f7b1961e893793f43ba865b721..81c64d21b8da5daae656d63dfde9536988af2cfb 100644 +index 737ca972a248538d110d4c91f9eb45a4645bdd0c..73cf38cf0846bf224b4e01434b2bcf1875c3e782 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -8416,7 +8416,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -8392,7 +8392,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 0acbc7908f..96a036890a 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -100,7 +100,7 @@ index 07847521e7217c78480205812a73cc89503c00d2..586e866ca7ec0eb0b573d23e3bd95792 } else { // No need to bother, we don't know how many pages are available. diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc -index 3d567787ea43ca93d5a71b360b9f7b4b21a5eb76..961a8b9e74104f2621275935e30e2e8f2f9518df 100644 +index 3fb7a99ac1f2efa472dc8aa6682ab5b8c326c7aa..4c43edf8dd9db4416cc1edbb438ee3612524cc8a 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc @@ -241,6 +241,24 @@ void PrintDialogGtk::UpdateSettings( diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch index 551c798655..1b5f501e00 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 0b39ef4e60da3d82b55c4093a02fcbb29a8205d0..58489d8acfbeb4377d4c1996173736fb2ecf3c00 100644 +index bb6e6804a49c10e5d0238aea61e4676a9dcfb72d..a3fec02c6c1179a2ed1a69c9eac76d0e53f3a544 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -2817,6 +2817,7 @@ void LocalFrame::RequestExecuteScript( +@@ -2813,6 +2813,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -75,7 +75,7 @@ index 0b39ef4e60da3d82b55c4093a02fcbb29a8205d0..58489d8acfbeb4377d4c1996173736fb BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -2850,7 +2851,7 @@ void LocalFrame::RequestExecuteScript( +@@ -2846,7 +2847,7 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( script_state, std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, want_result_option, @@ -85,10 +85,10 @@ index 0b39ef4e60da3d82b55c4093a02fcbb29a8205d0..58489d8acfbeb4377d4c1996173736fb void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() { diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h -index eb4ce179cb09e28b97ad167b5b6d0e1c25e53c5f..a9cde93321e1afd18e3f742777b31112c066a6a1 100644 +index 72ad9031f29df222b81c9232152d4d4f863349b9..f754df2a4edfffb9058625fc125d8114a27673c2 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -796,6 +796,7 @@ class CORE_EXPORT LocalFrame final +@@ -794,6 +794,7 @@ class CORE_EXPORT LocalFrame final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -97,7 +97,7 @@ index eb4ce179cb09e28b97ad167b5b6d0e1c25e53c5f..a9cde93321e1afd18e3f742777b31112 mojom::blink::WantResultOption, mojom::blink::PromiseResultOption); diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc -index 2a25fa8cf63052fc9278fb6e7a9f579b4d258ca5..ae894500c3e10797241ee95d19eb70c79bf7e7af 100644 +index b3403675e34ae0113d2d00ecc649818cf7cb9169..bbd94da0e079bc60a036aea8ba646cf73e1bf30c 100644 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc @@ -937,6 +937,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( @@ -204,7 +204,7 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0 const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index def81df8c1d1c001508c8bbebfd4c0e96cf8c85a..f9d777631d22265f0d9cb3aacfc7c0396f17ab4d 100644 +index e2761c6b431657778ffe10cdf5fb7e6e29c4c099..42b8887568efdf978f563c8297c42dac04d5de12 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc @@ -1117,14 +1117,15 @@ void WebLocalFrameImpl::RequestExecuteScript( diff --git a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch index 30e62d5b79..51613f5745 100644 --- a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch +++ b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch @@ -145,7 +145,7 @@ index e6587d2208a13576af1831b94724a6286f0e0607..91223ef3f099e20aee5cf1d685c45d2c absl::optional corners = absl::nullopt) override; void Cancel() override; diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.h b/ui/views/controls/menu/menu_runner_impl_cocoa.h -index 2056016df30982e24d4d99271f59e0edb261a16a..2876d3ccedf0e9f041d3f3310cd596de1fb7b000 100644 +index 2325534ec92430ac4effc95d370925984ce7bd4b..8b6cc1780e53f4edf579e8a62de831330ab94c49 100644 --- a/ui/views/controls/menu/menu_runner_impl_cocoa.h +++ b/ui/views/controls/menu/menu_runner_impl_cocoa.h @@ -41,6 +41,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface { @@ -157,7 +157,7 @@ index 2056016df30982e24d4d99271f59e0edb261a16a..2876d3ccedf0e9f041d3f3310cd596de absl::optional corners = absl::nullopt) override; void Cancel() override; diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_cocoa.mm -index f137d6f86aba7227440b06160d072fcc0578a736..45d1eaf4cd73c00e9ddd79499b351517a12958cb 100644 +index c3c80f6becee734319e374968bc00a08273f07b8..5e1bfcc6e1114c6d9dee56428b41797f447586b6 100644 --- a/ui/views/controls/menu/menu_runner_impl_cocoa.mm +++ b/ui/views/controls/menu/menu_runner_impl_cocoa.mm @@ -189,6 +189,7 @@ diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 7539bb626b..3b12b81ffe 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -20,10 +20,10 @@ index 4dcb9d4b52d78782602a22617971185f95850090..fea14bc71daae7b638e04c2b28919c23 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index bf33334c13c42251052b9d07cd7c0411332d6a19..f6a32c5d639dbbbfa09f5b2f0bee4e231b05bbe1 100644 +index 48f2887b6c7181aae3d4cc6a87578d4f876ee79f..6c9c592ccc5be2243e56f8b9dbc2a21173e35864 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -311,6 +311,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -315,6 +315,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index eb049915db..5b5b6c54f3 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -38,10 +38,10 @@ index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7 // Returns whether `Initialize` has already been invoked in the process. // Initialization is a one-way operation (i.e., this method cannot return diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 87adacdf36f17b49eba5db104f4e365d517f787c..67b6b7ab4194d831a38429789dba269ddec7cbc9 100644 +index 33dc4eb4070698bcd156fc59ec11fc419c2120a8..7b9a1f6ab9c32415b0ecc7be3017227f58c2547a 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -430,7 +430,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -429,7 +429,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, const std::string js_command_line_flags, @@ -51,7 +51,7 @@ index 87adacdf36f17b49eba5db104f4e365d517f787c..67b6b7ab4194d831a38429789dba269d static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -440,7 +441,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -439,7 +440,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, // See https://crbug.com/v8/11043 SetFlags(mode, js_command_line_flags); diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 14ee684618..fc883349c8 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -40,7 +40,7 @@ index c57305681efb469d296c90df68b6cdbea927580d..6dda1a5465e08df64b539ee203b7c403 // Called from BrowserMainLoop::PostCreateThreads(). // TODO(content/browser/gpu/OWNERS): This should probably use a diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index 6831a7207aa2e02ea88673cd69cfe50f31c1682c..2ebd7dcbffed67caa5b625fa57332904c7e443fc 100644 +index ef2ff9a1dd1a2b18d9896cb7e9e8adb06bf2bd18..dbf021231b9373233e55c040ea2fdb2406b90647 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc @@ -1222,6 +1222,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 7c031b0f83..a14b9c5d82 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/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 34aeda7e532285a4655c18277d95af3eeb101f2d..3e96e54d4c34bb96753b8317a035c9312c14d333 100644 +index ec4710e8df2e8fe678cecc39c92d95e086eeeb7e..c596b66cc7fd45596119140203a41da5a2817e00 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1225,6 +1225,11 @@ +@@ -1234,6 +1234,11 @@ "includes": [7440], }, diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index b36e53dbf7..7c5c18b739 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -9,10 +9,10 @@ but due to the nature of electron, we need to load the v8 snapshot in the browser process. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 47314a4f02c33f7ba7e03ecf9f1b6bb97598b947..0bd8a7330bcbedfdfe7f4bd6873a6244a4778d62 100644 +index 965b07bc438473baacd3c1309e012e68a3b245d9..c5b68291a9632e8820721de5513ed682c65a175c 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -273,11 +273,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -275,11 +275,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, const std::string& process_type) { diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 59d7bb4b10..641fb0f994 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -43,7 +43,7 @@ index 5a096477c123a782341115f964c4975301ccaf9a..ecfbb3b405425af346a6ba6788fc1d8f } // namespace diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index 9a118ce02ad183a5821c9f82073f7bff736d42be..37b534f98f0be9b93c47d87af1c3f0e52bccd07c 100644 +index b9cab13f0916c1b6d092badb5100af52e640c479..3cb91f8ca4e7a9518d2ac34ab6a3f45b8aab2763 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm @@ -605,10 +605,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { @@ -147,10 +147,10 @@ index 3edad19a3ecbd27f54f1d17aca2e806fbbff05d4..1b4ed839f0d00334fd32a102be07be91 // Used to force the NSApplication's focused accessibility element to be the // content::BrowserAccessibilityCocoa accessibility tree when the NSView for diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b12047133e68f920 100644 +index 6f95c717849b0ba1795e018e237625e221fd4ced..d9888a6c4bc5b6e6a386aeebd035cdc7a626e40c 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -278,8 +278,10 @@ +@@ -279,8 +279,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -161,7 +161,7 @@ index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b1204713 // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling // pointers. `ns_view_` gets reinitialized later in this method. -@@ -1636,8 +1638,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1637,8 +1639,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -172,7 +172,7 @@ index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b1204713 return [GetInProcessNSView() window]; } -@@ -1682,9 +1686,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1683,9 +1687,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -184,7 +184,7 @@ index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b1204713 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2186,12 +2192,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2192,12 +2198,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -200,7 +200,7 @@ index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b1204713 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index ff4cbb1065f89098b6465fdb2b7e13118dcaab29..80ca25f1b7d3562d29a76fe725f54eca7ce179f2 100644 +index 6eb8ca650c74b858be07b4c42da3fbd089123317..88b443dab9a3e485a3a99bf7cfd5c726c762cbe1 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -376,6 +376,13 @@ component("base") { @@ -265,10 +265,10 @@ index ed832e00520aced33ef6341d413244fae10f8d42..905a922692cb7e522426639c083971cb // Used to force the NSApplication's focused accessibility element to be the // views::Views accessibility tree when the NSView for this is focused. diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -index 8b7fa028e80c1c636643abcc19584c7d697b5ae5..71e29611fcb17aa018bde038e5f4b4b86ec12f65 100644 +index ff5060bbeb626822895a36fd1244559cf51aa21d..9833577e99f7166d0414de5056e3bf4acb2a44c0 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -343,7 +343,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -342,7 +342,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const { if (in_process_ns_window_bridge_) return in_process_ns_window_bridge_->ns_view(); @@ -280,7 +280,7 @@ index 8b7fa028e80c1c636643abcc19584c7d697b5ae5..71e29611fcb17aa018bde038e5f4b4b8 } gfx::NativeViewAccessible -@@ -358,7 +362,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -357,7 +361,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, return [in_process_ns_window_bridge_->ns_view() window]; } @@ -292,7 +292,7 @@ index 8b7fa028e80c1c636643abcc19584c7d697b5ae5..71e29611fcb17aa018bde038e5f4b4b8 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1389,20 +1397,24 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1388,20 +1396,24 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index d83e4920a7..32d8bde4f5 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/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 f47ffb49ddf2a2d6a384f636489bafaebcf21b68..33963405e7367bf5df4df6457c2889fa59eae653 100644 +index a88d8177dc8ac02c81ec79e10e2c937eca002ff7..04a0a7a581f2daafc8929e61fcc6980e6070c3b2 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -145,6 +145,11 @@ @@ -177,10 +177,10 @@ index 3f51ecd9694c900ffb21d7e9ec5d737387ea39ca..9bd43e9e373b74f2f8fcc8f12ab0e0c3 std::unique_ptr internal_host_resolver_; // Map values set to non-null only if that HostResolver has its own private diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 0af727743712cb82c882c3597e3b75e9f2ef5303..b678694478f62fc096bb2f79a1982492a0b9a228 100644 +index d790176f8cfec7368f0513f95fd94ded25e8fd13..05b77489e5dc30194d90c7e01b2342906af73d5d 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -317,6 +317,17 @@ struct NetworkContextFilePaths { +@@ -316,6 +316,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -198,7 +198,7 @@ index 0af727743712cb82c882c3597e3b75e9f2ef5303..b678694478f62fc096bb2f79a1982492 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -942,6 +953,9 @@ interface NetworkContext { +@@ -941,6 +952,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 5b27ab962f..4dcce856c3 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,7 +7,7 @@ Pass RenderFrameHost through to PlatformNotificationService so Electron can identify which renderer a notification came from. diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc -index 21683b9fba4414d825a32a7c12cf55b4bcc488a9..367299bdfc6d716099ff4ceafe493af4fe880bad 100644 +index 7b31b8fce0fb99baa751131b336a2842f728433a..8f230c09e465df0403c7f162f5f9161ae0085cdf 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc @@ -201,6 +201,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( @@ -19,7 +19,7 @@ index 21683b9fba4414d825a32a7c12cf55b4bcc488a9..367299bdfc6d716099ff4ceafe493af4 const GURL& origin, const GURL& document_url, diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h -index 4ffd662e1411c8ba707cfab6970d7533246633e1..9266120342a179bb642286e617feeafb8f57d798 100644 +index 2552c32ed769482c8bbb7b7538bf59cb66dcc16d..7fda86e70ad47766211a9ff8b5ed732068f0b885 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.h +++ b/chrome/browser/notifications/platform_notification_service_impl.h @@ -57,6 +57,7 @@ class PlatformNotificationServiceImpl @@ -92,7 +92,7 @@ index 00965c253f28bd3947255b2ab77bf3a0bb71f14a..e04a7eef94990dfb0e2fca2e116352fe contents_.get()->GetPrimaryMainFrame()->GetWeakDocumentPtr(), RenderProcessHost::NotificationServiceCreatorType::kDocument, diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc -index 9814861ab18fa88bc781f83acb602129b6f3de1f..1c5a2efc2749697aa3d38247f491eabf240c1aa5 100644 +index aaccaa3e3e43497ebd0909d55f471cf98972f27a..52e0692c5ce782d3ac433e9de443c2b63430e2ce 100644 --- a/content/browser/notifications/platform_notification_context_impl.cc +++ b/content/browser/notifications/platform_notification_context_impl.cc @@ -268,6 +268,7 @@ void PlatformNotificationContextImpl::Shutdown() { @@ -113,7 +113,7 @@ index 9814861ab18fa88bc781f83acb602129b6f3de1f..1c5a2efc2749697aa3d38247f491eabf } diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h -index d0e0d10739b5daf99435a67e18dc51df8e670e09..704f3d6c2fdd27a84d1c4e1b7bf680f62c86c2d0 100644 +index 9c9e590aab71d5b66cdd2c9a0cfc5f2d34443e84..c461c131d93d592487e319893d531bf4bdf14e39 100644 --- a/content/browser/notifications/platform_notification_context_impl.h +++ b/content/browser/notifications/platform_notification_context_impl.h @@ -45,6 +45,7 @@ struct NotificationDatabaseData; @@ -133,7 +133,7 @@ index d0e0d10739b5daf99435a67e18dc51df8e670e09..704f3d6c2fdd27a84d1c4e1b7bf680f6 const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index d9b23d9ae9743798c561ae1c7211c66a3b7aa6c5..c966317bfe5370b3241a8042848eba6fc041df6a 100644 +index 44922d6b9f7f7a9d1d0fb9f69b044d4728593cf3..cb161217889e2daaffcf68ff438bbba395ac7b4e 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1960,7 +1960,7 @@ void RenderProcessHostImpl::CreateNotificationService( @@ -155,7 +155,7 @@ index d9b23d9ae9743798c561ae1c7211c66a3b7aa6c5..c966317bfe5370b3241a8042848eba6f break; } diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h -index d9e36712dc3fbc6a9043e2c33660090ca2f7367b..7d910583eb22fc315eb0619febe518d5c24c0c4d 100644 +index 82db1db4175fb9f4ee7490d5a163164ef4495ecb..4f51683be14ba6ee657a290c7747969e052a88ca 100644 --- a/content/public/browser/platform_notification_service.h +++ b/content/public/browser/platform_notification_service.h @@ -26,6 +26,8 @@ struct PlatformNotificationData; @@ -176,7 +176,7 @@ index d9e36712dc3fbc6a9043e2c33660090ca2f7367b..7d910583eb22fc315eb0619febe518d5 const GURL& origin, const GURL& document_url, diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc -index c9a01dd2bd6e0de08c09b417c3dce5ef13adb304..ded3b477c9766a77cd8fe1c2646bcc1935ebb1ec 100644 +index 6b835ca4d0426d2412f1cff6f0bb962e0f2fd586..a48198747b80929e7d4b290e9b40b6629dbda669 100644 --- a/content/test/mock_platform_notification_service.cc +++ b/content/test/mock_platform_notification_service.cc @@ -29,6 +29,7 @@ MockPlatformNotificationService::MockPlatformNotificationService( @@ -188,7 +188,7 @@ index c9a01dd2bd6e0de08c09b417c3dce5ef13adb304..ded3b477c9766a77cd8fe1c2646bcc19 const GURL& origin, const GURL& document_url, diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h -index 7cd457defa729855c8d7c9d873efab5389d025cd..2b8e644d54d93a9499adcc1bf5660d72a24e2f29 100644 +index 66fd1e7f1171fec33c337375a9f8f11fcc6ab27e..188d507b42544dfab7abceed24097766496086b5 100644 --- a/content/test/mock_platform_notification_service.h +++ b/content/test/mock_platform_notification_service.h @@ -52,6 +52,7 @@ class MockPlatformNotificationService : public PlatformNotificationService { diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index f34ce2adc4..4175a2f9ec 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -40,7 +40,7 @@ index af0616d9ca466d146f3c41887857dd4720ebafbf..c088db193f5bd4b88aa42a3803571d2b ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground, kCloseButtonIconSize)); diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc -index 692ce6c73512c096f37209ab9f27d44d73296d57..b425171629ad6c8b43c6b429f07ac7c96806e2da 100644 +index 50c222d235461ecce1f3ccc8941293de41cc134c..88d2338f7b6fb4fded4c34105bb7f52fc35f06a1 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -16,9 +16,11 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index c3b3bedef4..2a3ea50bc2 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,10 +11,10 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. diff --git a/BUILD.gn b/BUILD.gn -index d51b0758e8883ba29a36b1dc3717bc76722f13f9..c68f9ec516f8adca4be86b6ce6158df36aa58f63 100644 +index 64819b31d74a78986b5e9f7f133192a83f9bf113..bc2c7f6505c8b8b99ff8e35c1b0798e29e76c5cc 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -972,7 +972,6 @@ if (is_win) { +@@ -973,7 +973,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index d51b0758e8883ba29a36b1dc3717bc76722f13f9..c68f9ec516f8adca4be86b6ce6158df3 "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -981,6 +980,10 @@ if (is_win) { +@@ -982,6 +981,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -706,7 +706,7 @@ index 3f9a514fb41d72c5d06de6ac989f9d7c0513a4e7..0e7ada9df962808dad7caf074a08ebde // Tells the browser printing failed. PrintingFailed(int32 cookie, PrintFailureReason reason); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad2712c509660 100644 +index 514bf6a4491cf2f619e6e7c71f907af3c5cc92ca..d83153866456e33f9333ceec064e261c13038abb 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -45,6 +45,7 @@ @@ -717,7 +717,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 #include "printing/units.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" -@@ -1207,14 +1208,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1211,14 +1212,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { } print_in_progress_ = true; @@ -734,7 +734,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 if (!weak_this) { return; } -@@ -1245,7 +1246,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1249,7 +1250,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -743,7 +743,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1260,7 +1261,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1264,7 +1265,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -752,7 +752,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 if (render_frame_gone_) { return; -@@ -1349,7 +1350,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1353,7 +1354,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -762,7 +762,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 if (render_frame_gone_) { return; } -@@ -1412,6 +1414,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1416,6 +1418,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -771,7 +771,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2036,7 +2040,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2040,7 +2044,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { } Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -781,7 +781,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 // Check if `this` is still valid. if (!weak_this) { return; -@@ -2052,17 +2057,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2056,17 +2061,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -804,7 +804,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 DidFinishPrinting(PrintingResult::kFailPrintInit); return; } -@@ -2083,8 +2090,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2087,8 +2094,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -821,7 +821,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 // Check if `this` is still valid. if (!self) return; -@@ -2323,25 +2337,33 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2327,25 +2341,33 @@ void PrintRenderFrameHelper::IPCProcessed() { } bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame, @@ -861,7 +861,7 @@ index d1c93d9b0ea6bd6ae6fb700a5b31b7462d8cf8cd..e4dea961cf7aed1b4cbdd0ff2b4ad271 return true; } -@@ -2448,7 +2470,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2452,7 +2474,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -905,10 +905,10 @@ index 45b63865e34e6d8225e11e9b74d864f40dce5f4a..d175ab1e3aa7612467a4eb06464e1d2b // Calculate number of pages in source document. uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame, diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index f3a9f07786e91dc3a2955f677c17694183b8c69c..0647eaaf0a1991ef7861d105b74222b70401a856 100644 +index 576f6e3b2ef210aaae5b74d3e93ccc62017016d3..75d8a3fa0083a82587ba6d429286764db37ba84d 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2971,8 +2971,9 @@ source_set("browser") { +@@ -2963,8 +2963,9 @@ source_set("browser") { "//ppapi/shared_impl", ] diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index 355d3eebc5..6e9f2bf652 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,7 +30,7 @@ index c4255d8dfc2e3c4f1f32506e4e9edbb90a74340a..142398a8adafc94e6724ee750b612a66 // RenderWidgetHost on the primary main frame, and false otherwise. virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 7bd2cdfab5e0f0cfea19f198a4f62456b1fb830e..0e704d385ba11f418d0ea12cbd42826ba8fc8dc0 100644 +index 80224052d4a3c195eabeadfb0d8863a2cf31b6e2..11fde625a13a78dec5ae8245ada514e8ca6ab2c6 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -2122,6 +2122,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { @@ -44,10 +44,10 @@ index 7bd2cdfab5e0f0cfea19f198a4f62456b1fb830e..0e704d385ba11f418d0ea12cbd42826b void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6cbca31bca51095b2301c9926910139b53548a9d..cab32460f2da655fa65675a64cef0a04106f3876 100644 +index 6354e6152d281d06fcd85c61b76d836bd5043e1a..4eb6047128a5cfdd1c6e62adbae7f662c477b6f1 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4996,6 +4996,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4972,6 +4972,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -60,7 +60,7 @@ index 6cbca31bca51095b2301c9926910139b53548a9d..cab32460f2da655fa65675a64cef0a04 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index f56c25e1dadb8c59eceb9ec4ca76536ca82f755d..bd7491a48a39fde39dd171aecef51c3297c0bcbe 100644 +index d471d2559a21e4cd92c33fa08ab402167851654a..02352f13c1b26e9a49bf9957920424320e7c33e0 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -1009,6 +1009,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, diff --git a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch index a7bca17610..4cb36bdb7c 100644 --- a/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch +++ b/patches/chromium/refactor_expose_hostimportmoduledynamically_and.patch @@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and This is so that Electron can blend Blink's and Node's implementations of these isolate handlers. diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index 69009e2055ac8d952bc4e75b04f6f86967641149..b02b67215cbaace80089208c6600409e960f96aa 100644 +index 9af71550493e372f3be34d0e8ad03ab2ae0413f0..f5fe8904e052289dfa7f83e4de3b053ec8b69f83 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -589,7 +589,9 @@ bool JavaScriptCompileHintsMagicEnabledCallback( +@@ -598,7 +598,9 @@ bool JavaScriptCompileHintsMagicEnabledCallback( execution_context); } @@ -21,7 +21,7 @@ index 69009e2055ac8d952bc4e75b04f6f86967641149..b02b67215cbaace80089208c6600409e v8::Local context, v8::Local v8_host_defined_options, v8::Local v8_referrer_resource_url, -@@ -665,7 +667,7 @@ v8::MaybeLocal HostImportModuleDynamically( +@@ -674,7 +676,7 @@ v8::MaybeLocal HostImportModuleDynamically( } // https://html.spec.whatwg.org/C/#hostgetimportmetaproperties @@ -30,7 +30,7 @@ index 69009e2055ac8d952bc4e75b04f6f86967641149..b02b67215cbaace80089208c6600409e v8::Local module, v8::Local meta) { ScriptState* script_state = ScriptState::From(context); -@@ -692,6 +694,8 @@ void HostGetImportMetaProperties(v8::Local context, +@@ -701,6 +703,8 @@ void HostGetImportMetaProperties(v8::Local context, meta->CreateDataProperty(context, resolve_key, resolve_value).ToChecked(); } @@ -39,7 +39,7 @@ index 69009e2055ac8d952bc4e75b04f6f86967641149..b02b67215cbaace80089208c6600409e void InitializeV8Common(v8::Isolate* isolate) { // Set up garbage collection before setting up anything else as V8 may trigger // GCs during Blink setup. -@@ -711,9 +715,9 @@ void InitializeV8Common(v8::Isolate* isolate) { +@@ -722,9 +726,9 @@ void InitializeV8Common(v8::Isolate* isolate) { SharedArrayBufferConstructorEnabledCallback); isolate->SetJavaScriptCompileHintsMagicEnabledCallback( JavaScriptCompileHintsMagicEnabledCallback); diff --git a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch index 4656d35f69..04549b8f0b 100644 --- a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch +++ b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch @@ -12,12 +12,12 @@ should be removed as soon as those have been updated. Patching because every instance is a FTBFS that prevents testing any one instance's fix. diff --git a/base/functional/callback_helpers.h b/base/functional/callback_helpers.h -index a04ff2452a68096bee9673d08bfa66b2fca8e7ba..098ef69594f2450a937d658f8fa710877a04481d 100644 +index 1b44aeb4302d4ca0100e837e4551c5f83420cc6a..7570f6a85755b6760751cda22635cf509f61a8d0 100644 --- a/base/functional/callback_helpers.h +++ b/base/functional/callback_helpers.h -@@ -98,6 +98,22 @@ class OnceCallbackHolder final { - - } // namespace internal +@@ -123,6 +123,22 @@ RepeatingCallback ForwardRepeatingCallbacks( + std::move(v)); + } +// Wraps the given OnceCallback into a RepeatingCallback that relays its +// invocation to the original OnceCallback on the first invocation. The diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 63342ac2a3..cc6bf728d0 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe as well? terrifying. diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc -index 9dd7439e8c1c03c7dbc06045e11f73146bd087b4..1fc7bc9f735ec8820f4cd5db1ab5948f81ffa62e 100644 +index 1634c3556dc783f90f3a7527ab9f9745373b6f48..e3d2eeaa6d4af4cef87cb1dc639e0c247226092d 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc @@ -695,6 +695,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For( @@ -24,16 +24,17 @@ index 9dd7439e8c1c03c7dbc06045e11f73146bd087b4..1fc7bc9f735ec8820f4cd5db1ab5948f const blink::WebMouseEvent& event, const ui::LatencyInfo& latency) { diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h -index 3b4461acc2fc65c539477dc75602e55282aaf77b..d23bb83bb2e4f0061d529b64f970acc220c8fb98 100644 +index b010d43aaeb90c766914b0c8038f7dfef064875a..7af2399116087fe4062fc5739f0ecee4f7242dc1 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h -@@ -25,8 +25,11 @@ +@@ -24,9 +24,12 @@ + #include "components/viz/common/surfaces/surface_id.h" #include "components/viz/host/hit_test/hit_test_query.h" #include "content/browser/renderer_host/display_feature.h" - #include "content/browser/renderer_host/event_with_latency_info.h" +#include "content/browser/renderer_host/visible_time_request_trigger.h" +#include "content/browser/web_contents/web_contents_view.h" #include "content/common/content_export.h" + #include "content/common/input/event_with_latency_info.h" #include "content/public/browser/render_frame_metadata_provider.h" +#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host_view.h" diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 01fc4e75f7..1cbe18fb73 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/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 429827478a9c8a3031fcfe97fc75c5975727d49c..200379c8f6c933f3877fc4c6b983ca64214b8d9e 100644 +index 78e717afce47c78d502b43d0189fa0c13d118b9b..dcf02923c21e1c4c292eb800f6325e4bb764c823 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1612,7 +1612,7 @@ if (is_chrome_branded && !is_android) { +@@ -1608,7 +1608,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 429827478a9c8a3031fcfe97fc75c5975727d49c..200379c8f6c933f3877fc4c6b983ca64 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1641,6 +1641,12 @@ if (!is_android) { +@@ -1637,6 +1637,12 @@ if (!is_android) { } } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 9077014370..3b95adfa1f 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,7 +22,7 @@ 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 c966317bfe5370b3241a8042848eba6fc041df6a..9bfb6a027cfba013069ceff4addb29d3fbedb5ce 100644 +index cb161217889e2daaffcf68ff438bbba395ac7b4e..20351961220004528837f16b5d858481f0b788aa 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1645,9 +1645,15 @@ bool RenderProcessHostImpl::Init() { diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 4b71595dbd..8bcdc777ea 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,7 +9,7 @@ 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 864835dc83c51e8d67a6a6d2da32e1fb2fffb23d..cca13a5720803107f404dae71ac9c458a42242b3 100644 +index 0be596bc2bd91b0f3e76e76f329c0e8d6c2ec928..c42ace29f426d7ea7d6d5ae9370d12b380181082 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3348,6 +3348,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index c6d88d0734..a1b0860978 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,10 +8,10 @@ This allows dragging and dropping between 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 b3c433192029755e1175ec2012c344d7f0416b3d..dc0ec4f3431fcb0858afd55602ff9fee046dea0d 100644 +index 1420a19f223cc0cd3f683a96fc0f62516690a363..1830568c52a5ce96bd36ab866ac00012ce518570 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -892,10 +892,7 @@ bool WebContentsViewAura::IsValidDragTarget( +@@ -901,10 +901,7 @@ bool WebContentsViewAura::IsValidDragTarget( // for the outermost view. Inner `WebContents` will have a // `WebContentsViewChildFrame` so when dragging between an inner // `WebContents` and its embedder the view IDs will be the same. @@ -24,10 +24,10 @@ index b3c433192029755e1175ec2012c344d7f0416b3d..dc0ec4f3431fcb0858afd55602ff9fee //////////////////////////////////////////////////////////////////////////////// diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm -index 808e3103cd12d32b54dc80dc122746923db83138..298ad238a2d26603b2af8f9143fa5881ba09184a 100644 +index 9c49e73d58ecf5cd6fce0582e2a767d3f1ac43d9..07ca39e09bb3413bdb95c7c535b6612d18861799 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm -@@ -422,9 +422,7 @@ - (void)resetDragStartTrackers { +@@ -427,9 +427,7 @@ - (void)resetDragStartTrackers { } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index b7a1612cf2..0578c5dd2e 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -15,10 +15,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 9cd412fb6f4a87a7145a59881dce80dd4b50f435..dad843f05a2036118fe26c984f8bae43688ff7cf 100644 +index 5ea6972f03fd450272de52c84f783be9113608bc..72dc42e2919fcb7bdfb15512b1ff38ea48807c7f 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7301,6 +7301,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -7316,6 +7316,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,7 +37,7 @@ index 9cd412fb6f4a87a7145a59881dce80dd4b50f435..dad843f05a2036118fe26c984f8bae43 if (had_fullscreen_token && !GetView()->HasFocus()) GetView()->Focus(); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index cca13a5720803107f404dae71ac9c458a42242b3..a0114fd97e5721f7b1961e893793f43ba865b721 100644 +index c42ace29f426d7ea7d6d5ae9370d12b380181082..737ca972a248538d110d4c91f9eb45a4645bdd0c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3594,21 +3594,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 259e5d0429..0a11f6c0b9 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index a4130ad4dc8158f8256b55fdd87f577687135626..3139aa65807cee23f0e8dbc85243566e // 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 3a7c981662075b367fc9ffce78cefc38633a4bb2..1091270d0ed83b4230283d8ecfe9be867a0458f8 100644 +index cddb519c4c893607e56ea44e17e75783fb33d373..0a3a36d2650d7aa3edb50f37898be20500fc99e5 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -789,6 +789,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -788,6 +788,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index 6e0ebc6b6d..235c5e1662 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -35,10 +35,10 @@ index 3139aa65807cee23f0e8dbc85243566ef9de89b9..19707edb1283f2432f3c0059f80fabd5 // 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 1091270d0ed83b4230283d8ecfe9be867a0458f8..28435c14357fb1e0a03ff55bb77d1f1284cb5a52 100644 +index 0a3a36d2650d7aa3edb50f37898be20500fc99e5..63fe14db69116258a874117232c193f4be7d8f83 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -801,6 +801,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -800,6 +800,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } diff --git a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch index c937aca6a5..8e05749599 100644 --- a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch +++ b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch @@ -36,10 +36,10 @@ index b1f0db6afb29188e4e69c5dd899523e836f9d253..4290e626fd875a50740bbd668ca11a4f import '../../ui/legacy/components/source_frame/source_frame-meta.js'; import '../../panels/console_counters/console_counters-meta.js'; diff --git a/front_end/ui/legacy/BUILD.gn b/front_end/ui/legacy/BUILD.gn -index 38efc67f3e34aead6e80730736353672dbf8e5b8..0368f531ea70efcbb51c9433bcdf8e3e6d69c19b 100644 +index e94af4d321de3dbd0eb1d0190f9e9339875be318..f4fc031e4ccb988731913f0b3603a3169c54a57f 100644 --- a/front_end/ui/legacy/BUILD.gn +++ b/front_end/ui/legacy/BUILD.gn -@@ -187,5 +187,6 @@ devtools_entrypoint("legacy") { +@@ -188,5 +188,6 @@ devtools_entrypoint("legacy") { visibility = [ "../..:legacy_entrypoints", "../../legacy_test_runner/*", diff --git a/patches/node/.patches b/patches/node/.patches index cb8962f5a1..d3ce9997ee 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -49,3 +49,5 @@ test_deflake_test-tls-socket-close.patch net_fix_crash_due_to_simultaneous_close_shutdown_on_js_stream.patch net_use_asserts_in_js_socket_stream_to_catch_races_in_future.patch lib_fix_broadcastchannel_initialization_location.patch +src_adapt_to_v8_exception_api_change.patch +lib_test_do_not_hardcode_buffer_kmaxlength.patch diff --git a/patches/node/lib_test_do_not_hardcode_buffer_kmaxlength.patch b/patches/node/lib_test_do_not_hardcode_buffer_kmaxlength.patch new file mode 100644 index 0000000000..bdb1bfe83d --- /dev/null +++ b/patches/node/lib_test_do_not_hardcode_buffer_kmaxlength.patch @@ -0,0 +1,156 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= +Date: Thu, 28 Sep 2023 14:50:20 +0200 +Subject: lib,test: do not hardcode Buffer.kMaxLength + +V8 will soon support typed arrays as large as the maximum array buffer +length. This patch replaces hardcoded values related to +Buffer.kMaxLength with the actual constant. +It also fixes a test that was passing by accident. + +Refs: https://github.com/v8/v8/commit/44b299590083b888637c79fb5632806e607ab861 +PR-URL: https://github.com/nodejs/node/pull/49876 +Reviewed-By: Richard Lau +Reviewed-By: Luigi Pinca +Reviewed-By: Yagiz Nizipli +(cherry picked from commit a4fdb1abe0844d86b4cbfcc4051794656e7d746e) + +diff --git a/lib/internal/blob.js b/lib/internal/blob.js +index a25f6cf7df23875a5cefc0a4f92a997494a313af..58d2193195d9523d3bc43054efbbe4eebb0c7b05 100644 +--- a/lib/internal/blob.js ++++ b/lib/internal/blob.js +@@ -25,6 +25,9 @@ const { + FixedSizeBlobCopyJob, + getDataObject, + } = internalBinding('blob'); ++const { ++ kMaxLength, ++} = internalBinding('buffer'); + + const { + TextDecoder, +@@ -61,7 +64,6 @@ const { + } = require('internal/errors'); + + const { +- isUint32, + validateDictionary, + } = require('internal/validators'); + +@@ -161,8 +163,8 @@ class Blob { + return src; + }); + +- if (!isUint32(length)) +- throw new ERR_BUFFER_TOO_LARGE(0xFFFFFFFF); ++ if (length > kMaxLength) ++ throw new ERR_BUFFER_TOO_LARGE(kMaxLength); + + this[kHandle] = _createBlob(sources_, length); + this[kLength] = length; +diff --git a/test/parallel/test-blob-buffer-too-large.js b/test/parallel/test-blob-buffer-too-large.js +index 2fd8b8754bd593a0da069044d33fcd6bba82f9c9..a9cf53b025bbff58a8d5783e4f807d79f5d68e2b 100644 +--- a/test/parallel/test-blob-buffer-too-large.js ++++ b/test/parallel/test-blob-buffer-too-large.js +@@ -3,17 +3,17 @@ + + const common = require('../common'); + const assert = require('assert'); +-const { Blob } = require('buffer'); ++const { Blob, kMaxLength } = require('buffer'); + + if (common.isFreeBSD) + common.skip('Oversized buffer make the FreeBSD CI runner crash'); + + try { +- new Blob([new Uint8Array(0xffffffff), [1]]); ++ new Blob([new Uint8Array(kMaxLength), [1]]); + } catch (e) { + if ( + e.message === 'Array buffer allocation failed' || +- e.message === 'Invalid typed array length: 4294967295' ++ e.message === `Invalid typed array length: ${kMaxLength}` + ) { + common.skip( + 'Insufficient memory on this platform for oversized buffer test.' +diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js +index c6b728027057ece38c2b7fcc6bf7b18b959125d2..aad9c6bcab69e971c02281928885d94aa21c8199 100644 +--- a/test/parallel/test-buffer-alloc.js ++++ b/test/parallel/test-buffer-alloc.js +@@ -4,13 +4,16 @@ const common = require('../common'); + const assert = require('assert'); + const vm = require('vm'); + +-const SlowBuffer = require('buffer').SlowBuffer; ++const { ++ SlowBuffer, ++ kMaxLength, ++} = require('buffer'); + + // Verify the maximum Uint8Array size. There is no concrete limit by spec. The + // internal limits should be updated if this fails. + assert.throws( +- () => new Uint8Array(2 ** 32 + 1), +- { message: 'Invalid typed array length: 4294967297' } ++ () => new Uint8Array(kMaxLength + 1), ++ { message: `Invalid typed array length: ${kMaxLength + 1}` }, + ); + + const b = Buffer.allocUnsafe(1024); +diff --git a/test/parallel/test-buffer-over-max-length.js b/test/parallel/test-buffer-over-max-length.js +index c263633d941cddc7614df7e7ec64ad9aaaa7864b..1167328131fcd59d973ccf38201f458441517636 100644 +--- a/test/parallel/test-buffer-over-max-length.js ++++ b/test/parallel/test-buffer-over-max-length.js +@@ -13,18 +13,8 @@ const bufferMaxSizeMsg = { + message: /^The argument 'size' is invalid\. Received [^"]*$/ + }; + +-assert.throws(() => Buffer((-1 >>> 0) + 2), bufferMaxSizeMsg); +-assert.throws(() => SlowBuffer((-1 >>> 0) + 2), bufferMaxSizeMsg); +-assert.throws(() => Buffer.alloc((-1 >>> 0) + 2), bufferMaxSizeMsg); +-assert.throws(() => Buffer.allocUnsafe((-1 >>> 0) + 2), bufferMaxSizeMsg); +-assert.throws(() => Buffer.allocUnsafeSlow((-1 >>> 0) + 2), bufferMaxSizeMsg); +- + assert.throws(() => Buffer(kMaxLength + 1), bufferMaxSizeMsg); + assert.throws(() => SlowBuffer(kMaxLength + 1), bufferMaxSizeMsg); + assert.throws(() => Buffer.alloc(kMaxLength + 1), bufferMaxSizeMsg); + assert.throws(() => Buffer.allocUnsafe(kMaxLength + 1), bufferMaxSizeMsg); + assert.throws(() => Buffer.allocUnsafeSlow(kMaxLength + 1), bufferMaxSizeMsg); +- +-// issue GH-4331 +-assert.throws(() => Buffer.allocUnsafe(0x100000001), bufferMaxSizeMsg); +-assert.throws(() => Buffer.allocUnsafe(0xFFFFFFFFF), bufferMaxSizeMsg); +diff --git a/test/parallel/test-buffer-tostring-rangeerror.js b/test/parallel/test-buffer-tostring-rangeerror.js +index 4416effb422ac4a000eff1732cbfeeffcc567555..0ebea759b5c42be0c294093256ea3cad7034a98b 100644 +--- a/test/parallel/test-buffer-tostring-rangeerror.js ++++ b/test/parallel/test-buffer-tostring-rangeerror.js +@@ -1,18 +1,22 @@ + 'use strict'; + require('../common'); + +-// This test ensures that Node.js throws a RangeError when trying to convert a +-// gigantic buffer into a string. ++// This test ensures that Node.js throws an Error when trying to convert a ++// large buffer into a string. + // Regression test for https://github.com/nodejs/node/issues/649. + + const assert = require('assert'); +-const SlowBuffer = require('buffer').SlowBuffer; ++const { ++ SlowBuffer, ++ constants: { ++ MAX_STRING_LENGTH, ++ }, ++} = require('buffer'); + +-const len = 1422561062959; ++const len = MAX_STRING_LENGTH + 1; + const message = { +- code: 'ERR_INVALID_ARG_VALUE', +- name: 'RangeError', +- message: /^The argument 'size' is invalid\. Received [^"]*$/ ++ code: 'ERR_STRING_TOO_LONG', ++ name: 'Error', + }; + assert.throws(() => Buffer(len).toString('utf8'), message); + assert.throws(() => SlowBuffer(len).toString('utf8'), message); diff --git a/patches/node/src_adapt_to_v8_exception_api_change.patch b/patches/node/src_adapt_to_v8_exception_api_change.patch new file mode 100644 index 0000000000..a74f9a39e2 --- /dev/null +++ b/patches/node/src_adapt_to_v8_exception_api_change.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: John Kleinschmidt +Date: Mon, 2 Oct 2023 10:59:53 -0400 +Subject: src: adapt to v8::Exception API change + +4898682: [api] Add Error.cause to V8 API | https://chromium-review.googlesource.com/c/v8/v8/+/4898682 +Cherry picked fix from https://github.com/nodejs/node-v8/commit/675f411677c28a10a2f03d4b3ef14c2284c33587 + +diff --git a/src/env-inl.h b/src/env-inl.h +index debd982c75805c51ea7d01229b9d635550060503..103dc6711e71e15da640edc5e017bc638ddc6ad1 100644 +--- a/src/env-inl.h ++++ b/src/env-inl.h +@@ -730,10 +730,10 @@ inline void Environment::ThrowRangeError(const char* errmsg) { + } + + inline void Environment::ThrowError( +- v8::Local (*fun)(v8::Local), ++ v8::Local (*fun)(v8::Local, v8::Local), + const char* errmsg) { + v8::HandleScope handle_scope(isolate()); +- isolate()->ThrowException(fun(OneByteString(isolate(), errmsg))); ++ isolate()->ThrowException(fun(OneByteString(isolate(), errmsg), {})); + } + + inline void Environment::ThrowErrnoException(int errorno, +diff --git a/src/env.h b/src/env.h +index 45a9a7811b4abe1effb6acf2c89a772a7c2256c9..36e8e7d960a95a9040ad963c79a7f66c89233c87 100644 +--- a/src/env.h ++++ b/src/env.h +@@ -956,7 +956,7 @@ class Environment : public MemoryRetainer { + inline void RemoveHeapSnapshotNearHeapLimitCallback(size_t heap_limit); + + private: +- inline void ThrowError(v8::Local (*fun)(v8::Local), ++ inline void ThrowError(v8::Local (*fun)(v8::Local, v8::Local), + const char* errmsg); + + std::list loaded_addons_; diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 06915d8d2f..4f24b83361 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also change visibility on mksnapshot in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index ba07869aada66d4a274db7ca6fabf47d32539596..7a221c00719670c42b9264215bfd8381f7cb87f6 100644 +index 025203d66c73a835b2d178c007b8a6cfe180bfec..66a66da616d5fd86d20862008193580c9d0c2314 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -757,7 +757,7 @@ config("internal_config") { +@@ -745,7 +745,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index ba07869aada66d4a274db7ca6fabf47d32539596..7a221c00719670c42b9264215bfd8381 defines += [ "BUILDING_V8_SHARED" ] } -@@ -6776,7 +6776,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6790,7 +6790,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index ba07869aada66d4a274db7ca6fabf47d32539596..7a221c00719670c42b9264215bfd8381 deps = [ ":v8_libbase", -@@ -6788,7 +6788,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6802,7 +6802,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index 3020b023c1..c93a972e5b 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,10 +12,10 @@ 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 7a221c00719670c42b9264215bfd8381f7cb87f6..6c4dc4a53227f7e01f68e4395c5a3fd17418496e 100644 +index 66a66da616d5fd86d20862008193580c9d0c2314..11e0fc85728fb182046db2bdec5b3e8d252a6c4f 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -757,6 +757,10 @@ config("internal_config") { +@@ -745,6 +745,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index 2c94ebab62..af93340d20 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -69,10 +69,12 @@ bool GetProtocolLaunchPath(gin::Arguments* args, std::wstring* exe) { // Read in optional args arg std::vector launch_args; if (args->GetNext(&launch_args) && !launch_args.empty()) - *exe = base::StringPrintf(L"\"%ls\" \"%ls\" \"%%1\"", exe->c_str(), - base::JoinString(launch_args, L"\" \"").c_str()); + *exe = base::UTF8ToWide( + base::StringPrintf("\"%ls\" \"%ls\" \"%%1\"", exe->c_str(), + base::JoinString(launch_args, L"\" \"").c_str())); else - *exe = base::StringPrintf(L"\"%ls\" \"%%1\"", exe->c_str()); + *exe = + base::UTF8ToWide(base::StringPrintf("\"%ls\" \"%%1\"", exe->c_str())); return true; } @@ -140,8 +142,8 @@ bool FormatCommandLineString(std::wstring* exe, if (!launch_args.empty()) { std::u16string joined_launch_args = base::JoinString(launch_args, u" "); - *exe = base::StringPrintf(L"%ls %ls", exe->c_str(), - base::as_wcstr(joined_launch_args)); + *exe = base::UTF8ToWide(base::StringPrintf( + "%ls %ls", exe->c_str(), base::as_wcstr(joined_launch_args))); } return true; diff --git a/shell/browser/notifications/platform_notification_service.cc b/shell/browser/notifications/platform_notification_service.cc index aa2eb839c5..802916132d 100644 --- a/shell/browser/notifications/platform_notification_service.cc +++ b/shell/browser/notifications/platform_notification_service.cc @@ -135,6 +135,10 @@ void PlatformNotificationService::CloseNotification( void PlatformNotificationService::GetDisplayedNotifications( DisplayedNotificationsCallback callback) {} +void PlatformNotificationService::GetDisplayedNotificationsForOrigin( + const GURL& origin, + DisplayedNotificationsCallback callback) {} + int64_t PlatformNotificationService::ReadNextPersistentNotificationId() { // Electron doesn't support persistent notifications. return 0; diff --git a/shell/browser/notifications/platform_notification_service.h b/shell/browser/notifications/platform_notification_service.h index 55b00b9993..f3ced68cd3 100644 --- a/shell/browser/notifications/platform_notification_service.h +++ b/shell/browser/notifications/platform_notification_service.h @@ -44,6 +44,9 @@ class PlatformNotificationService void CloseNotification(const std::string& notification_id) override; void GetDisplayedNotifications( DisplayedNotificationsCallback callback) override; + void GetDisplayedNotificationsForOrigin( + const GURL& origin, + DisplayedNotificationsCallback callback) override; int64_t ReadNextPersistentNotificationId() override; void RecordNotificationUkmEvent( const content::NotificationDatabaseData& data) override; diff --git a/shell/browser/osr/osr_web_contents_view.cc b/shell/browser/osr/osr_web_contents_view.cc index 89abca8960..005f65762c 100644 --- a/shell/browser/osr/osr_web_contents_view.cc +++ b/shell/browser/osr/osr_web_contents_view.cc @@ -164,6 +164,7 @@ bool OffScreenWebContentsView::CloseTabAfterEventTrackingIfNeeded() { void OffScreenWebContentsView::StartDragging( const content::DropData& drop_data, + const url::Origin& source_origin, blink::DragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& cursor_offset, @@ -175,8 +176,9 @@ void OffScreenWebContentsView::StartDragging( ->SystemDragEnded(source_rwh); } -void OffScreenWebContentsView::UpdateDragCursor( - ui::mojom::DragOperation operation) {} +void OffScreenWebContentsView::UpdateDragOperation( + ui::mojom::DragOperation operation, + bool document_is_handling_drag) {} void OffScreenWebContentsView::SetPainting(bool painting) { auto* view = GetView(); diff --git a/shell/browser/osr/osr_web_contents_view.h b/shell/browser/osr/osr_web_contents_view.h index b612705e54..0c46517a3a 100644 --- a/shell/browser/osr/osr_web_contents_view.h +++ b/shell/browser/osr/osr_web_contents_view.h @@ -75,13 +75,15 @@ class OffScreenWebContentsView : public content::WebContentsView, // content::RenderViewHostDelegateView void StartDragging(const content::DropData& drop_data, + const url::Origin& source_origin, blink::DragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& cursor_offset, const gfx::Rect& drag_obj_rect, const blink::mojom::DragEventSourceInfo& event_info, content::RenderWidgetHostImpl* source_rwh) override; - void UpdateDragCursor(ui::mojom::DragOperation operation) override; + void UpdateDragOperation(ui::mojom::DragOperation operation, + bool document_is_handling_drag) override; void SetPainting(bool painting); bool IsPainting() const; void SetFrameRate(int frame_rate); diff --git a/shell/browser/relauncher_win.cc b/shell/browser/relauncher_win.cc index b3804b3b00..39112f41eb 100644 --- a/shell/browser/relauncher_win.cc +++ b/shell/browser/relauncher_win.cc @@ -9,6 +9,7 @@ #include "base/logging.h" #include "base/process/launch.h" #include "base/strings/stringprintf.h" +#include "base/strings/utf_string_conversions.h" #include "base/win/scoped_handle.h" #include "sandbox/win/src/nt_internals.h" #include "sandbox/win/src/win_utils.h" @@ -108,7 +109,8 @@ StringType AddQuoteForArg(const StringType& arg) { } // namespace StringType GetWaitEventName(base::ProcessId pid) { - return base::StringPrintf(L"%ls-%d", kWaitEventName, static_cast(pid)); + return base::UTF8ToWide( + base::StringPrintf("%ls-%d", kWaitEventName, static_cast(pid))); } StringType ArgvToCommandLineString(const StringVector& argv) { diff --git a/shell/common/gin_helper/error_thrower.cc b/shell/common/gin_helper/error_thrower.cc index d555b69a26..8e02e573af 100644 --- a/shell/common/gin_helper/error_thrower.cc +++ b/shell/common/gin_helper/error_thrower.cc @@ -36,7 +36,7 @@ void ErrorThrower::ThrowSyntaxError(base::StringPiece err_msg) const { } void ErrorThrower::Throw(ErrorGenerator gen, base::StringPiece err_msg) const { - v8::Local exception = gen(gin::StringToV8(isolate_, err_msg)); + v8::Local exception = gen(gin::StringToV8(isolate_, err_msg), {}); if (!isolate_->IsExecutionTerminating()) isolate_->ThrowException(exception); } diff --git a/shell/common/gin_helper/error_thrower.h b/shell/common/gin_helper/error_thrower.h index 879705b70a..e09072fba7 100644 --- a/shell/common/gin_helper/error_thrower.h +++ b/shell/common/gin_helper/error_thrower.h @@ -26,8 +26,8 @@ class ErrorThrower { v8::Isolate* isolate() const { return isolate_; } private: - using ErrorGenerator = - v8::Local (*)(v8::Local err_msg); + using ErrorGenerator = v8::Local (*)(v8::Local err_msg, + v8::Local options); void Throw(ErrorGenerator gen, base::StringPiece err_msg) const; raw_ptr isolate_;