From d02c9f8bc644ba39acf9caa908c33a737202a790 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Fri, 3 Feb 2023 12:43:42 +0100 Subject: [PATCH] chore: bump chromium to 111.0.5544.3 (main) (#36820) * chore: bump chromium in DEPS to 111.0.5522.0 * chore: bump chromium in DEPS to 111.0.5524.0 * chore: bump chromium in DEPS to 111.0.5526.0 * chore: bump chromium in DEPS to 111.0.5528.0 * chore: update patches/chromium/mas_avoid_usage_of_private_macos_apis.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4132807 Fix simple code shear * chore: update patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4130675 Fix simple code shear * chore: update patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4144281 Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches/chromium/disable_unload_metrics.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4126173 Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches/chromium/feat_add_data_parameter_to_processsingleton.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4144281 Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches/chromium/preconnect_manager.patch https://chromium-review.googlesource.com/c/chromium/src/+/4144281 Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches/v8/force_cppheapcreateparams_to_be_noncopyable.patch https://chromium-review.googlesource.com/c/v8/v8/+/3533019 Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches * chore: update patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4128765 Upstream added a new call to HeaderContext(), whose signature we have patched * chore: bump chromium in DEPS to 111.0.5530.0 * chore: update patches * Move ChildProcessHost* from content/common to content/browser Xref: Move ChildProcessHost* from content/common to content/browser * Remove RenderViewHostChanged Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4134103 [upstream removal of RenderViewHostChanged] Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4092763 Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4093234 Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4133892 Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4134103 [examples of upstream code adjusting to the change] Upstream handles this change in roughly two approaches: 1. Move the code over to RenderFrameHostChanged(old_host, new_host) but test for new_host->IsInPrimaryMainFrame() before acting 2. Migrate to the PrimaryPageChanged(page) API and use page.GetMainDocument() to get the RenderFrameHost. I've chosen 1. because electron_api_web_contents needed that pointer to old_host to call RemoveInputEventListener(), but I may be missing some context & would appreciate review on this commit. * Make electron/shell/browser/relauncher_win.cc use Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4129135 Many internal Windows types are now available in winternl.h so upstrem no longer defines the types themselves. * Move ChildProcessHost* from content/common to content/browser Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4134795 * fixup! Make electron/shell/browser/relauncher_win.cc use winternl.h does not define the field we need, so clone the struct Chromium was using into unnamed namespace * fixup! Move ChildProcessHost* from content/common to content/browser chore: update #includes too * chore: bump chromium in DEPS to 111.0.5532.0 * chore: sync patches/chromium/pepper_plugin_support.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4133323 manually reync patch; no code changes * chore: sync patches/chromium/mas_no_private_api.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4143865 the content/common/pseudonymization_salt.cc patch is no longer needed * chore: sync patches/chromium/mas_disable_remote_accessibility.patch patch-fuzz update; no manual changes * chore: sync patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4111725 manually reync patch; no code changes * chore: sync patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4133323 manually reync patch; no code changes * chore: sync patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch Xref: https://chromium-review.googlesource.com/c/v8/v8/+/4127230 patch-fuzz update; no manual changes * chore: rebuild patches * fixup! Remove RenderViewHostChanged Use PrimaryPageChanged() * chore: remove unused method TabsUpdateFunction::OnExecuteCodeFinished() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4133991 This private, already-unused function showed up as a FTBFS because it took a base::ListValue parameter and ListValue was removed upstream. * task posting v3: remove includes of runner handles and IWYU task runners Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4133323 * chore: lint * chore: more lint * fixup! task posting v3: remove includes of runner handles and IWYU task runners macOS, too * fixup! task posting v3: remove includes of runner handles and IWYU task runners * chore: bump chromium in DEPS to 111.0.5534.0 * chore: sync patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4141862 patch-fuzz update; no manual changes * chore: sync patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4153110 Sync to minor upstream changes. Add const correctness. * chore: sync electron/patches/chromium/feat_configure_launch_options_for_service_process.patch https://chromium-review.googlesource.com/c/chromium/src/+/4141862 patch-fuzz update; no manual changes * chore: patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch sync https://chromium-review.googlesource.com/c/v8/v8/+/4147787 patch-fuzz update; no manual changes * chore: update patches * chore: bump chromium in DEPS to 111.0.5536.0 * chore: sync patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4141863 Sync with upstream code changes. Minor code golf for readability. Note: upstream is laying groundwork for being able to work off of env vars instead of switches. Doesn't affect us yet but worth being aware of. > + // Environment variables could be supported in the future, but are not > + // currently supported when launching with the zygote. * chore: update patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4126836 patch-fuzz update; no manual changes * chore: sync electron/patches/chromium/feat_configure_launch_options_for_service_process.patch Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4141863 manual sync * chore: sync electron/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch https://chromium-review.googlesource.com/c/v8/v8/+/4147788 fuzz-patch * chore: rebuild patches * chore: bump chromium in DEPS to 111.0.5538.0 * chore: bump chromium in DEPS to 111.0.5540.0 * chore: update patches * Remove sdk_forward_declarations https://chromium-review.googlesource.com/c/chromium/src/+/4166680 * task posting v3: Remove task runner handles from codebase entirely Refs https://chromium-review.googlesource.com/c/chromium/src/+/4150928 * Cleanup child_process_launcher_helper* Refs https://chromium-review.googlesource.com/c/chromium/src/+/4141863 * fix: utilityprocess spec on macOS * fix: build on windows Refs https://chromium-review.googlesource.com/c/chromium/src/+/4141863 * chore: fix lint * chore: bump chromium 111.0.5544.3 * chore: gen filenames.libcxx.gni * Add check for Executable+Writable handles in renderer processes. Refs https://chromium-review.googlesource.com/c/chromium/src/+/3774416 * fixup! Add check for Executable+Writable handles in renderer processes. * 4143761: [110] Disable SwiftShader for WebGL on M1 Macs. https://chromium-review.googlesource.com/c/chromium/src/+/4143761 (cherry picked from commit 2f74db3c2139424c416f92d9169aeaa8a2f9c1ec) * chore: bump chromium to 111.0.5555.0 * 56085: Remove hmac.h include from ssl.h. https://boringssl-review.googlesource.com/c/boringssl/+/56085 * 4167020: Remove forwarding headers https://chromium-review.googlesource.com/c/chromium/src/+/4167020 * chore: bump chromium to 111.0.5559.0 * 4181044: Restrict WebCursor usage to RenderWidgetHostViewAura https://chromium-review.googlesource.com/c/chromium/src/+/4181044 * 4189437: views: rename ink_drop_host_view to ink_drop_host https://chromium-review.googlesource.com/c/chromium/src/+/4189437 * chore: bump chromium to 111.0.5560.0 * 4167016: win7dep: remove non aeroglass code https://chromium-review.googlesource.com/c/chromium/src/+/4167016 * fixup after rebase: Remove forwarding header s https://chromium-review.googlesource.com/c/chromium/src/+/4167020 * 4125755: Reland "Reject getDisplayMedia calls without user activation" https://chromium-review.googlesource.com/c/chromium/src/+/4125755 * test: add workaround * chore: update patches * fix: alter coreModuleRegExp to prevent arm crash * Revert "fix: alter coreModuleRegExp to prevent arm crash" This reverts commit 7e50630c98137831a711c5abdbc8809e60cf1d73. * 4218354: Disable the use of preserve_most on arm64 Windows https://chromium-review.googlesource.com/c/v8/v8/+/4218354 * chore: review changes --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 Co-authored-by: John Kleinschmidt Co-authored-by: Shelley Vohr --- BUILD.gn | 2 +- DEPS | 2 +- filenames.libcxx.gni | 44 +++- patches/boringssl/expose_aes-cfb.patch | 4 +- ...ack_ssl_error_zero_return_explicitly.patch | 8 +- ...client_precreatemessageloop_callback.patch | 2 +- .../add_didinstallconditionalfeatures.patch | 20 +- ...er_to_linuxui_getwindowframeprovider.patch | 23 +- ..._scheduler_throttling_per_renderview.patch | 8 +- ...leges_in_unsandboxed_child_processes.patch | 33 ++- ..._secondary_label_via_simplemenumodel.patch | 2 +- patches/chromium/blink_local_frame.patch | 8 +- ...build_disable_print_content_analysis.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 20 +- patches/chromium/build_gn.patch | 2 +- ...bcxx_abi_unstable_false_for_electron.patch | 2 +- ...ld_config_in_the_required_components.patch | 34 +-- patches/chromium/can_create_window.patch | 30 +-- ...hore_add_electron_deps_to_gitignores.patch | 12 +- ...dle_synthetic_mouse_events_for_touch.patch | 6 +- ..._introduce_blocking_api_for_electron.patch | 6 +- ...tition_attribute_dcheck_for_webviews.patch | 2 +- ...screationoverridden_with_full_params.patch | 44 ++-- patches/chromium/command-ismediakey.patch | 2 +- ...e_browser_v8_snapshot_file_name_fuse.patch | 18 +- .../custom_protocols_plzserviceworker.patch | 8 +- patches/chromium/dcheck.patch | 2 +- patches/chromium/desktop_media_list.patch | 10 +- .../disable_color_correct_rendering.patch | 16 +- .../disable_compositor_recycling.patch | 4 +- ...le_freezing_flags_after_init_in_node.patch | 4 +- patches/chromium/disable_hidden.patch | 8 +- patches/chromium/disable_unload_metrics.patch | 8 +- .../chromium/enable_reset_aspect_ratio.patch | 6 +- ...locator_for_usage_outside_of_the_gin.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 16 +- ...egenerationcheckcallbackinmainthread.patch | 2 +- ...d_data_parameter_to_processsingleton.patch | 8 +- ...dd_set_theme_source_to_allow_apps_to.patch | 4 +- ..._registry_to_multibuffer_data_source.patch | 8 +- ...g_the_base_spellchecker_download_url.patch | 2 +- ...to_add_observers_on_created_hunspell.patch | 24 +- ...e_launch_options_for_service_process.patch | 213 +++++++++++------- ...screen_rendering_with_viz_compositor.patch | 44 ++-- ..._raw_response_headers_from_urlloader.patch | 38 ++-- ...indows_in_the_current_application_in.patch | 4 +- ..._exclusive_access_for_electron_needs.patch | 6 +- ...uest_webcontents_to_enter_fullscreen.patch | 4 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...ding_non-standard_schemes_in_iframes.patch | 14 +- ...ete_SerialPortManager_on_main_thread.patch | 2 +- ...ntcapturercount_in_web_contents_impl.patch | 8 +- ...board_hides_on_input_blur_in_webview.patch | 8 +- ...out_profile_refs_in_accessibility_ui.patch | 12 +- ..._properly_honor_printing_page_ranges.patch | 8 +- ...x_remove_caption-removing_style_call.patch | 4 +- ...from_localframe_requestexecutescript.patch | 28 +-- .../fix_tray_icon_gone_on_lock_screen.patch | 10 +- patches/chromium/frame_host_manager.patch | 6 +- .../gin_enable_disable_v8_platform.patch | 10 +- ...gpu_notify_when_dxdiag_request_fails.patch | 2 +- .../chromium/gritsettings_resource_ids.patch | 4 +- ...nse_interceptor_to_point_to_electron.patch | 4 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- patches/chromium/ignore_rc_check.patch | 4 +- ...tform_electron_can_call_x11_property.patch | 6 +- patches/chromium/isolate_holder.patch | 8 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...reate_a_console_if_logging_to_stderr.patch | 12 +- .../mas-cgdisplayusesforcetogray.patch | 4 +- ...as_avoid_usage_of_private_macos_apis.patch | 6 +- .../mas_disable_remote_accessibility.patch | 38 ++-- .../chromium/mas_disable_remote_layer.patch | 10 +- patches/chromium/mas_no_private_api.patch | 36 +-- ...emote_certificate_verification_logic.patch | 20 +- .../chromium/notification_provenance.patch | 28 +-- patches/chromium/pepper_plugin_support.patch | 30 +-- patches/chromium/picture-in-picture.patch | 2 +- ...utofill_colors_to_the_color_pipeline.patch | 12 +- patches/chromium/preconnect_manager.patch | 6 +- patches/chromium/printing.patch | 48 ++-- patches/chromium/process_singleton.patch | 6 +- ...r_changes_to_the_webcontentsobserver.patch | 60 ++--- .../render_widget_host_view_base.patch | 23 +- .../render_widget_host_view_mac.patch | 6 +- patches/chromium/resource_file_conflict.patch | 6 +- ...h_spell_check_delayed_initialization.patch | 2 +- patches/chromium/scroll_bounce_flag.patch | 4 +- ...ecks_in_mediastreamdevicescontroller.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 22 +- patches/chromium/sysroot.patch | 6 +- ...andboxed_ppapi_processes_skip_zygote.patch | 10 +- .../upload_list_add_loadsync_method.patch | 4 +- patches/chromium/web_contents.patch | 12 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 18 +- ...feat_add_hook_to_notify_script_ready.patch | 14 +- ...bals_to_allow_patching_devtools_dock.patch | 4 +- ...ingssl_and_openssl_incompatibilities.patch | 12 + .../node/support_v8_sandboxed_pointers.patch | 4 +- patches/v8/.patches | 1 + patches/v8/build_gn.patch | 6 +- patches/v8/dcheck.patch | 4 +- ...se_of_preserve_most_on_arm64_windows.patch | 44 ++++ ...export_private_v8_symbols_on_windows.patch | 4 +- ...ort_symbols_needed_for_windows_build.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- ...ed_attribute_for_older_msvc_versions.patch | 10 +- ...ppheapcreateparams_to_be_noncopyable.patch | 8 +- ..._terminating_exception_in_microtasks.patch | 8 +- ...workaround_an_undefined_symbol_error.patch | 10 +- shell/app/electron_main_delegate_mac.mm | 2 +- shell/app/node_main.cc | 4 +- shell/app/uv_task_runner.h | 2 +- shell/browser/api/electron_api_app.cc | 4 +- shell/browser/api/electron_api_base_window.cc | 7 +- .../api/electron_api_browser_window.cc | 4 +- .../api/electron_api_crash_reporter.cc | 2 +- .../api/electron_api_data_pipe_holder.cc | 3 +- shell/browser/api/electron_api_debugger.h | 2 +- .../browser/api/electron_api_download_item.cc | 1 - .../browser/api/electron_api_event_emitter.cc | 4 +- .../api/electron_api_global_shortcut.h | 2 +- shell/browser/api/electron_api_menu.h | 2 +- shell/browser/api/electron_api_menu_mac.mm | 8 +- .../api/electron_api_native_theme_mac.mm | 1 - shell/browser/api/electron_api_net_log.cc | 2 +- shell/browser/api/electron_api_net_log.h | 2 +- .../api/electron_api_power_save_blocker.cc | 3 +- shell/browser/api/electron_api_screen.cc | 8 +- shell/browser/api/electron_api_session.cc | 2 +- .../electron_api_system_preferences_mac.mm | 4 +- .../electron_api_system_preferences_win.cc | 2 +- shell/browser/api/electron_api_tray.cc | 1 - .../api/electron_api_utility_process.cc | 6 +- .../browser/api/electron_api_web_contents.cc | 27 +-- shell/browser/api/electron_api_web_contents.h | 6 +- shell/browser/api/electron_api_web_request.cc | 3 +- shell/browser/api/frame_subscriber.cc | 12 +- shell/browser/api/frame_subscriber.h | 5 +- shell/browser/api/gpuinfo_manager.cc | 6 +- shell/browser/api/message_port.cc | 3 +- shell/browser/api/save_page_handler.cc | 2 +- shell/browser/auto_updater_mac.mm | 2 +- .../browser/badging/badge_manager_factory.cc | 2 +- shell/browser/browser.cc | 11 +- shell/browser/certificate_manager_model.cc | 2 +- shell/browser/certificate_manager_model.h | 2 +- shell/browser/cookie_change_notifier.cc | 2 +- .../electron_autofill_driver_factory.cc | 4 +- .../electron_autofill_driver_factory.h | 2 +- shell/browser/electron_browser_client.cc | 4 +- shell/browser/electron_browser_context.cc | 1 - shell/browser/electron_browser_main_parts.cc | 7 +- shell/browser/electron_browser_main_parts.h | 3 +- .../electron_download_manager_delegate.cc | 2 +- .../electron_javascript_dialog_manager.cc | 2 +- shell/browser/electron_permission_manager.h | 2 +- ...ron_speech_recognition_manager_delegate.cc | 2 +- .../electron_management_api_delegate.cc | 2 +- shell/browser/extensions/api/tabs/tabs_api.cc | 12 - shell/browser/extensions/api/tabs/tabs_api.h | 3 - .../extensions/electron_extension_loader.cc | 2 +- .../extensions/electron_extension_loader.h | 2 +- .../electron_extension_message_filter.cc | 4 +- .../extensions/electron_extension_system.cc | 2 +- .../electron_extensions_browser_client.cc | 2 +- .../extensions/electron_messaging_delegate.cc | 2 +- shell/browser/fake_location_provider.cc | 2 +- shell/browser/file_select_helper.cc | 2 +- shell/browser/file_select_helper_mac.mm | 2 +- shell/browser/hid/hid_chooser_context.cc | 2 +- shell/browser/hid/hid_chooser_controller.cc | 2 +- shell/browser/javascript_environment.cc | 4 +- shell/browser/lib/power_observer_linux.cc | 2 +- shell/browser/lib/power_observer_linux.h | 2 +- shell/browser/login_handler.cc | 6 +- shell/browser/mac/electron_application.h | 2 +- shell/browser/mac/in_app_purchase.h | 2 +- shell/browser/mac/in_app_purchase.mm | 2 +- shell/browser/mac/in_app_purchase_observer.h | 2 +- shell/browser/mac/in_app_purchase_observer.mm | 2 +- shell/browser/mac/in_app_purchase_product.h | 2 +- shell/browser/mac/in_app_purchase_product.mm | 2 +- shell/browser/native_window.cc | 2 +- .../net/proxying_url_loader_factory.cc | 4 +- shell/browser/net/proxying_websocket.cc | 2 +- shell/browser/net/resolve_proxy_helper.cc | 2 +- shell/browser/net/url_pipe_loader.cc | 3 +- shell/browser/osr/osr_host_display_client.h | 2 +- .../osr/osr_render_widget_host_view.cc | 7 +- .../browser/osr/osr_render_widget_host_view.h | 2 +- shell/browser/osr/osr_video_consumer.h | 2 +- .../printing/print_preview_message_handler.cc | 2 +- .../printing/print_view_manager_electron.cc | 2 +- shell/browser/relauncher_win.cc | 21 ++ .../serial/serial_chooser_controller.cc | 2 +- shell/browser/special_storage_policy.cc | 4 +- .../ui/cocoa/electron_menu_controller.h | 2 +- .../ui/cocoa/electron_ns_window_delegate.mm | 2 +- shell/browser/ui/devtools_manager_delegate.cc | 2 +- shell/browser/ui/file_dialog_gtk.cc | 2 +- shell/browser/ui/gtk/menu_gtk.h | 2 +- shell/browser/ui/message_box.h | 2 +- shell/browser/ui/message_box_gtk.cc | 2 +- shell/browser/ui/message_box_mac.mm | 2 +- shell/browser/ui/run_all_unittests.cc | 2 +- shell/browser/ui/views/autofill_popup_view.cc | 4 +- .../ui/views/electron_views_delegate_win.cc | 2 +- .../ui/views/global_menu_bar_registrar_x11.cc | 2 +- shell/browser/ui/views/submenu_button.cc | 2 +- shell/browser/ui/webui/accessibility_ui.cc | 4 +- shell/browser/ui/win/notify_icon_host.cc | 2 +- shell/browser/ui/win/taskbar_host.h | 2 +- shell/browser/usb/usb_chooser_context.cc | 6 +- shell/browser/usb/usb_chooser_controller.cc | 2 +- shell/browser/zoom_level_delegate.cc | 2 +- shell/common/api/object_life_monitor.cc | 2 +- .../gin_converters/callback_converter.h | 2 +- shell/common/gin_helper/callback.h | 2 +- shell/common/gin_helper/function_template.h | 4 +- shell/common/gin_helper/trackable_object.cc | 2 +- shell/common/gin_helper/trackable_object.h | 2 +- shell/common/gin_helper/wrappable.cc | 1 - shell/common/gin_helper/wrappable.h | 2 +- shell/common/mac/main_application_bundle.mm | 2 +- shell/common/mouse_util.h | 2 +- shell/common/node_bindings.cc | 3 +- shell/common/platform_util.cc | 2 +- shell/common/platform_util.h | 2 +- shell/common/platform_util_mac.mm | 2 +- shell/common/platform_util_win.cc | 4 +- .../electron_api_crash_reporter_renderer.cc | 2 +- .../api/electron_api_spell_check_client.cc | 4 +- .../api/electron_api_spell_check_client.h | 2 +- .../browser_exposed_renderer_interfaces.cc | 6 +- shell/renderer/electron_autofill_agent.cc | 2 +- shell/services/node/parent_port.cc | 2 +- .../electron_content_utility_client.cc | 3 +- spec/api-browser-window-spec.ts | 16 +- spec/api-media-handler-spec.ts | 22 +- spec/api-web-contents-spec.ts | 11 +- spec/chromium-spec.ts | 5 +- 244 files changed, 1051 insertions(+), 927 deletions(-) create mode 100644 patches/v8/disable_the_use_of_preserve_most_on_arm64_windows.patch diff --git a/BUILD.gn b/BUILD.gn index 4e824c5eaa8..d065e315a0e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -546,7 +546,7 @@ source_set("electron_lib") { deps += [ "//components/remote_cocoa/app_shim", "//components/remote_cocoa/browser", - "//content/common:mac_helpers", + "//content/browser:mac_helpers", "//ui/accelerated_widget_mac", ] diff --git a/DEPS b/DEPS index b2d5def1b93..eae8edb921e 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '111.0.5518.0', + '111.0.5560.0', 'node_version': 'v18.13.0', 'nan_version': diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index 992f8b69c6b..627d0f49b6d 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -10,6 +10,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__algorithm/copy.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/copy_backward.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/copy_if.h", + "//buildtools/third_party/libc++/trunk/include/__algorithm/copy_move_common.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/copy_n.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/count.h", "//buildtools/third_party/libc++/trunk/include/__algorithm/count_if.h", @@ -193,9 +194,19 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__assert", "//buildtools/third_party/libc++/trunk/include/__availability", "//buildtools/third_party/libc++/trunk/include/__bit/bit_cast.h", + "//buildtools/third_party/libc++/trunk/include/__bit/bit_ceil.h", + "//buildtools/third_party/libc++/trunk/include/__bit/bit_floor.h", + "//buildtools/third_party/libc++/trunk/include/__bit/bit_log2.h", + "//buildtools/third_party/libc++/trunk/include/__bit/bit_width.h", + "//buildtools/third_party/libc++/trunk/include/__bit/blsr.h", "//buildtools/third_party/libc++/trunk/include/__bit/byteswap.h", + "//buildtools/third_party/libc++/trunk/include/__bit/countl.h", + "//buildtools/third_party/libc++/trunk/include/__bit/countr.h", + "//buildtools/third_party/libc++/trunk/include/__bit/endian.h", + "//buildtools/third_party/libc++/trunk/include/__bit/has_single_bit.h", + "//buildtools/third_party/libc++/trunk/include/__bit/popcount.h", + "//buildtools/third_party/libc++/trunk/include/__bit/rotate.h", "//buildtools/third_party/libc++/trunk/include/__bit_reference", - "//buildtools/third_party/libc++/trunk/include/__bits", "//buildtools/third_party/libc++/trunk/include/__bsd_locale_defaults.h", "//buildtools/third_party/libc++/trunk/include/__bsd_locale_fallbacks.h", "//buildtools/third_party/libc++/trunk/include/__charconv/chars_format.h", @@ -293,6 +304,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__filesystem/u8path.h", "//buildtools/third_party/libc++/trunk/include/__format/buffer.h", "//buildtools/third_party/libc++/trunk/include/__format/concepts.h", + "//buildtools/third_party/libc++/trunk/include/__format/container_adaptor.h", "//buildtools/third_party/libc++/trunk/include/__format/enable_insertable.h", "//buildtools/third_party/libc++/trunk/include/__format/escaped_output_table.h", "//buildtools/third_party/libc++/trunk/include/__format/extended_grapheme_cluster_table.h", @@ -315,8 +327,10 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__format/formatter_output.h", "//buildtools/third_party/libc++/trunk/include/__format/formatter_pointer.h", "//buildtools/third_party/libc++/trunk/include/__format/formatter_string.h", + "//buildtools/third_party/libc++/trunk/include/__format/formatter_tuple.h", "//buildtools/third_party/libc++/trunk/include/__format/parser_std_format_spec.h", "//buildtools/third_party/libc++/trunk/include/__format/range_default_formatter.h", + "//buildtools/third_party/libc++/trunk/include/__format/range_formatter.h", "//buildtools/third_party/libc++/trunk/include/__format/unicode.h", "//buildtools/third_party/libc++/trunk/include/__functional/binary_function.h", "//buildtools/third_party/libc++/trunk/include/__functional/binary_negate.h", @@ -354,6 +368,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__fwd/span.h", "//buildtools/third_party/libc++/trunk/include/__fwd/string.h", "//buildtools/third_party/libc++/trunk/include/__fwd/string_view.h", + "//buildtools/third_party/libc++/trunk/include/__fwd/subrange.h", "//buildtools/third_party/libc++/trunk/include/__fwd/tuple.h", "//buildtools/third_party/libc++/trunk/include/__hash_table", "//buildtools/third_party/libc++/trunk/include/__ios/fpos.h", @@ -379,6 +394,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__iterator/iter_swap.h", "//buildtools/third_party/libc++/trunk/include/__iterator/iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/iterator_traits.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/iterator_with_data.h", "//buildtools/third_party/libc++/trunk/include/__iterator/mergeable.h", "//buildtools/third_party/libc++/trunk/include/__iterator/move_iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/move_sentinel.h", @@ -391,6 +407,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__iterator/readable_traits.h", "//buildtools/third_party/libc++/trunk/include/__iterator/reverse_access.h", "//buildtools/third_party/libc++/trunk/include/__iterator/reverse_iterator.h", + "//buildtools/third_party/libc++/trunk/include/__iterator/segmented_iterator.h", "//buildtools/third_party/libc++/trunk/include/__iterator/size.h", "//buildtools/third_party/libc++/trunk/include/__iterator/sortable.h", "//buildtools/third_party/libc++/trunk/include/__iterator/unreachable_sentinel.h", @@ -485,6 +502,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__random/weibull_distribution.h", "//buildtools/third_party/libc++/trunk/include/__ranges/access.h", "//buildtools/third_party/libc++/trunk/include/__ranges/all.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/as_rvalue_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/common_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/concepts.h", "//buildtools/third_party/libc++/trunk/include/__ranges/copyable_box.h", @@ -493,6 +511,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__ranges/data.h", "//buildtools/third_party/libc++/trunk/include/__ranges/drop_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/drop_while_view.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/elements_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/empty.h", "//buildtools/third_party/libc++/trunk/include/__ranges/empty_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/enable_borrowed_range.h", @@ -511,6 +530,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__ranges/reverse_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/single_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/size.h", + "//buildtools/third_party/libc++/trunk/include/__ranges/split_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/subrange.h", "//buildtools/third_party/libc++/trunk/include/__ranges/take_view.h", "//buildtools/third_party/libc++/trunk/include/__ranges/take_while_view.h", @@ -542,14 +562,16 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__thread/timed_backoff_policy.h", "//buildtools/third_party/libc++/trunk/include/__threading_support", "//buildtools/third_party/libc++/trunk/include/__tree", - "//buildtools/third_party/libc++/trunk/include/__tuple/apply_cv.h", - "//buildtools/third_party/libc++/trunk/include/__tuple/make_tuple_types.h", - "//buildtools/third_party/libc++/trunk/include/__tuple/sfinae_helpers.h", - "//buildtools/third_party/libc++/trunk/include/__tuple/tuple_element.h", - "//buildtools/third_party/libc++/trunk/include/__tuple/tuple_indices.h", - "//buildtools/third_party/libc++/trunk/include/__tuple/tuple_like.h", - "//buildtools/third_party/libc++/trunk/include/__tuple/tuple_size.h", - "//buildtools/third_party/libc++/trunk/include/__tuple/tuple_types.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/apply_cv.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/make_tuple_types.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/pair_like.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/sfinae_helpers.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/tuple_element.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/tuple_indices.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/tuple_like.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/tuple_like_ext.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/tuple_size.h", + "//buildtools/third_party/libc++/trunk/include/__tuple_dir/tuple_types.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/add_const.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/add_cv.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/add_lvalue_reference.h", @@ -578,6 +600,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__type_traits/is_abstract.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_aggregate.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_allocator.h", + "//buildtools/third_party/libc++/trunk/include/__type_traits/is_always_bitcastable.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_arithmetic.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_array.h", "//buildtools/third_party/libc++/trunk/include/__type_traits/is_assignable.h", @@ -685,6 +708,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__utility/cmp.h", "//buildtools/third_party/libc++/trunk/include/__utility/convert_to_integral.h", "//buildtools/third_party/libc++/trunk/include/__utility/declval.h", + "//buildtools/third_party/libc++/trunk/include/__utility/exception_guard.h", "//buildtools/third_party/libc++/trunk/include/__utility/exchange.h", "//buildtools/third_party/libc++/trunk/include/__utility/forward.h", "//buildtools/third_party/libc++/trunk/include/__utility/forward_like.h", @@ -697,7 +721,6 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/__utility/rel_ops.h", "//buildtools/third_party/libc++/trunk/include/__utility/swap.h", "//buildtools/third_party/libc++/trunk/include/__utility/to_underlying.h", - "//buildtools/third_party/libc++/trunk/include/__utility/transaction.h", "//buildtools/third_party/libc++/trunk/include/__utility/unreachable.h", "//buildtools/third_party/libc++/trunk/include/__variant/monostate.h", "//buildtools/third_party/libc++/trunk/include/__verbose_abort", @@ -816,6 +839,7 @@ libcxx_headers = [ "//buildtools/third_party/libc++/trunk/include/set", "//buildtools/third_party/libc++/trunk/include/setjmp.h", "//buildtools/third_party/libc++/trunk/include/shared_mutex", + "//buildtools/third_party/libc++/trunk/include/source_location", "//buildtools/third_party/libc++/trunk/include/span", "//buildtools/third_party/libc++/trunk/include/sstream", "//buildtools/third_party/libc++/trunk/include/stack", diff --git a/patches/boringssl/expose_aes-cfb.patch b/patches/boringssl/expose_aes-cfb.patch index b352d5595f6..899d5deff90 100644 --- a/patches/boringssl/expose_aes-cfb.patch +++ b/patches/boringssl/expose_aes-cfb.patch @@ -58,10 +58,10 @@ index 852b76bea69988e0b3ac76a17b603128f239dde0..d443f4dc2daea0b7aa86ae75d31d995f callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg); callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg); diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h -index b1876e0dcdab3bc69107093919e0c20fb92fc670..dffb4bcb519a3e8c2d0e2fc63603964a03cc1f4e 100644 +index 0e52ac8dc948764d52f196734cfc974e6d740b8e..caaeade2d78f361fd67186e444e3cb6997355d14 100644 --- a/include/openssl/cipher.h +++ b/include/openssl/cipher.h -@@ -464,6 +464,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void); +@@ -470,6 +470,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void); // EVP_aes_128_cfb128 is only available in decrepit. OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void); diff --git a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch index 70b11cf8441..03f362ad6cc 100644 --- a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch +++ b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch @@ -20,7 +20,7 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57 case ssl_open_record_error: diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc -index cfd1862d4bd031dffb4e7d0cfd0aadcb61200c47..d14c8cd02171daf26ed9460b890b82475d3537c0 100644 +index 0f0f5b1c32f88ec019fc3eab0977c9bb64c095ed..e25b72ec1e43c52d329d4f396776698526685439 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc @@ -1320,7 +1320,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { @@ -48,10 +48,10 @@ index cfd1862d4bd031dffb4e7d0cfd0aadcb61200c47..d14c8cd02171daf26ed9460b890b8247 void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export, diff --git a/ssl/ssl_test.cc b/ssl/ssl_test.cc -index 89273853c368ebd2c3c0098cc2a23af0490b7b87..5003607d4aded4ed885b6e362d224497932f1626 100644 +index 17209298f84bcd248c0367a4cc8fb88074705b5e..fa6d7d22a26c520896ea8b8b1f0e5cf816a52812 100644 --- a/ssl/ssl_test.cc +++ b/ssl/ssl_test.cc -@@ -8435,11 +8435,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { +@@ -8437,11 +8437,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { EXPECT_EQ(ret, 0); EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_ZERO_RETURN); @@ -63,7 +63,7 @@ index 89273853c368ebd2c3c0098cc2a23af0490b7b87..5003607d4aded4ed885b6e362d224497 // Although the client has seen close_notify, it should continue to report // |SSL_ERROR_SYSCALL| when its writes fail. ret = SSL_write(client.get(), data, sizeof(data)); -@@ -8447,22 +8442,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { +@@ -8449,22 +8444,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_SYSCALL); EXPECT_TRUE(write_failed); write_failed = false; diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index dbfc6faeb0c..78614d1de6a 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index c8fbf62f92b8577dc3e377bec0ed5da9b7a9fe26..3838e3170d48414cf0954fcf4848cf54770920f0 100644 +index 31f48f482532651052ba63a95884162a2e652509..0076d9f34970488a236ace0274aef31dd20b2dfa 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -242,6 +242,10 @@ int GpuMain(MainFunctionParams parameters) { diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 257fb7a9296..78f27c94f9e 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index 7eaed5e4ce1f8a46d1e25f8838cf52b3676a7fb5..8f2bd75d29acfc212f2e680caf63c428 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 191da0db4945d95ab66e19c6dcea5904c30eb487..d24cc7d5da9db9f6ad1e4e4d6573b5043d08bb07 100644 +index a0123eac7193282dbfba9712f0d88b2b87fccd9f..137c78c4441d58d9e8822aa87a2389126a80e1aa 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4394,6 +4394,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4407,6 +4407,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,7 +40,7 @@ index 191da0db4945d95ab66e19c6dcea5904c30eb487..d24cc7d5da9db9f6ad1e4e4d6573b504 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 6b705468189704725c78806456efc72792db1ca2..d0d0ef3cc648b11a2cb7683da793d16c5603f2e7 100644 +index c0d24c1715b4714c5f179dbba4f0d91cddef1946..c819e1429630342cb34476847b3c25b140dfc593 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -603,6 +603,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -53,7 +53,7 @@ index 6b705468189704725c78806456efc72792db1ca2..d0d0ef3cc648b11a2cb7683da793d16c int world_id) override; void DidChangeScrollOffset() override; diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h -index c27c7cd30b0e069f9c679c5c5c63ff7595e47f79..2f4d84d18d7fd64409578064c636b4b0049d22ef 100644 +index 9fa27d4f1c63599d5cfeb095e74a72a88db1d8a2..0d37864c44495615103f5c1dca623c1e181a6460 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h @@ -592,6 +592,9 @@ class BLINK_EXPORT WebLocalFrameClient { @@ -79,10 +79,10 @@ index 9736b31c03a32635fb8fde581321cc10ec11b11a..c9fd2170a25a7970648b8210ebe94e22 if (World().IsMainWorld()) { GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index 33baa5f23a9bb5ed80ddf045567af44f42ce7d97..30805671081930e40de5f5d780d184c24910ae0f 100644 +index bbcc1a23378d86d716171cf695f641212e64a30a..06b10cdfa96473731958c4a7e6d0839e79714ad3 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -309,6 +309,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -308,6 +308,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,7 +92,7 @@ index 33baa5f23a9bb5ed80ddf045567af44f42ce7d97..30805671081930e40de5f5d780d184c2 int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index dccf5cabe379cbe5709cfd4fd731e086d1815b9c..ceafdfddf7aadead9c9d5f60777f8fec7cbd74a7 100644 +index 77850c10195719e320b1fdfc4f13c805a802d4ef..98955dd3da64a2f4b7036466d9e1eefd1704727d 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc @@ -283,6 +283,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -110,7 +110,7 @@ index dccf5cabe379cbe5709cfd4fd731e086d1815b9c..ceafdfddf7aadead9c9d5f60777f8fec v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -index 9592a9573a34ea31c120184621e434cb62ec076d..a3fb80f374f1e6ac4434a16162a842486d3a050b 100644 +index d3f976c53e4ad894bfb808c1184f949871c3df2f..00d95e053dcc274036fc7300ad0b946df969d5fa 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h @@ -82,6 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index 9592a9573a34ea31c120184621e434cb62ec076d..a3fb80f374f1e6ac4434a16162a84248 int32_t world_id) override; diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index affd840ef7f796d16367243a3bf7286f512f7ca0..4cb5f8b5b3024d4dd9acf5fb50e11c51b5f334be 100644 +index 163e228075b5c6a1dcdb33896570258e14f5b5b3..e0ca34b36b2d6b98f9394f4022645f084cae3a58 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -374,6 +374,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -373,6 +373,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch index b6a53ec79f7..2d0100c6750 100644 --- a/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch +++ b/patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch @@ -58,7 +58,7 @@ index ebc31db3dad9ba7904fbd345c6a1ba31ed6fd813..1d2ffc82bb67ed80f508631c8c7d045b } // namespace gtk diff --git a/ui/gtk/window_frame_provider_gtk.cc b/ui/gtk/window_frame_provider_gtk.cc -index 9180d27328c5170171ea45d9ad83b34493aae2b9..f38bac04961fb200031f719183a229b943e22754 100644 +index e866f32a06abd8b9ee70f2972822b37756878259..d55229238fed1fedba65a969495c9b5c9f1b94fa 100644 --- a/ui/gtk/window_frame_provider_gtk.cc +++ b/ui/gtk/window_frame_provider_gtk.cc @@ -39,16 +39,18 @@ std::string GetThemeName() { @@ -105,7 +105,16 @@ index 9180d27328c5170171ea45d9ad83b34493aae2b9..f38bac04961fb200031f719183a229b9 ApplyCssToContext(context, R"(window, headerbar { background-image: none; background-color: black; -@@ -170,8 +172,8 @@ void WindowFrameProviderGtk::Asset::CloneFrom( +@@ -145,7 +147,7 @@ int ComputeTopCornerRadius() { + bool HeaderIsTranslucent() { + // The arbitrary square size to render a sample header. + constexpr int kHeaderSize = 32; +- auto context = HeaderContext(false, false); ++ auto context = HeaderContext(false, false, false); + ApplyCssToContext(context, R"(window, headerbar { + box-shadow: none; + border: none; +@@ -197,8 +199,8 @@ void WindowFrameProviderGtk::Asset::CloneFrom( unfocused_bitmap = src.unfocused_bitmap; } @@ -116,7 +125,7 @@ index 9180d27328c5170171ea45d9ad83b34493aae2b9..f38bac04961fb200031f719183a229b9 WindowFrameProviderGtk::~WindowFrameProviderGtk() = default; -@@ -273,7 +275,7 @@ void WindowFrameProviderGtk::PaintWindowFrame( +@@ -305,7 +307,7 @@ void WindowFrameProviderGtk::PaintWindowFrame( top_area_height_dip * scale - effective_frame_thickness_px.top(); auto header = PaintHeaderbar({client_bounds_px.width(), top_area_height_px}, @@ -125,7 +134,7 @@ index 9180d27328c5170171ea45d9ad83b34493aae2b9..f38bac04961fb200031f719183a229b9 image = gfx::ImageSkia::CreateFrom1xBitmap(header); // In GTK4, the headerbar gets clipped by the window. if (GtkCheckVersion(4)) { -@@ -305,7 +307,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) { +@@ -337,7 +339,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) { gfx::Rect frame_bounds_dip(kMaxFrameSizeDip, kMaxFrameSizeDip, 2 * kMaxFrameSizeDip, 2 * kMaxFrameSizeDip); @@ -134,7 +143,7 @@ index 9180d27328c5170171ea45d9ad83b34493aae2b9..f38bac04961fb200031f719183a229b9 frame_bounds_dip.Inset(-GtkStyleContextGetPadding(focused_context)); frame_bounds_dip.Inset(-GtkStyleContextGetBorder(focused_context)); gfx::Size bitmap_size(BitmapSizePx(asset), BitmapSizePx(asset)); -@@ -313,7 +315,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) { +@@ -345,7 +347,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) { PaintBitmap(bitmap_size, frame_bounds_dip, focused_context, scale); asset.unfocused_bitmap = PaintBitmap(bitmap_size, frame_bounds_dip, @@ -144,7 +153,7 @@ index 9180d27328c5170171ea45d9ad83b34493aae2b9..f38bac04961fb200031f719183a229b9 // In GTK4, there's no way to obtain the frame thickness from CSS values // directly, so we must determine it experimentally based on the drawn diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h -index d8cb2c6aab333cc55ad1daa70ac91b0569d33a7c..558aa3979301f79df789a29ba3ad1cf134bd6494 100644 +index 32c3d63ae4598339965c58443a8c2d12b99fb89a..91496d957b8291cd37948e237a1cc4bf605848b0 100644 --- a/ui/gtk/window_frame_provider_gtk.h +++ b/ui/gtk/window_frame_provider_gtk.h @@ -14,7 +14,7 @@ namespace gtk { @@ -156,7 +165,7 @@ index d8cb2c6aab333cc55ad1daa70ac91b0569d33a7c..558aa3979301f79df789a29ba3ad1cf1 WindowFrameProviderGtk(const WindowFrameProviderGtk&) = delete; WindowFrameProviderGtk& operator=(const WindowFrameProviderGtk&) = delete; -@@ -70,6 +70,9 @@ class WindowFrameProviderGtk : public ui::WindowFrameProvider { +@@ -72,6 +72,9 @@ class WindowFrameProviderGtk : public ui::WindowFrameProvider { // Cached bitmaps and metrics. The scale is rounded to percent. base::flat_map assets_; 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 371fb240a5a..026eb535c5c 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 6b36af5ca7c104e070287c5a7bf26ee71444ce51..6643eb7ea989de249bfe9bea4179392bc94d7943 100644 +index 39bd6ef7be6ecb0f22692ace3c77845d76a59391..d51a7418fe874102f0458d1aedbca26e85669da6 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -691,6 +691,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -689,6 +689,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,10 +22,10 @@ index 6b36af5ca7c104e070287c5a7bf26ee71444ce51..6643eb7ea989de249bfe9bea4179392b return is_active(); } diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h -index 4e40347feef5c7dde979407c4d85867fb5dd1c61..a72c2f97c1b28f847a145585dcd6ad6578de7ef6 100644 +index 574e1f33f7eb9302fc6b64efca23426676821afc..c8509989003da8ca3bbfd13c802f5bd8b81460e5 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h -@@ -138,6 +138,7 @@ class CONTENT_EXPORT RenderViewHostImpl +@@ -136,6 +136,7 @@ class CONTENT_EXPORT RenderViewHostImpl void EnablePreferredSizeMode() override; void WriteIntoTrace(perfetto::TracedProto context) const override; diff --git a/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch index 7308c1e09d7..41708d41f94 100644 --- a/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch +++ b/patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch @@ -6,25 +6,22 @@ Subject: allow new privileges in unsandboxed child processes This allows unsandboxed child process to launch setuid processes on Linux. diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc -index 8c5cc2b157f6e2894216a003256a9ef3b6dbf5f7..008ba5bef67adbd166919ca4708452faa4bb85b5 100644 +index b7f21237e87fa994b304a26fea8fec2531bca8de..7f6a4197aa7da2ba6a16cd83b78243e49ec1f2f4 100644 --- a/content/browser/child_process_launcher_helper_linux.cc +++ b/content/browser/child_process_launcher_helper_linux.cc -@@ -56,6 +56,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( - options->fds_to_remap.push_back(std::make_pair(sandbox_fd, GetSandboxFD())); - } +@@ -62,6 +62,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( + options->fds_to_remap.emplace_back(sandbox_fd, GetSandboxFD()); + } -+ // (For Electron), if we're launching without zygote, that means we're -+ // launching an unsandboxed process (since all sandboxed processes are -+ // forked from the zygote). Relax the allow_new_privs option to permit -+ // launching suid processes from unsandboxed child processes. -+ ZygoteHandle zygote_handle = -+ base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) -+ ? nullptr -+ : delegate_->GetZygote(); -+ if (!zygote_handle) { -+ options->allow_new_privs = true; -+ } ++ // (For Electron), if we're launching without zygote, that means we're ++ // launching an unsandboxed process (since all sandboxed processes are ++ // forked from the zygote). Relax the allow_new_privs option to permit ++ // launching suid processes from unsandboxed child processes. ++ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote) && ++ delegate_->GetZygote() == nullptr) { ++ options->allow_new_privs = true; ++ } + - for (const auto& remapped_fd : file_data_->additional_remapped_fds) { - options->fds_to_remap.emplace_back(remapped_fd.second.get(), - remapped_fd.first); + options->environment = delegate_->GetEnvironment(); + } else { + DCHECK(GetZygoteForLaunch()); diff --git a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch index 29f93d20013..5d1180eec0c 100644 --- a/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch +++ b/patches/chromium/allow_setting_secondary_label_via_simplemenumodel.patch @@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976 diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc -index ad157214c1d98b241f081db47f4ecffcf028f501..c9966e3d1eb5701ed12eb77d630f287d2720c913 100644 +index c058edaf6ea40746228da569a8739c50f958500d..2d4306d16ce8e354dcdf3da8c5afce8546349fcd 100644 --- a/ui/base/models/simple_menu_model.cc +++ b/ui/base/models/simple_menu_model.cc @@ -52,6 +52,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId( diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 4b8ef2cbe94..c4091f0709a 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -15,7 +15,7 @@ Refs changes in: This patch reverts the changes to fix associated crashes in Electron. diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc -index d6d1494f91ff6287eaf168700a7f9db246da43b3..7d1bc01d77f9e08d04030ef218639ed84cf5d514 100644 +index 33c676021af1165993cb20d92378dea3ab3bd8d4..98fc59d9dac47fa6f0725e088ddc2f9dc70ecc7e 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc @@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) { @@ -49,10 +49,10 @@ index d6d1494f91ff6287eaf168700a7f9db246da43b3..7d1bc01d77f9e08d04030ef218639ed8 // 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 f42f7ce6570c3fc36ee5731227f5701212592597..25c04c0b0a160d5cfc40f3be0163f5d375763d50 100644 +index 34cb438b0559cc133c8be67768fec35c4890e946..8ebcae8f67814537a5350f89d163e2a510532f7f 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -552,10 +552,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -576,10 +576,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index f42f7ce6570c3fc36ee5731227f5701212592597..25c04c0b0a160d5cfc40f3be0163f5d3 if (!Client()) return false; -@@ -603,6 +599,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -627,6 +623,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_disable_print_content_analysis.patch b/patches/chromium/build_disable_print_content_analysis.patch index 6ac268892a9..f60006254cc 100644 --- a/patches/chromium/build_disable_print_content_analysis.patch +++ b/patches/chromium/build_disable_print_content_analysis.patch @@ -13,7 +13,7 @@ This patch can be removed when enable_print_content_analysis can be more easily enabled or disabled by default with buildflags. diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni -index 6c7cc4a41fed63a68d19caee424f3b102d2e09fc..1ef6b397de1a641ec19e4306389cc3f6d362c254 100644 +index 8a688b2d196070caf8076bc5621eca2649a6f136..c148f511628ac13f0b50faab01f7308538f102a9 100644 --- a/printing/buildflags/buildflags.gni +++ b/printing/buildflags/buildflags.gni @@ -44,7 +44,7 @@ declare_args() { 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 7ab7aad9dae..4139dbb3811 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,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this patch. diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 810a07499722f73e4776b09e8f8a028945507645..f71abdb39b03bdd962ef4c544b6b8bc23fb4ce15 100644 +index 8f003ac2da1e49bc2bbf3a7cce1a648980e325c1..f216efc553847fe1ce41e41c8a7144d2f6911dee 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -183,11 +183,16 @@ if (!is_android && !is_mac) { +@@ -187,11 +187,16 @@ if (!is_android && !is_mac) { "common/crash_keys.h", ] @@ -33,10 +33,10 @@ index 810a07499722f73e4776b09e8f8a028945507645..f71abdb39b03bdd962ef4c544b6b8bc2 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 9bb3491228c6a7c7c82df9599a471f568ae75cb7..80ff0f32478eddec28be36b18ee5661035d6f026 100644 +index 6fd94d13f11645f389b0c5cbd185e40c86f11d44..5333a8a16ed62747830083c427a07a9546f0a42d 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4609,7 +4609,7 @@ static_library("browser") { +@@ -4557,7 +4557,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 9bb3491228c6a7c7c82df9599a471f568ae75cb7..80ff0f32478eddec28be36b18ee56610 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index a2fd936f1a14698db23e385e44cc9ba5ba64917b..30fb1b70ef3e3fb610e649f674d8337a60c6db86 100644 +index 18ca933e7a07e73c1dcd7dc60be42c6180653b59..d01b8278141a4f19f3888f895efc24a415fe45b3 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -6235,7 +6235,6 @@ test("unit_tests") { +@@ -6229,7 +6229,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index a2fd936f1a14698db23e385e44cc9ba5ba64917b..30fb1b70ef3e3fb610e649f674d8337a "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:crash_reporter_client_win_unit_tests", -@@ -6261,6 +6260,10 @@ test("unit_tests") { +@@ -6255,6 +6254,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,16 +68,16 @@ index a2fd936f1a14698db23e385e44cc9ba5ba64917b..30fb1b70ef3e3fb610e649f674d8337a ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -7183,7 +7186,7 @@ test("unit_tests") { +@@ -7167,7 +7170,7 @@ test("unit_tests") { } deps += [ - "//chrome:packed_resources_integrity_hash", + # "//chrome:packed_resources_integrity_hash", + "//chrome/browser/apps/app_service", "//chrome/browser/apps/app_service:test_support", "//chrome/browser/enterprise/connectors/analysis:features", - "//chrome/browser/image_editor:image_editor_component_util", -@@ -7314,6 +7317,10 @@ test("unit_tests") { +@@ -7300,6 +7303,10 @@ test("unit_tests") { } } diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index c106af82553..d7fc1718dde 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will rebuild the entire tree. diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index cc7e92ddb67cd0da1acd38bfaf1479cb08b2ca65..6cd73d404b27058ba45e1c32a29ddd707d1b0adb 100644 +index e675e08bee105e475ae7aa784d030d5dbaa12080..5a4570c4699cde1376c21fb50954b6562acd999f 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { diff --git a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch index b1bf6c90797..853eb159917 100644 --- a/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch +++ b/patches/chromium/build_make_libcxx_abi_unstable_false_for_electron.patch @@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron https://nornagon.medium.com/a-libc-odyssey-973e51649063 diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site -index 9a8ffa89b17da51a906e998723e9a0a52d524db7..09e229b580446528f93c3da87e1dfb41c3bda0be 100644 +index 2df8632ec45777b387988fea1f2932661ed5ff3c..8b9995a6144f77d2772debf0e772b5e6d4063929 100644 --- a/buildtools/third_party/libc++/__config_site +++ b/buildtools/third_party/libc++/__config_site @@ -12,7 +12,6 @@ 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 d75949dc27a..46573bd2495 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 16bc334f392d5c8b83cc497889893227e1e91fdd..767432485873396589d71cbb1a5e1208031a4588 100644 +index 29344e62d32b50cceef20c5c869c77f992880667..90dbf4ad6f38f6380aa65679d8114fd8cb230444 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1499,6 +1499,7 @@ component("base") { +@@ -1485,6 +1485,7 @@ component("base") { "//build/config/compiler:prevent_unsafe_narrowing", "//build/config/compiler:wexit_time_destructors", "//build/config/compiler:wglobal_constructors", @@ -18,7 +18,7 @@ index 16bc334f392d5c8b83cc497889893227e1e91fdd..767432485873396589d71cbb1a5e1208 deps = [ diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 6cd73d404b27058ba45e1c32a29ddd707d1b0adb..50cb31fcac0b960b98693b6f63d5580780d24c43 100644 +index 5a4570c4699cde1376c21fb50954b6562acd999f..7172c144eacccf8efce6cc85545599ecf14c5d4a 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -355,7 +355,6 @@ default_compiler_configs = [ @@ -43,7 +43,7 @@ index 8448ff2d912ed8664ba1117397a2407c08e9a578..5f6bb1a87615c474e06209fc8034ff36 if (is_win) { diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn -index 43713a7eef20efc7bdf2a78f8d126d43ff09ffff..44e7ec5c621ab17851dffe6ad42f7b561576731c 100644 +index 1adfddd0fa65aac18e4bc98a38e52dfd62701ff4..6ac3d77d7259970394537e164097cd8dbefec6b0 100644 --- a/components/remote_cocoa/app_shim/BUILD.gn +++ b/components/remote_cocoa/app_shim/BUILD.gn @@ -16,6 +16,7 @@ component("app_shim") { @@ -55,7 +55,7 @@ index 43713a7eef20efc7bdf2a78f8d126d43ff09ffff..44e7ec5c621ab17851dffe6ad42f7b56 "alert.h", "alert.mm", diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 97a4fa63593ca119501dcf76468052b33041cf27..be10275cdcd7bacae4ab24608ad840c5f238ecec 100644 +index c320ce10cfcd8b62dc516871bae900f6da9600f5..c9347d61c76098c9df5e0142872b5078017e6270 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -306,6 +306,8 @@ viz_component("service") { @@ -68,10 +68,10 @@ index 97a4fa63593ca119501dcf76468052b33041cf27..be10275cdcd7bacae4ab24608ad840c5 if (is_android || use_ozone) { diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index c8668e8e831cc0e5e2ea96da2c87b4bd711a2e71..fa0eb1250d7ae8b0878bb00543911bd7aa9ee550 100644 +index 9ba992e9ce8e107949db8dfc928a478b50fea35a..564467c1dda1210085488aed47d64052c457bd8a 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -53,6 +53,7 @@ source_set("browser") { +@@ -57,6 +57,7 @@ source_set("browser") { "//content:content_implementation", "//v8:external_startup_data", ] @@ -80,10 +80,10 @@ index c8668e8e831cc0e5e2ea96da2c87b4bd711a2e71..fa0eb1250d7ae8b0878bb00543911bd7 libs = [] frameworks = [] diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn -index bc96005c80cec046e6a4ef27d006c06037c24cea..81b14ee5000549368454c18d2f47fabf831351fe 100644 +index d01ad9dbeabeef8a5679823d8b1678d0a46c3865..2c4d34bc40aec5de7603ada2777e532be4416fce 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn -@@ -178,6 +178,7 @@ source_set("common") { +@@ -170,6 +170,7 @@ source_set("common") { "//content:content_implementation", "//build/config:precompiled_headers", ] @@ -92,10 +92,10 @@ index bc96005c80cec046e6a4ef27d006c06037c24cea..81b14ee5000549368454c18d2f47fabf public_deps = [ ":mojo_bindings", diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn -index 2a2410d4a46c1c6280d38aa5646748433ca4b742..32468dc2c1a74acba5a56db44cfb00eb4df45266 100644 +index a1f691c0d3452b440210190c467f96c727b3ec58..2c4808ec4b7018165947c311816d113067e8542c 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn -@@ -216,6 +216,7 @@ target(link_target_type, "renderer") { +@@ -220,6 +220,7 @@ target(link_target_type, "renderer") { } configs += [ "//content:content_implementation" ] @@ -128,7 +128,7 @@ index e5bc3c86e07873f5ad5a54fba950e3105049ab2b..6774273357a7b6a465a9918f81b4cee9 if (is_android) { sources += [ diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 3cc3a2de26e0988ab23245f4b6019b80585a50c3..cc6df0a804ce9e35dd71014519ef00db59236199 100644 +index 44635f13048890b20c74870d26c4e74bab363ddb..33ad7650832b7572949fb6f362bef02879f4c31b 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -188,6 +188,7 @@ source_set("audio") { @@ -181,10 +181,10 @@ index b078486d595ec38e5db1462486ab31a2951430e0..5cafd91460d5f98a20caa884834cc3ed source_set("sandbox_unittests") { diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn -index e38505d2b17428428defa0ebab06845374b7fe7c..a9812fa4abff04e5415c2315d5db7e0b6ec8673f 100644 +index fabf49654cebc659348e3505487b2be583647fed..58efb9cfe6e4ed44a8e3753ef4af8e4db84617cd 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn -@@ -286,6 +286,7 @@ component("core") { +@@ -280,6 +280,7 @@ component("core") { configs -= core_config_remove configs += core_config_add configs += [ "//v8:external_startup_data" ] @@ -206,7 +206,7 @@ index 1ca2843130e81f9ea6be7a71b6b2a8d68bd413ae..712e4428bc9417f114a695a5980c4888 test("accelerated_widget_mac_unittests") { diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn -index dffa31d3a753b6bb261b90c832826a6820d171d4..1c22f03f23f7db0432cfd7ab78649d05c7461b7a 100644 +index 3bec9f0f7d46f09842d785092295370c04d7b613..85aea7cc7fe5466aed6bf28f73409ce9b487e4b6 100644 --- a/ui/accessibility/platform/BUILD.gn +++ b/ui/accessibility/platform/BUILD.gn @@ -249,6 +249,7 @@ component("platform") { @@ -257,10 +257,10 @@ index d2692c7422e4694a783876addc1b283d451e937f..a07aaa7e88f38fa91c1254f7af03675c if (is_win) { sources += [ diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn -index 75070cd98a76b2d74f1038d5492660ffe0b76168..47503aae619cc61dbd48ea711ee737ef9f80d15b 100644 +index 36bc22a122193bf5ccd7e86df08cce7e5451a035..6d64206ee17042b6eef9ba15977eba0458903c75 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn -@@ -661,6 +661,7 @@ component("views") { +@@ -664,6 +664,7 @@ component("views") { "IOSurface.framework", "QuartzCore.framework", ] diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 58395999391..3ac03da9c6d 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 91b08b41778c01684593de09ea872ffab73d2909..87ddba88f50141bd957156f118a70167576f79ee 100644 +index 337aab0addc0a0e31df71b5dce3b62626b7f9504..080c99e23a4a81a4ddbf8a7689c8c10b66f9e039 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7317,6 +7317,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -7474,6 +7474,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 91b08b41778c01684593de09ea872ffab73d2909..87ddba88f50141bd957156f118a70167 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 74749758894a2d9f9ba0fb01eab9040e6a568e69..ebb60f0c70f309f753682cf32049a5683541f26a 100644 +index 720156a65fe9804834aa943dbcad975076d99193..03082815e5c4de60da566176af10bc972cff0072 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4129,6 +4129,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4127,6 +4127,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( auto* new_contents_impl = new_contents.get(); @@ -37,7 +37,7 @@ index 74749758894a2d9f9ba0fb01eab9040e6a568e69..ebb60f0c70f309f753682cf32049a568 // 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 -@@ -4170,12 +4176,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4168,12 +4174,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -66,10 +66,10 @@ index d2f710218b4fb7c24be02ea1cc78abcfb5718fc9..4d6f86e5674cf4f419061a0f67f3700f // 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 bac1d3db4f12a7f24b4d5685b8f28c66a4eb3b0f..44204c7531f947f1b307eb105f307b47a8c4f610 100644 +index 28afdb7d6f13a0a7331048197762acb44381bc57..b8712563ca3804872a6aab6b6f0fd170f21bbcd6 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -633,6 +633,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -634,6 +634,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -79,7 +79,7 @@ index bac1d3db4f12a7f24b4d5685b8f28c66a4eb3b0f..44204c7531f947f1b307eb105f307b47 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 efb918a1abd528db70e045ffd27e00b07ac06b31..dd6f95a6ce1b7b5a51d2d8fdaefd633d19a22824 100644 +index 174a8d9197876cc7167407560fa011ed2e9d6adf..b1e3179eae105e29a360cc5a92c475e7c545704d 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -164,6 +164,7 @@ class NetworkService; @@ -100,7 +100,7 @@ index efb918a1abd528db70e045ffd27e00b07ac06b31..dd6f95a6ce1b7b5a51d2d8fdaefd633d bool opener_suppressed, bool* no_javascript_access); diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index 7122abf89f48a931a5abd38de03d3aebb6d0fb09..eec7f60003267f91f856dc347b31ab8d637fc674 100644 +index 3c6897e12b0a14a7502158e1e977fe4ea318b41d..6f6a5eee43f3f5ecc89f907b825451d1bb833836 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -27,6 +27,17 @@ namespace content { @@ -122,7 +122,7 @@ index 7122abf89f48a931a5abd38de03d3aebb6d0fb09..eec7f60003267f91f856dc347b31ab8d const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 405a82d3344c2fc0c27afcbdb9347b7e1c95e8cd..c81dd661c5773f23d4e91d0e867d76206fb555e7 100644 +index 2717fd39b99c6c3f8b0cb8278fc5011dfb6d34a8..fae93468160463c098b5b115ef293989bbc1f38c 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -148,10 +148,10 @@ index 405a82d3344c2fc0c27afcbdb9347b7e1c95e8cd..c81dd661c5773f23d4e91d0e867d7620 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 1d591069c9aecb32a75c88b4398d2df412801278..191da0db4945d95ab66e19c6dcea5904c30eb487 100644 +index b5feb7b1c89954409c18f2a8d348ff1ca2f6389c..a0123eac7193282dbfba9712f0d88b2b87fccd9f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6284,6 +6284,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6290,6 +6290,10 @@ WebView* RenderFrameImpl::CreateNewWindow( blink::GetNavigationInitiatorActivationAndAdStatus( request.HasUserGesture(), GetWebFrame()->IsAdScriptInStack()); @@ -163,7 +163,7 @@ index 1d591069c9aecb32a75c88b4398d2df412801278..191da0db4945d95ab66e19c6dcea5904 // moved on send. bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index aca7d52eb07f7682c304490e2bab0285dea3b8ac..b6b2559b133012170cdf63f447665d0bda6605d2 100644 +index c1e5e53f49eee554daf7acbd097b3f3d4e2a084c..602f74dad295c86afa8506c0db7156966b4cce11 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc @@ -501,6 +501,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( @@ -210,10 +210,10 @@ index a50a83d36f9172add44867ee0b0f1c89779b387e..c4ac7d4c885e764cfcfc3f2cd25e31b4 } // namespace blink diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc -index 8e15273752904e22b3efa219ebd505ae8516628a..6760186cfe90c6bbe5cd98f11e6bd9127fd2315b 100644 +index c88166f2b60dcb799f56bfecfd0a8a10e70a887f..6b58d128b238ebc98078e62f9f388d9e5f70c76d 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2212,6 +2212,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2213,6 +2213,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window, completed_url); diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index c1798088b51..9071f5a7391 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores Makes things like "git status" quicker when developing electron locally diff --git a/.gitignore b/.gitignore -index 179ef51773f5b8dfd9b6c1d78978d2dba87c75c2..01d9d597c8f09b8712ec72c762af1ea0056b988c 100644 +index 13ace36474a9de85ba7111c4b9794206e112e46d..ee8c0a6daed14a51a76595546f02f9834986decc 100644 --- a/.gitignore +++ b/.gitignore -@@ -235,6 +235,7 @@ vs-chromium-project.txt +@@ -236,6 +236,7 @@ vs-chromium-project.txt /delegate_execute /device/serial/device_serial_mojo.xml /docs/website @@ -18,10 +18,10 @@ index 179ef51773f5b8dfd9b6c1d78978d2dba87c75c2..01d9d597c8f09b8712ec72c762af1ea0 /google_apis/internal /googleurl diff --git a/third_party/.gitignore b/third_party/.gitignore -index e756eab113a9690aef7772b39a70c6c2a96f47f7..025f59c12655706d6ec031f3af7166ccc97ab1e5 100644 +index d2d1b438f80fa6fe94c935f64d1ba007265bd3fa..cf0966f75b61e407aa781849bfc5b1b5a8d1e033 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore -@@ -86,6 +86,7 @@ +@@ -87,6 +87,7 @@ /directxsdk /dom_distiller_js/dist /eigen3/src @@ -29,7 +29,7 @@ index e756eab113a9690aef7772b39a70c6c2a96f47f7..025f59c12655706d6ec031f3af7166cc /elfutils/src /emoji-metadata/src /emoji-segmenter/src -@@ -185,6 +186,7 @@ +@@ -186,6 +187,7 @@ /mocha /mockito/src /nacl_sdk_binaries/ @@ -37,7 +37,7 @@ index e756eab113a9690aef7772b39a70c6c2a96f47f7..025f59c12655706d6ec031f3af7166cc /nasm /nearby/src /neon_2_sse/src -@@ -248,6 +250,7 @@ +@@ -249,6 +251,7 @@ /speex /sqlite/src /sqlite4java/lib/ diff --git a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch index c77ad2d6370..1039b36cccd 100644 --- a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch +++ b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch @@ -7,7 +7,7 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch actions in the non-client caption area. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index a38b2752f76194de52685a4cefa17756b5d3b79d..abf3fe4637d1774dd59d93ef6cdaefc58b4c282c 100644 +index e534b895eca4e28e003ef35de4a2fb5b32baf88b..756738951476ba1d509935d0eb152c978cfde7e6 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -1204,6 +1204,10 @@ void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged( @@ -34,10 +34,10 @@ index b23ba1bf3a49f72d1cd0f0ae4b0f316e7c15fa76..bf0a4869af4aaca15074fae42508b54a Widget* GetWidget(); const Widget* GetWidget() const; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 631393000c825ab953014b82b342d323d87c28bc..a15abb9c3b295185852cc2641c1ee3e653548d29 100644 +index 214a596da0dfdff2566a7642ac04e501655c5d88..dff84d16386acfb3ccc72a22878476f1ac463ea1 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3131,15 +3131,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3094,15 +3094,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, SetMsgHandled(FALSE); // We must let Windows handle the caption buttons if it's drawing them, or // they won't work. diff --git a/patches/chromium/chore_introduce_blocking_api_for_electron.patch b/patches/chromium/chore_introduce_blocking_api_for_electron.patch index a3be57515a6..a1ead6fd579 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 9cc4929deb2490f3628242da40439a1442dcf148..4a795bd8681358a3e0d8330286fdd0e18c8ce0f2 100644 +index f5436c117c2663a6c69e139d8a21338137c79ef0..ef0290a799dfd916b3aa971a71b41326100dbb52 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -129,6 +129,7 @@ class FirefoxProfileLock; @@ -28,7 +28,7 @@ index 9cc4929deb2490f3628242da40439a1442dcf148..4a795bd8681358a3e0d8330286fdd0e1 namespace enterprise_connectors { class LinuxKeyRotationCommand; } // namespace enterprise_connectors -@@ -549,6 +553,7 @@ class BASE_EXPORT ScopedAllowBlocking { +@@ -553,6 +557,7 @@ class BASE_EXPORT ScopedAllowBlocking { friend class ::DesktopNotificationBalloon; friend class ::FirefoxProfileLock; friend class ::GaiaConfig; @@ -36,7 +36,7 @@ index 9cc4929deb2490f3628242da40439a1442dcf148..4a795bd8681358a3e0d8330286fdd0e1 friend class ::ProfileImpl; friend class ::ScopedAllowBlockingForProfile; friend class ::StartupTabProviderImpl; -@@ -589,6 +594,7 @@ class BASE_EXPORT ScopedAllowBlocking { +@@ -593,6 +598,7 @@ class BASE_EXPORT ScopedAllowBlocking { friend class crosapi::LacrosThreadTypeDelegate; friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847 friend class drive::FakeDriveService; diff --git a/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch b/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch index c989820dc16..eb1c41d780f 100644 --- a/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch +++ b/patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch @@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK. It can be removed once/if we see a better solution to the problem. diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc -index 3c57b5c22e7d489cd3812218b7c3d8478ddd36d3..3227038eb346df8d636b75a03b3378d1e7b3e96c 100644 +index c204a15da17d7ca717bc130c29a70c696b7299be..a06dcd028a39c85bf0f3649396155063dcc90e83 100644 --- a/content/browser/site_instance_impl.cc +++ b/content/browser/site_instance_impl.cc @@ -209,7 +209,7 @@ scoped_refptr SiteInstanceImpl::CreateForGuest( diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 186f597743e..8faed925fa1 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -7,7 +7,7 @@ Pending upstream patch, this gives us fuller access to the window.open params so that we will be able to decide whether to cancel it or not. diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc -index 5d7675b25b9180405e1ca7c3fe88e34af8806591..a0edfe2efc4e5f4f3a21fb4e8d8e06ab66a99be7 100644 +index 3205aa98621b855a8e1dcea19daf5c4bf660dc09..54a994670a6ce84baf74e1939aba88ca8f1648b3 100644 --- a/chrome/browser/media/offscreen_tab.cc +++ b/chrome/browser/media/offscreen_tab.cc @@ -285,8 +285,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden( @@ -66,7 +66,7 @@ index 1af9377f917f4659149698593dbe85d98ed3409e..52771e9703663e60ed8ac77fff5abf9c content::WebContents* source, const content::OpenURLParams& params) override; diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc -index 0e9e41382300d6bb5fc6fa47cd5ed2ed4181ce46..e65a9bb5b9909e16f5a7dd2e73defa850795c9c4 100644 +index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685ab623bf7 100644 --- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc +++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc @@ -74,8 +74,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate, @@ -80,7 +80,7 @@ index 0e9e41382300d6bb5fc6fa47cd5ed2ed4181ce46..e65a9bb5b9909e16f5a7dd2e73defa85 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 3490be7e0fd125099fb0a14cfdd6578982862138..4dee48d17171b98dcf1f0b773f4e1bd878ef0a90 100644 +index 08ac5f0afd874913929e6ea9c79b38c6b28789ce..efe0f782e7747825a836a590400b65106f557c43 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1840,12 +1840,11 @@ bool Browser::IsWebContentsCreationOverridden( @@ -99,10 +99,10 @@ index 3490be7e0fd125099fb0a14cfdd6578982862138..4dee48d17171b98dcf1f0b773f4e1bd8 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 25a4953e4c1994b37b6425913526c64c24307bcb..cb17cb1f023b9bdbc0df8d53bd7694895984c856 100644 +index 08879ac2f134a338200f841cea1dea3323b6696f..136f86297dc03610e725526a70d0aaa1c45d81d0 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -851,8 +851,7 @@ class Browser : public TabStripModelObserver, +@@ -853,8 +853,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -113,7 +113,7 @@ index 25a4953e4c1994b37b6425913526c64c24307bcb..cb17cb1f023b9bdbc0df8d53bd769489 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc -index c76254dab42cb4761401dacc0587d74393eedf67..2ae0911e8ead5fae1c34f8981a97c1d829fb6e12 100644 +index 114e765ae7780922b0db688e381447c2e4b73cd3..c187ddf65418f4f3068593c6d4165d50524e1bfc 100644 --- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc +++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc @@ -202,8 +202,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden( @@ -127,7 +127,7 @@ index c76254dab42cb4761401dacc0587d74393eedf67..2ae0911e8ead5fae1c34f8981a97c1d8 // uses this to spawn new windows/tabs, which is also not allowed for // local presentations. diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h -index 9f36b1721b154ebd31a593800d5eb1f5930314cc..5c0f9cb89b675b58d7334c71c6546afb58498c03 100644 +index 0c8f72c7e6cbe38c2e05381e97c58a3a6c991f8e..2afc5dc73d6e23555faf39bf144b43a19a7c1118 100644 --- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h +++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h @@ -105,8 +105,7 @@ class PresentationReceiverWindowController final @@ -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 edfa75775225bf877d10df4ac867064f8d73d007..ee65f87d7ba7e11dc75fbf1acd1ae2b813d3c5f8 100644 +index 465dcd8c19fff3f435ed1286a9932a484b7d7d4e..6fbf7fc57e7188d4fc323e0276a85a58c3d9cbc4 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4029,8 +4029,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4027,8 +4027,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -232,7 +232,7 @@ index edfa75775225bf877d10df4ac867064f8d73d007..ee65f87d7ba7e11dc75fbf1acd1ae2b8 static_cast(delegate_->CreateCustomWebContents( opener, source_site_instance, is_new_browsing_instance, diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index eec7f60003267f91f856dc347b31ab8d637fc674..68e739a2b6dfb58593c29cde177c27c7aa793976 100644 +index 6f6a5eee43f3f5ecc89f907b825451d1bb833836..457cf0f6a5c254afca6148038b951391ca32addf 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( @@ -246,7 +246,7 @@ index eec7f60003267f91f856dc347b31ab8d637fc674..68e739a2b6dfb58593c29cde177c27c7 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index c81dd661c5773f23d4e91d0e867d76206fb555e7..bd3967c3d8141692289a21b7e7f99424a42ef583 100644 +index fae93468160463c098b5b115ef293989bbc1f38c..3d6bcc0c6a21f318b76607c6fa25a3aafc975e60 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -321,8 +321,7 @@ class CONTENT_EXPORT WebContentsDelegate { @@ -260,10 +260,10 @@ index c81dd661c5773f23d4e91d0e867d76206fb555e7..bd3967c3d8141692289a21b7e7f99424 // Allow delegate to creates a custom WebContents when // WebContents::CreateNewWindow() is called. This function is only called diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -index 111f4b46265628ef23c4e08f6fc0ad5ed6f793c3..d300d7276c8217c60f4b39802577b8bace6be7c3 100644 +index 2d6b5c054087593cff571daf1dcb5a10bdc6f157..fa255c126064a4072ede486d59e6dc00f63777cb 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -@@ -197,8 +197,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( +@@ -207,8 +207,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -274,10 +274,10 @@ index 111f4b46265628ef23c4e08f6fc0ad5ed6f793c3..d300d7276c8217c60f4b39802577b8ba // view is used for displaying embedded extension options, we want any // external links to be opened in a new tab, not in a new guest view so we diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h -index e7ca270c9e95c539c5379e09302ae43256e193d2..9c2de6f9992e4630fa8b4359607973d5087b83ff 100644 +index 675780388e55aaabcb099f795e7e388f7105e56c..fd876690186533cde2fde6a08a5a8916f44833b4 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.h +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h -@@ -59,8 +59,7 @@ class ExtensionOptionsGuest +@@ -61,8 +61,7 @@ class ExtensionOptionsGuest content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -288,10 +288,10 @@ index e7ca270c9e95c539c5379e09302ae43256e193d2..9c2de6f9992e4630fa8b4359607973d5 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index 50a583c2bc96aaf04b9dd76c40fb56a3b7be792b..3e8331cb95254076a47f1ec0a259c747e2fa302d 100644 +index ec5521a6e20051b1b66bc41ccee79b9aa43de4d0..7d89a6c8f13feb533964eb26a390902813a48bbc 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -@@ -390,8 +390,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( +@@ -400,8 +400,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -302,10 +302,10 @@ index 50a583c2bc96aaf04b9dd76c40fb56a3b7be792b..3e8331cb95254076a47f1ec0a259c747 } diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index 06d3ed32b65708d91b220cdd4991fd377d84217c..bc942580c1bfb16bc5a8e9168f55626d16b863f0 100644 +index 810289b11cba74feec6ee3f61f02562980050d06..db1f6baccb883cc35f35bf7c111483c2ecec776d 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -@@ -170,8 +170,7 @@ class MimeHandlerViewGuest +@@ -172,8 +172,7 @@ class MimeHandlerViewGuest content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -316,10 +316,10 @@ index 06d3ed32b65708d91b220cdd4991fd377d84217c..bc942580c1bfb16bc5a8e9168f55626d content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc -index 1d5e4398a08fef2346aa4c9325858b340eee942d..5dec54ab24ed4fe0d1a0840cdc500d107b06ebb0 100644 +index c3af8403a996bac2742c6502dbe8e13e0809b0c0..fbea9891e2a5e533c3eb9d98ff16c3cc03396cc4 100644 --- a/fuchsia_web/webengine/browser/frame_impl.cc +++ b/fuchsia_web/webengine/browser/frame_impl.cc -@@ -564,8 +564,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -567,8 +567,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -344,7 +344,7 @@ index 69e45b758a48fd2a117715869861d70294b334b3..5e36410b91e92b399a7179e14dd18fca int opener_render_process_id, int opener_render_frame_id, diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc -index 010ff2c94287e6b9ef37fd21f959670775a03dbf..f2392c90f91db631837495809290b4f77ac1243b 100644 +index 2bb690e05876c497abd1ad7d2c600b78532df1e6..c595d97a478a7475c8a56f322112006ae9117cd3 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc @@ -183,8 +183,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index 6a44aeab2ea..58e7c8df687 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -66,7 +66,7 @@ index 3c2fc1707e38345c114e140104ffc5a93d704918..40dac9fd7beb7a1a589a479a8035391d bool is_listening_ = false; diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc -index 51cc1dd4f3452c18a4b4cc0634509ab4faa9dcd7..bb5f937d59617f323e829c5259a33028822f585a 100644 +index 943168e2c72c0aeb59f1ea21b14f2dc8e6cfd7e0..db3ca2ed0ba0994caa4d26436b942166a2d4b1a4 100644 --- a/chrome/browser/extensions/global_shortcut_listener_win.cc +++ b/chrome/browser/extensions/global_shortcut_listener_win.cc @@ -62,6 +62,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, 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 95360010d5f..5d746bebe78 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 ff0ab3ba7a31e9af5e3e68668293095f12097301..b11f8b287d59061573d4fe19951b66821fdf71d4 100644 +index c2ef1da09511b9314298b4e55a23bd521ba17969..d95b992daae050ea601da86008823bbd41df9b6d 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -39,6 +39,7 @@ @@ -17,8 +17,8 @@ index ff0ab3ba7a31e9af5e3e68668293095f12097301..b11f8b287d59061573d4fe19951b6682 +#include "base/strings/string_piece.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" - #include "base/task/thread_pool/environment_config.h" -@@ -249,8 +250,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { + #include "base/task/single_thread_task_runner.h" +@@ -251,8 +252,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) { #endif @@ -33,7 +33,7 @@ index ff0ab3ba7a31e9af5e3e68668293095f12097301..b11f8b287d59061573d4fe19951b6682 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) base::FileDescriptorStore& file_descriptor_store = base::FileDescriptorStore::GetInstance(); -@@ -279,11 +285,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, +@@ -281,11 +287,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, #endif // V8_USE_EXTERNAL_STARTUP_DATA @@ -48,7 +48,7 @@ index ff0ab3ba7a31e9af5e3e68668293095f12097301..b11f8b287d59061573d4fe19951b6682 #endif // V8_USE_EXTERNAL_STARTUP_DATA } -@@ -955,7 +962,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { +@@ -965,7 +972,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { return TerminateForFatalInitializationError(); #endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE) @@ -81,7 +81,7 @@ index a687861c04b323102a8d2bfe22b24a964793cd9b..4a7a469111eaec3e1e76ee852bd5afbb return new ContentClient(); } diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h -index 8420d43b88bc7187d8e0701dd58a5de07366a5c6..5572fad8219ae2c72f7c636b8b86c0b64cf75411 100644 +index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3cb033a99 100644 --- a/content/public/app/content_main_delegate.h +++ b/content/public/app/content_main_delegate.h @@ -9,6 +9,7 @@ @@ -102,10 +102,10 @@ index 8420d43b88bc7187d8e0701dd58a5de07366a5c6..5572fad8219ae2c72f7c636b8b86c0b6 friend class ContentClientCreator; friend class ContentClientInitializer; diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index b6d84ce28ebd0e30dc962972583a2c457ed28f8a..a7d4641b99e785b0f7ee48de9e69ae81237bccbd 100644 +index 3fd76d7051ccc5f7e6f45c5be17fca4b22463b24..1d197cb685d14fb440c0136a6b4fff7336e9e946 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -505,8 +505,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, +@@ -494,8 +494,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out, #if defined(V8_USE_EXTERNAL_STARTUP_DATA) @@ -115,7 +115,7 @@ index b6d84ce28ebd0e30dc962972583a2c457ed28f8a..a7d4641b99e785b0f7ee48de9e69ae81 if (g_mapped_snapshot) { // TODO(crbug.com/802962): Confirm not loading different type of snapshot // files in a process. -@@ -515,10 +514,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { +@@ -504,10 +503,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 bf48dfa3151..79007948865 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 bd15ed3dffe9ad3b8f5fe7478d7f9b5864f2da08..83015cb512c418087c24ce021f00be15276f9711 100644 +index 88a5ecbb040e74822be75585f8f0265825e63a3c..faac202dec6ba0b482ee4e3869a22fc6da7e852b 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc -@@ -1726,6 +1726,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1724,6 +1724,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( loader_factory_bundle_info = context()->loader_factory_bundle_for_update_check()->Clone(); @@ -38,7 +38,7 @@ index bd15ed3dffe9ad3b8f5fe7478d7f9b5864f2da08..83015cb512c418087c24ce021f00be15 if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig( browser_context(), scope_origin)) { // If this is a Service Worker for a WebUI, the WebUI's URLDataSource -@@ -1745,9 +1765,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1743,9 +1763,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeScheme) && scope.scheme_piece() == kChromeUIScheme) { config->RegisterURLDataSource(browser_context()); @@ -49,7 +49,7 @@ index bd15ed3dffe9ad3b8f5fe7478d7f9b5864f2da08..83015cb512c418087c24ce021f00be15 .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory( browser_context(), kChromeUIScheme, base::flat_set())); -@@ -1755,9 +1773,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( +@@ -1753,9 +1771,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( features::kEnableServiceWorkersForChromeUntrusted) && scope.scheme_piece() == kChromeUIUntrustedScheme) { config->RegisterURLDataSource(browser_context()); diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 72a405cd9c6..10910767082 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,7 +17,7 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc -index 2c0cc8d12b2e7987034fde9819e34b801549878d..c6353228eb5e5c720518d9c7a647349fcc617e05 100644 +index 2114f75a3172c70b70625ecc97e1135e9f58b699..12d289efee5920dcd9f54a7f8b9586b107daf7d5 100644 --- a/ui/base/clipboard/clipboard_win.cc +++ b/ui/base/clipboard/clipboard_win.cc @@ -891,10 +891,10 @@ SkBitmap ClipboardWin::ReadBitmapInternal(ClipboardBuffer buffer) const { diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 61645135249..2dafb42eeef 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -8,7 +8,7 @@ Subject: desktop_media_list.patch * Ensure "OnRefreshComplete()" even if there are no items in the list diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h -index 2892ec2c97b6a49b696f155780900e5c4654b051..c559ad5e07344281e61148eff3b63a131144fed2 100644 +index 42da00a0f473928263df89f11d80830b6986292b..6a556939d0acfbd910ebb0923e198e2fe67fd43d 100644 --- a/chrome/browser/media/webrtc/desktop_media_list.h +++ b/chrome/browser/media/webrtc/desktop_media_list.h @@ -107,7 +107,8 @@ class DesktopMediaList { @@ -22,7 +22,7 @@ index 2892ec2c97b6a49b696f155780900e5c4654b051..c559ad5e07344281e61148eff3b63a13 virtual int GetSourceCount() const = 0; virtual const Source& GetSource(int index) const = 0; diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc -index c49e83d5ea1e8425156f0be482ec9061544db9bd..549e5a3a900c8aca83e64ea000a13e8377d28227 100644 +index 0389599ac786b6abd61ca921347fe12ddd5d0ee7..780927301744ea7312f230cec76a24a33d71f767 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc @@ -69,12 +69,12 @@ void DesktopMediaListBase::StartUpdating(DesktopMediaListObserver* observer) { @@ -41,7 +41,7 @@ index c49e83d5ea1e8425156f0be482ec9061544db9bd..549e5a3a900c8aca83e64ea000a13e83 int DesktopMediaListBase::GetSourceCount() const { diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h -index 202cfa1df6a540fb6e13ef06b43bdabba5535599..94ed6bf35606fe22c4c58cbb4ed6668f84247d52 100644 +index f25dede94beab46120194bd5450882fa30a2ad8d..e74071f9e82cb89d0f3eba8ff86e01d67207f1d3 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h +++ b/chrome/browser/media/webrtc/desktop_media_list_base.h @@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList { @@ -54,7 +54,7 @@ index 202cfa1df6a540fb6e13ef06b43bdabba5535599..94ed6bf35606fe22c4c58cbb4ed6668f const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.cc b/chrome/browser/media/webrtc/fake_desktop_media_list.cc -index 1b977da7ff9e2ac86ce131da0dd0c6f3b6a69448..f94b818d3de71cb9a5521186611452c086d56608 100644 +index 832e0da5271d6ac92466c84dba6917041f825f96..068e7f57be13a89889047abeddd07dfc03b1fce0 100644 --- a/chrome/browser/media/webrtc/fake_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/fake_desktop_media_list.cc @@ -79,7 +79,8 @@ void FakeDesktopMediaList::StartUpdating(DesktopMediaListObserver* observer) { @@ -82,7 +82,7 @@ index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index 836f7683b77b3b28f33984f27649d675ddddd5b7..84135d3cf983c88fc165a0fc012200e5132a52ff 100644 +index 97d1618356d2c42eda3e24ab0038c961d220194f..60aa0f41fbe1115d8367b024cacdfb71be26aff0 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -141,7 +141,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 3e235cebd71..b27ab74face 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,10 +20,10 @@ 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 45b74d16e038a33d8b3d47e0357cfa3a1838461a..0f21653e6a3839ef4d4ae0bff9b58114fd27502d 100644 +index 940f15cab30983c3f05ef886d3b055bcc35159f2..4ddc504b02b8d0abcefd6e3e7871875df9b0fd81 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1898,6 +1898,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1880,6 +1880,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -48,7 +48,7 @@ index 012e0f781d21b96890b88e0bc2cb2d46cb1e3829..e74783c3f8003d87fbb343087a83da3c // Image Decode Service and raster tiles without images until the decode is // ready. diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h -index 97996a8a897e0ac7d6ba2eb9d1f47da6da573b6b..d84292521466d7bb2d7794269a332b0f2fa2d6e7 100644 +index a398a5d597946d804fff199859f85e03ff9960fc..621d08a28c5f1967343669bc805f7fb8a0ffb24d 100644 --- a/components/viz/common/display/renderer_settings.h +++ b/components/viz/common/display/renderer_settings.h @@ -24,6 +24,7 @@ class VIZ_COMMON_EXPORT RendererSettings { @@ -81,7 +81,7 @@ index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ce !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index de753e5a941170d162132f2917b11672a50e833f..7e1fab06bf317758b731d56acb86ab0bf0b603fb 100644 +index 9f1efcdd0ef27c528c4aec954ab9ca74085a6e74..f86f288f32404ce75d4f177c7bfd1253c7b1ee3f 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -224,6 +224,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -93,10 +93,10 @@ index de753e5a941170d162132f2917b11672a50e833f..7e1fab06bf317758b731d56acb86ab0b 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 0602a370d017a0b82b9056fb53341a30becb7b58..5300f3d6f55a40bcfc75cafcf1b757c18bbfd650 100644 +index 31678701d6ee0aefdb86c046178abdf11277de3d..7632aeeba116e08c9d2c7fdfb684334c7fa0ba76 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -3302,6 +3302,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3309,6 +3309,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -213,7 +213,7 @@ index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a82433691 IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc -index a97bb1e7442c16a3f7659889e11ab51e431f1585..b0b882b5cea67a66faa9f7e40786f0d5f8c65b5d 100644 +index 52d44ad6b3e7c602711d304e07ce32138c99b4e0..e25476c76ad2d0aae66ee5a157548078b9f90ebd 100644 --- a/ui/gfx/switches.cc +++ b/ui/gfx/switches.cc @@ -13,6 +13,8 @@ namespace switches { @@ -226,7 +226,7 @@ index a97bb1e7442c16a3f7659889e11ab51e431f1585..b0b882b5cea67a66faa9f7e40786f0d5 // sharpness, kerning, hinting and layout. const char kDisableFontSubpixelPositioning[] = diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h -index 8bb46cc8a5d521452ac0ef9cac975987e203404c..03ee7b511c6b8fcd0b7154365cf533778ff4d234 100644 +index 166ac12df74510fd72d619251d4e7e455af075da..299a68885b5a5a4e6a684f12c96e61a1b34af273 100644 --- a/ui/gfx/switches.h +++ b/ui/gfx/switches.h @@ -12,6 +12,7 @@ diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 8d9f86ebd0b..1525620c9ce 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 07dcac920740a029dfc69c123506bafd142eb4ef..1e17393b6477e39a25e5973b19393ba2e7e9a4f6 100644 +index a557cc2b06e68e54817f154f2d1e6a7635958d0e..386bd7e06917a69b7fdcc26056aeccc5ad967b7b 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -525,7 +525,11 @@ +@@ -531,7 +531,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_freezing_flags_after_init_in_node.patch b/patches/chromium/disable_freezing_flags_after_init_in_node.patch index 8ec170fc96d..f832c305995 100644 --- a/patches/chromium/disable_freezing_flags_after_init_in_node.patch +++ b/patches/chromium/disable_freezing_flags_after_init_in_node.patch @@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor node initialization to not update flags after V8 initialization. diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc -index 07a0e9c43eddf8960812547ed11d71d182f761c7..ded681f144b9cff81908e48c2fd8e0f0830c490a 100644 +index af6e5cee1b9e79821a3cf064b6336dbc96d2895b..58b6d3daca0eb85b63c3680742afa43e4af1f47b 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc -@@ -234,6 +234,9 @@ RenderProcessImpl::RenderProcessImpl() +@@ -223,6 +223,9 @@ RenderProcessImpl::RenderProcessImpl() SetV8FlagIfNotFeature(features::kWebAssemblyDynamicTiering, "--no-wasm-dynamic-tiering"); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index e8b1d92d49c..faac5ad5518 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 59472c8b415c0d5dd0471399025d117e0ce5b8c1..e89237f4efe157298cffa8d7baaff4008d438f2d 100644 +index a689c6e60b5d55c1dd2f09c40da9c8a60786b90f..f49cf68e4b5be592000b193a3b1fae18e0bd41dc 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -800,6 +800,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,7 +20,7 @@ index 59472c8b415c0d5dd0471399025d117e0ce5b8c1..e89237f4efe157298cffa8d7baaff400 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 c03146d42dbb33d3950ccfefff6ff6b122d23932..464d5ff65641fa754511ccfe54b0f32540ede3a8 100644 +index 3910d3a1642abc19d01556b275582170ecc520ce..60224d202aa14bd83d5eb2a52b13e37282d621dc 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -896,6 +896,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl @@ -33,10 +33,10 @@ index c03146d42dbb33d3950ccfefff6ff6b122d23932..464d5ff65641fa754511ccfe54b0f325 protected: // |routing_id| must not be MSG_ROUTING_NONE. 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 9ed11c861275a6d0ef52fa58986b9f580e837c2a..06bfc3927dd049404ead14e98e1f09f0326da8f0 100644 +index 65daab40548600bff98bdd1273b7325611f6b82f..f09d6289319c5dbaff6002af60cfd53c1a6cc5cc 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -604,7 +604,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 45e1091d368..fe1b6ad682c 100644 --- a/patches/chromium/disable_unload_metrics.patch +++ b/patches/chromium/disable_unload_metrics.patch @@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we should continue seeking for a real fix. diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc -index da87f76a539cb1e84fc22c41d3b8aec180c1f5a2..0ef6894657e8fa0aafecd828aa6ffcf6f1fb2d24 100644 +index f4b46f5f002366d9aaee6b851c8d0643ce8e556b..fb5344a6f91fb71d7b6ea483f25a1fac5729ba29 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1263,6 +1263,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1265,6 +1265,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,11 +35,11 @@ index da87f76a539cb1e84fc22c41d3b8aec180c1f5a2..0ef6894657e8fa0aafecd828aa6ffcf6 // If this is a same-process navigation and we have timestamps for unload // durations, fill those metrics out as well. if (params.unload_start && params.unload_end && -@@ -1313,6 +1314,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1314,6 +1315,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } +#endif builder.Record(ukm::UkmRecorder::Get()); - navigation_data_.reset(); + metrics_data_.reset(); diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 4be1b9b8b61..47a96a7fec1 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0 Make SetAspectRatio accept 0 as valid input, which would reset to null. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index aed571451f1c24b6b5e57b8f0e57b771ced85e92..a38b2752f76194de52685a4cefa17756b5d3b79d 100644 +index 0be1688818063dac2242428393babcca1d03e836..e534b895eca4e28e003ef35de4a2fb5b32baf88b 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -564,7 +564,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { @@ -19,10 +19,10 @@ index aed571451f1c24b6b5e57b8f0e57b771ced85e92..a38b2752f76194de52685a4cefa17756 aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 6ba506fc896bc165007ee9ec43faeb3e95ac9d97..1db500b4d7f685dc54d3b782de42ba6fe1aabf41 100644 +index 22bb24f2afcefc3d875fe6959a7926cf2eaf7d6f..0a546b2649b37ad2a8de2783079d0fe93a24d7ac 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1020,8 +1020,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, +@@ -1009,8 +1009,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, } void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) { diff --git a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch index 1177474b891..61aed824c3b 100644 --- a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch +++ b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch @@ -21,7 +21,7 @@ index c4f2df96133012faebec25ac3a738c34cd6b4cf8..1b0333b2efe05a659e161f28ce6c01e5 v8::ZoneBackingAllocator* GetZoneBackingAllocator() override; #endif diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc -index d045398533be9cd95027acc34732294e06d1420b..76073b9d22d2db3fd8170da223ec913275ce0030 100644 +index bbb16efbf5208989fa88c7f6d83d36aa5e54a0d1..1ead276abf4327d48a816d8b520ebe958b5aa17b 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc @@ -370,6 +370,10 @@ PageAllocator* V8Platform::GetPageAllocator() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index f3b7095a823..25a248d9436 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 4e0ae6719069da886db193642df9f90d52a332d3..0473bd61eae4afc903c3cbc55ec4bffcd3485d3d 100644 +index 74b881ef99b32d085f58fc7b30cd42005855dcbc..ab34e6ad6736a5b4c154750d95eef622f2051f0d 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1389,6 +1389,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1387,6 +1387,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index 4e0ae6719069da886db193642df9f90d52a332d3..0473bd61eae4afc903c3cbc55ec4bffc // This may only be called on NetworkContexts created with the constructor // that calls MakeURLRequestContext(). diff --git a/services/network/network_context.h b/services/network/network_context.h -index 8b41b28c036837a35a732a63aa6e1ebeaf416970..3f132d81a36276aa6b6c9455eb8f26ecfa156286 100644 +index 98c33a3048f1a10e8293c51213a99089ca55456b..92cf6606e0cef6e640accbacfdacd9cb9f1aeef1 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -301,6 +301,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -302,6 +302,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; @@ -63,10 +63,10 @@ index 8b41b28c036837a35a732a63aa6e1ebeaf416970..3f132d81a36276aa6b6c9455eb8f26ec void SetEnableReferrers(bool enable_referrers) override; void SetEnablePreconnect(bool enable_preconnect) override; diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 28745d0a28062fba30f31342c430524aab6a2a4a..bd15f0c63b7c435910ca10e72d5311a5ae3f923c 100644 +index a9e7ccf5676cf72fddfd882d7582cc8f6f3162da..5b533f299ce753f5c40fbc432d6550f67fe994c0 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1108,6 +1108,9 @@ interface NetworkContext { +@@ -1113,6 +1113,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index 28745d0a28062fba30f31342c430524aab6a2a4a..bd15f0c63b7c435910ca10e72d5311a5 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index 9e757600c4a9e4cac9bfafc7393b20188efc2a5a..dafff85abaa9776de271822ff13da2bdbdce7a0d 100644 +index 5415522f3b145519825082d31d4e4c95f8d5e848..842e8981d0f517196bd58f2a952d71f88991c56e 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -136,6 +136,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -137,6 +137,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} diff --git a/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch b/patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch index 50c5cb83092..f3414ee56be 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 7f2f8101c043a66a8c771bc21833ec541ea55101..d151ab58afb6014d4bf63a1a1464caecdce69715 100644 +index c9c33c560476e43e097f04d1b21154debc20667c..fcbccbb67b0d152a771e26aaae5beb85ffe83bc2 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc @@ -443,8 +443,9 @@ TrustedTypesCodeGenerationCheck(v8::Local context, diff --git a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch index 29e489b47eb..8bc35e83559 100644 --- a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -13,11 +13,11 @@ app.requestSingleInstanceLock API so that users can pass in a JSON object for the second instance to send to the first instance. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index 19350d58e817ea8ac7868dd90a08cc25836c9921..5e4a054946c37bed297cc4e952235b83b23756be 100644 +index 02d9eabfef9521722340739bf86df3dfc30018d7..af8639ebcc61d8081a12334f652a551d542cd758 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -18,6 +18,7 @@ - #include "base/files/file_path.h" + #include "base/functional/callback.h" #include "base/memory/ref_counted.h" #include "base/process/process.h" +#include "base/containers/span.h" @@ -65,7 +65,7 @@ index 19350d58e817ea8ac7868dd90a08cc25836c9921..5e4a054946c37bed297cc4e952235b83 #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 62902da2dde6be2e2b223d612ebab3dd54a286bd..24772ea67464eb5ad4e0c3a2aa4fb557d720f000 100644 +index 0e1baf024e7aee3bc1edad1e0620bd56647d042b..2302cd0b1c536f5c5bc5125a7bbe133e86a77d69 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -608,6 +608,7 @@ class ProcessSingleton::LinuxWatcher @@ -179,7 +179,7 @@ index 62902da2dde6be2e2b223d612ebab3dd54a286bd..24772ea67464eb5ad4e0c3a2aa4fb557 if (!WriteToSocket(socket.fd(), to_send.data(), to_send.length())) { // Try to kill the other process, because it might have been dead. diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 009b522049adc32144c51842369dc1156bd959fa..8fb7835f6e0a7b2690d13b45179f8de70747e874 100644 +index 51a109504c1c8f79ef8748641ef21efed3a9315d..7df5b345b7e6a2360c226e0aaf48bcdf95c99afa 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -81,10 +81,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { diff --git a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 4aae7aaec92..17e2ae73e29 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,7 +13,7 @@ uses internally for things like menus and devtools. We can remove this patch once it has in some shape been upstreamed. diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc -index c4049d94aaa00774777f3788c7093cb19101fcb5..92866fc8fe2375f9703ce77be980646bf61cf8ac 100644 +index 835fa36e64e2cb350f3f09798b0040b234f7c0ee..f9a754acab125bc50660e9c3763b36930ea7fe1d 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc @@ -144,6 +144,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, @@ -62,7 +62,7 @@ index a97bf39a8b481ce5d6c87a22054451f5fd470b75..4748ef033d939173b4dbe6f6cb83eb3b SEQUENCE_CHECKER(sequence_checker_); }; diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index c2f3c20cbe92e877acc30111314a0ee2bce539a1..d100806abfbc9b2be4891c2f3dd4a75ee87c51b6 100644 +index b27c0856568c5c601976aa0593d16014a4f99dfe..5aa80492896f7b1107c974b00e5d145256cf7647 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc @@ -622,6 +622,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { 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 01a468337de..6018e0745c4 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 @@ -13,12 +13,12 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass then refers to the list so that it can correctly determine the data source's settings. diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index 7d14fadbd5c653bc11dbee2d4d83632ccbd71de4..5ebd911b559fec4eea1639bea47959c6f552d9f2 100644 +index a26d2de400d1a2b5d97d03eb438c4d7024e03ef5..c1ae23cda6a72d92c508ef239b7c4892dc81c4af 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc @@ -11,8 +11,10 @@ - #include "base/containers/adapters.h" - #include "base/cxx17_backports.h" + #include "base/functional/bind.h" + #include "base/functional/callback_helpers.h" #include "base/location.h" +#include "base/no_destructor.h" #include "base/numerics/safe_conversions.h" @@ -65,7 +65,7 @@ index 7d14fadbd5c653bc11dbee2d4d83632ccbd71de4..5ebd911b559fec4eea1639bea47959c6 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 6830850624160dc50d1166bfa49562809679d1b7..ecb38660ce8d1e6eef0849aa5769e43df0e2ecee 100644 +index 29ca8efb5994ccb5b65d2762088dd53e0583cb72..c533149f567731e6bb6ed2d94dcffd03346f7f87 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_add_support_for_overriding_the_base_spellchecker_download_url.patch b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch index 709972bde38..0f29dcb7fa0 100644 --- a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch +++ b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch @@ -9,7 +9,7 @@ production use cases. This is unlikely to be upstreamed as the change is entirely in //chrome. diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -index c331a7935eb07152c706c7e2bfc20cd29a33dfd2..380a2f5b4dc917637188390dd66ef9469753289b 100644 +index 27f5a789f39c3ac896e3d4b8fd9fedcb562ef8c4..cf73bd941d82d54cbd6fab95123672439a652f0e 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -49,6 +49,9 @@ namespace { diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index 845029e0927..ca27e84c67f 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell This patch is used by Electron to implement spellchecker events. diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index 9718d5fbe6837e476e5d44bc6ed7b1eab26293ea..5b7eb05223cff26c2307db98370572501658ee49 100644 +index 0409bf02684e1d01a76e04f43fe30bb19098ac4c..b1102a326d8ef74ac42494f6bc2a36815d56d465 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -468,6 +468,9 @@ void SpellcheckService::LoadDictionaries() { +@@ -463,6 +463,9 @@ void SpellcheckService::LoadDictionaries() { std::make_unique( dictionary, platform_spellcheck_language, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); @@ -20,7 +20,7 @@ index 9718d5fbe6837e476e5d44bc6ed7b1eab26293ea..5b7eb05223cff26c2307db9837057250 hunspell_dictionaries_.back()->Load(); } -@@ -520,6 +523,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { +@@ -515,6 +518,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { (!hunspell_dictionaries_.empty() || enable_if_uninitialized); } @@ -38,23 +38,23 @@ index 9718d5fbe6837e476e5d44bc6ed7b1eab26293ea..5b7eb05223cff26c2307db9837057250 + hunspell_observer_ = observer; +} + - void SpellcheckService::Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { + void SpellcheckService::OnRenderProcessHostCreated( + content::RenderProcessHost* host) { + InitForRenderer(host); diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h -index 1527b8f76ad0de4b8d7d9f056147c45723bf30d8..67aeacd26eaef3f878fbcb12cfa0355f88b523d8 100644 +index 00e613bb4ca4346eb0b0e65b9b818d817ac724d9..bd9745d29a61944a23b83b274aace2ea8cb37a0f 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h -@@ -138,6 +138,8 @@ class SpellcheckService : public KeyedService, +@@ -135,6 +135,8 @@ class SpellcheckService : public KeyedService, // dictionaries available. bool IsSpellcheckEnabled() const; + void SetHunspellObserver(SpellcheckHunspellDictionary::Observer* observer); + - // NotificationProfile implementation. - void Observe(int type, - const content::NotificationSource& source, -@@ -305,6 +307,8 @@ class SpellcheckService : public KeyedService, + // content::RenderProcessHostCreationObserver implementation. + void OnRenderProcessHostCreated(content::RenderProcessHost* host) override; + +@@ -299,6 +301,8 @@ class SpellcheckService : public KeyedService, // A pointer to the BrowserContext which this service refers to. raw_ptr context_; diff --git a/patches/chromium/feat_configure_launch_options_for_service_process.patch b/patches/chromium/feat_configure_launch_options_for_service_process.patch index 9b34c27d03c..3b8bcc07453 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -18,10 +18,10 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t parent process to read from the pipe. diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h -index 626108008f8358ac6006b9161c544199d15dcec7..0b379093357ddd9261f4c33fa6bdba322d06a32f 100644 +index 2688eace4c00176ac9d1636641b44b8258c29b08..f8498a45db1158f2cfb7a9f548f290a879e8ab34 100644 --- a/content/browser/child_process_launcher.h +++ b/content/browser/child_process_launcher.h -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #if BUILDFLAG(IS_WIN) #include "base/win/windows_types.h" @@ -29,37 +29,65 @@ index 626108008f8358ac6006b9161c544199d15dcec7..0b379093357ddd9261f4c33fa6bdba32 #endif #if BUILDFLAG(IS_POSIX) -@@ -163,7 +164,10 @@ struct ChildProcessLauncherFileData { +@@ -164,7 +165,10 @@ struct ChildProcessLauncherFileData { delete; ~ChildProcessLauncherFileData(); --#if BUILDFLAG(IS_POSIX) +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) + base::win::ScopedHandle stdout_handle; + base::win::ScopedHandle stderr_handle; -+#elif BUILDFLAG(IS_POSIX) ++#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Files opened by the browser and passed as corresponding file descriptors - // in the child process. - // Currently only supported on Linux, ChromeOS and Android platforms. + // in the child process. If a FilePath is provided, the file will be opened + // and the descriptor cached for future process launches. If a ScopedFD is +@@ -179,6 +183,15 @@ struct ChildProcessLauncherFileData { + std::map> + files_to_preload; + #endif ++ ++#if BUILDFLAG(IS_POSIX) ++ // Map of file descriptors to pass. This is used instead of ++ // `files_to_preload` when the data needs to be installed at an exact FD ++ // number in the new process. ++ // ++ // Currently only supported on POSIX platforms. ++ std::map additional_remapped_fds; ++#endif + }; + + // Launches a process asynchronously and notifies the client of the process diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc -index 008ba5bef67adbd166919ca4708452faa4bb85b5..c1de4bba95c862cc38589efd503c0392f7c9e8d2 100644 +index 7f6a4197aa7da2ba6a16cd83b78243e49ec1f2f4..a4b0ad5a63f39a4c4ff8301fe2a9ba131149a9bd 100644 --- a/content/browser/child_process_launcher_helper_linux.cc +++ b/content/browser/child_process_launcher_helper_linux.cc -@@ -73,7 +73,9 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( - remapped_fd.first); - } +@@ -62,6 +62,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( + options->fds_to_remap.emplace_back(sandbox_fd, GetSandboxFD()); + } -+ options->current_directory = delegate_->GetCurrentDirectory(); - options->environment = delegate_->GetEnvironment(); -+ options->clear_environment = !delegate_->ShouldInheritEnvironment(); ++ for (const auto& remapped_fd : file_data_->additional_remapped_fds) { ++ options->fds_to_remap.emplace_back(remapped_fd.second.get(), ++ remapped_fd.first); ++ } ++ + // (For Electron), if we're launching without zygote, that means we're + // launching an unsandboxed process (since all sandboxed processes are + // forked from the zygote). Relax the allow_new_privs option to permit +@@ -71,7 +76,9 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( + options->allow_new_privs = true; + } - return true; - } ++ options->current_directory = delegate_->GetCurrentDirectory(); + options->environment = delegate_->GetEnvironment(); ++ options->clear_environment = !delegate_->ShouldInheritEnvironment(); + } else { + DCHECK(GetZygoteForLaunch()); + // Environment variables could be supported in the future, but are not diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc -index faddc7a513b0c36fb1ef1b109e412f1e02e5e9e4..7a58d41af76196ba8249bb4d2cd09f22cc86f643 100644 +index a4be170a8c66e32f9913a34f31e5cfe29593e9b4..9ade30e64841a27e4bb174df3ff94514fbdcef8f 100644 --- a/content/browser/child_process_launcher_helper_mac.cc +++ b/content/browser/child_process_launcher_helper_mac.cc -@@ -117,7 +117,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -121,7 +121,8 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( 'mojo', base::MachRendezvousPort(endpoint.TakeMachReceiveRight()))); options->environment = delegate_->GetEnvironment(); @@ -69,8 +97,20 @@ index faddc7a513b0c36fb1ef1b109e412f1e02e5e9e4..7a58d41af76196ba8249bb4d2cd09f22 options->disclaim_responsibility = delegate_->DisclaimResponsibility(); options->enable_cpu_security_mitigations = delegate_->EnableCpuSecurityMitigations(); +@@ -182,6 +183,11 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( + base::StringPrintf("%s%d", sandbox::switches::kSeatbeltClient, pipe)); + } + ++ for (const auto& remapped_fd : file_data_->additional_remapped_fds) { ++ options->fds_to_remap.emplace_back(remapped_fd.second.get(), ++ remapped_fd.first); ++ } ++ + return true; + } + diff --git a/content/browser/child_process_launcher_helper_win.cc b/content/browser/child_process_launcher_helper_win.cc -index d9a3feec1955ebfea5b1dcf707b804933a3b14ac..39bf5fbd7e19e13dfcdabcf5914003498dbcecb5 100644 +index d4c9e420ce93414e4f73de6a4e195052eb523ca4..03a620bbf906678ec6c923f0e3285687da791f7c 100644 --- a/content/browser/child_process_launcher_helper_win.cc +++ b/content/browser/child_process_launcher_helper_win.cc @@ -19,6 +19,8 @@ @@ -82,7 +122,7 @@ index d9a3feec1955ebfea5b1dcf707b804933a3b14ac..39bf5fbd7e19e13dfcdabcf591400349 namespace content { namespace internal { -@@ -54,6 +56,30 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( +@@ -58,6 +60,30 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread( mojo_channel_->PrepareToPassRemoteEndpoint(&options->handles_to_inherit, command_line()); } @@ -113,20 +153,20 @@ index d9a3feec1955ebfea5b1dcf707b804933a3b14ac..39bf5fbd7e19e13dfcdabcf591400349 return true; } -@@ -81,7 +107,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThread( +@@ -85,7 +111,7 @@ ChildProcessLauncherHelper::LaunchProcessOnLauncherThread( ChildProcessLauncherHelper::Process process; *launch_result = StartSandboxedProcess(delegate_.get(), *command_line(), -- options.handles_to_inherit, &process.process); +- options->handles_to_inherit, &process.process); + options, &process.process); return process; } diff --git a/content/browser/service_process_host_impl.cc b/content/browser/service_process_host_impl.cc -index e547f42bc0d06b485797ccc1605969259631831f..0f3041f4a5b636440d9579303721f2ae7e1855c6 100644 +index 0072ab78bd82d387c0b27c3e121cf233daf4ae25..ce2973c1fa05c4250d18b386ca6124aa580006b7 100644 --- a/content/browser/service_process_host_impl.cc +++ b/content/browser/service_process_host_impl.cc -@@ -190,6 +190,15 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver, +@@ -189,6 +189,15 @@ void LaunchServiceProcess(mojo::GenericPendingReceiver receiver, host->SetExtraCommandLineSwitches(std::move(options.extra_switches)); if (options.child_flags) host->set_child_flags(*options.child_flags); @@ -143,10 +183,10 @@ index e547f42bc0d06b485797ccc1605969259631831f..0f3041f4a5b636440d9579303721f2ae host->GetChildProcess()->BindServiceInterface(std::move(receiver)); } diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc -index 893a902621593f42a81323b82614491241f58df9..66f368cfddb3d9368880eb5a68d87efac900d51d 100644 +index fe0b5134ea3d7887aa237200e89e79c2ff68314c..c544d1ef0eb381da7f96013643c862f60984a9c9 100644 --- a/content/browser/utility_process_host.cc +++ b/content/browser/utility_process_host.cc -@@ -101,11 +101,13 @@ const ChildProcessData& UtilityProcessHost::GetData() { +@@ -106,11 +106,13 @@ const ChildProcessData& UtilityProcessHost::GetData() { return process_->GetData(); } @@ -162,9 +202,9 @@ index 893a902621593f42a81323b82614491241f58df9..66f368cfddb3d9368880eb5a68d87efa bool UtilityProcessHost::Start() { return StartProcess(); -@@ -146,6 +148,24 @@ void UtilityProcessHost::SetExtraCommandLineSwitches( - extra_switches_ = std::move(switches); +@@ -166,6 +168,24 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) { } + #endif // BUILDFLAG(USE_ZYGOTE) +#if BUILDFLAG(IS_WIN) +void UtilityProcessHost::SetStdioHandles( @@ -187,17 +227,17 @@ index 893a902621593f42a81323b82614491241f58df9..66f368cfddb3d9368880eb5a68d87efa mojom::ChildProcess* UtilityProcessHost::GetChildProcess() { return static_cast(process_->GetHost()) ->child_process(); -@@ -336,9 +356,22 @@ bool UtilityProcessHost::StartProcess() { - file_data->files_to_preload = GetV8SnapshotFilesToPreload(); +@@ -355,9 +375,22 @@ bool UtilityProcessHost::StartProcess() { + file_data_->files_to_preload.merge(GetV8SnapshotFilesToPreload()); #endif // BUILDFLAG(IS_POSIX) +#if BUILDFLAG(IS_WIN) -+ file_data->stdout_handle = std::move(stdout_handle_); -+ file_data->stderr_handle = std::move(stderr_handle_); ++ file_data_->stdout_handle = std::move(stdout_handle_); ++ file_data_->stderr_handle = std::move(stderr_handle_); +#elif BUILDFLAG(IS_POSIX) + if (!fds_to_remap_.empty()) { + for (const auto& remapped_fd : fds_to_remap_) { -+ file_data->additional_remapped_fds.emplace( ++ file_data_->additional_remapped_fds.emplace( + remapped_fd.second, remapped_fd.first); + } + } @@ -209,13 +249,13 @@ index 893a902621593f42a81323b82614491241f58df9..66f368cfddb3d9368880eb5a68d87efa + sandbox_type_, env_, current_directory_, *cmd_line, + inherit_environment_); - process_->LaunchWithFileData(std::move(delegate), std::move(cmd_line), - std::move(file_data), true); + #if BUILDFLAG(USE_ZYGOTE) + if (zygote_for_testing_.has_value()) { diff --git a/content/browser/utility_process_host.h b/content/browser/utility_process_host.h -index db20f0c7cfab79a02f3b6bb5d22f1863e1070419..22fad76769cd601f0c4c81fd4b1330616123254d 100644 +index c0abba2466c7dba5f3e41f95ede3f983ce0050e0..0f3bb9b69597aec460ad26d569b281b0877ff6f9 100644 --- a/content/browser/utility_process_host.h +++ b/content/browser/utility_process_host.h -@@ -28,6 +28,10 @@ +@@ -35,6 +35,10 @@ #include "mojo/public/cpp/system/message_pipe.h" #endif @@ -226,7 +266,7 @@ index db20f0c7cfab79a02f3b6bb5d22f1863e1070419..22fad76769cd601f0c4c81fd4b133061 namespace base { class Thread; } // namespace base -@@ -86,9 +90,13 @@ class CONTENT_EXPORT UtilityProcessHost +@@ -93,9 +97,13 @@ class CONTENT_EXPORT UtilityProcessHost // Returns information about the utility child process. const ChildProcessData& GetData(); @@ -242,9 +282,9 @@ index db20f0c7cfab79a02f3b6bb5d22f1863e1070419..22fad76769cd601f0c4c81fd4b133061 // Starts the utility process. bool Start(); -@@ -117,6 +125,16 @@ class CONTENT_EXPORT UtilityProcessHost - // Provides extra switches to append to the process's command line. - void SetExtraCommandLineSwitches(std::vector switches); +@@ -135,6 +143,16 @@ class CONTENT_EXPORT UtilityProcessHost + void SetZygoteForTesting(ZygoteCommunication* handle); + #endif // BUILDFLAG(USE_ZYGOTE) +#if BUILDFLAG(IS_WIN) + void SetStdioHandles(base::win::ScopedHandle stdout_handle, @@ -259,9 +299,9 @@ index db20f0c7cfab79a02f3b6bb5d22f1863e1070419..22fad76769cd601f0c4c81fd4b133061 // Returns a control interface for the running child process. mojom::ChildProcess* GetChildProcess(); -@@ -158,6 +176,22 @@ class CONTENT_EXPORT UtilityProcessHost - // Extra command line switches to append. - std::vector extra_switches_; +@@ -183,6 +201,22 @@ class CONTENT_EXPORT UtilityProcessHost + absl::optional> zygote_for_testing_; + #endif // BUILDFLAG(USE_ZYGOTE) +#if BUILDFLAG(IS_WIN) + // Specifies the handles for redirection of stdout and stderr. @@ -283,7 +323,7 @@ index db20f0c7cfab79a02f3b6bb5d22f1863e1070419..22fad76769cd601f0c4c81fd4b133061 // launch failed. enum class LaunchState { diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc -index ce7d3a9db5de2725d78af502f5a1cead4f3e4b36..85d8b62aaa75caf0e726014b838568c14f2a7c31 100644 +index 051f08d67c6186a8e874ded8752c1fd355e26cd7..fad86c948f6f2ee3a51680f367ad6440649141a4 100644 --- a/content/browser/utility_sandbox_delegate.cc +++ b/content/browser/utility_sandbox_delegate.cc @@ -29,13 +29,15 @@ UtilitySandboxedProcessLauncherDelegate:: @@ -324,10 +364,10 @@ index ce7d3a9db5de2725d78af502f5a1cead4f3e4b36..85d8b62aaa75caf0e726014b838568c1 + return current_directory_; +} - #if BUILDFLAG(USE_ZYGOTE_HANDLE) - ZygoteHandle UtilitySandboxedProcessLauncherDelegate::GetZygote() { + #if BUILDFLAG(USE_ZYGOTE) + ZygoteCommunication* UtilitySandboxedProcessLauncherDelegate::GetZygote() { diff --git a/content/browser/utility_sandbox_delegate.h b/content/browser/utility_sandbox_delegate.h -index 41d93b41e7fff8ba4a7138d05035e4bc24b7a85b..20cb410fc71994e26cff6ac9801d42ebd11d9fee 100644 +index 7ba799ad2bed61d4728c549f01004777b6e0979a..3cde2b41bdf8ed75e84040cf41d8fd99ab5deb20 100644 --- a/content/browser/utility_sandbox_delegate.h +++ b/content/browser/utility_sandbox_delegate.h @@ -26,7 +26,9 @@ class UtilitySandboxedProcessLauncherDelegate @@ -341,9 +381,9 @@ index 41d93b41e7fff8ba4a7138d05035e4bc24b7a85b..20cb410fc71994e26cff6ac9801d42eb ~UtilitySandboxedProcessLauncherDelegate() override; sandbox::mojom::Sandbox GetSandboxType() override; -@@ -45,16 +47,16 @@ class UtilitySandboxedProcessLauncherDelegate - ZygoteHandle GetZygote() override; - #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) +@@ -45,25 +47,25 @@ class UtilitySandboxedProcessLauncherDelegate + ZygoteCommunication* GetZygote() override; + #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_POSIX) base::EnvironmentMap GetEnvironment() override; @@ -351,10 +391,19 @@ index 41d93b41e7fff8ba4a7138d05035e4bc24b7a85b..20cb410fc71994e26cff6ac9801d42eb + bool ShouldInheritEnvironment() override; + base::FilePath GetCurrentDirectory() override; + #if BUILDFLAG(USE_ZYGOTE) + void SetZygote(ZygoteCommunication* handle); + #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) + private: -#if BUILDFLAG(IS_POSIX) base::EnvironmentMap env_; -#endif // BUILDFLAG(IS_POSIX) + + #if BUILDFLAG(USE_ZYGOTE) + absl::optional> zygote_; + #endif // BUILDFLAG(USE_ZYGOTE) + + base::FilePath current_directory_; sandbox::mojom::Sandbox sandbox_type_; base::CommandLine cmd_line_; @@ -363,7 +412,7 @@ index 41d93b41e7fff8ba4a7138d05035e4bc24b7a85b..20cb410fc71994e26cff6ac9801d42eb } // namespace content diff --git a/content/common/sandbox_init_win.cc b/content/common/sandbox_init_win.cc -index 498f60227d13eb2e476413f88eaa58cc0babf461..b2d7a009477293bf73f3ae4a0c8452d1b1bf1dd8 100644 +index 498f60227d13eb2e476413f88eaa58cc0babf461..619639ad5d22a1121b0e0d5f2c9e3c10394cdbd7 100644 --- a/content/common/sandbox_init_win.cc +++ b/content/common/sandbox_init_win.cc @@ -23,7 +23,7 @@ namespace content { @@ -371,7 +420,7 @@ index 498f60227d13eb2e476413f88eaa58cc0babf461..b2d7a009477293bf73f3ae4a0c8452d1 SandboxedProcessLauncherDelegate* delegate, const base::CommandLine& target_command_line, - const base::HandlesToInheritVector& handles_to_inherit, -+ const base::LaunchOptions& options, ++ const base::LaunchOptions* options, base::Process* process) { std::string type_str = target_command_line.GetSwitchValueASCII(switches::kProcessType); @@ -435,12 +484,12 @@ index 6d25170e3badb65745c7dbea9c9664bdf8c91b0e..df79ba6137c8a9264ba32e4f9e1c1d78 return std::move(*this); } diff --git a/content/public/browser/service_process_host.h b/content/public/browser/service_process_host.h -index a308d46612c1b30163cf9988117d2224a43ab5ad..5a41c3c907c0f0cf42759c52e7493cbf675f6fa6 100644 +index c46ee10e6e02b7c48cf0bcdfdcf6d6096a4dbd32..2b0be74c55b711faab774a55e39748ed85f3b382 100644 --- a/content/public/browser/service_process_host.h +++ b/content/public/browser/service_process_host.h @@ -13,6 +13,7 @@ - #include "base/callback.h" #include "base/command_line.h" + #include "base/functional/callback.h" #include "base/observer_list_types.h" +#include "base/process/launch.h" #include "base/process/process_handle.h" @@ -506,7 +555,7 @@ index a308d46612c1b30163cf9988117d2224a43ab5ad..5a41c3c907c0f0cf42759c52e7493cbf // An interface which can be implemented and registered/unregistered with diff --git a/content/public/common/sandbox_init_win.h b/content/public/common/sandbox_init_win.h -index 9bb4b30ba0f5d37ec2b28f0848d94f34c24f9423..c19cceae4215d74ae74f6e6005125f326453f955 100644 +index 9bb4b30ba0f5d37ec2b28f0848d94f34c24f9423..b614fef01ee5cdf81b7112be721b851c454756a2 100644 --- a/content/public/common/sandbox_init_win.h +++ b/content/public/common/sandbox_init_win.h @@ -29,7 +29,7 @@ class SandboxedProcessLauncherDelegate; @@ -514,17 +563,17 @@ index 9bb4b30ba0f5d37ec2b28f0848d94f34c24f9423..c19cceae4215d74ae74f6e6005125f32 SandboxedProcessLauncherDelegate* delegate, const base::CommandLine& target_command_line, - const base::HandlesToInheritVector& handles_to_inherit, -+ const base::LaunchOptions& options, ++ const base::LaunchOptions* options, base::Process* process); } // namespace content diff --git a/content/public/common/sandboxed_process_launcher_delegate.cc b/content/public/common/sandboxed_process_launcher_delegate.cc -index ee7cdddba192f151346b74b68ef1eabe5f46e84a..4378d5ac7f455eb54f9f39364184649d7a63666f 100644 +index 422613b73a9c3ef8d1d82914bd9425392b00d566..1e443457b3ddd245c82f95d0369ed9ed7d9fc43d 100644 --- a/content/public/common/sandboxed_process_launcher_delegate.cc +++ b/content/public/common/sandboxed_process_launcher_delegate.cc -@@ -53,11 +53,17 @@ ZygoteHandle SandboxedProcessLauncherDelegate::GetZygote() { +@@ -53,11 +53,17 @@ ZygoteCommunication* SandboxedProcessLauncherDelegate::GetZygote() { } - #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) + #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_POSIX) base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() { @@ -543,7 +592,7 @@ index ee7cdddba192f151346b74b68ef1eabe5f46e84a..4378d5ac7f455eb54f9f39364184649d #if BUILDFLAG(IS_MAC) diff --git a/content/public/common/sandboxed_process_launcher_delegate.h b/content/public/common/sandboxed_process_launcher_delegate.h -index 1e8f3994764a2b4e4efb87a08c522cc0e0103e18..83cc16ffbf484aa78b1c350d20a5a15ffd0dd0e8 100644 +index ea5342394f2aaf6d612f58ab886440473ed12647..0a5a4fbdcebbb2ec5d06206f1854de5870b3096c 100644 --- a/content/public/common/sandboxed_process_launcher_delegate.h +++ b/content/public/common/sandboxed_process_launcher_delegate.h @@ -6,6 +6,7 @@ @@ -555,8 +604,8 @@ index 1e8f3994764a2b4e4efb87a08c522cc0e0103e18..83cc16ffbf484aa78b1c350d20a5a15f #include "base/process/process.h" #include "build/build_config.h" @@ -48,10 +49,14 @@ class CONTENT_EXPORT SandboxedProcessLauncherDelegate - virtual ZygoteHandle GetZygote(); - #endif // BUILDFLAG(USE_ZYGOTE_HANDLE) + virtual ZygoteCommunication* GetZygote(); + #endif // BUILDFLAG(USE_ZYGOTE) -#if BUILDFLAG(IS_POSIX) // Override this if the process needs a non-empty environment map. @@ -572,10 +621,10 @@ index 1e8f3994764a2b4e4efb87a08c522cc0e0103e18..83cc16ffbf484aa78b1c350d20a5a15f #if BUILDFLAG(IS_MAC) // Whether or not to disclaim TCC responsibility for the process, defaults to diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc -index aac49f712187a62e2fd1f908420b1632a6c357b7..ca02e5c7c42c6a53bc8a74c11b3f03cbdf6ed55f 100644 +index 38601d04959aac61fbeba7b99482831833b9f564..3fbc8482465a03716cdeb434995dbcff30c32cec 100644 --- a/sandbox/policy/win/sandbox_win.cc +++ b/sandbox/policy/win/sandbox_win.cc -@@ -810,11 +810,9 @@ ResultCode GenerateConfigForSandboxedProcess(const base::CommandLine& cmd_line, +@@ -742,11 +742,9 @@ ResultCode GenerateConfigForSandboxedProcess(const base::CommandLine& cmd_line, // command line flag. ResultCode LaunchWithoutSandbox( const base::CommandLine& cmd_line, @@ -588,57 +637,57 @@ index aac49f712187a62e2fd1f908420b1632a6c357b7..ca02e5c7c42c6a53bc8a74c11b3f03cb // Network process runs in a job even when unsandboxed. This is to ensure it // does not outlive the browser, which could happen if there is a lot of I/O // on process shutdown, in which case TerminateProcess can fail. See -@@ -1035,7 +1033,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { +@@ -973,7 +971,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) { ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( const base::CommandLine& cmd_line, const std::string& process_type, - const base::HandlesToInheritVector& handles_to_inherit, -+ const base::LaunchOptions& options, ++ const base::LaunchOptions* options, SandboxDelegate* delegate, TargetPolicy* policy) { const base::CommandLine& launcher_process_command_line = -@@ -1049,7 +1047,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -987,7 +985,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( } // Add any handles to be inherited to the policy. - for (HANDLE handle : handles_to_inherit) -+ for (HANDLE handle : options.handles_to_inherit) ++ for (HANDLE handle : options->handles_to_inherit) policy->AddHandleToShare(handle); if (!policy->GetConfig()->IsConfigured()) { -@@ -1064,6 +1062,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -1002,6 +1000,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( // have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS. policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE)); policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE)); +#else -+ if (options.stdout_handle != nullptr && options.stdout_handle != INVALID_HANDLE_VALUE) { -+ policy->SetStdoutHandle(options.stdout_handle); ++ if (options->stdout_handle != nullptr && options->stdout_handle != INVALID_HANDLE_VALUE) { ++ policy->SetStdoutHandle(options->stdout_handle); + } -+ if (options.stderr_handle != nullptr && options.stderr_handle != INVALID_HANDLE_VALUE) { -+ policy->SetStderrHandle(options.stderr_handle); ++ if (options->stderr_handle != nullptr && options->stderr_handle != INVALID_HANDLE_VALUE) { ++ policy->SetStderrHandle(options->stderr_handle); + } #endif if (!delegate->PreSpawnTarget(policy)) -@@ -1076,7 +1081,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( +@@ -1014,7 +1019,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess( ResultCode SandboxWin::StartSandboxedProcess( const base::CommandLine& cmd_line, const std::string& process_type, - const base::HandlesToInheritVector& handles_to_inherit, -+ const base::LaunchOptions& options, ++ const base::LaunchOptions* options, SandboxDelegate* delegate, base::Process* process) { const base::ElapsedTimer timer; -@@ -1084,7 +1089,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1022,7 +1027,7 @@ ResultCode SandboxWin::StartSandboxedProcess( // Avoid making a policy if we won't use it. if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line, *base::CommandLine::ForCurrentProcess())) { - return LaunchWithoutSandbox(cmd_line, handles_to_inherit, delegate, -+ return LaunchWithoutSandbox(cmd_line, options, delegate, ++ return LaunchWithoutSandbox(cmd_line, *options, delegate, process); } -@@ -1095,7 +1100,7 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1033,7 +1038,7 @@ ResultCode SandboxWin::StartSandboxedProcess( auto policy = g_broker_services->CreatePolicy(tag); auto time_policy_created = timer.Elapsed(); ResultCode result = GeneratePolicyForSandboxedProcess( @@ -648,7 +697,7 @@ index aac49f712187a62e2fd1f908420b1632a6c357b7..ca02e5c7c42c6a53bc8a74c11b3f03cb return result; auto time_policy_generated = timer.Elapsed(); diff --git a/sandbox/policy/win/sandbox_win.h b/sandbox/policy/win/sandbox_win.h -index d1adadc10de3053f69fde39387d196054a96beda..0111a9c4becca009f17a3839d4d4bef3d9d880b8 100644 +index d8842ebdd1bd4ebd2ba9e33b8bcf390033dbf4d4..771c6f366559641544f775c3b45eba617923ebdb 100644 --- a/sandbox/policy/win/sandbox_win.h +++ b/sandbox/policy/win/sandbox_win.h @@ -50,7 +50,7 @@ class SANDBOX_POLICY_EXPORT SandboxWin { @@ -656,7 +705,7 @@ index d1adadc10de3053f69fde39387d196054a96beda..0111a9c4becca009f17a3839d4d4bef3 const base::CommandLine& cmd_line, const std::string& process_type, - const base::HandlesToInheritVector& handles_to_inherit, -+ const base::LaunchOptions& options, ++ const base::LaunchOptions* options, SandboxDelegate* delegate, base::Process* process); @@ -665,7 +714,7 @@ index d1adadc10de3053f69fde39387d196054a96beda..0111a9c4becca009f17a3839d4d4bef3 const base::CommandLine& cmd_line, const std::string& process_type, - const base::HandlesToInheritVector& handles_to_inherit, -+ const base::LaunchOptions& options, ++ const base::LaunchOptions* options, SandboxDelegate* delegate, TargetPolicy* policy); 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 50fb90b9ff9..308a90a03f2 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -8,10 +8,10 @@ rendering with the viz compositor by way of a custom HostDisplayClient and LayeredWindowUpdater. diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc -index 6d905b62e62582e72d5ea7ef74a3992e35c6fe8f..c0af9ee7459d29f18aa2972cd43e3a1a6a52798d 100644 +index 0c63e0d59b6b005059d59415bb3dde57a8c1314d..863f1974eb76dc0860362445e48b3064837e5b44 100644 --- a/components/viz/host/host_display_client.cc +++ b/components/viz/host/host_display_client.cc -@@ -47,9 +47,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( +@@ -48,9 +48,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( } #endif @@ -22,7 +22,7 @@ index 6d905b62e62582e72d5ea7ef74a3992e35c6fe8f..c0af9ee7459d29f18aa2972cd43e3a1a if (!NeedsToUseLayerWindow(widget_)) { DLOG(ERROR) << "HWND shouldn't be using a layered window"; return; -@@ -57,7 +57,15 @@ void HostDisplayClient::CreateLayeredWindowUpdater( +@@ -58,7 +58,15 @@ void HostDisplayClient::CreateLayeredWindowUpdater( layered_window_updater_ = std::make_unique(widget_, std::move(receiver)); @@ -87,7 +87,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index fb793e98d59390c9b33370b3f16e84334bf0322a..97a4fa63593ca119501dcf76468052b33041cf27 100644 +index 77fc13c924dd185f337fcf1d7a5f7e69953143e1..c320ce10cfcd8b62dc516871bae900f6da9600f5 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -137,6 +137,8 @@ viz_component("service") { @@ -114,7 +114,7 @@ index 28f44e5df4a3591c8563564a9aba7cec1b023a29..befc5a556a7fd6719d8a1c2eb8e92784 } // namespace viz diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc -index d8f25c1435d4b83031d18b6367041a18a23454fb..7233299c32ba4600f7708ca2fd0deadbc19b29fb 100644 +index ec7cc3404b5d60f2c57f239889f4b6a557d7c44c..1fdbbbfc7caf4c40fc7ff6240c70e40199ee7ad2 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -23,12 +23,14 @@ @@ -176,10 +176,10 @@ index d8f25c1435d4b83031d18b6367041a18a23454fb..7233299c32ba4600f7708ca2fd0deadb return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, display_client); diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.h b/components/viz/service/display_embedder/output_surface_provider_impl.h -index 5c4d03a4d268bf96eb6521e94848a8aef479bf25..6719cd6b369f1694f7c7cf8d4ca37fe583b7992f 100644 +index e82717d5167e13e2926bcaf6c0ad66c1502e66f6..783c4d6ed399120e026bbf18baab40929daf8fc1 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.h +++ b/components/viz/service/display_embedder/output_surface_provider_impl.h -@@ -49,12 +49,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl +@@ -50,12 +50,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -197,10 +197,10 @@ index 5c4d03a4d268bf96eb6521e94848a8aef479bf25..6719cd6b369f1694f7c7cf8d4ca37fe5 const raw_ptr gpu_service_impl_; diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc -index c04eb117a5ec8796bc1ad11eb21340688a7601a0..fcfcea5ddd28596935dffbfca52bfcd75dc264c1 100644 +index a8fcbf5149efa95ec5ec01f4571428053a10bbdb..9fa132fd8dd984e65e53ef6298c09a7d2f358988 100644 --- a/components/viz/service/display_embedder/software_output_device_mac.cc +++ b/components/viz/service/display_embedder/software_output_device_mac.cc -@@ -105,6 +105,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage( +@@ -106,6 +106,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage( SkCanvas* SoftwareOutputDeviceMac::BeginPaint( const gfx::Rect& new_damage_rect) { @@ -209,7 +209,7 @@ index c04eb117a5ec8796bc1ad11eb21340688a7601a0..fcfcea5ddd28596935dffbfca52bfcd7 // Record the previous paint buffer. Buffer* previous_paint_buffer = buffer_queue_.empty() ? nullptr : buffer_queue_.back().get(); -@@ -190,6 +192,7 @@ void SoftwareOutputDeviceMac::EndPaint() { +@@ -191,6 +193,7 @@ void SoftwareOutputDeviceMac::EndPaint() { ca_layer_params.is_empty = false; ca_layer_params.scale_factor = scale_factor_; ca_layer_params.pixel_size = pixel_size_; @@ -218,10 +218,10 @@ index c04eb117a5ec8796bc1ad11eb21340688a7601a0..fcfcea5ddd28596935dffbfca52bfcd7 IOSurfaceCreateMachPort(current_paint_buffer_->io_surface)); client_->SoftwareDeviceUpdatedCALayerParams(ca_layer_params); diff --git a/components/viz/service/display_embedder/software_output_device_mac.h b/components/viz/service/display_embedder/software_output_device_mac.h -index b09785bfc8143c355e75d473a9a25b2e355c97a0..a6cd4e2399b1b17bad00c9e6f6520819e035744e 100644 +index fd787775ccd27c85ebd1e36157a095d4a871d8c4..5a55149fc5ef8d2ea7136b92f67546155232c377 100644 --- a/components/viz/service/display_embedder/software_output_device_mac.h +++ b/components/viz/service/display_embedder/software_output_device_mac.h -@@ -60,6 +60,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice { +@@ -61,6 +61,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice { void UpdateAndCopyBufferDamage(Buffer* previous_paint_buffer, const SkRegion& new_damage_rect); @@ -500,7 +500,7 @@ index 0000000000000000000000000000000000000000..e1a22ee881c0fd679ac2d2d4d11a3c93 + +#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_ diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc -index 8a3e46bacb0c97edc5f5ad4d106e4daf2f0189cb..3692dee6a0df67af876c44e90312783c8d1ce937 100644 +index d4d4c1444e7a169d154bb9062f09f2270e7e9734..01943e14de567afd7b14f6a92eec651df185e1bb 100644 --- a/components/viz/service/display_embedder/software_output_device_win.cc +++ b/components/viz/service/display_embedder/software_output_device_win.cc @@ -192,7 +192,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( @@ -513,7 +513,7 @@ index 8a3e46bacb0c97edc5f5ad4d106e4daf2f0189cb..3692dee6a0df67af876c44e90312783c 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 4fabf6628f41dd06adffbf652edc9ddfb6ff07c6..1e80c8a8ef7072ca2b4751f7a5b9d48302227c5a 100644 +index f9dd844cd6b665a5566cf6f46830287cffedc0ca..5b74259b2650fc4a525ba3a1be61d3d92131eac7 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 @@ -85,7 +85,8 @@ RootCompositorFrameSinkImpl::Create( @@ -527,7 +527,7 @@ index 4fabf6628f41dd06adffbf652edc9ddfb6ff07c6..1e80c8a8ef7072ca2b4751f7a5b9d483 // Creating output surface failed. The host can send a new request, possibly // with a different compositing mode. diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index 3b44531f2618f5642c8b1fcd4b96085333185d9d..6893355c693edde1d7d4a80378aeda1053e1dc91 100644 +index 0b0c6d676f83f49eb3c846ee79430089b5a5bc0f..3427494a6b6d1df803d9b6bdae81ceaf296028ae 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc @@ -399,8 +399,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( @@ -548,10 +548,10 @@ index 3b44531f2618f5642c8b1fcd4b96085333185d9d..6893355c693edde1d7d4a80378aeda10 compositor_data.display_client->GetBoundRemote(resize_task_runner_); mojo::AssociatedRemote diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom -index 52f44a31de4a8df838622886581052dcd86072e9..65b938d76e43021bbab565a97d0645cb9c35a4ff 100644 +index 83c153d99c1e2be2b139330cd4eedf129fcac2ce..14466dd30eb6b63638d351dcf7caf93a8d30e2fb 100644 --- a/services/viz/privileged/mojom/compositing/display_private.mojom +++ b/services/viz/privileged/mojom/compositing/display_private.mojom -@@ -103,7 +103,6 @@ interface DisplayClient { +@@ -107,7 +107,6 @@ interface DisplayClient { // Creates a LayeredWindowUpdater implementation to draw into a layered // window. @@ -583,10 +583,10 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 50cea82c6b47769b27b44a487f1ef08cc81040e6..f024e6013bfb9c9240885a66b46631099ff5d50c 100644 +index 2d296b025ec172d895512e58cfefe9bb156b5675..4cb3b9b6afde1484d5bdf4da4640c7d7604b77dc 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h -@@ -87,6 +87,7 @@ class DisplayPrivate; +@@ -89,6 +89,7 @@ class DisplayPrivate; class ExternalBeginFrameController; } // namespace mojom class ContextProvider; @@ -594,7 +594,7 @@ index 50cea82c6b47769b27b44a487f1ef08cc81040e6..f024e6013bfb9c9240885a66b4663109 class HostFrameSinkManager; class LocalSurfaceId; class RasterContextProvider; -@@ -143,6 +144,16 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -145,6 +146,16 @@ class COMPOSITOR_EXPORT ContextFactory { virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; @@ -611,7 +611,7 @@ index 50cea82c6b47769b27b44a487f1ef08cc81040e6..f024e6013bfb9c9240885a66b4663109 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -186,6 +197,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -188,6 +199,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -621,7 +621,7 @@ index 50cea82c6b47769b27b44a487f1ef08cc81040e6..f024e6013bfb9c9240885a66b4663109 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -503,6 +517,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -513,6 +527,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index 6188d7b1b89..66d44ce5b1e 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide access to these headers for loader clients created on the browser process. diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc -index 1ed8dec3d558f6210e971369f0864bb56fc86f33..9c0162fc74de6e1d741f11c6a03a7e3ba560e884 100644 +index 6d42ae691a2c4a8cf51501bc4c690aca328001f5..71ac9d67eaa87346e7348e63d10157fbc6e8f836 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc -@@ -120,6 +120,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=( +@@ -137,6 +137,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=( disable_secure_dns = other.disable_secure_dns; has_user_activation = other.has_user_activation; allow_cookies_from_browser = other.allow_cookies_from_browser; @@ -28,7 +28,7 @@ index 1ed8dec3d558f6210e971369f0864bb56fc86f33..9c0162fc74de6e1d741f11c6a03a7e3b cookie_observer = Clone(&const_cast&>( other.cookie_observer)); -@@ -140,6 +141,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting( +@@ -160,6 +161,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting( const TrustedParams& other) const { return isolation_info.IsEqualForTesting(other.isolation_info) && disable_secure_dns == other.disable_secure_dns && @@ -37,34 +37,34 @@ index 1ed8dec3d558f6210e971369f0864bb56fc86f33..9c0162fc74de6e1d741f11c6a03a7e3b allow_cookies_from_browser == other.allow_cookies_from_browser && client_security_state == other.client_security_state; diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index 7ca1df693aca0f2aa4b597df589f5c245c65fb83..44a3f8f445fa6576543cb20000444c3a84cf192e 100644 +index dcd008fe586c7745f5ab47733c98366e89ac7478..f36e6e628dca6307fc7725d08f7e8306d132c17c 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -63,6 +63,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { +@@ -64,6 +64,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { bool disable_secure_dns = false; bool has_user_activation = false; bool allow_cookies_from_browser = false; + bool report_raw_headers = false; mojo::PendingRemote cookie_observer; + mojo::PendingRemote trust_token_observer; mojo::PendingRemote - url_loader_network_observer; diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc -index 38c6a61bfdc050e1aa7876724b69c47115e088fe..380e65d2422f45076e9afabcb26bfa58a80f5345 100644 +index c5602f0181aa5ef8b0ee401900170a6c8864bb94..9d836552081d340acd25e4caf40a1b4f3a73d402 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc -@@ -89,6 +89,7 @@ bool StructTraitsdisable_secure_dns = data.disable_secure_dns(); out->has_user_activation = data.has_user_activation(); out->allow_cookies_from_browser = data.allow_cookies_from_browser(); + out->report_raw_headers = data.report_raw_headers(); out->cookie_observer = data.TakeCookieObserver< mojo::PendingRemote>(); - out->url_loader_network_observer = data.TakeUrlLoaderNetworkObserver< + out->trust_token_observer = data.TakeTrustTokenObserver< diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h -index 1331e8d10571dfaa5681a82a6e51744332ec91b2..7e5be4a748fc68ebad2a9297e358364caa513428 100644 +index acee3b745163333f20e4f43b3e73cf2f7c589f02..e8dbb39633d32f6935b3f55fbae23d7a20ad7805 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h -@@ -69,6 +69,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) +@@ -70,6 +70,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) const network::ResourceRequest::TrustedParams& trusted_params) { return trusted_params.allow_cookies_from_browser; } @@ -76,10 +76,10 @@ index 1331e8d10571dfaa5681a82a6e51744332ec91b2..7e5be4a748fc68ebad2a9297e358364c cookie_observer( const network::ResourceRequest::TrustedParams& trusted_params) { diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index ae49a7b0c8cb8438d7c1471a0ecf4443dfbed64c..566e9a794542553098daa60f7035c7df81520e9a 100644 +index 6da8e326da7af60dbbcf23782c60c731a5989dba..b8b442cee1ed5c2c5aac756c32b502f95b0d7f5d 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom -@@ -70,6 +70,9 @@ struct TrustedUrlRequestParams { +@@ -71,6 +71,9 @@ struct TrustedUrlRequestParams { // FollowRedirect(). bool allow_cookies_from_browser; @@ -90,18 +90,18 @@ index ae49a7b0c8cb8438d7c1471a0ecf4443dfbed64c..566e9a794542553098daa60f7035c7df // a cookie. If this is set to non-null, the observer passed to // URLLoaderFactory will be ignored. diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom -index f4cbafde0cfa92e3e93f5480242025b3d5c822c4..73a7a02a224a4737c4f7a97a98a73e7f67ce3250 100644 +index 5cfd1bb970562e19e668105e6e0accae63bfbd32..6aa05958b3dcf848038b9634b79823a35cdc2a39 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom -@@ -9,6 +9,7 @@ import "mojo/public/mojom/base/unguessable_token.mojom"; - import "services/network/public/mojom/alternate_protocol_usage.mojom"; +@@ -10,6 +10,7 @@ import "services/network/public/mojom/alternate_protocol_usage.mojom"; + import "services/network/public/mojom/encoded_body_length.mojom"; import "services/network/public/mojom/fetch_api.mojom"; import "services/network/public/mojom/ip_address_space.mojom"; +import "services/network/public/mojom/http_raw_headers.mojom"; import "services/network/public/mojom/ip_endpoint.mojom"; import "services/network/public/mojom/load_timing_info.mojom"; import "services/network/public/mojom/network_param.mojom"; -@@ -38,6 +39,9 @@ struct URLResponseHead { +@@ -39,6 +40,9 @@ struct URLResponseHead { // The response headers or NULL if the URL type does not support headers. HttpResponseHeaders headers; @@ -112,7 +112,7 @@ index f4cbafde0cfa92e3e93f5480242025b3d5c822c4..73a7a02a224a4737c4f7a97a98a73e7f string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index f16ea5e7113ba67d43257dfe780ebe6ff06d4544..4337d34efe2c88408f6d7fded2ee67877abb85cb 100644 +index dd848ae45573b18d6c6ccaafdc51e45d9dc87a81..7078ca900dff196d267ccd57b11020f805d7e283 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc @@ -642,6 +642,7 @@ URLLoader::URLLoader( @@ -153,7 +153,7 @@ index f16ea5e7113ba67d43257dfe780ebe6ff06d4544..4337d34efe2c88408f6d7fded2ee6787 // Parse and remove the Trust Tokens response headers, if any are expected, diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index 55bbfa31b671bdf1b4ecc47e87e856682b21bbbe..0d328327635c8d40081819dbe836d8ad3d6ee885 100644 +index 75c9872f16851db1ed1cf25efd898fc258863331..e905a5b054bc5c263d69aa3fd6a0dc5ba8d32b24 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h @@ -505,6 +505,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader diff --git a/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch b/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch index c2ff933d3b8..bfdc1916665 100644 --- a/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch +++ b/patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch @@ -7,10 +7,10 @@ Subject: feat: filter out non-shareable windows in the current application in This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases. diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm -index dc28dc5379aa252c6eb380a38a1e1411ac983f93..5b7d99ffa9f6489be5073d432887de53875d78e8 100644 +index 618a17d87e9af2511dd74702ed30d2a67ec8853c..5b9a2a691afc5e0c2a049ac9c9216b7f61bec18e 100644 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm -@@ -164,7 +164,15 @@ void OnShareableContentCreated( +@@ -165,7 +165,15 @@ void OnShareableContentCreated( case DesktopMediaID::TYPE_SCREEN: for (SCDisplay* display : [content displays]) { if (source_.id == [display displayID]) { diff --git a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch index 7ee6075f314..72a11658b91 100644 --- a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch +++ b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch @@ -16,7 +16,7 @@ Linux or Windows to un-fullscreen in some circumstances without this change. diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index a296f90a4963d691fedd8571c73f59c540c9f1c0..b507a134ec6c575cafaa3811bb5557d48c241e47 100644 +index 0255e13e061293cd57de670b6a817b3e822dd8c5..e72c644e0adb9b447d60021d0e511479f0479c0d 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -16,12 +16,16 @@ @@ -127,10 +127,10 @@ index a296f90a4963d691fedd8571c73f59c540c9f1c0..b507a134ec6c575cafaa3811bb5557d4 extension_caused_fullscreen_ = GURL(); diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -index 232938c7317c5feba8ce1f8b9f3f0dbb025a6778..c0a154352dfecf625cdb709d2fb579fed3452b2b 100644 +index 6502b3e023947e9f34cef246b233d984d2a02373..31d275e7d07848bc72c11553b0e0c891148fec56 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h -@@ -246,10 +246,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { +@@ -249,10 +249,12 @@ class FullscreenController : public ExclusiveAccessControllerBase { // Used in testing to set the state to tab fullscreen. bool is_tab_fullscreen_for_testing_ = false; diff --git a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch index 430ae2ceed0..13410e6b05b 100644 --- a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch +++ b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch @@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 88b2d2e576c5e0bbc89b69e8dcdb2e9fdca01add..e636616a3340ff9ec7022e8371c4b3d2c6c0da03 100644 +index 2e3b9ebd5be217eb892fea1cce09afee4d05f2e3..eff9b4689b68c7ff291b31b53d98b9ab7bf21e85 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3547,7 +3547,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -3549,7 +3549,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame, options)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 04071de24f8..850407bd0ea 100644 --- a/patches/chromium/fix_aspect_ratio_with_max_size.patch +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the BrowserWindow. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 1db500b4d7f685dc54d3b782de42ba6fe1aabf41..631393000c825ab953014b82b342d323d87c28bc 100644 +index 0a546b2649b37ad2a8de2783079d0fe93a24d7ac..214a596da0dfdff2566a7642ac04e501655c5d88 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3698,6 +3698,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3656,6 +3656,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, delegate_->GetMinMaxSize(&min_window_size, &max_window_size); min_window_size = delegate_->DIPToScreenSize(min_window_size); max_window_size = delegate_->DIPToScreenSize(max_window_size); 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 b718806a677..789064554c5 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 @@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl. 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 37e932cfc8f66631e811d520542c6fc6f29aff80..9c6740d228dedd8a3f47c9f782095bb3d6cab868 100644 +index 61b47ad9abee29a8e6f999830ca37b0095b62222..7b60da8f1433cf1d43432d1b42db69600c7f1640 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -6886,10 +6886,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -6975,10 +6975,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { if (IsForMhtmlSubframe()) return origin_with_debug_info; @@ -37,12 +37,12 @@ index 37e932cfc8f66631e811d520542c6fc6f29aff80..9c6740d228dedd8a3f47c9f782095bb3 } diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h -index a19e9306c24d9483e2e899bfa8e5b78d77e9fb88..c1c9faae501786a2f7bc24d76f2ec2c2944b9ec2 100644 +index 21cb1e96f90341981c02ffac84eb3c0d6f9ae87b..c62197529e85d94c387c0389b9fc0e05438e2975 100644 --- a/content/browser/renderer_host/render_frame_host_impl.h +++ b/content/browser/renderer_host/render_frame_host_impl.h -@@ -2770,6 +2770,17 @@ class CONTENT_EXPORT RenderFrameHostImpl - user_activation_state_.Activate(notification_type); - } +@@ -2783,6 +2783,17 @@ class CONTENT_EXPORT RenderFrameHostImpl + // used on primary main frames. + bool IsPageReadyToBeClosed(); + // Returns whether the given origin and URL is allowed to commit in the + // current RenderFrameHost. The |url| is used to ensure it matches the origin @@ -58,7 +58,7 @@ index a19e9306c24d9483e2e899bfa8e5b78d77e9fb88..c1c9faae501786a2f7bc24d76f2ec2c2 protected: friend class RenderFrameHostFactory; -@@ -3086,17 +3097,6 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -3101,17 +3112,6 @@ class CONTENT_EXPORT RenderFrameHostImpl // relevant. void ResetWaitingState(); diff --git a/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch index 6a42fc50f54..915cf8da80d 100644 --- a/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch +++ b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch @@ -50,7 +50,7 @@ upstream would also hit this DCHECK, so give it a try with content_shell or chrome and that would help reporting upstream crbug. diff --git a/services/device/device_service.cc b/services/device/device_service.cc -index 1f8a587cfea7507bcb4d1b10099b7c61c5d313dc..35d1e45a95f28dcfed8408ca0c538893398a905a 100644 +index eaee3293f9df6c2fa237684206fda50793aee1ae..b5a9e57452703ceb686a408f0d48bf62185343d5 100644 --- a/services/device/device_service.cc +++ b/services/device/device_service.cc @@ -158,7 +158,7 @@ DeviceService::~DeviceService() { diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index c9e3caffc3b..908754dc47a 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 52e3c3774d1c4258af44596716df2932d4d8d178..c331000b1e110bc52653e240382d0166c1f383e2 100644 +index ef8ac6dca3a43cfa5a58f10b3860987bb01eec2b..0b01ed746df9fc91c6b106381f79eedaa04851b5 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1863,7 +1863,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1852,7 +1852,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,10 +21,10 @@ index 52e3c3774d1c4258af44596716df2932d4d8d178..c331000b1e110bc52653e240382d0166 // Calculates the PageVisibilityState for |visibility|, taking the capturing // state into account. diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 5c46cfe48858238803a58210fd1aa1fc65c6927b..e8a4f1a583a5b0e53b4cafb4c6f85209f8870580 100644 +index b32c7c02d85794f684ccbe0a7a6c9cf1aee695e9..7d8dec5501c4da0829122b5afd6a7e53f3ba8e02 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -695,6 +695,10 @@ class WebContents : public PageNavigator, +@@ -694,6 +694,10 @@ class WebContents : public PageNavigator, bool stay_awake, bool is_activity = true) = 0; 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 7eb017bbb8f..6768e756026 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,7 +15,7 @@ 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 bf9a7159266b6985c463e8491bf75f1f94449f9e..55a08ce16512a6c42dffbdfb7001a3cfe312a408 100644 +index 0d51ac779dde44da69cb1d4141e3df53d46dde74..d2df636848524bb2d78d153ce90a732621a7a281 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 @@ -993,6 +993,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties( @@ -32,7 +32,7 @@ index bf9a7159266b6985c463e8491bf75f1f94449f9e..55a08ce16512a6c42dffbdfb7001a3cf 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 f7f9a981003ba1e3fefc9fc0f2b2bcf921c0a4d5..cd69daf186a6ec22fb70a2a36568e544524d025f 100644 +index 05c3c2d19985b8d32d95187fe3075aa4eab6de0a..424967bfaf957b3ab426517b3185b8fc3bd7b633 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 @@ -181,6 +181,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame @@ -45,10 +45,10 @@ index f7f9a981003ba1e3fefc9fc0f2b2bcf921c0a4d5..cd69daf186a6ec22fb70a2a36568e544 // 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 e636616a3340ff9ec7022e8371c4b3d2c6c0da03..b455ed036ce207a49509563c11acd67bf99b6609 100644 +index eff9b4689b68c7ff291b31b53d98b9ab7bf21e85..c7bbcc7973341acfeefc374959feb0151ff57a33 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -8048,7 +8048,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -8027,7 +8027,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch index 0d88fcc0371..4d586ba719a 100644 --- a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch +++ b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch @@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility to make it usable from Electron by removing Profile references. diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc -index 4f0fcb630f91efe649913220d0e972bb2fe5dd47..17340bb185339baf3266cb931b7b4923c96bbe21 100644 +index 737959bfc0410d7ad0254b995279f940c9007fcc..3f94acb95f1a487f73515f4e6e9aeffe63e9371a 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -21,7 +21,10 @@ @@ -75,7 +75,7 @@ index 4f0fcb630f91efe649913220d0e972bb2fe5dd47..17340bb185339baf3266cb931b7b4923 data.Set(kBrowsersField, std::move(browser_list)); base::Value::List widgets_list; -@@ -484,8 +491,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag( +@@ -482,8 +489,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag( AllowJavascript(); if (flag_name_str == kInternal) { @@ -86,7 +86,7 @@ index 4f0fcb630f91efe649913220d0e972bb2fe5dd47..17340bb185339baf3266cb931b7b4923 return; } -@@ -589,8 +598,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -587,8 +596,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -99,7 +99,7 @@ index 4f0fcb630f91efe649913220d0e972bb2fe5dd47..17340bb185339baf3266cb931b7b4923 std::string accessibility_contents = web_contents->DumpAccessibilityTree(internal, property_filters); result.Set(kTreeField, accessibility_contents); -@@ -615,6 +628,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -613,6 +626,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -107,7 +107,7 @@ index 4f0fcb630f91efe649913220d0e972bb2fe5dd47..17340bb185339baf3266cb931b7b4923 for (Browser* browser : *BrowserList::GetInstance()) { if (browser->session_id().id() == session_id) { base::Value::Dict result = BuildTargetDescriptor(browser); -@@ -627,6 +641,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -625,6 +639,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( return; } } @@ -115,7 +115,7 @@ index 4f0fcb630f91efe649913220d0e972bb2fe5dd47..17340bb185339baf3266cb931b7b4923 #endif // !BUILDFLAG(IS_ANDROID) // No browser with the specified |session_id| was found. base::Value::Dict result; -@@ -739,5 +754,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( +@@ -737,5 +752,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 0f41b4aa61d..9459a082f33 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -25,10 +25,10 @@ index 53b106a1522a04d596d6ec833b00aa2170c760d9..3b5ca717d48cdade667fda8ce113f3f6 // Returns true if duplex mode is set. bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode); diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm -index 9dd650de9a9a372eba11854aa48695d5bdbff8aa..561ac4a781432a974ec6e5d131859863c0d5ad28 100644 +index 844c3befb928c1e7509f3af4be22ef7b9a131af8..dce986be7a16b6ecbcddbd33cedae69fb935d09e 100644 --- a/printing/printing_context_mac.mm +++ b/printing/printing_context_mac.mm -@@ -199,7 +199,8 @@ PMPaper MatchPaper(CFArrayRef paper_list, +@@ -200,7 +200,8 @@ PMPaper MatchPaper(CFArrayRef paper_list, !SetCollateInPrintSettings(settings_->collate()) || !SetDuplexModeInPrintSettings(settings_->duplex_mode()) || !SetOutputColor(static_cast(settings_->color())) || @@ -38,7 +38,7 @@ index 9dd650de9a9a372eba11854aa48695d5bdbff8aa..561ac4a781432a974ec6e5d131859863 return OnError(); } } -@@ -352,6 +353,22 @@ PMPaper MatchPaper(CFArrayRef paper_list, +@@ -353,6 +354,22 @@ PMPaper MatchPaper(CFArrayRef paper_list, return PMSetCopies(print_settings, copies, false) == noErr; } @@ -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 d282ef0b825ac2dd7c2b23aec14f401e4a68af7b..9cc8e4bbab87ea52387f08673e6b3e2f73c4335a 100644 +index afa936ce95602d5e66189303a73d7824611187b3..89371a4f0d3216f21761adc51bdd2accec0c74a1 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc @@ -247,6 +247,24 @@ void PrintDialogGtk::UpdateSettings( diff --git a/patches/chromium/fix_remove_caption-removing_style_call.patch b/patches/chromium/fix_remove_caption-removing_style_call.patch index ec73fab54b4..4eeaf273f9b 100644 --- a/patches/chromium/fix_remove_caption-removing_style_call.patch +++ b/patches/chromium/fix_remove_caption-removing_style_call.patch @@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue for opaque frameless windows even with that block commented out. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index a15abb9c3b295185852cc2641c1ee3e653548d29..609e07865c2fa7398fe2949ad35d66205ed5f9bd 100644 +index dff84d16386acfb3ccc72a22878476f1ac463ea1..693705ebaebbccc8929b53b6e453e48af7dfdf09 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1740,7 +1740,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { +@@ -1729,7 +1729,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), 0); 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 381effe6390..a173e85b076 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -8,7 +8,7 @@ v8::Value instead of base::Value. Refs https://bugs.chromium.org/p/chromium/issues/detail?id=1323953 diff --git a/extensions/renderer/script_injection.cc b/extensions/renderer/script_injection.cc -index bbeec904936d05ef76a9e5de1dcd7159e5c0f364..4be3de364630e989f4ac956944362800d535ef73 100644 +index 43fd5ef20228479f3090af0806df19baf65b963c..72062ab628af1eb3faac6337c4ce757c3e378d46 100644 --- a/extensions/renderer/script_injection.cc +++ b/extensions/renderer/script_injection.cc @@ -331,6 +331,7 @@ void ScriptInjection::InjectJs(std::set* executing_scripts, @@ -20,10 +20,10 @@ index bbeec904936d05ef76a9e5de1dcd7159e5c0f364..4be3de364630e989f4ac956944362800 injector_->ExpectsResults(), injector_->ShouldWaitForPromise()); } diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h -index deef767d771347277462c897088c4a1a14b1e9f3..0f96fe2c73e7e096bc1692729b5d18af9bb97432 100644 +index 257c1bcf2d87388697d8f7278655b5c5cc83da40..7a82e2257e74aa2e8014e318a044991626919756 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h -@@ -430,6 +430,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame { +@@ -434,6 +434,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame { mojom::EvaluationTiming, mojom::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -32,7 +32,7 @@ index deef767d771347277462c897088c4a1a14b1e9f3..0f96fe2c73e7e096bc1692729b5d18af mojom::WantResultOption, mojom::PromiseResultOption) = 0; diff --git a/third_party/blink/public/web/web_script_execution_callback.h b/third_party/blink/public/web/web_script_execution_callback.h -index acc31345b556a4daf8a189cf7a9f302926e7cfdb..1f57875bb31f0e92829a0380e6f0f357684cff37 100644 +index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c6baab7d0 100644 --- a/third_party/blink/public/web/web_script_execution_callback.h +++ b/third_party/blink/public/web/web_script_execution_callback.h @@ -13,8 +13,17 @@ class TimeTicks; @@ -64,10 +64,10 @@ index acc31345b556a4daf8a189cf7a9f302926e7cfdb..1f57875bb31f0e92829a0380e6f0f357 #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 25c04c0b0a160d5cfc40f3be0163f5d375763d50..dffd9362f564b36ae7f017ab16de906ebb9e91f8 100644 +index 8ebcae8f67814537a5350f89d163e2a510532f7f..9a1499f1da38efa27793f435bb62df801c6633b0 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -2560,6 +2560,7 @@ void LocalFrame::RequestExecuteScript( +@@ -2594,6 +2594,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -75,7 +75,7 @@ index 25c04c0b0a160d5cfc40f3be0163f5d375763d50..dffd9362f564b36ae7f017ab16de906e BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -2590,7 +2591,8 @@ void LocalFrame::RequestExecuteScript( +@@ -2624,7 +2625,8 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( ToScriptState(DomWindow(), *world), std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, @@ -86,10 +86,10 @@ index 25c04c0b0a160d5cfc40f3be0163f5d375763d50..dffd9362f564b36ae7f017ab16de906e 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 f62e0cbf131cef047754db0023cccdf3ce3fe57b..5986d67c72bed37d5ba1be8571149d52e2c58cff 100644 +index 0cc7e3abb8b17a598ed593127ed93a6e7f260ad6..4a90544d7adcaad487699c94cbf02dee724efae7 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -767,6 +767,7 @@ class CORE_EXPORT LocalFrame final +@@ -765,6 +765,7 @@ class CORE_EXPORT LocalFrame final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -98,10 +98,10 @@ index f62e0cbf131cef047754db0023cccdf3ce3fe57b..5986d67c72bed37d5ba1be8571149d52 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 84d506b956931465cdffc2d5526847a61f6b87f7..bc5fba399c701f2498829153ee617bf601414d69 100644 +index b2af7a248941bdb2a8af3e9fb4f0f4ee903b4a81..707d6fb55d2240b0a7f2a7a6184873eb8155e808 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 -@@ -1039,6 +1039,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( +@@ -1051,6 +1051,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( std::move(callback).Run(value ? std::move(*value) : base::Value()); }, std::move(callback)), @@ -110,7 +110,7 @@ index 84d506b956931465cdffc2d5526847a61f6b87f7..bc5fba399c701f2498829153ee617bf6 wants_result ? mojom::blink::WantResultOption::kWantResultDateAndRegExpAllowed diff --git a/third_party/blink/renderer/core/frame/pausable_script_executor.cc b/third_party/blink/renderer/core/frame/pausable_script_executor.cc -index 42cc739e222f65be431dd49347bb9b1057938144..97aa7c001329c2fa4d325ec07d698d448dd81d13 100644 +index 438de31065a4834c169318de9e8e5693e2703efb..a285be083128f96120c1f673f5da8c6fa194fbe8 100644 --- a/third_party/blink/renderer/core/frame/pausable_script_executor.cc +++ b/third_party/blink/renderer/core/frame/pausable_script_executor.cc @@ -248,7 +248,7 @@ void PausableScriptExecutor::CreateAndRun( @@ -205,10 +205,10 @@ 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 62812d95421e23d26dc806f738cf688fb0101fa2..1b9cace5130301f081fae552065ed8211bbce371 100644 +index ae6df696a514728e175982f202036d6a6029cd9f..33265ffd7b8a029b84eb1304de0331b292b07707 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 -@@ -1112,14 +1112,15 @@ void WebLocalFrameImpl::RequestExecuteScript( +@@ -1114,14 +1114,15 @@ void WebLocalFrameImpl::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, diff --git a/patches/chromium/fix_tray_icon_gone_on_lock_screen.patch b/patches/chromium/fix_tray_icon_gone_on_lock_screen.patch index fc656203df1..829599e2433 100644 --- a/patches/chromium/fix_tray_icon_gone_on_lock_screen.patch +++ b/patches/chromium/fix_tray_icon_gone_on_lock_screen.patch @@ -6,10 +6,10 @@ Subject: Re-register status item when owner of status watcher is changed https://chromium-review.googlesource.com/c/chromium/src/+/4022621 diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -index 166f6cf06cba791e14851b35a785200f1a5f5549..88289caa2518a2888de596fd65b7dfb6efa3e1ab 100644 +index cba134dd8c10e9f05d4d2547fd39cc51f83ba054..797953fd2ddef1f827e504c5116a666e0d5e90fb 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc -@@ -380,6 +380,13 @@ void StatusIconLinuxDbus::OnInitialized(bool success) { +@@ -361,6 +361,13 @@ void StatusIconLinuxDbus::OnInitialized(bool success) { return; } @@ -23,7 +23,7 @@ index 166f6cf06cba791e14851b35a785200f1a5f5549..88289caa2518a2888de596fd65b7dfb6 dbus::MethodCall method_call(kInterfaceStatusNotifierWatcher, kMethodRegisterStatusNotifierItem); dbus::MessageWriter writer(&method_call); -@@ -395,6 +402,14 @@ void StatusIconLinuxDbus::OnRegistered(dbus::Response* response) { +@@ -376,6 +383,14 @@ void StatusIconLinuxDbus::OnRegistered(dbus::Response* response) { delegate_->OnImplInitializationFailed(); } @@ -39,10 +39,10 @@ index 166f6cf06cba791e14851b35a785200f1a5f5549..88289caa2518a2888de596fd65b7dfb6 dbus::MethodCall* method_call, dbus::ExportedObject::ResponseSender sender) { diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h -index e7628de42f980fa3535cab9dfffd0deab30f8812..eae1c332a0972aefb8843cac947aeb2f4c48d360 100644 +index 1257135667d738f733c576d4b36a449a429b4a47..4025a7c6483b92b4462869b903228b8d630a730b 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h -@@ -74,10 +74,16 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, +@@ -71,10 +71,16 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux, const std::string& method_name, bool success); void OnInitialized(bool success); diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 10c0cbe052f..6b3db03d73c 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 1066d68ac211f2f436049cdbe33acbbeca0afe8f..ce4788491aeb19195dd9201135c6e7e227aefa60 100644 +index c13bafd949765fe838322a1550efb0e4a2a1ab99..764fea690df47b026b0bffa8f85a3e4de30e6384 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3470,6 +3470,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3536,6 +3536,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index 1066d68ac211f2f436049cdbe33acbbeca0afe8f..ce4788491aeb19195dd9201135c6e7e2 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index dd6f95a6ce1b7b5a51d2d8fdaefd633d19a22824..d54d3694e7e5becbb72dc9362bc530c3ce2faa0e 100644 +index b1e3179eae105e29a360cc5a92c475e7c545704d..a0a5173ad8feb09ded34ba462e9295649ca80667 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -275,6 +275,11 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index 42becab3069..ab69fb52f80 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -7,10 +7,10 @@ We don't use gin to create the V8 platform, because we need to inject Node things. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index a82c7d1189b35223647f5de46ed415302f269827..c74b81af691aee95609913519e36498ec578620a 100644 +index e8608bb868c82c9af5426cd6f8512ce6b18ff39f..6268851494a0bbc0b3e693782dae6171f6347657 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -137,9 +137,10 @@ void IsolateHolder::Initialize(ScriptMode mode, +@@ -136,9 +136,10 @@ void IsolateHolder::Initialize(ScriptMode mode, const intptr_t* reference_table, const std::string js_command_line_flags, v8::FatalErrorCallback fatal_error_callback, @@ -38,10 +38,10 @@ index 10caab6d9ef3345332c163a55dcef991248ab4ea..c9bc6e5dd7e1cf8d198afcd21cbb2497 // 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 88206801bc1a1f4ea4e79f9a3d177b85ad9e598d..b6d84ce28ebd0e30dc962972583a2c457ed28f8a 100644 +index c10536b30120fc905988653e7117059ef7479838..3fd76d7051ccc5f7e6f45c5be17fca4b22463b24 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -377,7 +377,8 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -382,7 +382,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 88206801bc1a1f4ea4e79f9a3d177b85ad9e598d..b6d84ce28ebd0e30dc962972583a2c45 static bool v8_is_initialized = false; if (v8_is_initialized) return; -@@ -387,7 +388,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +@@ -392,7 +393,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 a842d8e76ad..be24af285a2 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 1b03f182346d544a2551ab3a8fcad288d819ea26..67884548adff4a8dbda52e68f863445b void UpdateDawnInfo(const std::vector& dawn_info_list); diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index c0a7b6b3625186effa7bf8175e872c6820aa4171..5b3fb5412a949a2d972702508aaf7f7cbb97ae53 100644 +index 280c20ab79a09d3b5dd70c4668a58c6fbb5799af..745297088e1255e16da251e92ee7881f42f1bb00 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc @@ -1198,6 +1198,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 70acd2744d3..151355b2251 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 22d3017a4dda1b7ad7e81d312b18407b8409891a..4f5cdce9af2621a3d1ae05db7f9f2665ff5882a8 100644 +index 15e77b25cc0b10e59d154d2389d4b8dbaca6391a..5217174af25d95562b959974e3a9b491ea70b228 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1068,6 +1068,11 @@ +@@ -1107,6 +1107,11 @@ "includes": [4960], }, diff --git a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch index 6feeb969409..addf1aba9ed 100644 --- a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch +++ b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch @@ -8,12 +8,12 @@ require a largeish patch to get working, so just redirect it to our implementation instead. diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc -index 8f6d4c50727f2b0053847ce4de7d7398aa86e7e9..762fb5f3c0dfcd59be35cda4d672bb39d83b586f 100644 +index 71b016bdea8d9f2e2a8f9fec0b30f321dc818c44..804a4c2a48087d7ad1f4a2a975e628e8c0b869b8 100644 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc @@ -10,8 +10,8 @@ - #include "base/bind.h" #include "base/feature_list.h" + #include "base/functional/bind.h" #include "base/guid.h" -#include "chrome/browser/extensions/api/streams_private/streams_private_api.h" -#include "chrome/browser/plugins/plugin_utils.h" diff --git a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index e47af4b92a9..12bad3d896b 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1: Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index ebeea5db0313ebad39782c36efc1b6d963fd64c8..1cbb3ccbf792a3299801449b02f4622343f8d777 100755 +index 7cad05926ce951a5fdc879251b959b9f50d0b5af..4a91d8e45847171e4d59c5378fc795d48f93eeb3 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -302,6 +302,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/ignore_rc_check.patch b/patches/chromium/ignore_rc_check.patch index 55e0ad82c48..427c2306315 100644 --- a/patches/chromium/ignore_rc_check.patch +++ b/patches/chromium/ignore_rc_check.patch @@ -7,10 +7,10 @@ Dont compare RC.exe and RC.py output. FIXME: It has to be reverted once the script is fixed. diff --git a/build/toolchain/win/rc/rc.py b/build/toolchain/win/rc/rc.py -index 2e5ec6b2631ef62d6bcae95a7dfd95bdaa8ce8af..44530b54d36d5925e99edd200ea8bc73fdfdedb6 100755 +index a650506a1e0a19566861b672cb800024965d7ff5..cde05b15eef3decdee0093ca8b84201008e4adb0 100755 --- a/build/toolchain/win/rc/rc.py +++ b/build/toolchain/win/rc/rc.py -@@ -245,7 +245,10 @@ def CompareToMsRcOutput(preprocessed_output, is_utf8, flags): +@@ -244,7 +244,10 @@ def CompareToMsRcOutput(preprocessed_output, is_utf8, flags): # Assert Microsoft rc.exe and rc.py produced identical .res files. if rc_exe_exit_code == 0: import filecmp diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch index 3ab2be6002f..58416f3d54b 100644 --- a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -9,10 +9,10 @@ at rutime. It would be best if eventually all usages of this property were replaced with clean ozone native implementations. diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc -index c51bf1feb4827bd161a4fa018c3ca97f1b676e5f..1c0a5d56357f23a4901bdae9f824357c45714f97 100644 +index 28a5f5e977fd0c31f70f34e5f3c2d329f1abc5ca..8eddf4f4bb5ee8e366de299582f13fe9ae2e1303 100644 --- a/ui/ozone/platform/x11/ozone_platform_x11.cc +++ b/ui/ozone/platform/x11/ozone_platform_x11.cc -@@ -191,6 +191,7 @@ class OzonePlatformX11 : public OzonePlatform, +@@ -192,6 +192,7 @@ class OzonePlatformX11 : public OzonePlatform, base::MessagePumpType::UI; properties->supports_vulkan_swap_chain = true; properties->skia_can_fall_back_to_x11 = true; @@ -21,7 +21,7 @@ index c51bf1feb4827bd161a4fa018c3ca97f1b676e5f..1c0a5d56357f23a4901bdae9f824357c properties->supports_global_application_menus = true; properties->app_modal_dialogs_use_event_blocker = true; diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h -index 111259c8dcfc8d62ea8c35be738ff8c25f66e5c6..e0be1690bbff7c06e02fa1404f6e048a05a7584c 100644 +index ecfc3487a1bd4ed3a15b09403e218460b25c1e51..acae9305f973b3c3781f6f3326d18230c23d52aa 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h @@ -125,6 +125,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { diff --git a/patches/chromium/isolate_holder.patch b/patches/chromium/isolate_holder.patch index e8d1fb23a45..911019d09ee 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -15,10 +15,10 @@ for us to register the isolate in between Isolate::Allocate and Isolate::Initialize. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index c74b81af691aee95609913519e36498ec578620a..7e1e6ad49ebddb9a4d86789939663b8208d057d5 100644 +index 6268851494a0bbc0b3e693782dae6171f6347657..87ae3db7aec96577856804aa3718e53e3ccf66d3 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -73,7 +73,8 @@ IsolateHolder::IsolateHolder( +@@ -72,7 +72,8 @@ IsolateHolder::IsolateHolder( IsolateType isolate_type, IsolateCreationMode isolate_creation_mode, v8::CreateHistogramCallback create_histogram_callback, @@ -28,7 +28,7 @@ index c74b81af691aee95609913519e36498ec578620a..7e1e6ad49ebddb9a4d86789939663b82 : IsolateHolder(task_runner, access_mode, isolate_type, -@@ -81,14 +82,16 @@ IsolateHolder::IsolateHolder( +@@ -80,14 +81,16 @@ IsolateHolder::IsolateHolder( atomics_wait_mode, create_histogram_callback, add_histogram_sample_callback), @@ -47,7 +47,7 @@ index c74b81af691aee95609913519e36498ec578620a..7e1e6ad49ebddb9a4d86789939663b82 : access_mode_(access_mode), isolate_type_(isolate_type) { CHECK(Initialized()) << "You need to invoke gin::IsolateHolder::Initialize first"; -@@ -99,7 +102,7 @@ IsolateHolder::IsolateHolder( +@@ -98,7 +101,7 @@ IsolateHolder::IsolateHolder( v8::ArrayBuffer::Allocator* allocator = params->array_buffer_allocator; DCHECK(allocator); diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index ca72d9f37e5..6c847d077b0 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 3b3603723fdce751ceea13a17f0533b9bf631eb1..ff0ab3ba7a31e9af5e3e68668293095f12097301 100644 +index 5029cbe44e4bdbf85b666d961ffac9d8314e1429..c2ef1da09511b9314298b4e55a23bd521ba17969 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -270,11 +270,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -272,11 +272,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/logging_win32_only_create_a_console_if_logging_to_stderr.patch b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch index 0e71bbc5047..8630d517441 100644 --- a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch +++ b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch @@ -9,17 +9,19 @@ be created for each child process, despite logs being redirected to a file. diff --git a/content/app/content_main.cc b/content/app/content_main.cc -index 1ea066908cd96040070d344c486d4a98a8fcad2f..4d032cd172bb0badc56faf1b0c678e2f04c002b2 100644 +index 00c293219a70cc046c1d2ebc703c8d6541a0a958..ee0c736944a67f8bfaf45ef270ddf536100e87d2 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -324,8 +324,12 @@ RunContentProcess(ContentMainParams params, +@@ -302,10 +302,12 @@ RunContentProcess(ContentMainParams params, #if BUILDFLAG(IS_WIN) // Route stdio to parent console (if any) or create one. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( -- switches::kEnableLogging)) { -+ auto* cmd_line = base::CommandLine::ForCurrentProcess(); -+ bool log_to_stderr = +- switches::kEnableLogging) || +- base::CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kHeadless)) { ++ auto const* cmd_line = base::CommandLine::ForCurrentProcess(); ++ bool const log_to_stderr = + cmd_line->HasSwitch(switches::kEnableLogging) && + cmd_line->GetSwitchValueASCII(switches::kEnableLogging) != "file" && + !cmd_line->HasSwitch(switches::kLogFile); diff --git a/patches/chromium/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index 8635d4fe56f..33e9f151c3f 100644 --- a/patches/chromium/mas-cgdisplayusesforcetogray.patch +++ b/patches/chromium/mas-cgdisplayusesforcetogray.patch @@ -6,10 +6,10 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray Removes usage of the CGDisplayUsesForceToGray private API. diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index a0c06e539088c6521793ecf9ba8d54311c4a6ff7..90c21bfc045df5c43dfa1d5305df28acb7d1123f 100644 +index 2185525edaf5e14b57055e1043db0299bed87fd8..0d5ef8c48f08b1eb5ed878ab8934f2ecd04083fa 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -269,7 +269,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { +@@ -268,7 +268,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { display.set_color_depth(Display::kDefaultBitsPerPixel); display.set_depth_per_component(Display::kDefaultBitsPerComponent); } diff --git a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch index 7672eb672b1..f7877ae9608 100644 --- a/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch +++ b/patches/chromium/mas_avoid_usage_of_private_macos_apis.patch @@ -39,7 +39,7 @@ index 91a65a1e700cf1accb8e4541e0ceca4e0a734b16..323b9b48214aa013ad8f7da2f63cca2e } // namespace base diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index 7ce85cdc4c546d8f1d4e477becaa2be3900ef4e8..45a7731474932c48fce6076d1cf894c7d6375d90 100644 +index 74d1351a7a3c46e5158f903a165fe3068b9732be..fb6529038b41ffddb1a05b139c86f593e14fb701 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -28,12 +28,6 @@ @@ -47,7 +47,7 @@ index 7ce85cdc4c546d8f1d4e477becaa2be3900ef4e8..45a7731474932c48fce6076d1cf894c7 CFTypeID SecKeyGetTypeID(); #if !BUILDFLAG(IS_IOS) -// The NSFont/CTFont toll-free bridging is broken before 10.15. --// http://www.openradar.me/15341349 rdar://15341349 +-// https://openradar.appspot.com/15341349 -// -// TODO(https://crbug.com/1076527): This is fixed in 10.15. When 10.15 is the -// minimum OS for Chromium, remove this SPI declaration. @@ -142,7 +142,7 @@ index f860be6fbb6caf166f4808772a490ebba9cd7f08..d1b588346e106b032045b1a33ccc469c std::vector argv_cstr; argv_cstr.reserve(argv.size() + 1); diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc -index fa83b9cd51c1d3ad1ccee49772424390ef05e46f..604bc712f14283282253bd88580123160483f530 100644 +index 72b78e9a7b80a37247c4c8e5468e17a5464e9d12..71fb7cfe4a0a8cd329940af5b0b371731ee2567a 100644 --- a/media/audio/mac/audio_low_latency_input_mac.cc +++ b/media/audio/mac/audio_low_latency_input_mac.cc @@ -31,19 +31,23 @@ diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 450238d3763..67f3c6d0856 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -11,7 +11,7 @@ needs to think it's coming from the PWA process). I think it can just be chopped out -- if there are any side-effects, we should be able to work around them. diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm -index 89b9323c08cfed0d3ea3a0ec1beaa0bdfabe343e..69ae95eb8537bab751d27749d6cf392a8419f317 100644 +index 447bc6bfb54484b30686db7fd9df0454f48316c8..a1b3140858ae9a456f1c07fbe60cf9ca55e78bb0 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm @@ -51,6 +51,7 @@ @@ -44,10 +44,10 @@ index 89b9323c08cfed0d3ea3a0ec1beaa0bdfabe343e..69ae95eb8537bab751d27749d6cf392a } // 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 c8ddc72eff408f123363b597a56211092aa7d137..c96a6538a2aca5dedebfe2b25c45efc25a0a4e36 100644 +index bb0bb33745c9fa7c2c9b7ba0b03e832ad51f0829..de419f3226b586b122cb9b90d105d85a957c02d7 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 -@@ -566,10 +566,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -567,10 +567,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -61,7 +61,7 @@ index c8ddc72eff408f123363b597a56211092aa7d137..c96a6538a2aca5dedebfe2b25c45efc2 // Beware: This view was briefly removed (in favor of a bare CALayer) in // crrev/c/1236675. The ordering of unassociated layers relative to NSView diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -index abd19b8613e52a6f4c9404f509ab7ed5a61046a6..8c69b989882084946bb821e1d64d75657f17ab26 100644 +index 5fbbb7a1d56640a2bf540ecb148f358ef88c4ad2..7eb3433b6561bba527d9c69b4819e7c26388eb2d 100644 --- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm +++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm @@ -77,6 +77,7 @@ explicit RenderWidgetHostNSViewBridgeOwner( @@ -105,7 +105,7 @@ index abd19b8613e52a6f4c9404f509ab7ed5a61046a6..8c69b989882084946bb821e1d64d7565 } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index af40af18152d184b9235e412ab053a9674a1b498..54de20661940542fb6565aefa6117966b5968ca0 100644 +index 22e8250d7f87d1c34854aa07f96b229caa807e17..5575c479ac6aaa92b6a637781c1cdb472b54f95c 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm @@ -22,7 +22,9 @@ @@ -118,7 +118,7 @@ index af40af18152d184b9235e412ab053a9674a1b498..54de20661940542fb6565aefa6117966 namespace { -@@ -616,6 +618,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -617,6 +619,7 @@ void PostAnnouncementNotification(NSString* announcement) { if ([NSApp isActive]) return window == [NSApp accessibilityFocusedWindow]; @@ -126,7 +126,7 @@ index af40af18152d184b9235e412ab053a9674a1b498..54de20661940542fb6565aefa6117966 // TODO(accessibility): We need a solution to the problem described below. // If the window is NSAccessibilityRemoteUIElement, there are some challenges: // 1. NSApp is the browser which spawned the PWA, and what it considers the -@@ -643,6 +646,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -644,6 +647,7 @@ void PostAnnouncementNotification(NSString* announcement) { // from within the app shim content. if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) return true; @@ -135,7 +135,7 @@ index af40af18152d184b9235e412ab053a9674a1b498..54de20661940542fb6565aefa6117966 return false; } diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h -index c1f2725cf74fe8845843461518a849f2cbf2c024..c9f489a8603a63dc2641fbd435c4ab1de9fafbd3 100644 +index a58b06e3fa5e9008e6013565c2a58fad906c8b79..8e679d886ca90636f63b1752296fc76405f562e5 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -52,7 +52,9 @@ class ScopedPasswordInputEnabler; @@ -148,7 +148,7 @@ index c1f2725cf74fe8845843461518a849f2cbf2c024..c9f489a8603a63dc2641fbd435c4ab1d @class RenderWidgetHostViewCocoa; namespace content { -@@ -671,10 +673,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -670,10 +672,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -162,10 +162,10 @@ index c1f2725cf74fe8845843461518a849f2cbf2c024..c9f489a8603a63dc2641fbd435c4ab1d // 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 e27191c89a3be5fd21be4403a5e183e5dd12d383..07dcac920740a029dfc69c123506bafd142eb4ef 100644 +index ab7e3a7428a2ea2ac9eb3f0e97cd4bce9c72f0ba..a557cc2b06e68e54817f154f2d1e6a7635958d0e 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -260,8 +260,10 @@ +@@ -262,8 +262,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -174,9 +174,9 @@ index e27191c89a3be5fd21be4403a5e183e5dd12d383..07dcac920740a029dfc69c123506bafd remote_window_accessible_.reset(); +#endif - // Disconnect from the previous bridge (this will have the effect of - // destroying the associated bridge), and close the receiver (to allow it -@@ -1574,8 +1576,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, + // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling + // pointers. `ns_view_` gets reinitialized later in this method. +@@ -1580,8 +1582,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -187,7 +187,7 @@ index e27191c89a3be5fd21be4403a5e183e5dd12d383..07dcac920740a029dfc69c123506bafd return [GetInProcessNSView() window]; } -@@ -1623,9 +1627,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1629,9 +1633,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -199,7 +199,7 @@ index e27191c89a3be5fd21be4403a5e183e5dd12d383..07dcac920740a029dfc69c123506bafd } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2121,20 +2127,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2127,20 +2133,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken( GetRenderWidgetAccessibilityTokenCallback callback) { base::ProcessId pid = getpid(); @@ -293,7 +293,7 @@ index 1c30148ec8f091e6e35a9f849cc1935cd10f2691..3ca2b624c03ca09b75b966d63f3559d0 // 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 5b71ee9bd88ec988d1c5a948cc0f59d339c76700..6ebbc0e9231bb453edcfd539191772108377a6cc 100644 +index 0cb9bea6f8d29ccacac658ccb419e3549cdc6af5..14fcb3e2daf451a7db8111aad550300235bcd168 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm @@ -337,14 +337,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -319,7 +319,7 @@ index 5b71ee9bd88ec988d1c5a948cc0f59d339c76700..6ebbc0e9231bb453edcfd53919177210 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1345,6 +1353,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1350,6 +1358,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -327,7 +327,7 @@ index 5b71ee9bd88ec988d1c5a948cc0f59d339c76700..6ebbc0e9231bb453edcfd53919177210 remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1353,14 +1362,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1358,14 +1367,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, [remote_view_accessible_ setTopLevelUIElement:remote_window_accessible_.get()]; [NSAccessibilityRemoteUIElement setRemoteUIApp:YES]; diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index d4e49c9487e..9007af24b72 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -16,7 +16,7 @@ cases where performance improves when disabling remote CoreAnimation (remote CoreAnimation is really only about battery usage). diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h -index 4b5f79a2331d491c1f05306dc45540aa7477abfc..61204fc4dc789936f7e5f3582917076ba1999330 100644 +index 29b75456a779ff9c36bb0cc2cdc4a1b2a1aa5966..4157e90fdbc265ab34405e4e9c1efbff06c26d70 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h @@ -18,7 +18,9 @@ @@ -29,7 +29,7 @@ index 4b5f79a2331d491c1f05306dc45540aa7477abfc..61204fc4dc789936f7e5f3582917076b @class CALayer; namespace ui { -@@ -81,7 +83,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::Presenter, +@@ -89,7 +91,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::Presenter, base::WeakPtr delegate_; bool use_remote_layer_api_; @@ -40,10 +40,10 @@ index 4b5f79a2331d491c1f05306dc45540aa7477abfc..61204fc4dc789936f7e5f3582917076b gfx::Size pixel_size_; diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -index 70ce56dbfdad32012bfa25101eecd2ed2a3cafe2..75ec71f9a0437e3ded62f4e30e0a30f0a4906791 100644 +index e2b4368c08ba9e30cb46218988c6212a46c98217..02db1e7041f18bae8c90539fee0e768b353fa523 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -71,12 +71,14 @@ +@@ -74,12 +74,14 @@ // Create the CAContext to send this to the GPU process, and the layer for // the context. @@ -58,7 +58,7 @@ index 70ce56dbfdad32012bfa25101eecd2ed2a3cafe2..75ec71f9a0437e3ded62f4e30e0a30f0 } ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() { -@@ -171,7 +173,9 @@ +@@ -174,7 +176,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 2ad7c3282ef..d60045f2efb 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -33,24 +33,6 @@ index 6840358c3187522c63dff66b5a85567aaadc5c12..72c57fbc5fbb267f96ff9e21915fb801 return true; } -diff --git a/content/common/pseudonymization_salt.cc b/content/common/pseudonymization_salt.cc -index c7e4ef224e76b4df4fa08bb7fa8dd78605ea8de1..8a15ee3e062e108824c6b2fadc2ffa807ff03ade 100644 ---- a/content/common/pseudonymization_salt.cc -+++ b/content/common/pseudonymization_salt.cc -@@ -41,11 +41,13 @@ uint32_t GetPseudonymizationSalt() { - uint32_t salt = g_salt.load(); - - if (salt == 0) { -+#if !IS_MAS_BUILD() - #if DCHECK_IS_ON() - // Only the Browser process needs to initialize the `salt` on demand. - // Other processes (identified via the IsProcessSandboxed heuristic) should - // receive the salt from their parent processes. - DCHECK(!sandbox::policy::Sandbox::IsProcessSandboxed()); -+#endif - #endif - salt = InitializeSalt(); - } diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm index add9345fdd076698fc7ec654d7ef1701699639a4..ea5287cbe878014e4f0f6124a459bef225b0ca59 100644 --- a/content/renderer/renderer_main_platform_delegate_mac.mm @@ -122,10 +104,10 @@ index f50448237c40710e25644c2f7d44e8d0bc0789c8..752b575cf341546bdcc46e6dfff28fe4 } diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm -index dced377388d22f825ce228dd615056ba0548986d..00724d8e6e597441d93c8a2c9b2f9415783213d8 100644 +index 0c4121f178392864053f5511bf880d8e20845fdd..f472ecfc2ba6d3ce51fa14f989bfad77d21347fb 100644 --- a/device/bluetooth/bluetooth_adapter_mac.mm +++ b/device/bluetooth/bluetooth_adapter_mac.mm -@@ -41,6 +41,7 @@ +@@ -42,6 +42,7 @@ #include "device/bluetooth/bluetooth_socket_mac.h" #include "device/bluetooth/public/cpp/bluetooth_address.h" @@ -133,7 +115,7 @@ index dced377388d22f825ce228dd615056ba0548986d..00724d8e6e597441d93c8a2c9b2f9415 extern "C" { // Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and // `Karabiner` [3] to programmatically control the Bluetooth state. Calling the -@@ -54,6 +55,7 @@ +@@ -55,6 +56,7 @@ // [4] https://support.apple.com/kb/PH25091 void IOBluetoothPreferenceSetControllerPowerState(int state); } @@ -141,7 +123,7 @@ index dced377388d22f825ce228dd615056ba0548986d..00724d8e6e597441d93c8a2c9b2f9415 namespace { -@@ -113,8 +115,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) { +@@ -114,8 +116,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) { : controller_state_function_( base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState, base::Unretained(this))), @@ -152,7 +134,7 @@ index dced377388d22f825ce228dd615056ba0548986d..00724d8e6e597441d93c8a2c9b2f9415 classic_discovery_manager_( BluetoothDiscoveryManagerMac::CreateClassic(this)), low_energy_discovery_manager_( -@@ -355,8 +359,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) { +@@ -356,8 +360,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) { } bool BluetoothAdapterMac::SetPoweredImpl(bool powered) { @@ -166,7 +148,7 @@ index dced377388d22f825ce228dd615056ba0548986d..00724d8e6e597441d93c8a2c9b2f9415 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 855b1e004a82d21a79d7278d957c391e87def2be..3cc3a2de26e0988ab23245f4b6019b80585a50c3 100644 +index 79021074867df91e3090bc6bbea6114364e6e78d..44635f13048890b20c74870d26c4e74bab363ddb 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -176,6 +176,12 @@ source_set("audio") { @@ -183,10 +165,10 @@ index 855b1e004a82d21a79d7278d957c391e87def2be..3cc3a2de26e0988ab23245f4b6019b80 "AudioToolbox.framework", "AudioUnit.framework", diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc -index b5ad37cb3e8064d180ff987ab7a96da3886dc7f9..b6da8a68fabaec5ecf71b2c2fcaa1b0e52d2fcbe 100644 +index 2cd163bf82f16a44456d0f98505514489ba8f751..636096ec3d6425b858bbcb9f732be44cbab077e7 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc -@@ -895,7 +895,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( +@@ -975,7 +975,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( void AudioManagerMac::InitializeOnAudioThread() { DCHECK(GetTaskRunner()->BelongsToCurrentThread()); @@ -196,7 +178,7 @@ index b5ad37cb3e8064d180ff987ab7a96da3886dc7f9..b6da8a68fabaec5ecf71b2c2fcaa1b0e } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index a8a223d1d9ea6de51a27f148c008ee8be38af29a..328200858bd7aa4077bf6824bfc1367bda748920 100644 +index a93e7cd74d2a9d692304ecf10279fae8e96bb695..3506d6ca555701bad6623cc1c614e0081892e42b 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc @@ -130,8 +130,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { 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 d0a34fde1a4..bf862e2c563 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 6bae8bce2d5b14d12291774fd20042f9e5ee3d67..4e0ae6719069da886db193642df9f90d52a332d3 100644 +index 47bba434b56d88a981ca1af6a72a3d4df76d455f..74b881ef99b32d085f58fc7b30cd42005855dcbc 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -134,6 +134,11 @@ @@ -114,7 +114,7 @@ index 6bae8bce2d5b14d12291774fd20042f9e5ee3d67..4e0ae6719069da886db193642df9f90d constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -716,6 +806,13 @@ void NetworkContext::SetClient( +@@ -714,6 +804,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,7 +128,7 @@ index 6bae8bce2d5b14d12291774fd20042f9e5ee3d67..4e0ae6719069da886db193642df9f90d void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2181,6 +2278,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2192,6 +2289,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,10 +139,10 @@ index 6bae8bce2d5b14d12291774fd20042f9e5ee3d67..4e0ae6719069da886db193642df9f90d builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index cca5788e85c849c0ea17edccf72b2bbfbf0e8f57..8b41b28c036837a35a732a63aa6e1ebeaf416970 100644 +index eb77d029e308a06b3dd9d41d9f270a3cd89ce406..98c33a3048f1a10e8293c51213a99089ca55456b 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -103,6 +103,7 @@ class URLMatcher; +@@ -104,6 +104,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -150,7 +150,7 @@ index cca5788e85c849c0ea17edccf72b2bbfbf0e8f57..8b41b28c036837a35a732a63aa6e1ebe class CookieManager; class HostResolver; class MdnsResponderManager; -@@ -238,6 +239,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -239,6 +240,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,7 +159,7 @@ index cca5788e85c849c0ea17edccf72b2bbfbf0e8f57..8b41b28c036837a35a732a63aa6e1ebe void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -819,6 +822,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -829,6 +832,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -169,10 +169,10 @@ index cca5788e85c849c0ea17edccf72b2bbfbf0e8f57..8b41b28c036837a35a732a63aa6e1ebe 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 1e7e922c738ce0960f0658cec817d57db341f9a6..28745d0a28062fba30f31342c430524aab6a2a4a 100644 +index b2254b765c313a0fa552c82944f9b69e97df432b..a9e7ccf5676cf72fddfd882d7582cc8f6f3162da 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -289,6 +289,17 @@ struct NetworkContextFilePaths { +@@ -291,6 +291,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -190,7 +190,7 @@ index 1e7e922c738ce0960f0658cec817d57db341f9a6..28745d0a28062fba30f31342c430524a // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -847,6 +858,9 @@ interface NetworkContext { +@@ -852,6 +863,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 501b55bac32..0ff41914d50 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 a3bc7c2ff135fe6fe228bd60886f08a7c94b7ebb..9fb3a65e68cd7d3a3d60b479b4497482100835b6 100644 +index 39d85278026f2a625a593d75f5c7bd0166c6110c..72546797930ddade55d71d0a47e6702072acad8b 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc @@ -197,6 +197,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( @@ -31,7 +31,7 @@ index dfbfbf4e5d92eb8c7c2ba38f31264ac41713a485..78cc81931321656c308e5611e30e0813 const GURL& origin, const GURL& document_url, diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc -index d4540308246d1166aee7319229390b9b8afce219..a0e67d2bdb8680229bfba072173acfcc3162b96c 100644 +index 688c95eeb2a1ea60b004eb643cb5afcff48c11bd..226d1e3f01f976d8b35e6b3fbd332683d1a0f84b 100644 --- a/content/browser/notifications/blink_notification_service_impl.cc +++ b/content/browser/notifications/blink_notification_service_impl.cc @@ -87,12 +87,14 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( @@ -79,10 +79,10 @@ index 1c1a95953c6c216b378c2ab0bfbef6eeb19cc184..2f0ce853dbb28163aa30914b5bc31be7 scoped_refptr service_worker_context_; diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc -index b07eaabb5f2914b160edbfd38091c1b9b24e9564..aba444e8e8f4973056ebe5a88ed1b7939d2d7def 100644 +index f4a46e1d636349c9fe189afbc8b60ee2bf72ff14..4013af45d48a4ee936ba46f1892896338c7018ea 100644 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc -@@ -136,7 +136,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { +@@ -135,7 +135,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { notification_service_ = std::make_unique( notification_context_.get(), &browser_context_, embedded_worker_helper_->context_wrapper(), &render_process_host_, @@ -92,10 +92,10 @@ index b07eaabb5f2914b160edbfd38091c1b9b24e9564..aba444e8e8f4973056ebe5a88ed1b793 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 76e711cf9e1aee95ca7d10d268e02b41447ed986..5e46ea38736ec5ba820485212abd6c99bec0ef40 100644 +index aa04c672494e5ecb9ca43eb7e0d3b49bad01e29b..ff24af7f921dc86c00bfd7151dc8d70af6f1b99a 100644 --- a/content/browser/notifications/platform_notification_context_impl.cc +++ b/content/browser/notifications/platform_notification_context_impl.cc -@@ -282,6 +282,7 @@ void PlatformNotificationContextImpl::Shutdown() { +@@ -283,6 +283,7 @@ void PlatformNotificationContextImpl::Shutdown() { void PlatformNotificationContextImpl::CreateService( RenderProcessHost* render_process_host, @@ -103,7 +103,7 @@ index 76e711cf9e1aee95ca7d10d268e02b41447ed986..5e46ea38736ec5ba820485212abd6c99 const blink::StorageKey& storage_key, const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, -@@ -290,7 +291,7 @@ void PlatformNotificationContextImpl::CreateService( +@@ -291,7 +292,7 @@ void PlatformNotificationContextImpl::CreateService( DCHECK_CURRENTLY_ON(BrowserThread::UI); services_.push_back(std::make_unique( this, browser_context_, service_worker_context_, render_process_host, @@ -113,7 +113,7 @@ index 76e711cf9e1aee95ca7d10d268e02b41447ed986..5e46ea38736ec5ba820485212abd6c99 } diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h -index 600d248a3060f754c676b9b96007329d2db7253e..5e075572ef71397a8bbdb54e8ed8131892476aab 100644 +index bbd2aa78722fc0a14ac815ca0243b83965ad8d7c..b6e0a2fce3a0fb9c449aa1bef6a0f970ef5c2d07 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,10 +133,10 @@ index 600d248a3060f754c676b9b96007329d2db7253e..5e075572ef71397a8bbdb54e8ed81318 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 ebe9c1eafcffa70e436d4f23d6859a70e6a7ab7e..44d5616a627d34576cd70eac6dee664a1da25341 100644 +index 0f4588f2d8fd861bc6c84a4bd1b6913c0d4eb8b3..200131d89e8616054c321841b4b27fbee67b5d88 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2122,7 +2122,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2120,7 +2120,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index ebe9c1eafcffa70e436d4f23d6859a70e6a7ab7e..44d5616a627d34576cd70eac6dee664a creator_type, std::move(receiver)); break; } -@@ -2130,7 +2130,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2128,7 +2128,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -155,7 +155,7 @@ index ebe9c1eafcffa70e436d4f23d6859a70e6a7ab7e..44d5616a627d34576cd70eac6dee664a break; } diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h -index 2cb0d1fc03df42c4681d2594d9c600b414a423b4..7959141a4707d55b88ed2c986f4b41874c123c9f 100644 +index d9e36712dc3fbc6a9043e2c33660090ca2f7367b..7d910583eb22fc315eb0619febe518d5c24c0c4d 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 2cb0d1fc03df42c4681d2594d9c600b414a423b4..7959141a4707d55b88ed2c986f4b4187 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 b78a368e201d7f1624fcf8371c5c7c2be5e536e0..c10dd93fecd308f832132183da5c136658177f9f 100644 +index b3ef5af4450b3f96787bc3f9935dfdf19ebaaa94..6a4309070e0f6eaa743deefb0aeb2d0be558a787 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 b78a368e201d7f1624fcf8371c5c7c2be5e536e0..c10dd93fecd308f832132183da5c1366 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 91f77590918d92c2d35bd5a94e42817015905d4d..ff61450499ba2e1c8caafbc0548bb239e632b887 100644 +index 7cd457defa729855c8d7c9d873efab5389d025cd..2b8e644d54d93a9499adcc1bf5660d72a24e2f29 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/pepper_plugin_support.patch b/patches/chromium/pepper_plugin_support.patch index a67e31c087d..4b873293f21 100644 --- a/patches/chromium/pepper_plugin_support.patch +++ b/patches/chromium/pepper_plugin_support.patch @@ -7,13 +7,13 @@ This tweaks Chrome's pepper flash and PDF plugin support to make it usable from Electron. diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc -index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2d7e270a9 100644 +index 7004be59929ebe573e304c7e4dfb529f54889b80..99f0edae518ad00c04ce2120eca30d6cd53e7a20 100644 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc -@@ -6,17 +6,21 @@ - +@@ -7,17 +7,21 @@ #include + #include "base/task/sequenced_task_runner.h" +#if 0 #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" @@ -32,7 +32,7 @@ index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2 #include "ppapi/c/pp_errors.h" #include "ppapi/host/dispatch_host_message.h" #include "ppapi/host/host_message_context.h" -@@ -25,12 +29,11 @@ +@@ -26,12 +30,11 @@ #include "ppapi/shared_impl/file_system_util.h" #include "storage/browser/file_system/isolated_context.h" @@ -46,7 +46,7 @@ index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2 namespace { -@@ -40,6 +43,7 @@ const char* kPredefinedAllowedCrxFsOrigins[] = { +@@ -41,6 +44,7 @@ const char* kPredefinedAllowedCrxFsOrigins[] = { }; } // namespace @@ -54,7 +54,7 @@ index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2 // static PepperIsolatedFileSystemMessageFilter* -@@ -63,11 +67,16 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter( +@@ -64,11 +68,16 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter( const base::FilePath& profile_directory, const GURL& document_url, ppapi::host::PpapiHost* ppapi_host) @@ -71,7 +71,7 @@ index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2 } PepperIsolatedFileSystemMessageFilter:: -@@ -92,6 +101,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived( +@@ -93,6 +102,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived( return PP_ERROR_FAILED; } @@ -79,7 +79,7 @@ index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2 Profile* PepperIsolatedFileSystemMessageFilter::GetProfile() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); ProfileManager* profile_manager = g_browser_process->profile_manager(); -@@ -116,6 +126,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) { +@@ -117,6 +127,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) { return storage::IsolatedContext::ScopedFSHandle(); #endif } @@ -87,7 +87,7 @@ index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2 int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( ppapi::host::HostMessageContext* context, -@@ -124,7 +135,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( +@@ -125,7 +136,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID: break; case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX: @@ -96,7 +96,7 @@ index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2 } NOTREACHED(); context->reply_msg = -@@ -132,6 +143,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( +@@ -133,6 +144,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( return PP_ERROR_FAILED; } @@ -104,16 +104,16 @@ index f25790df4c705bbe1bf2da86ef1261633034fd3f..8ae719107d88ebe53f98f167630c70a2 int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( ppapi::host::HostMessageContext* context) { #if BUILDFLAG(ENABLE_EXTENSIONS) -@@ -172,3 +184,4 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( +@@ -173,3 +185,4 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( return PP_ERROR_NOTSUPPORTED; #endif } +#endif diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h -index 946bbba987594769d371dbdb2ab22582a5d86d9f..01657a210c53c432acee1ba26916b1a6e610a260 100644 +index 716f5f9abe27a4411f7cc47c37d80d9a72099369..77a5cd69317db2c02a4ca75b91cea9405ea99de5 100644 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h -@@ -19,7 +19,9 @@ +@@ -20,7 +20,9 @@ #include "storage/browser/file_system/isolated_context.h" #include "url/gurl.h" @@ -123,7 +123,7 @@ index 946bbba987594769d371dbdb2ab22582a5d86d9f..01657a210c53c432acee1ba26916b1a6 namespace content { class BrowserPpapiHost; -@@ -58,6 +60,7 @@ class PepperIsolatedFileSystemMessageFilter +@@ -59,6 +61,7 @@ class PepperIsolatedFileSystemMessageFilter ~PepperIsolatedFileSystemMessageFilter() override; @@ -131,7 +131,7 @@ index 946bbba987594769d371dbdb2ab22582a5d86d9f..01657a210c53c432acee1ba26916b1a6 Profile* GetProfile(); // Returns filesystem id of isolated filesystem if valid, or empty string -@@ -65,18 +68,23 @@ class PepperIsolatedFileSystemMessageFilter +@@ -66,18 +69,23 @@ class PepperIsolatedFileSystemMessageFilter // allows access on that thread. storage::IsolatedContext::ScopedFSHandle CreateCrxFileSystem( Profile* profile); diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 4b7ddd3b9f0..0773add9aac 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -9,7 +9,7 @@ don't get errors for Chrome's generated resources, which are non-existent because we don't generate them in our build. 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 4c83c6a6685490ce1899b119742fa25b6b9a50cd..23d7bf23e13af2c0bb10a9b58bf20f1f763d547c 100644 +index 1ef7adec61a6b5f85177bb035f2534a319cd8f4f..dcb329f794e7a579e37eb370db4378b8cded3d69 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -14,9 +14,11 @@ diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch index f1c0ee14d4c..fd552c6d8af 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index cabd236eaa3f24b8564d471587543eb5be9ec6bf..53812c4fd4103f60896b5c9b1c9ae811dba75fe2 100644 +index c8727dcac4d1440f7aef0b32e5ac7569b02f177e..4b6cd9afd7d224198c704e4a45f2f13c07e1fc81 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -260,6 +260,10 @@ +@@ -289,6 +289,10 @@ E_CPONLY(kColorScrollbarThumbInactive) \ E_CPONLY(kColorScrollbarThumbPressed) \ E_CPONLY(kColorScrollbarTrack) \ @@ -22,7 +22,7 @@ index cabd236eaa3f24b8564d471587543eb5be9ec6bf..53812c4fd4103f60896b5c9b1c9ae811 E_CPONLY(kColorSeparator) \ E_CPONLY(kColorShadowBase) \ E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ -@@ -314,6 +318,7 @@ +@@ -344,6 +348,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -31,10 +31,10 @@ index cabd236eaa3f24b8564d471587543eb5be9ec6bf..53812c4fd4103f60896b5c9b1c9ae811 #if BUILDFLAG(IS_CHROMEOS) diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index 80394f269c91cb1064f9f960e3ecca41704c8e03..0885bf11672d47544d067deb74dbe786aa227127 100644 +index 45bea447f6d25e23d60e0b5dde9aeb0ac7a005f3..7b9f527ba0efe6c09e00b15c7a9895a446f771cd 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -192,6 +192,17 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -202,6 +202,17 @@ void AddUiColorMixer(ColorProvider* provider, : SkColorSetA(SK_ColorBLACK, 0x80)}; mixer[kColorScrollbarTrack] = {dark_mode ? SkColorSetRGB(0x42, 0x42, 0x42) : SkColorSetRGB(0xF1, 0xF1, 0xF1)}; @@ -52,7 +52,7 @@ index 80394f269c91cb1064f9f960e3ecca41704c8e03..0885bf11672d47544d067deb74dbe786 mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -273,6 +284,7 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -283,6 +294,7 @@ void AddUiColorMixer(ColorProvider* provider, mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; diff --git a/patches/chromium/preconnect_manager.patch b/patches/chromium/preconnect_manager.patch index 2e6aae4a53a..00ce4a2375f 100644 --- a/patches/chromium/preconnect_manager.patch +++ b/patches/chromium/preconnect_manager.patch @@ -10,11 +10,11 @@ in favor of defining PreconnectRequest in this file since we don't build the header. diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc -index de39505b1e515559182b6b3f25ffbe96f0b8262b..a040d30dd35f3f6c4dda58fb9d2e3e537ecbb9f7 100644 +index 2e1391ce0a3abcae068f52222e88d17f76157b42..fea6de602562ae051df14b2beb3f461b8e0f3aea 100644 --- a/chrome/browser/predictors/preconnect_manager.cc +++ b/chrome/browser/predictors/preconnect_manager.cc @@ -10,9 +10,11 @@ - #include "base/containers/adapters.h" + #include "base/functional/bind.h" #include "base/metrics/histogram_macros.h" #include "base/trace_event/trace_event.h" +#if 0 @@ -63,7 +63,7 @@ index de39505b1e515559182b6b3f25ffbe96f0b8262b..a040d30dd35f3f6c4dda58fb9d2e3e53 void PreconnectManager::Start(const GURL& url, diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h -index 5f7e0db497a48829a330d7aae63d0da34cca7e33..d25f97a11174cb6e28b961cd7fc59ba3831e7a54 100644 +index d18470c05cdaffbc48b83cc0c76f7085442dccce..0c0a3f11a2da083ef5437a0e6abcf91afbcf9df3 100644 --- a/chrome/browser/predictors/preconnect_manager.h +++ b/chrome/browser/predictors/preconnect_manager.h @@ -17,7 +17,9 @@ diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index a98e085f5a2..65e13e764b0 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 449762d965145b882e84765e94dbfb16c1361dee..f38d5a3a3c028742a51894038d0e48325a2d58d8 100644 +index e8b687fa8db81d22d04bae5302b8514bed6053d3..0b67e532df8864e6e9b6c054d6d3225f63447f9d 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -965,7 +965,6 @@ if (is_win) { +@@ -956,7 +956,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index 449762d965145b882e84765e94dbfb16c1361dee..f38d5a3a3c028742a51894038d0e4832 "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -974,6 +973,10 @@ if (is_win) { +@@ -965,6 +964,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -34,7 +34,7 @@ index 449762d965145b882e84765e94dbfb16c1361dee..f38d5a3a3c028742a51894038d0e4832 } diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc -index 796c7f06fa6063ac409f3fef53871e18d4c07838..6575e833388bcc3ac487a409027d984bf62db004 100644 +index e1ddd8fc237f61ceb86115d66087a6f89940609f..3631a378c2829a6007d86a2b934ee0f4fd055156 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc @@ -91,6 +91,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { @@ -78,7 +78,7 @@ index 796c7f06fa6063ac409f3fef53871e18d4c07838..6575e833388bcc3ac487a409027d984b : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 017e421d0ca3e6154b849373abbcb8d75b369e60..aaadfba1735b21e17b66e8efe69f8a5ab4a312b0 100644 +index 34d6001efd674bd49031845e8257c468d894258e..4f29c2ac96e50cdfe49669802edfd9ab6a293880 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -29,8 +29,6 @@ @@ -415,10 +415,10 @@ index 017e421d0ca3e6154b849373abbcb8d75b369e60..aaadfba1735b21e17b66e8efe69f8a5a for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 25d415022a331721ac356a55e1d23da00e494162..dad283702062c210e2306854bc346c6ab0fe6a22 100644 +index 1fe06e1ffd9ad45afe01fe0d4282a38759a53f3a..998bebb10e9fa24414e1adeb626c93dec46f7812 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h -@@ -42,6 +42,8 @@ namespace printing { +@@ -46,6 +46,8 @@ namespace printing { class PrintQueriesQueue; class PrinterQuery; @@ -427,7 +427,7 @@ index 25d415022a331721ac356a55e1d23da00e494162..dad283702062c210e2306854bc346c6a // Base class for managing the print commands for a WebContents. class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { public: -@@ -67,7 +69,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -71,7 +73,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment. @@ -439,7 +439,7 @@ index 25d415022a331721ac356a55e1d23da00e494162..dad283702062c210e2306854bc346c6a #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in `print_data` with settings specified in -@@ -123,6 +128,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -127,6 +132,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { void ShowInvalidPrinterSettingsError() override; void PrintingFailed(int32_t cookie, mojom::PrintFailureReason reason) override; @@ -447,7 +447,7 @@ index 25d415022a331721ac356a55e1d23da00e494162..dad283702062c210e2306854bc346c6a // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -130,6 +136,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -134,6 +140,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { void AddObserver(Observer& observer); void RemoveObserver(Observer& observer); @@ -462,7 +462,7 @@ index 25d415022a331721ac356a55e1d23da00e494162..dad283702062c210e2306854bc346c6a protected: explicit PrintViewManagerBase(content::WebContents* web_contents); -@@ -266,7 +280,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -270,7 +284,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -472,7 +472,7 @@ index 25d415022a331721ac356a55e1d23da00e494162..dad283702062c210e2306854bc346c6a // Requests the RenderView to render all the missing pages for the print job. // No-op if no print job is pending. Returns true if at least one page has -@@ -336,8 +351,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -340,8 +355,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -486,7 +486,7 @@ index 25d415022a331721ac356a55e1d23da00e494162..dad283702062c210e2306854bc346c6a // Indication that the job is getting canceled. bool canceling_job_ = false; diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc -index b9f35e43b41501a8a921a6c694f3824e8b9fcaa1..43b64d07a214f44228a5e193751cc81fe28b2f02 100644 +index d01d616c3b1ea5965bcc0dafc63ca757d991f975..632207f53dfac75ed7e963836fe03f8317933b76 100644 --- a/chrome/browser/printing/printer_query.cc +++ b/chrome/browser/printing/printer_query.cc @@ -298,17 +298,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings, @@ -562,7 +562,7 @@ index 42d9af1e278f6c3e09bb7e54a7c4de0f17d064bf..96112222530e63f911d866884eca03cc // Tells the browser that there are invalid printer settings. ShowInvalidPrinterSettingsError(); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 5b0ba913e94a3132a3d3a6c71cfe08f940b97fc1..dfcd383c5242752a6b3751da417e81749e09ca71 100644 +index f97675b7abe9553a4ea11ba7faa91f042e133448..0b269b93206c07befdb12d0a0e7f796605026976 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -43,6 +43,7 @@ @@ -742,7 +742,7 @@ index 5b0ba913e94a3132a3d3a6c71cfe08f940b97fc1..dfcd383c5242752a6b3751da417e8174 std::move(quit_closure).Run(); }, diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 97151dfd451fc847472fa82d418ab1f5abd8d853..e8e963aca6c1ab0360c55da0ad0845b92f6ca95a 100644 +index 3f82c0cdfd11a8d0c3cbcba9cc74b0e3e1a41b0f..36c1df7e3346f51945721ababf12dc3424f17686 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h @@ -253,7 +253,7 @@ class PrintRenderFrameHelper @@ -783,10 +783,10 @@ index 97151dfd451fc847472fa82d418ab1f5abd8d853..e8e963aca6c1ab0360c55da0ad0845b9 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index aff547e8e5ed0fcafb2fe5cdd5dec0c0ec7ef7d0..c8668e8e831cc0e5e2ea96da2c87b4bd711a2e71 100644 +index f8325e930179fcb7a675db696fbfe0e2436b769b..9ba992e9ce8e107949db8dfc928a478b50fea35a 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2820,8 +2820,9 @@ source_set("browser") { +@@ -2827,8 +2827,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -811,7 +811,7 @@ index 3a9e75c229f028dcbfb2d7b9294bc42989cb4c1e..a890c5517c0708034bbc6b9b606c990a std::unique_ptr settings = PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 42095172d1406860249601537648fe22790ba744..361c20ef66d5c7acd34528711c52714d4c62a456 100644 +index 7582c73418e7478e7a91622089ec555e3e1e7113..d0e164b2748f2f078a2ace5bd46bbdc431cb6947 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h @@ -171,6 +171,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { @@ -835,18 +835,10 @@ index 42095172d1406860249601537648fe22790ba744..361c20ef66d5c7acd34528711c52714d bool skip_system_calls() const { #if BUILDFLAG(ENABLE_OOP_PRINTING) diff --git a/sandbox/policy/mac/sandbox_mac.mm b/sandbox/policy/mac/sandbox_mac.mm -index d709edc697f1390a3eb086c4be16a8185bf6e66c..e6f4cdf018bb9a1cdf140a3b80eaca9accd289d8 100644 +index 99a89b0334b703b021e40baafe7fb1184405e072..28b74e85619368703cde82ed7caeca438d596d36 100644 --- a/sandbox/policy/mac/sandbox_mac.mm +++ b/sandbox/policy/mac/sandbox_mac.mm -@@ -25,7 +25,6 @@ - #include "sandbox/policy/mac/nacl_loader.sb.h" - #include "sandbox/policy/mac/network.sb.h" - #include "sandbox/policy/mac/ppapi.sb.h" --#include "sandbox/policy/mac/print_backend.sb.h" - #include "sandbox/policy/mac/print_compositor.sb.h" - #include "sandbox/policy/mac/renderer.sb.h" - #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) -@@ -35,6 +34,10 @@ +@@ -37,6 +37,10 @@ #include "sandbox/policy/mac/utility.sb.h" #include "sandbox/policy/mojom/sandbox.mojom.h" diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index f74f6f41dac..6b37ce4cc20 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -18,7 +18,7 @@ This patch adds a few changes to the Chromium code: admin permissions. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index 2db06b7dc4cb729ebfb5ae48ab676a7bc0697a99..19350d58e817ea8ac7868dd90a08cc25836c9921 100644 +index b05c0157ecca222452fb38e3b28c9d7cc6bcfbfd..02d9eabfef9521722340739bf86df3dfc30018d7 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -102,12 +102,19 @@ class ProcessSingleton { @@ -51,7 +51,7 @@ index 2db06b7dc4cb729ebfb5ae48ab676a7bc0697a99..19350d58e817ea8ac7868dd90a08cc25 base::win::MessageWindow window_; // The message-only window. bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment. diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 7b3c6db871da993c405f187b9beb74a9f66c5954..62902da2dde6be2e2b223d612ebab3dd54a286bd 100644 +index e9ba0101791d7ca84ae8a6801aa7b3607d5a6ded..0e1baf024e7aee3bc1edad1e0620bd56647d042b 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -54,6 +54,7 @@ @@ -172,7 +172,7 @@ index 7b3c6db871da993c405f187b9beb74a9f66c5954..62902da2dde6be2e2b223d612ebab3dd int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index f89f9265ba8de66a2f661a77611334dc91c08c0f..009b522049adc32144c51842369dc1156bd959fa 100644 +index 046764b67c98924b79405ef7d5d90ca9fa972d6e..51a109504c1c8f79ef8748641ef21efed3a9315d 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -29,7 +29,9 @@ 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 d9622e0abb3..d639756a51a 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -8,49 +8,49 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about ` Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779 diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h -index 5bc19ff673adff67f857cff16e3cbf4cbdd3d10b..c9649e974e251c7f490a0d6a22ac63cde3918d71 100644 +index b842aea32366182edd993f7de9ebad8612f29dd6..fbadeec8d06bf69e872d261447efd52ab770e6e5 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h -@@ -14,6 +14,7 @@ - #include "build/build_config.h" - #include "components/viz/common/vertical_scroll_direction.h" - #include "content/common/content_export.h" -+#include "content/common/cursors/webcursor.h" - #include "content/public/common/drop_data.h" - #include "services/metrics/public/cpp/ukm_recorder.h" - #include "third_party/abseil-cpp/absl/types/optional.h" +@@ -21,6 +21,7 @@ + #include "third_party/blink/public/common/page/drag_operation.h" + #include "third_party/blink/public/mojom/frame/lifecycle.mojom.h" + #include "third_party/blink/public/mojom/manifest/display_mode.mojom.h" ++#include "ui/base/cursor/cursor.h" + #include "ui/gfx/native_widget_types.h" + + namespace blink { @@ -257,6 +258,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { // Returns the associated RenderViewHostDelegateView*, if possible. virtual RenderViewHostDelegateView* GetDelegateView(); + // Notify the delegate of the RenderWidget's changing cursor. -+ virtual void OnCursorChanged(const WebCursor& cursor) {} ++ virtual void OnCursorChanged(const ui::Cursor& cursor) {} + // Returns true if the provided RenderWidgetHostImpl matches the current // 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 e89237f4efe157298cffa8d7baaff4008d438f2d..67a54f4ee4c370bf0d1530fb5b0fc69e4ac148c9 100644 +index f49cf68e4b5be592000b193a3b1fae18e0bd41dc..06f9fd63819afb96cad0569abeb07410ca200024 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2077,6 +2077,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -2050,6 +2050,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) - view_->UpdateCursor(WebCursor(cursor)); + view_->UpdateCursor(cursor); + if (delegate_) -+ delegate_->OnCursorChanged(WebCursor(cursor)); ++ delegate_->OnCursorChanged(cursor); } void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index ebb60f0c70f309f753682cf32049a5683541f26a..edfa75775225bf877d10df4ac867064f8d73d007 100644 +index 03082815e5c4de60da566176af10bc972cff0072..465dcd8c19fff3f435ed1286a9932a484b7d7d4e 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4713,6 +4713,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4711,6 +4711,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } -+void WebContentsImpl::OnCursorChanged(const WebCursor& cursor) { ++void WebContentsImpl::OnCursorChanged(const ui::Cursor& cursor) { + observers_.NotifyObservers(&WebContentsObserver::OnCursorChanged, + cursor); +} @@ -59,35 +59,35 @@ index ebb60f0c70f309f753682cf32049a5683541f26a..edfa75775225bf877d10df4ac867064f 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 3f0ecf8749e44638f27ae6a5484fed7fac1c808b..52e3c3774d1c4258af44596716df2932d4d8d178 100644 +index ae95a44450f4942cd463cfbcc3b90123796cdf3e..ef8ac6dca3a43cfa5a58f10b3860987bb01eec2b 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -968,6 +968,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -957,6 +957,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; -+ void OnCursorChanged(const WebCursor& cursor) override; ++ void OnCursorChanged(const ui::Cursor& cursor) override; bool IsWidgetForPrimaryMainFrame( RenderWidgetHostImpl* render_widget_host) override; bool IsShowingContextMenuOnPage() const override; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h -index d89d18e8d2509629c0d43c199c9a4ae3a302c062..283a8f88eb46fa75dc4e5ddd396b79cb3d936259 100644 +index d89d18e8d2509629c0d43c199c9a4ae3a302c062..82d6e6f97830282a89d5bbfa55a9b2d950e00fbc 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h -@@ -13,6 +13,7 @@ - #include "base/threading/thread_restrictions.h" - #include "components/viz/common/vertical_scroll_direction.h" - #include "content/common/content_export.h" -+#include "content/common/cursors/webcursor.h" - #include "content/public/browser/allow_service_worker_result.h" - #include "content/public/browser/reload_type.h" - #include "content/public/browser/render_frame_host.h" +@@ -30,6 +30,7 @@ + #include "third_party/blink/public/mojom/loader/resource_load_info.mojom-forward.h" + #include "third_party/blink/public/mojom/media/capture_handle_config.mojom-forward.h" + #include "third_party/skia/include/core/SkColor.h" ++#include "ui/base/cursor/cursor.h" + #include "ui/base/page_transition_types.h" + #include "ui/base/window_open_disposition.h" + @@ -546,6 +547,9 @@ class CONTENT_EXPORT WebContentsObserver { // Invoked when the primary main frame changes size. virtual void PrimaryMainFrameWasResized(bool width_changed) {} + // Invoked every time the RenderWidget's cursor changes. -+ virtual void OnCursorChanged(const WebCursor& cursor) {} ++ virtual void OnCursorChanged(const ui::Cursor& cursor) {} + // Invoked when the given frame changes its window.name property. virtual void FrameNameChanged(RenderFrameHost* render_frame_host, diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index eb611d562a4..17d37e71a49 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,10 +6,10 @@ 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 0433b7653ccb10098f967232afe92305c5f68084..c1fe370a5905cc44b90e83c2ab5458e4cd3219f6 100644 +index 9a942b2b4dd39dc969803f7c5f20e343200b43cf..7fe07c3c491c998730770cdd72ca283fca589103 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -707,6 +707,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -699,6 +699,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 0433b7653ccb10098f967232afe92305c5f68084..c1fe370a5905cc44b90e83c2ab5458e4 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 75293ead16466e3e43ed9564a2309df385339d60..f94f50a9ecf885d28b4e1c61fe49eedc6e0bd077 100644 +index 1425fc2e82e485f6f31eb9ffba3bda30a8568b5c..5d5ffb5f5b9e84734e3173c61ba8c9ecb17f433b 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 @@ @@ -48,16 +48,7 @@ index 75293ead16466e3e43ed9564a2309df385339d60..f94f50a9ecf885d28b4e1c61fe49eedc namespace ui { class Compositor; -@@ -62,7 +65,7 @@ enum class DomCode; - class LatencyInfo; - class TouchEvent; - struct DidOverscrollParams; --} -+} // namespace ui - - namespace content { - -@@ -70,9 +73,11 @@ class CursorManager; +@@ -71,9 +74,11 @@ class CursorManager; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -66,10 +57,10 @@ index 75293ead16466e3e43ed9564a2309df385339d60..f94f50a9ecf885d28b4e1c61fe49eedc class TextInputManager; class TouchSelectionControllerClientManager; +class WebContentsView; - class WebCursor; class WebContentsAccessibility; class DelegatedFrameHost; -@@ -149,6 +154,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { + +@@ -148,6 +153,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Rect& keyboard_rect) override {} bool IsHTMLFormPopup() const override; @@ -79,7 +70,7 @@ index 75293ead16466e3e43ed9564a2309df385339d60..f94f50a9ecf885d28b4e1c61fe49eedc // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -317,6 +325,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -316,6 +324,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, const ui::LatencyInfo& latency); diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 53561e4ab6c..327d5163435 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`. Additionally, disables usage of some private APIs in MAS builds. diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 6932b01bf1c7e4d1801f02bb47d2583f7b3bc19c..1569e6c0dd05b9e406068dcc614074fd44f4fbe6 100644 +index 9235ef0202972569b4c5b2e5f2e0469e29df8992..306b05fe54b6baf43d4adbe8b1e0c6f69b2bcfd4 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm @@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string, @@ -61,7 +61,7 @@ index 6932b01bf1c7e4d1801f02bb47d2583f7b3bc19c..1569e6c0dd05b9e406068dcc614074fd // We only handle key down events and just simply forward other events. if (eventType != NSEventTypeKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1823,9 +1843,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1806,9 +1826,11 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -73,7 +73,7 @@ index 6932b01bf1c7e4d1801f02bb47d2583f7b3bc19c..1569e6c0dd05b9e406068dcc614074fd - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1834,7 +1856,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1817,7 +1839,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index c04fcf52c4a..06b81f345bb 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 e08a3829477aae7d0ee5f747723ba670b2fb370f..810a07499722f73e4776b09e8f8a028945507645 100644 +index cfe599398a92ad8954c102f3ba9644436f4e9791..8f003ac2da1e49bc2bbf3a7cce1a648980e325c1 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1545,7 +1545,7 @@ if (is_chrome_branded && !is_android) { +@@ -1555,7 +1555,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index e08a3829477aae7d0ee5f747723ba670b2fb370f..810a07499722f73e4776b09e8f8a0289 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1574,6 +1574,12 @@ if (!is_android) { +@@ -1584,6 +1584,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch b/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch index a121aeff710..6b9644bae3f 100644 --- a/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch +++ b/patches/chromium/revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch @@ -10,7 +10,7 @@ can be reverted when those failures are addressed. It's unlikely that this patch will be upstreamed. diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc -index 01abaf8086c8a0eee581516ce1b9c5748f41d1e8..a1798e40df8797f56d4113de84e3e9ab252b9b7c 100644 +index 87944ed0b4a51498e0c3e2da7fee2b6b0ed4768b..8ba3141b7bd18a073f71db6047ffd064f102cf02 100644 --- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc +++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc @@ -293,26 +293,7 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) { diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index ef31afcc8c6..8ca070c2201 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch Patch to make scrollBounce option work. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index 1ab2dbae16a7d0bd3a0410baa666e0a64d58ecc5..a14f06e4ae45291eb17ad4fbe0111e39149f07d6 100644 +index 2fb8a5e9b9f185fa7ebc5cb3ddb28ec96517276c..98ee9b41922ff064a26deb38f911dc1a931b90ec 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1336,7 +1336,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1334,7 +1334,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch index 2634a5588a1..e9cb3ce1f94 100644 --- a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -15,7 +15,7 @@ short-circuit all the permissions checks in MSDC for now to allow us to unduplicate this code. diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc -index 7dbbcc13901dcd8b7a9ca9c9bdce4f924c1c6a55..f4def7e347aafe30485fd1e6055c97d471b44776 100644 +index 9cec3223124ce856ab8bbe95d2fdf5c1f08bed06..f2c6f3dea44084d6de1a79776707c9e020904586 100644 --- a/components/webrtc/media_stream_devices_controller.cc +++ b/components/webrtc/media_stream_devices_controller.cc @@ -56,7 +56,8 @@ bool PermissionIsRequested(blink::PermissionType permission, @@ -86,7 +86,7 @@ index 7dbbcc13901dcd8b7a9ca9c9bdce4f924c1c6a55..f4def7e347aafe30485fd1e6055c97d4 } diff --git a/components/webrtc/media_stream_devices_controller.h b/components/webrtc/media_stream_devices_controller.h -index b9cf3f6ad047fa16594393134eae5fc5349e7430..5de5e0bf9b455872f69de47d58dda929f00df12c 100644 +index b4258f59081c5d99b9c3edf02ca538499a5a435e..3bb6ac4e27fb39283d71a46dd3af7b9f7258d1e2 100644 --- a/components/webrtc/media_stream_devices_controller.h +++ b/components/webrtc/media_stream_devices_controller.h @@ -48,7 +48,8 @@ class MediaStreamDevicesController { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 42c484a403e..72af31d1ff1 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,15 +22,15 @@ 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 44d5616a627d34576cd70eac6dee664a1da25341..0602a370d017a0b82b9056fb53341a30becb7b58 100644 +index 200131d89e8616054c321841b4b27fbee67b5d88..31678701d6ee0aefdb86c046178abdf11277de3d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1793,9 +1793,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1800,9 +1800,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); +#else -+#if BUILDFLAG(USE_ZYGOTE_HANDLE) ++#if BUILDFLAG(USE_ZYGOTE) + bool use_zygote = !cmd_line->HasSwitch(switches::kNoZygote); + std::unique_ptr sandbox_delegate = + std::make_unique(use_zygote); @@ -42,13 +42,13 @@ index 44d5616a627d34576cd70eac6dee664a1da25341..0602a370d017a0b82b9056fb53341a30 auto file_data = std::make_unique(); diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc -index 099ded6131be193050c16d4c0b520810256116bd..52061527afcf99d0af3fd76b25f208928a36491f 100644 +index 83f3f0d60d9832112f50fbd4ef9fff98ef09d7c4..3ab11ff1a934192d439db7d2102248fa73b47183 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc @@ -33,6 +33,9 @@ namespace content { - #if BUILDFLAG(USE_ZYGOTE_HANDLE) - ZygoteHandle RendererSandboxedProcessLauncherDelegate::GetZygote() { + #if BUILDFLAG(USE_ZYGOTE) + ZygoteCommunication* RendererSandboxedProcessLauncherDelegate::GetZygote() { + if (!use_zygote_) { + return nullptr; + } @@ -59,35 +59,35 @@ index 099ded6131be193050c16d4c0b520810256116bd..52061527afcf99d0af3fd76b25f20892 GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()), renderer_app_container_disabled_( GetContentClient()->browser()->IsRendererAppContainerDisabled()) { -+#if BUILDFLAG(USE_ZYGOTE_HANDLE) ++#if BUILDFLAG(USE_ZYGOTE) + use_zygote_ = !cmd_line->HasSwitch(switches::kNoZygote); +#endif if (is_jit_disabled) { dynamic_code_can_be_disabled_ = true; return; diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h -index 736b46ec59d495c9e5639fa53d2d76e8510d091c..bc37668adab98027d61f684c95b81d8c1dc893cd 100644 +index 8f6531e5aa2ce7f9faf4c6b24652366fe74941b1..9377b8aefbf3c67ce6a24f0804e913069c0594d2 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h @@ -18,6 +18,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate public: RendererSandboxedProcessLauncherDelegate() = default; -+#if BUILDFLAG(USE_ZYGOTE_HANDLE) ++#if BUILDFLAG(USE_ZYGOTE) + RendererSandboxedProcessLauncherDelegate(bool use_zygote): + use_zygote_(use_zygote) {} +#endif + ~RendererSandboxedProcessLauncherDelegate() override = default; - #if BUILDFLAG(USE_ZYGOTE_HANDLE) + #if BUILDFLAG(USE_ZYGOTE) @@ -29,6 +34,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate #endif // BUILDFLAG(IS_MAC) sandbox::mojom::Sandbox GetSandboxType() override; + + private: -+#if BUILDFLAG(USE_ZYGOTE_HANDLE) ++#if BUILDFLAG(USE_ZYGOTE) + bool use_zygote_ = true; +#endif }; diff --git a/patches/chromium/sysroot.patch b/patches/chromium/sysroot.patch index a9874103810..4debb1ac9af 100644 --- a/patches/chromium/sysroot.patch +++ b/patches/chromium/sysroot.patch @@ -7,10 +7,10 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds, which include extra deps that Electron needs (e.g. libnotify) diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py -index d7e36862f48e8a2e3dff406f1183df26ca1ef700..e702004c4bc8afbad0ba42fe45511d30dc445f6e 100755 +index 42842a184deb12b55c88b82134ef29f0d10c1a18..4dca0c2b63425b1592d0ee48b721402b8bebe347 100755 --- a/build/linux/sysroot_scripts/install-sysroot.py +++ b/build/linux/sysroot_scripts/install-sysroot.py -@@ -41,9 +41,11 @@ except ImportError: +@@ -40,9 +40,11 @@ except ImportError: from urllib2 import urlopen SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -24,7 +24,7 @@ index d7e36862f48e8a2e3dff406f1183df26ca1ef700..e702004c4bc8afbad0ba42fe45511d30 VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el') -@@ -107,7 +109,7 @@ def GetSysrootDict(target_platform, target_arch): +@@ -106,7 +108,7 @@ def GetSysrootDict(target_platform, target_arch): if target_arch not in VALID_ARCHS: raise Error('Unknown architecture: %s' % target_arch) diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index c76fa7d8d37..f435f023d3c 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,19 +6,19 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch Unsandboxed ppapi processes should skip zygote. diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -index 8e76a4a70717acd834db8900b36c42369151543b..d3a64a9aecee3e4e8a9be0cfa226cecd0d5cf583 100644 +index 971044297de82aa6f79714481eaf713485d8a636..d46528d14a13308866e1f91b6d36f0f8aedf016d 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -@@ -8,6 +8,7 @@ +@@ -10,6 +10,7 @@ #include "build/build_config.h" #include "content/public/common/content_switches.h" #include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" #if BUILDFLAG(IS_WIN) - #include "base/win/windows_version.h" -@@ -69,6 +70,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( - ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { + #include "sandbox/policy/features.h" +@@ -68,6 +69,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( + ZygoteCommunication* PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); + if (browser_command_line.HasSwitch(sandbox::policy::switches::kNoSandbox)) { diff --git a/patches/chromium/upload_list_add_loadsync_method.patch b/patches/chromium/upload_list_add_loadsync_method.patch index 28fd0e2d9c7..e34c04c06ee 100644 --- a/patches/chromium/upload_list_add_loadsync_method.patch +++ b/patches/chromium/upload_list_add_loadsync_method.patch @@ -9,7 +9,7 @@ deprecated, and this API should be removed once the deprecated behavior is no longer supported. diff --git a/components/upload_list/upload_list.cc b/components/upload_list/upload_list.cc -index da283af7c483beae96a0afde494ce24628e909c8..75fb0d0b019979186f9f6b34b72d96d39eb146f0 100644 +index bc1432727df939385fbf58f4f427ff470c2c8361..7edf9e3f7140d387c7ce07531fb3b48f9014076c 100644 --- a/components/upload_list/upload_list.cc +++ b/components/upload_list/upload_list.cc @@ -72,6 +72,10 @@ void UploadList::Load(base::OnceClosure callback) { @@ -24,7 +24,7 @@ index da283af7c483beae96a0afde494ce24628e909c8..75fb0d0b019979186f9f6b34b72d96d3 const base::Time& end, base::OnceClosure callback) { diff --git a/components/upload_list/upload_list.h b/components/upload_list/upload_list.h -index 9acfd8190484637630486bfdc654d25ff6a371b0..b9025804deca8c90969120ba05faa69110eef1d2 100644 +index 34aeeabde40111897b3e300861a0967a31887e3f..450c373f7d69986037fbd77bf9b1bcec88cdc5b3 100644 --- a/components/upload_list/upload_list.h +++ b/components/upload_list/upload_list.h @@ -77,6 +77,8 @@ class UploadList : public base::RefCountedThreadSafe { diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index e8d814a7465..109bb2875c0 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,10 +9,10 @@ is needed for OSR. Originally landed in https://github.com/electron/libchromiumcontent/pull/226. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index ee65f87d7ba7e11dc75fbf1acd1ae2b813d3c5f8..88b2d2e576c5e0bbc89b69e8dcdb2e9fdca01add 100644 +index 6fbf7fc57e7188d4fc323e0276a85a58c3d9cbc4..2e3b9ebd5be217eb892fea1cce09afee4d05f2e3 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3164,6 +3164,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3167,6 +3167,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, params.main_frame_name, GetOpener(), primary_main_frame_policy, base::UnguessableToken::Create()); @@ -26,7 +26,7 @@ index ee65f87d7ba7e11dc75fbf1acd1ae2b813d3c5f8..88b2d2e576c5e0bbc89b69e8dcdb2e9f std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3174,6 +3181,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3177,6 +3184,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,10 +35,10 @@ index ee65f87d7ba7e11dc75fbf1acd1ae2b813d3c5f8..88b2d2e576c5e0bbc89b69e8dcdb2e9f CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 1fd156150b6b54379a672329df38b28e6af3a37a..5c46cfe48858238803a58210fd1aa1fc65c6927b 100644 +index 54c0a5f2c347af943f4720953889a10909f5d248..b32c7c02d85794f684ccbe0a7a6c9cf1aee695e9 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -95,10 +95,13 @@ class BrowserContext; +@@ -94,10 +94,13 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -52,7 +52,7 @@ index 1fd156150b6b54379a672329df38b28e6af3a37a..5c46cfe48858238803a58210fd1aa1fc class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -241,6 +244,10 @@ class WebContents : public PageNavigator, +@@ -240,6 +243,10 @@ class WebContents : public PageNavigator, network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 45fd6ef072d..af2b83bbcca 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,7 +8,7 @@ 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 67dcac149803694ef13ab471ce9b84eb7e9c07ec..35ca1d706a4e29e8533e0c962f4459e1076d9964 100644 +index 78ce9650aad29217d786e55a93ffd4c26e10d3a4..812777a6bd88a50bb90a7f5a6bf3c061284e1380 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -919,10 +919,7 @@ bool WebContentsViewAura::IsValidDragTarget( @@ -24,7 +24,7 @@ index 67dcac149803694ef13ab471ce9b84eb7e9c07ec..35ca1d706a4e29e8533e0c962f4459e1 //////////////////////////////////////////////////////////////////////////////// diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm -index 3c6b5411341ccf415f6c0becee92127481286c6c..ecc667cd991beb06b30dc5963d6a6439f6f69e24 100644 +index 1af80994a4a64cce27dfc8a46e6cb68bbbd51b1b..a2f1aa2f1a9792bb6978173c30cc2b9bb18108ab 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -389,9 +389,7 @@ - (void)resetDragStartTrackers { diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 89e045f0526..fa82e0181ca 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,10 +14,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 87ddba88f50141bd957156f118a70167576f79ee..a334904f20849a1c13a8f72186fa126a08151cc9 100644 +index 080c99e23a4a81a4ddbf8a7689c8c10b66f9e039..000a22639c2e3f9ef29a0be31d60756295e71fe9 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6565,6 +6565,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6726,6 +6726,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index c03d38e3ec1..f09009e683f 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,7 +10,7 @@ An attempt to upstream this was made, but rejected: https://chromium-review.googlesource.com/c/chromium/src/+/1954347 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 09846e00f1a75b54ddfe9434521add4ce3b20e97..25b01a54932108c5a888607e19d76f2301e05b76 100644 +index 77f2c4fbf8c886c5c622f41d0b9da67d09b7d331..7aa2059f33dfa92828beec95f4716775e7291fed 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -373,6 +373,11 @@ class CONTENT_EXPORT ContentRendererClient { @@ -26,10 +26,10 @@ index 09846e00f1a75b54ddfe9434521add4ce3b20e97..25b01a54932108c5a888607e19d76f23 // 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 c31323121b8feeaa24b984042cc891778b4f3635..bb76dd7b61619d6d5be5ac8bbf5dad7e88274ffb 100644 +index a0811daead7bc6b44f8ad7210bc5dcd89c92c592..0b9e29a204f6b06e064452bc70c688e8e1f651fa 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -879,6 +879,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -856,6 +856,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index c31323121b8feeaa24b984042cc891778b4f3635..bb76dd7b61619d6d5be5ac8bbf5dad7e const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 3ae765eea4b8f903ada141c17e22bd1cae377e67..7f42a38482248fd87f66ad04051250ab975ebcfa 100644 +index f9b61ff32e3e76e73e82b5785521160c413c4dd5..64b38b09c9c6f0a67fe78fa80e621f3c5c8340f0 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -184,6 +184,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -182,6 +182,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -55,10 +55,10 @@ index 3ae765eea4b8f903ada141c17e22bd1cae377e67..7f42a38482248fd87f66ad04051250ab const blink::WebSecurityOrigin& script_origin) override; blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel() diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index a2a4996e3cbe326d92319b0f9fd383e5e543a2fe..59c70b9f82b338bd782ea9b6dd7e90180922d4a6 100644 +index b2de9ae25b7acfae950a68e77b0f85fa619d6fc9..375442953c6284d8b5936d3554a1eb5892e42cdb 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -651,6 +651,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -646,6 +646,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index a2a4996e3cbe326d92319b0f9fd383e5e543a2fe..59c70b9f82b338bd782ea9b6dd7e9018 const WebSecurityOrigin& script_origin) { return false; diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc -index 3282f6ea03bce5f3d670ab7c63b0078dbb7b0aff..01812866abf766ac1eb28d0c5aef5dc0a2b6b4c7 100644 +index 26406732de36f38635ba19e7db6f7a9e7a4e946f..995f304bcfebb734c30c1230e96a4014a78b345f 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -748,6 +748,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -749,6 +749,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { } pause_handle_.reset(); 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 248a7a94a38..fc0c267bd13 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 @@ -19,7 +19,7 @@ that clearly establishes the worker script is ready for evaluation with the scop initialized. diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 25b01a54932108c5a888607e19d76f2301e05b76..209b0a947d16118f1922be7063c0862e0feeb061 100644 +index 7aa2059f33dfa92828beec95f4716775e7291fed..df919b894d4f29274696806444d034d4fefb7ff9 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -373,6 +373,11 @@ class CONTENT_EXPORT ContentRendererClient { @@ -35,10 +35,10 @@ index 25b01a54932108c5a888607e19d76f2301e05b76..209b0a947d16118f1922be7063c0862e // 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 bb76dd7b61619d6d5be5ac8bbf5dad7e88274ffb..c2a082338c2d8243a5f053c49225c32accd26f8a 100644 +index 0b9e29a204f6b06e064452bc70c688e8e1f651fa..03463a737df6f168dd873a156ceecf478d124241 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -891,6 +891,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -868,6 +868,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index bb76dd7b61619d6d5be5ac8bbf5dad7e88274ffb..c2a082338c2d8243a5f053c49225c32a const blink::WebSecurityOrigin& script_origin) { return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 7f42a38482248fd87f66ad04051250ab975ebcfa..2df64bdb8cad8fdb3766975d18f95edc16676025 100644 +index 64b38b09c9c6f0a67fe78fa80e621f3c5c8340f0..018c8a69e79c69374f25db973ea61f60bdd9dfae 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -184,6 +184,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -182,6 +182,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -65,10 +65,10 @@ index 7f42a38482248fd87f66ad04051250ab975ebcfa..2df64bdb8cad8fdb3766975d18f95edc bool AllowScriptExtensionForServiceWorker( const blink::WebSecurityOrigin& script_origin) override; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 59c70b9f82b338bd782ea9b6dd7e90180922d4a6..ffc5abfd60c32c64892077f0fb869a28e5aa195b 100644 +index 375442953c6284d8b5936d3554a1eb5892e42cdb..d5be14053c68a37033a5648bc0bf5fdf00e396ad 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -651,6 +651,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -646,6 +646,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& 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 aef3e5eb736..c3101e0c04c 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 b22591ee606ef449817aef1f9bd5ff0c024d1c05..a14c0e0a381ae838d44d4c7f2cc252c2 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 8cefe7e1b0cd298ce52ea06186b43f3412115a4f..c03f52d42aef6e094a922d342276439f8628ff42 100644 +index 660dde0a60378278f43040ab1bf3f279ffa85349..dd165e9edca8b217977e6f326d2be288026a0d7d 100644 --- a/front_end/ui/legacy/BUILD.gn +++ b/front_end/ui/legacy/BUILD.gn -@@ -181,5 +181,6 @@ devtools_entrypoint("legacy") { +@@ -182,5 +182,6 @@ devtools_entrypoint("legacy") { visibility = [ "../..:legacy_entrypoints", "../../legacy_test_runner/*", diff --git a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch index c33d26e0fbf..45936a62921 100644 --- a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch +++ b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch @@ -308,6 +308,18 @@ index 28eb1bd6b7dc839fa6aefebe5813343c8e9444bb..1fe573cd7b6894743a0986e87802960a } } // namespace +diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h +index 716b40be50cdc2ebbd249e5a9d562385169f77ad..43247cf3d70b78a1e332d55336c2a5175a155e93 100644 +--- a/src/crypto/crypto_util.h ++++ b/src/crypto/crypto_util.h +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/src/node_metadata.cc b/src/node_metadata.cc index d4c8ccde21d3973f3099ee3075dc3c11d55cb514..d57435a73e17c21dad2a7c8fb2c6e8a356630d88 100644 --- a/src/node_metadata.cc diff --git a/patches/node/support_v8_sandboxed_pointers.patch b/patches/node/support_v8_sandboxed_pointers.patch index d3da23d7a49..e91b52ef007 100644 --- a/patches/node/support_v8_sandboxed_pointers.patch +++ b/patches/node/support_v8_sandboxed_pointers.patch @@ -105,10 +105,10 @@ index 1fe573cd7b6894743a0986e87802960ad09e2dd9..ff1346f65f3c280da9962df87eb0710a void SecureHeapUsed(const FunctionCallbackInfo& args) { #ifndef OPENSSL_IS_BORINGSSL diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h -index 716b40be50cdc2ebbd249e5a9d562385169f77ad..271b8b9c0e4b2b613fdc82c4ed0e7bc7cb9bba4f 100644 +index 43247cf3d70b78a1e332d55336c2a5175a155e93..b9066b4b0fb9a529c4cbf774e5aacfd8a7aa99c8 100644 --- a/src/crypto/crypto_util.h +++ b/src/crypto/crypto_util.h -@@ -279,7 +279,7 @@ class ByteSource { +@@ -280,7 +280,7 @@ class ByteSource { // Creates a v8::BackingStore that takes over responsibility for // any allocated data. The ByteSource will be reset with size = 0 // after being called. diff --git a/patches/v8/.patches b/patches/v8/.patches index d9b32bf9556..55e51988893 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -10,3 +10,4 @@ revert_runtime_dhceck_terminating_exception_in_microtasks.patch chore_disable_is_execution_terminating_dcheck.patch force_cppheapcreateparams_to_be_noncopyable.patch chore_allow_customizing_microtask_policy_per_context.patch +disable_the_use_of_preserve_most_on_arm64_windows.patch diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 97a4ec883bc..0286a059682 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 9beefd69669aec5a1ce261101e3cdee782682d22..08177df285fbe928690a4906af4b129f9d473875 100644 +index e1f23f17969f90df9becdcf7c0015b27cd973b4a..e689a0b35a0011ba14a94c3ab749043cddf93fb9 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -667,7 +667,7 @@ config("internal_config") { +@@ -674,7 +674,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index 9beefd69669aec5a1ce261101e3cdee782682d22..08177df285fbe928690a4906af4b129f defines += [ "BUILDING_V8_SHARED" ] } -@@ -6242,7 +6242,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6320,7 +6320,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 886dabe7557..7a9175bd2a7 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index de12398f3918bd00e6001ac0ef120011cce5937d..e5243ab4068481d542b3796901f4c5bf621df046 100644 +index 81c7d1e3f9b29a82224a21abf6b2574e3547c564..9199619c4752e95eb42e11704531de8872f5c0e4 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9496,7 +9496,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9522,7 +9522,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { diff --git a/patches/v8/disable_the_use_of_preserve_most_on_arm64_windows.patch b/patches/v8/disable_the_use_of_preserve_most_on_arm64_windows.patch new file mode 100644 index 00000000000..8b34dd70da7 --- /dev/null +++ b/patches/v8/disable_the_use_of_preserve_most_on_arm64_windows.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Clemens Backes +Date: Thu, 2 Feb 2023 14:38:14 +0100 +Subject: Disable the use of preserve_most on arm64 Windows + +We see crashes on arm64 on Windows. Disable the use of preserve_most +there, until we figure out (and fix) the root cause. + +R=mlippautz@chromium.org + +Bug: chromium:1409934 +Change-Id: Ic913039d36d158fb5ad368915d95c250d8724a07 +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218354 +Commit-Queue: Clemens Backes +Reviewed-by: Michael Lippautz +Cr-Commit-Position: refs/heads/main@{#85634} +(cherry picked from commit e33c3a09b31af5b69286f904a378fcbfb36a726d) + +diff --git a/include/v8config.h b/include/v8config.h +index fd762d87f5ebd32ccb23ff0c6383a37a5093ac78..6cffeaa5ad21826123c8dda487fc6c65b7d03ed2 100644 +--- a/include/v8config.h ++++ b/include/v8config.h +@@ -346,12 +346,15 @@ path. Add it with -I to the command line + # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull)) + # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline)) + # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused)) +-// Support for the "preserve_most" attribute is incomplete on 32-bit, and we see +-// failures in component builds. Thus only use it in 64-bit non-component builds +-// for now. +-#if (defined(_M_X64) || defined(__x86_64__) || defined(__AARCH64EL__) || \ +- defined(_M_ARM64)) /* x64 or arm64 */ \ +- && !defined(COMPONENT_BUILD) ++// Support for the "preserve_most" attribute is limited: ++// - 32-bit platforms do not implement it, ++// - component builds fail because _dl_runtime_resolve clobbers registers, ++// - we see crashes on arm64 on Windows (https://crbug.com/1409934), which can ++// hopefully be fixed in the future. ++#if (defined(_M_X64) || defined(__x86_64__) /* x64 (everywhere) */ \ ++ || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */ \ ++ && !defined(_WIN32))) /* not on windows */ \ ++ && !defined(COMPONENT_BUILD) /* no component build */ + # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most)) + #endif + # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility)) 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 9748a53b241..873802cd818 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 a81d64a635b1a0d5ef64d9ce490705fada10fdad..8a264b9c5ee80840bc2dee3ea3e28ef628cfc6c0 100644 +index de5bb0c5e7c9cd85211eeb073b828b793c8f49b3..9a3f28419a52b3c8433ca024d94b7a9445efdedb 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -667,6 +667,10 @@ config("internal_config") { +@@ -674,6 +674,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index 1f926346f12..f8f8b4c2108 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index 3e99ae6fec8ced55ca416afac595ffb72f2af2fb..4335c33c65574f1259827fd666ad1fdc8eb1e252 100644 +index 85e1c6012a04414123cf9e4c30af20bd87764921..0ffa0002bd853a771f113a13936ec6d22baac6d8 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -972,7 +972,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -973,7 +973,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; // Utility superclass for stack-allocated objects that must be updated // on gc. It provides two ways for the gc to update instances, either // iterating or updating after gc. diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index e051fa5835d..e0e2eb64a67 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index 08177df285fbe928690a4906af4b129f9d473875..a81d64a635b1a0d5ef64d9ce490705fada10fdad 100644 +index e689a0b35a0011ba14a94c3ab749043cddf93fb9..de5bb0c5e7c9cd85211eeb073b828b793c8f49b3 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -6254,7 +6254,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6332,7 +6332,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index 8de1f17bfc7..9aa4012938b 100644 --- a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -6,11 +6,11 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index c79cd04e0f16bcc2bb6e351f54d4d21139645ce8..900bf18ecec88d6482b0291019bdc01f6934a000 100644 +index a967d92c39c1518831f60eeb443409e5284bba6c..fd762d87f5ebd32ccb23ff0c6383a37a5093ac78 100644 --- a/include/v8config.h +++ b/include/v8config.h -@@ -503,10 +503,13 @@ path. Add it with -I to the command line - # define V8_NOINLINE /* NOT SUPPORTED */ +@@ -526,10 +526,13 @@ path. Add it with -I to the command line + # define V8_PRESERVE_MOST /* NOT SUPPORTED */ #endif - @@ -25,7 +25,7 @@ index c79cd04e0f16bcc2bb6e351f54d4d21139645ce8..900bf18ecec88d6482b0291019bdc01f #else # define V8_DEPRECATED(message) #endif -@@ -514,7 +517,11 @@ path. Add it with -I to the command line +@@ -537,7 +540,11 @@ path. Add it with -I to the command line // A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated. #if defined(V8_IMMINENT_DEPRECATION_WARNINGS) @@ -38,7 +38,7 @@ index c79cd04e0f16bcc2bb6e351f54d4d21139645ce8..900bf18ecec88d6482b0291019bdc01f #else # define V8_DEPRECATE_SOON(message) #endif -@@ -548,7 +555,7 @@ path. Add it with -I to the command line +@@ -571,7 +578,7 @@ path. Add it with -I to the command line END_ALLOW_USE_DEPRECATED() diff --git a/patches/v8/force_cppheapcreateparams_to_be_noncopyable.patch b/patches/v8/force_cppheapcreateparams_to_be_noncopyable.patch index ff7f507f324..aa42d081b20 100644 --- a/patches/v8/force_cppheapcreateparams_to_be_noncopyable.patch +++ b/patches/v8/force_cppheapcreateparams_to_be_noncopyable.patch @@ -14,7 +14,7 @@ If Electron compiles on Windows without this patch then it's no longer needed. diff --git a/include/v8-cppgc.h b/include/v8-cppgc.h -index 139af8fdac26c3f829886aedc18af1592a4de7ef..b361aa912c74233d2fb6feb0b00e45c1c1697496 100644 +index 4a457027c9f76b5d75f8f693ebe31fd616134849..16548d3053563d2a5891fb8967a2b63a1f920f95 100644 --- a/include/v8-cppgc.h +++ b/include/v8-cppgc.h @@ -76,6 +76,12 @@ struct WrapperDescriptor final { @@ -28,9 +28,9 @@ index 139af8fdac26c3f829886aedc18af1592a4de7ef..b361aa912c74233d2fb6feb0b00e45c1 +}; + struct V8_EXPORT CppHeapCreateParams { - std::vector> custom_spaces; - WrapperDescriptor wrapper_descriptor; -@@ -91,6 +97,7 @@ struct V8_EXPORT CppHeapCreateParams { + CppHeapCreateParams( + std::vector> custom_spaces, +@@ -100,6 +106,7 @@ struct V8_EXPORT CppHeapCreateParams { */ cppgc::Heap::SweepingType sweeping_support = cppgc::Heap::SweepingType::kIncrementalAndConcurrent; diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch index 63bf896a2fd..f48f9e576e7 100644 --- a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -18,10 +18,10 @@ index f58636fee555d782e18b7521c0c4f28ed60b3a52..6b0c63b34ff09f70cb9a4fe419f3b9bb StoreRoot(RootIndex::kCurrentMicrotask, microtask); TNode saved_entered_context_count = GetEnteredContextCount(); diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc -index 4a505cdcb882855f7467cf8f9e6e651d461b8125..dd51b8974fcd1359aab5521e3066efc9a27176d6 100644 +index 7d47afa2c92c1da43657702d5a85251646d680fd..10c3ec8387522ce2e35b77a7e6eb04de22597349 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc -@@ -6409,12 +6409,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { +@@ -6417,12 +6417,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { StoreFullTaggedNoWriteBarrier(pending_message, message); } @@ -35,10 +35,10 @@ index 4a505cdcb882855f7467cf8f9e6e651d461b8125..dd51b8974fcd1359aab5521e3066efc9 int type) { return Word32Equal(instance_type, Int32Constant(type)); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h -index 78689c08358d0fa5b5c058a131e6047794a86608..2ac85004fb568f48bedec5afae1ca1ab38a27727 100644 +index fdd6da601705f72bd5d1a9101171048bdf408b9d..496c73225f8641e78793ba74d80e2e8b1e3f5c02 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h -@@ -2582,7 +2582,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler +@@ -2550,7 +2550,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler TNode GetPendingMessage(); void SetPendingMessage(TNode message); diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index 923034eed9c..7220d970629 100644 --- a/patches/v8/workaround_an_undefined_symbol_error.patch +++ b/patches/v8/workaround_an_undefined_symbol_error.patch @@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file, this error no longer seems to happen. diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc -index e3ca3f9535c23a0182e84abac97b67f699151509..e7c24033ab388f31c753ac891468233823650ded 100644 +index 1110345f6b1aa8dff61512d211191e3389acb51b..f85fb8b4cc34eec9444743851d8714b10f277f3d 100644 --- a/src/codegen/arm64/assembler-arm64.cc +++ b/src/codegen/arm64/assembler-arm64.cc -@@ -3616,6 +3616,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, +@@ -3620,6 +3620,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, ImmMoveWide(static_cast(imm)) | ShiftMoveWide(shift)); } @@ -39,10 +39,10 @@ index e3ca3f9535c23a0182e84abac97b67f699151509..e7c24033ab388f31c753ac8914682338 const Operand& operand, FlagsUpdate S, AddSubOp op) { DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits()); diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h -index 1377e68ec9dda7e94bce532aee6feebda5e72e14..8b8ff183495fce2d9eeafed215031fb828521b7f 100644 +index ea079a9d6af6dca46f66004d4399f49e6e8fe6d5..4b9d3a8533910bbdbd8c7b073739dbb5699ab6e8 100644 --- a/src/codegen/arm64/assembler-arm64.h +++ b/src/codegen/arm64/assembler-arm64.h -@@ -2115,11 +2115,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2116,11 +2116,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { return rm.code() << Rm_offset; } @@ -55,7 +55,7 @@ index 1377e68ec9dda7e94bce532aee6feebda5e72e14..8b8ff183495fce2d9eeafed215031fb8 static Instr Ra(CPURegister ra) { DCHECK_NE(ra.code(), kSPRegInternalCode); -@@ -2143,15 +2139,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2144,15 +2140,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { // These encoding functions allow the stack pointer to be encoded, and // disallow the zero register. diff --git a/shell/app/electron_main_delegate_mac.mm b/shell/app/electron_main_delegate_mac.mm index 3805ad76a2d..95ed62baefc 100644 --- a/shell/app/electron_main_delegate_mac.mm +++ b/shell/app/electron_main_delegate_mac.mm @@ -13,7 +13,7 @@ #include "base/mac/scoped_nsautorelease_pool.h" #include "base/path_service.h" #include "base/strings/sys_string_conversions.h" -#include "content/common/mac_helpers.h" +#include "content/browser/mac_helpers.h" #include "content/public/common/content_paths.h" #include "shell/browser/mac/electron_application.h" #include "shell/common/application_info.h" diff --git a/shell/app/node_main.cc b/shell/app/node_main.cc index 3a8fc540c14..182e0427536 100644 --- a/shell/app/node_main.cc +++ b/shell/app/node_main.cc @@ -16,8 +16,8 @@ #include "base/feature_list.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/task/single_thread_task_runner.h" #include "base/task/thread_pool/thread_pool_instance.h" -#include "base/threading/thread_task_runner_handle.h" #include "content/public/common/content_switches.h" #include "electron/electron_version.h" #include "gin/array_buffer.h" @@ -139,7 +139,7 @@ int NodeMain(int argc, char* argv[]) { // Feed gin::PerIsolateData with a task runner. uv_loop_t* loop = uv_default_loop(); auto uv_task_runner = base::MakeRefCounted(loop); - base::ThreadTaskRunnerHandle handle(uv_task_runner); + base::SingleThreadTaskRunner::CurrentDefaultHandle handle(uv_task_runner); // Initialize feature list. auto feature_list = std::make_unique(); diff --git a/shell/app/uv_task_runner.h b/shell/app/uv_task_runner.h index 825240f2509..f88e5f137f2 100644 --- a/shell/app/uv_task_runner.h +++ b/shell/app/uv_task_runner.h @@ -7,7 +7,7 @@ #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/task/single_thread_task_runner.h" #include "uv.h" // NOLINT(build/include_directory) diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index fc7168d30a1..e0561b6f278 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -9,12 +9,12 @@ #include #include -#include "base/callback_helpers.h" #include "base/command_line.h" #include "base/containers/span.h" #include "base/environment.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/functional/callback_helpers.h" #include "base/path_service.h" #include "base/system/sys_info.h" #include "base/values.h" @@ -533,7 +533,7 @@ bool NotificationCallbackWrapper( callback.Run(cmd, cwd, std::move(additional_data)); } else { scoped_refptr task_runner( - base::ThreadTaskRunnerHandle::Get()); + base::SingleThreadTaskRunner::GetCurrentDefault()); // Make a copy of the span so that the data isn't lost. task_runner->PostTask(FROM_HERE, diff --git a/shell/browser/api/electron_api_base_window.cc b/shell/browser/api/electron_api_base_window.cc index fa9951cdb64..87b2b72a216 100644 --- a/shell/browser/api/electron_api_base_window.cc +++ b/shell/browser/api/electron_api_base_window.cc @@ -8,6 +8,7 @@ #include #include +#include "base/task/single_thread_task_runner.h" #include "electron/buildflags/buildflags.h" #include "gin/dictionary.h" #include "shell/browser/api/electron_api_browser_view.h" @@ -116,7 +117,8 @@ BaseWindow::~BaseWindow() { // Destroy the native window in next tick because the native code might be // iterating all windows. - base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, window_.release()); + base::SingleThreadTaskRunner::GetCurrentDefault()->DeleteSoon( + FROM_HERE, window_.release()); // Remove global reference so the JS object can be garbage collected. self_ref_.Reset(); @@ -164,7 +166,8 @@ void BaseWindow::OnWindowClosed() { BaseWindow::ResetBrowserViews(); // Destroy the native class when window is closed. - base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, GetDestroyClosure()); + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( + FROM_HERE, GetDestroyClosure()); } void BaseWindow::OnWindowEndSession() { diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index 71ee355195d..aba1214d18d 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -4,7 +4,7 @@ #include "shell/browser/api/electron_api_browser_window.h" -#include "base/threading/thread_task_runner_handle.h" +#include "base/task/single_thread_task_runner.h" #include "content/browser/renderer_host/render_widget_host_impl.h" // nogncheck #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" // nogncheck #include "content/browser/web_contents/web_contents_impl.h" // nogncheck @@ -402,7 +402,7 @@ void BrowserWindow::ScheduleUnresponsiveEvent(int ms) { window_unresponsive_closure_.Reset(base::BindRepeating( &BrowserWindow::NotifyWindowUnresponsive, GetWeakPtr())); - base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask( FROM_HERE, window_unresponsive_closure_.callback(), base::Milliseconds(ms)); } diff --git a/shell/browser/api/electron_api_crash_reporter.cc b/shell/browser/api/electron_api_crash_reporter.cc index 72bdf0563f9..826d9c8a760 100644 --- a/shell/browser/api/electron_api_crash_reporter.cc +++ b/shell/browser/api/electron_api_crash_reporter.cc @@ -10,8 +10,8 @@ #include #include -#include "base/bind.h" #include "base/command_line.h" +#include "base/functional/bind.h" #include "base/no_destructor.h" #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" diff --git a/shell/browser/api/electron_api_data_pipe_holder.cc b/shell/browser/api/electron_api_data_pipe_holder.cc index 67fe81959a1..da46fb27300 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.cc +++ b/shell/browser/api/electron_api_data_pipe_holder.cc @@ -10,6 +10,7 @@ #include "base/memory/weak_ptr.h" #include "base/no_destructor.h" #include "base/strings/string_number_conversions.h" +#include "base/task/sequenced_task_runner.h" #include "mojo/public/cpp/system/data_pipe.h" #include "mojo/public/cpp/system/simple_watcher.h" #include "net/base/net_errors.h" @@ -40,7 +41,7 @@ class DataPipeReader { data_pipe_getter_(std::move(data_pipe_getter)), handle_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL, - base::SequencedTaskRunnerHandle::Get()) { + base::SequencedTaskRunner::GetCurrentDefault()) { // Get a new data pipe and start. mojo::ScopedDataPipeProducerHandle producer_handle; CHECK_EQ(mojo::CreateDataPipe(nullptr, producer_handle, data_pipe_), diff --git a/shell/browser/api/electron_api_debugger.h b/shell/browser/api/electron_api_debugger.h index e9388df8b25..0c359b3c46e 100644 --- a/shell/browser/api/electron_api_debugger.h +++ b/shell/browser/api/electron_api_debugger.h @@ -7,7 +7,7 @@ #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/values.h" #include "content/public/browser/devtools_agent_host_client.h" #include "content/public/browser/web_contents_observer.h" diff --git a/shell/browser/api/electron_api_download_item.cc b/shell/browser/api/electron_api_download_item.cc index 68a502a0288..3c3d16ac806 100644 --- a/shell/browser/api/electron_api_download_item.cc +++ b/shell/browser/api/electron_api_download_item.cc @@ -7,7 +7,6 @@ #include #include "base/strings/utf_string_conversions.h" -#include "base/threading/thread_task_runner_handle.h" #include "net/base/filename_util.h" #include "shell/browser/electron_browser_main_parts.h" #include "shell/common/gin_converters/file_dialog_converter.h" diff --git a/shell/browser/api/electron_api_event_emitter.cc b/shell/browser/api/electron_api_event_emitter.cc index cb9397e4a99..13bccef7fd6 100644 --- a/shell/browser/api/electron_api_event_emitter.cc +++ b/shell/browser/api/electron_api_event_emitter.cc @@ -4,8 +4,8 @@ #include "shell/browser/api/electron_api_event_emitter.h" -#include "base/bind.h" -#include "base/callback.h" +#include "base/functional/bind.h" +#include "base/functional/callback.h" #include "base/no_destructor.h" #include "gin/dictionary.h" #include "shell/common/gin_converters/callback_converter.h" diff --git a/shell/browser/api/electron_api_global_shortcut.h b/shell/browser/api/electron_api_global_shortcut.h index 4f843a487c5..e5048c1826f 100644 --- a/shell/browser/api/electron_api_global_shortcut.h +++ b/shell/browser/api/electron_api_global_shortcut.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "chrome/browser/extensions/global_shortcut_listener.h" #include "gin/handle.h" #include "gin/wrappable.h" diff --git a/shell/browser/api/electron_api_menu.h b/shell/browser/api/electron_api_menu.h index eb2275b2656..fa30d89d49c 100644 --- a/shell/browser/api/electron_api_menu.h +++ b/shell/browser/api/electron_api_menu.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "gin/arguments.h" #include "shell/browser/api/electron_api_base_window.h" #include "shell/browser/event_emitter_mixin.h" diff --git a/shell/browser/api/electron_api_menu_mac.mm b/shell/browser/api/electron_api_menu_mac.mm index 10ac371cf50..6ff3e15d1a7 100644 --- a/shell/browser/api/electron_api_menu_mac.mm +++ b/shell/browser/api/electron_api_menu_mac.mm @@ -10,6 +10,7 @@ #include "base/mac/scoped_sending_event.h" #include "base/strings/sys_string_conversions.h" #include "base/task/current_thread.h" +#include "base/task/sequenced_task_runner.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" @@ -64,7 +65,8 @@ void MenuMac::PopupAt(BaseWindow* window, base::BindOnce(&MenuMac::PopupOnUI, weak_factory_.GetWeakPtr(), native_window->GetWeakPtr(), window->weak_map_id(), x, y, positioning_item, std::move(callback_with_ref)); - base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(popup)); + base::SequencedTaskRunner::GetCurrentDefault()->PostTask(FROM_HERE, + std::move(popup)); } v8::Local Menu::GetUserAcceleratorAt(int command_id) const { @@ -161,8 +163,8 @@ void MenuMac::PopupOnUI(const base::WeakPtr& native_window, void MenuMac::ClosePopupAt(int32_t window_id) { auto close_popup = base::BindOnce(&MenuMac::ClosePopupOnUI, weak_factory_.GetWeakPtr(), window_id); - base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE, - std::move(close_popup)); + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( + FROM_HERE, std::move(close_popup)); } std::u16string MenuMac::GetAcceleratorTextAtForTesting(int index) const { diff --git a/shell/browser/api/electron_api_native_theme_mac.mm b/shell/browser/api/electron_api_native_theme_mac.mm index fefdf341e29..27ce389d2d6 100644 --- a/shell/browser/api/electron_api_native_theme_mac.mm +++ b/shell/browser/api/electron_api_native_theme_mac.mm @@ -4,7 +4,6 @@ #include "shell/browser/api/electron_api_native_theme.h" -#include "base/mac/sdk_forward_declarations.h" #include "shell/browser/mac/electron_application.h" namespace electron::api { diff --git a/shell/browser/api/electron_api_net_log.cc b/shell/browser/api/electron_api_net_log.cc index 63952be0f34..24ebc6e29bd 100644 --- a/shell/browser/api/electron_api_net_log.cc +++ b/shell/browser/api/electron_api_net_log.cc @@ -7,9 +7,9 @@ #include #include -#include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/functional/bind.h" #include "base/task/thread_pool.h" #include "chrome/browser/browser_process.h" #include "components/net_log/chrome_net_log.h" diff --git a/shell/browser/api/electron_api_net_log.h b/shell/browser/api/electron_api_net_log.h index 26450517c68..362192129ac 100644 --- a/shell/browser/api/electron_api_net_log.h +++ b/shell/browser/api/electron_api_net_log.h @@ -5,8 +5,8 @@ #ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_ #define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_ -#include "base/callback.h" #include "base/files/file_path.h" +#include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "base/values.h" #include "gin/handle.h" diff --git a/shell/browser/api/electron_api_power_save_blocker.cc b/shell/browser/api/electron_api_power_save_blocker.cc index 0994cba7b6e..0391fe9e430 100644 --- a/shell/browser/api/electron_api_power_save_blocker.cc +++ b/shell/browser/api/electron_api_power_save_blocker.cc @@ -6,8 +6,7 @@ #include -#include "base/callback_helpers.h" -#include "base/threading/thread_task_runner_handle.h" +#include "base/functional/callback_helpers.h" #include "content/public/browser/device_service.h" #include "gin/dictionary.h" #include "gin/function_template.h" diff --git a/shell/browser/api/electron_api_screen.cc b/shell/browser/api/electron_api_screen.cc index 592d0017aea..1b64fc447bb 100644 --- a/shell/browser/api/electron_api_screen.cc +++ b/shell/browser/api/electron_api_screen.cc @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "gin/dictionary.h" #include "gin/handle.h" #include "shell/browser/browser.h" @@ -120,20 +120,20 @@ static gfx::Rect DIPToScreenRect(electron::NativeWindow* window, #endif void Screen::OnDisplayAdded(const display::Display& new_display) { - base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostNonNestableTask( FROM_HERE, base::BindOnce(&DelayEmit, base::Unretained(this), "display-added", new_display)); } void Screen::OnDisplayRemoved(const display::Display& old_display) { - base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostNonNestableTask( FROM_HERE, base::BindOnce(&DelayEmit, base::Unretained(this), "display-removed", old_display)); } void Screen::OnDisplayMetricsChanged(const display::Display& display, uint32_t changed_metrics) { - base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostNonNestableTask( FROM_HERE, base::BindOnce(&DelayEmitWithMetrics, base::Unretained(this), "display-metrics-changed", display, MetricsToArray(changed_metrics))); diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 02ca4ff5ee9..018c51d2f81 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -528,7 +528,7 @@ v8::Local Session::SetProxy(gin::Arguments* args) { createProxyConfig(proxy_mode, pac_url, proxy_rules, bypass_list)}, WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); - base::ThreadTaskRunnerHandle::Get()->PostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(gin_helper::Promise::ResolvePromise, std::move(promise))); diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index 168ce0f6a1a..bdbf5ef14e7 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -15,11 +15,9 @@ #import #include "base/mac/scoped_cftyperef.h" -#include "base/mac/sdk_forward_declarations.h" #include "base/strings/stringprintf.h" #include "base/strings/sys_string_conversions.h" #include "base/task/sequenced_task_runner.h" -#include "base/threading/sequenced_task_runner_handle.h" #include "base/values.h" #include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h" #include "net/base/mac/url_conversions.h" @@ -450,7 +448,7 @@ v8::Local SystemPreferences::PromptTouchID( nullptr)); scoped_refptr runner = - base::SequencedTaskRunnerHandle::Get(); + base::SequencedTaskRunner::GetCurrentDefault(); __block gin_helper::Promise p = std::move(promise); [context diff --git a/shell/browser/api/electron_api_system_preferences_win.cc b/shell/browser/api/electron_api_system_preferences_win.cc index c2d77e941e4..1327ed20e1f 100644 --- a/shell/browser/api/electron_api_system_preferences_win.cc +++ b/shell/browser/api/electron_api_system_preferences_win.cc @@ -74,7 +74,7 @@ std::string ConvertDeviceAccessStatus(DeviceAccessStatus value) { namespace api { bool SystemPreferences::IsAeroGlassEnabled() { - return ui::win::IsAeroGlassEnabled(); + return true; } std::string hexColorDWORDToRGBA(DWORD color) { diff --git a/shell/browser/api/electron_api_tray.cc b/shell/browser/api/electron_api_tray.cc index 18d7a055e7d..ebc46ae7bfd 100644 --- a/shell/browser/api/electron_api_tray.cc +++ b/shell/browser/api/electron_api_tray.cc @@ -6,7 +6,6 @@ #include -#include "base/threading/thread_task_runner_handle.h" #include "gin/dictionary.h" #include "gin/object_template_builder.h" #include "shell/browser/api/electron_api_menu.h" diff --git a/shell/browser/api/electron_api_utility_process.cc b/shell/browser/api/electron_api_utility_process.cc index f70cac01c6a..50fd245d8d9 100644 --- a/shell/browser/api/electron_api_utility_process.cc +++ b/shell/browser/api/electron_api_utility_process.cc @@ -7,14 +7,14 @@ #include #include -#include "base/bind.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/no_destructor.h" #include "base/process/kill.h" #include "base/process/launch.h" #include "base/process/process.h" +#include "content/public/browser/child_process_host.h" #include "content/public/browser/service_process_host.h" -#include "content/public/common/child_process_host.h" #include "content/public/common/result_codes.h" #include "gin/handle.h" #include "gin/object_template_builder.h" @@ -187,7 +187,7 @@ UtilityProcessWrapper::UtilityProcessWrapper( connector_ = std::make_unique( host_port_.TakeHandleToEntangleWithEmbedder(), mojo::Connector::SINGLE_THREADED_SEND, - base::ThreadTaskRunnerHandle::Get()); + base::SingleThreadTaskRunner::GetCurrentDefault()); connector_->set_incoming_receiver(this); connector_->set_connection_error_handler(base::BindOnce( &UtilityProcessWrapper::CloseConnectorPort, weak_factory_.GetWeakPtr())); diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 38357a91700..f1291e0efdc 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -20,8 +20,6 @@ #include "base/task/current_thread.h" #include "base/task/thread_pool.h" #include "base/threading/scoped_blocking_call.h" -#include "base/threading/sequenced_task_runner_handle.h" -#include "base/threading/thread_task_runner_handle.h" #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" @@ -1605,6 +1603,13 @@ void WebContents::RenderFrameDeleted( void WebContents::RenderFrameHostChanged(content::RenderFrameHost* old_host, content::RenderFrameHost* new_host) { + if (new_host->IsInPrimaryMainFrame()) { + if (old_host) + old_host->GetRenderWidgetHost()->RemoveInputEventObserver(this); + if (new_host) + new_host->GetRenderWidgetHost()->AddInputEventObserver(this); + } + // During cross-origin navigation, a FrameTreeNode will swap out its RFH. // If an instance of WebFrameMain exists, it will need to have its RFH // swapped as well. @@ -1702,14 +1707,6 @@ void WebContents::OnWebContentsLostFocus( Emit("blur"); } -void WebContents::RenderViewHostChanged(content::RenderViewHost* old_host, - content::RenderViewHost* new_host) { - if (old_host) - old_host->GetWidget()->RemoveInputEventObserver(this); - if (new_host) - new_host->GetWidget()->AddInputEventObserver(this); -} - void WebContents::DOMContentLoaded( content::RenderFrameHost* render_frame_host) { auto* web_frame = WebFrameMain::FromRenderFrameHost(render_frame_host); @@ -3282,9 +3279,7 @@ bool WebContents::IsBeingCaptured() { return web_contents()->IsBeingCaptured(); } -void WebContents::OnCursorChanged(const content::WebCursor& webcursor) { - const ui::Cursor& cursor = webcursor.cursor(); - +void WebContents::OnCursorChanged(const ui::Cursor& cursor) { if (cursor.type() == ui::mojom::CursorType::kCustom) { Emit("cursor-changed", CursorTypeToString(cursor), gfx::Image::CreateFrom1xBitmap(cursor.custom_bitmap()), @@ -3550,8 +3545,10 @@ v8::Local WebContents::TakeHeapSnapshot( v8::Local handle = promise.GetHandle(); ScopedAllowBlockingForElectron allow_blocking; - base::File file(file_path, - base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); + uint32_t flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE; + // The snapshot file is passed to an untrusted process. + flags = base::File::AddFlagsForPassingToUntrustedProcess(flags); + base::File file(file_path, flags); if (!file.IsValid()) { promise.RejectWithErrorMessage("takeHeapSnapshot failed"); return handle; diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 6231c0b2e41..944a986d395 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -17,7 +17,6 @@ #include "chrome/browser/devtools/devtools_eye_dropper.h" #include "chrome/browser/devtools/devtools_file_system_indexer.h" #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" // nogncheck -#include "content/common/cursors/webcursor.h" #include "content/common/frame.mojom.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/keyboard_event_processing_result.h" @@ -42,6 +41,7 @@ #include "shell/common/gin_helper/constructible.h" #include "shell/common/gin_helper/error_thrower.h" #include "shell/common/gin_helper/pinnable.h" +#include "ui/base/cursor/cursor.h" #include "ui/base/models/image_model.h" #include "ui/gfx/image/image.h" @@ -619,14 +619,12 @@ class WebContents : public ExclusiveAccessContext, const content::MediaPlayerId& id, content::WebContentsObserver::MediaStoppedReason reason) override; void DidChangeThemeColor() override; - void OnCursorChanged(const content::WebCursor& cursor) override; + void OnCursorChanged(const ui::Cursor& cursor) override; void DidAcquireFullscreen(content::RenderFrameHost* rfh) override; void OnWebContentsFocused( content::RenderWidgetHost* render_widget_host) override; void OnWebContentsLostFocus( content::RenderWidgetHost* render_widget_host) override; - void RenderViewHostChanged(content::RenderViewHost* old_host, - content::RenderViewHost* new_host) override; // InspectableWebContentsDelegate: void DevToolsReloadPage() override; diff --git a/shell/browser/api/electron_api_web_request.cc b/shell/browser/api/electron_api_web_request.cc index 7189168db02..4fd830405a3 100644 --- a/shell/browser/api/electron_api_web_request.cc +++ b/shell/browser/api/electron_api_web_request.cc @@ -9,6 +9,7 @@ #include #include "base/stl_util.h" +#include "base/task/sequenced_task_runner.h" #include "base/values.h" #include "extensions/browser/api/web_request/web_request_resource_type.h" #include "gin/converter.h" @@ -505,7 +506,7 @@ void WebRequest::OnListenerResult(uint64_t id, // The ProxyingURLLoaderFactory expects the callback to be executed // asynchronously, because it used to work on IO thread before NetworkService. - base::SequencedTaskRunnerHandle::Get()->PostTask( + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(std::move(callbacks_[id]), result)); callbacks_.erase(iter); } diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index a3a42a72e58..440256fd6bb 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -27,9 +27,7 @@ FrameSubscriber::FrameSubscriber(content::WebContents* web_contents, : content::WebContentsObserver(web_contents), callback_(callback), only_dirty_(only_dirty) { - content::RenderViewHost* rvh = web_contents->GetRenderViewHost(); - if (rvh) - AttachToHost(rvh->GetWidget()); + AttachToHost(web_contents->GetPrimaryMainFrame()->GetRenderWidgetHost()); } FrameSubscriber::~FrameSubscriber() = default; @@ -72,11 +70,11 @@ void FrameSubscriber::RenderViewDeleted(content::RenderViewHost* host) { } } -void FrameSubscriber::RenderViewHostChanged(content::RenderViewHost* old_host, - content::RenderViewHost* new_host) { - if ((old_host && old_host->GetWidget() == host_) || (!old_host && !host_)) { +void FrameSubscriber::PrimaryPageChanged(content::Page& page) { + if (auto* host = page.GetMainDocument().GetMainFrame()->GetRenderWidgetHost(); + host_ != host) { DetachFromHost(); - AttachToHost(new_host->GetWidget()); + AttachToHost(host); } } diff --git a/shell/browser/api/frame_subscriber.h b/shell/browser/api/frame_subscriber.h index a8d86cb0a37..4c680ea8b61 100644 --- a/shell/browser/api/frame_subscriber.h +++ b/shell/browser/api/frame_subscriber.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "components/viz/host/client_frame_sink_video_capturer.h" #include "content/public/browser/web_contents.h" @@ -46,9 +46,8 @@ class FrameSubscriber : public content::WebContentsObserver, void DetachFromHost(); void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; + void PrimaryPageChanged(content::Page& page) override; void RenderViewDeleted(content::RenderViewHost* host) override; - void RenderViewHostChanged(content::RenderViewHost* old_host, - content::RenderViewHost* new_host) override; // viz::mojom::FrameSinkVideoConsumer implementation. void OnFrameCaptured( diff --git a/shell/browser/api/gpuinfo_manager.cc b/shell/browser/api/gpuinfo_manager.cc index e4bcf0dcad0..bdf3b396d4c 100644 --- a/shell/browser/api/gpuinfo_manager.cc +++ b/shell/browser/api/gpuinfo_manager.cc @@ -7,7 +7,7 @@ #include #include "base/memory/singleton.h" -#include "base/threading/thread_task_runner_handle.h" +#include "base/task/single_thread_task_runner.h" #include "content/public/browser/browser_thread.h" #include "gpu/config/gpu_info_collector.h" #include "shell/browser/api/gpu_info_enumerator.h" @@ -54,7 +54,7 @@ void GPUInfoManager::OnGpuInfoUpdate() { // Ignore if called when not asked for complete GPUInfo if (NeedsCompleteGpuInfoCollection()) return; - base::ThreadTaskRunnerHandle::Get()->PostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&GPUInfoManager::ProcessCompleteInfo, base::Unretained(this))); } @@ -74,7 +74,7 @@ void GPUInfoManager::CompleteInfoFetcher( void GPUInfoManager::FetchCompleteInfo( gin_helper::Promise promise) { - base::ThreadTaskRunnerHandle::Get()->PostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&GPUInfoManager::CompleteInfoFetcher, base::Unretained(this), std::move(promise))); } diff --git a/shell/browser/api/message_port.cc b/shell/browser/api/message_port.cc index d261a9066f0..c15e70a53fa 100644 --- a/shell/browser/api/message_port.cc +++ b/shell/browser/api/message_port.cc @@ -9,6 +9,7 @@ #include #include "base/strings/string_number_conversions.h" +#include "base/task/single_thread_task_runner.h" #include "gin/arguments.h" #include "gin/data_object_builder.h" #include "gin/handle.h" @@ -128,7 +129,7 @@ void MessagePort::Entangle(blink::MessagePortDescriptor port) { connector_ = std::make_unique( port_.TakeHandleToEntangleWithEmbedder(), mojo::Connector::SINGLE_THREADED_SEND, - base::ThreadTaskRunnerHandle::Get()); + base::SingleThreadTaskRunner::GetCurrentDefault()); connector_->PauseIncomingMethodCallProcessing(); connector_->set_incoming_receiver(this); connector_->set_connection_error_handler( diff --git a/shell/browser/api/save_page_handler.cc b/shell/browser/api/save_page_handler.cc index e6c451e3288..c6837e9fc9c 100644 --- a/shell/browser/api/save_page_handler.cc +++ b/shell/browser/api/save_page_handler.cc @@ -6,8 +6,8 @@ #include -#include "base/callback.h" #include "base/files/file_path.h" +#include "base/functional/callback.h" #include "content/public/browser/web_contents.h" #include "shell/browser/electron_browser_context.h" diff --git a/shell/browser/auto_updater_mac.mm b/shell/browser/auto_updater_mac.mm index c9e4542ffdf..b0636cf3200 100644 --- a/shell/browser/auto_updater_mac.mm +++ b/shell/browser/auto_updater_mac.mm @@ -11,7 +11,7 @@ #import #import -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/sys_string_conversions.h" #include "base/time/time.h" #include "gin/arguments.h" diff --git a/shell/browser/badging/badge_manager_factory.cc b/shell/browser/badging/badge_manager_factory.cc index 28e4e4eae0a..99514d94a54 100644 --- a/shell/browser/badging/badge_manager_factory.cc +++ b/shell/browser/badging/badge_manager_factory.cc @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/memory/ptr_util.h" #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" diff --git a/shell/browser/browser.cc b/shell/browser/browser.cc index c5ed8d94e2c..29b20df384f 100644 --- a/shell/browser/browser.cc +++ b/shell/browser/browser.cc @@ -12,8 +12,8 @@ #include "base/no_destructor.h" #include "base/path_service.h" #include "base/run_loop.h" +#include "base/task/single_thread_task_runner.h" #include "base/threading/thread_restrictions.h" -#include "base/threading/thread_task_runner_handle.h" #include "chrome/common/chrome_paths.h" #include "shell/browser/browser_observer.h" #include "shell/browser/electron_browser_main_parts.h" @@ -37,7 +37,8 @@ namespace { void RunQuitClosure(base::OnceClosure quit) { // On Linux/Windows the "ready" event is emitted in "PreMainMessageLoopRun", // make sure we quit after message loop has run for once. - base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(quit)); + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(FROM_HERE, + std::move(quit)); } } // namespace @@ -189,8 +190,12 @@ void Browser::DidFinishLaunching(base::Value::Dict launch_info) { // Make sure the userData directory is created. ScopedAllowBlockingForElectron allow_blocking; base::FilePath user_data; - if (base::PathService::Get(chrome::DIR_USER_DATA, &user_data)) + if (base::PathService::Get(chrome::DIR_USER_DATA, &user_data)) { base::CreateDirectoryAndGetError(user_data, nullptr); +#if BUILDFLAG(IS_WIN) + base::SetExtraNoExecuteAllowedPath(chrome::DIR_USER_DATA); +#endif + } is_ready_ = true; if (ready_promise_) { diff --git a/shell/browser/certificate_manager_model.cc b/shell/browser/certificate_manager_model.cc index ea89a09b189..e2c09a5fefa 100644 --- a/shell/browser/certificate_manager_model.cc +++ b/shell/browser/certificate_manager_model.cc @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" #include "content/public/browser/browser_context.h" diff --git a/shell/browser/certificate_manager_model.h b/shell/browser/certificate_manager_model.h index 8f959dc212d..463d9f666de 100644 --- a/shell/browser/certificate_manager_model.h +++ b/shell/browser/certificate_manager_model.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/ref_counted.h" #include "net/cert/nss_cert_database.h" diff --git a/shell/browser/cookie_change_notifier.cc b/shell/browser/cookie_change_notifier.cc index f45261d2d4b..1d81cdc99db 100644 --- a/shell/browser/cookie_change_notifier.cc +++ b/shell/browser/cookie_change_notifier.cc @@ -4,7 +4,7 @@ #include "shell/browser/cookie_change_notifier.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/storage_partition.h" #include "net/cookies/canonical_cookie.h" diff --git a/shell/browser/electron_autofill_driver_factory.cc b/shell/browser/electron_autofill_driver_factory.cc index 254836b8240..20357c544ab 100644 --- a/shell/browser/electron_autofill_driver_factory.cc +++ b/shell/browser/electron_autofill_driver_factory.cc @@ -8,8 +8,8 @@ #include #include -#include "base/bind.h" -#include "base/callback.h" +#include "base/functional/bind.h" +#include "base/functional/callback.h" #include "content/public/browser/navigation_handle.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" diff --git a/shell/browser/electron_autofill_driver_factory.h b/shell/browser/electron_autofill_driver_factory.h index 6de143613a9..92ca2067bd3 100644 --- a/shell/browser/electron_autofill_driver_factory.h +++ b/shell/browser/electron_autofill_driver_factory.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" #include "shell/common/api/api.mojom.h" diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 7165ff4d32e..3ab8cc7631c 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -178,8 +178,8 @@ #endif #if BUILDFLAG(IS_MAC) -#include "content/common/mac_helpers.h" -#include "content/public/common/child_process_host.h" +#include "content/browser/mac_helpers.h" +#include "content/public/browser/child_process_host.h" #endif #if BUILDFLAG(IS_LINUX) diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 3e1706747ce..2fb81e26b08 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -16,7 +16,6 @@ #include "base/path_service.h" #include "base/strings/escape.h" #include "base/strings/string_util.h" -#include "base/threading/sequenced_task_runner_handle.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/pref_names.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 37a715dcf0e..0cd475694ee 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -18,6 +18,7 @@ #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" +#include "base/task/single_thread_task_runner.h" #include "chrome/browser/icon_manager.h" #include "chrome/browser/ui/color/chrome_color_mixers.h" #include "chrome/common/chrome_paths.h" @@ -75,7 +76,6 @@ #if BUILDFLAG(IS_LINUX) #include "base/environment.h" -#include "base/threading/thread_task_runner_handle.h" #include "device/bluetooth/bluetooth_adapter_factory.h" #include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h" #include "electron/electron_gtk_stubs.h" @@ -262,7 +262,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization() { void ElectronBrowserMainParts::PostEarlyInitialization() { // A workaround was previously needed because there was no ThreadTaskRunner // set. If this check is failing we may need to re-add that workaround - DCHECK(base::ThreadTaskRunnerHandle::IsSet()); + DCHECK(base::SingleThreadTaskRunner::HasCurrentDefault()); // The ProxyResolverV8 has setup a complete V8 environment, in order to // avoid conflicts we only initialize our V8 environment after that. @@ -558,7 +558,8 @@ void ElectronBrowserMainParts::PostCreateMainMessageLoop() { config->store = command_line.GetSwitchValueASCII(::switches::kPasswordStore); config->product_name = app_name; config->application_name = app_name; - config->main_thread_runner = base::ThreadTaskRunnerHandle::Get(); + config->main_thread_runner = + base::SingleThreadTaskRunner::GetCurrentDefault(); // c.f. // https://source.chromium.org/chromium/chromium/src/+/master:chrome/common/chrome_switches.cc;l=689;drc=9d82515060b9b75fa941986f5db7390299669ef1 config->should_use_preference = diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index b587648db62..d9227160ada 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -8,7 +8,8 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" +#include "base/task/single_thread_task_runner.h" #include "base/timer/timer.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_main_parts.h" diff --git a/shell/browser/electron_download_manager_delegate.cc b/shell/browser/electron_download_manager_delegate.cc index a6f35dfac3f..31677a7aa59 100644 --- a/shell/browser/electron_download_manager_delegate.cc +++ b/shell/browser/electron_download_manager_delegate.cc @@ -8,8 +8,8 @@ #include #include -#include "base/bind.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/task/thread_pool.h" #include "base/threading/thread_restrictions.h" #include "chrome/common/pref_names.h" diff --git a/shell/browser/electron_javascript_dialog_manager.cc b/shell/browser/electron_javascript_dialog_manager.cc index d995777e370..bf37e9014fc 100644 --- a/shell/browser/electron_javascript_dialog_manager.cc +++ b/shell/browser/electron_javascript_dialog_manager.cc @@ -8,7 +8,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/utf_string_conversions.h" #include "shell/browser/api/electron_api_web_contents.h" #include "shell/browser/native_window.h" diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 3aa980ea22d..761976d5c24 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -8,8 +8,8 @@ #include #include -#include "base/callback.h" #include "base/containers/id_map.h" +#include "base/functional/callback.h" #include "content/public/browser/permission_controller_delegate.h" #include "gin/dictionary.h" #include "shell/browser/electron_browser_context.h" diff --git a/shell/browser/electron_speech_recognition_manager_delegate.cc b/shell/browser/electron_speech_recognition_manager_delegate.cc index d2091fba86c..566ae307b87 100644 --- a/shell/browser/electron_speech_recognition_manager_delegate.cc +++ b/shell/browser/electron_speech_recognition_manager_delegate.cc @@ -6,7 +6,7 @@ #include -#include "base/callback.h" +#include "base/functional/callback.h" namespace electron { diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.cc b/shell/browser/extensions/api/management/electron_management_api_delegate.cc index 0b5558857f8..5033096e4ff 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.cc +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.cc @@ -9,7 +9,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/strcat.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" diff --git a/shell/browser/extensions/api/tabs/tabs_api.cc b/shell/browser/extensions/api/tabs/tabs_api.cc index c5eb0353068..ff2b09ada25 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.cc +++ b/shell/browser/extensions/api/tabs/tabs_api.cc @@ -509,16 +509,4 @@ ExtensionFunction::ResponseValue TabsUpdateFunction::GetResult() { return ArgumentList(tabs::Get::Results::Create(std::move(tab))); } -void TabsUpdateFunction::OnExecuteCodeFinished( - const std::string& error, - const GURL& url, - const base::ListValue& script_result) { - if (!error.empty()) { - Respond(Error(error)); - return; - } - - return Respond(GetResult()); -} - } // namespace extensions diff --git a/shell/browser/extensions/api/tabs/tabs_api.h b/shell/browser/extensions/api/tabs/tabs_api.h index eb3a86612e7..4cbbcfc519c 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.h +++ b/shell/browser/extensions/api/tabs/tabs_api.h @@ -111,9 +111,6 @@ class TabsUpdateFunction : public ExtensionFunction { private: ResponseAction Run() override; - void OnExecuteCodeFinished(const std::string& error, - const GURL& on_url, - const base::ListValue& script_result); DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE) }; diff --git a/shell/browser/extensions/electron_extension_loader.cc b/shell/browser/extensions/electron_extension_loader.cc index 1c7ddf8e438..d188f330e4f 100644 --- a/shell/browser/extensions/electron_extension_loader.cc +++ b/shell/browser/extensions/electron_extension_loader.cc @@ -7,9 +7,9 @@ #include #include "base/auto_reset.h" -#include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" diff --git a/shell/browser/extensions/electron_extension_loader.h b/shell/browser/extensions/electron_extension_loader.h index dc4d04ea4d9..dd0209ae55b 100644 --- a/shell/browser/extensions/electron_extension_loader.h +++ b/shell/browser/extensions/electron_extension_loader.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "extensions/browser/extension_registrar.h" diff --git a/shell/browser/extensions/electron_extension_message_filter.cc b/shell/browser/extensions/electron_extension_message_filter.cc index e01dd2b2120..27dc52478d0 100644 --- a/shell/browser/extensions/electron_extension_message_filter.cc +++ b/shell/browser/extensions/electron_extension_message_filter.cc @@ -7,9 +7,9 @@ #include #include -#include "base/bind.h" -#include "base/callback_helpers.h" #include "base/files/file_path.h" +#include "base/functional/bind.h" +#include "base/functional/callback_helpers.h" #include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/stl_util.h" diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index 36ebc3044f8..ef433159663 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -8,9 +8,9 @@ #include #include -#include "base/bind.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/json/json_string_value_serializer.h" #include "base/path_service.h" #include "base/values.h" diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index 6bf56a2d0fa..f9412bd510d 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -7,7 +7,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/memory/ptr_util.h" #include "base/path_service.h" #include "build/build_config.h" diff --git a/shell/browser/extensions/electron_messaging_delegate.cc b/shell/browser/extensions/electron_messaging_delegate.cc index d64573280f6..aec0ba41155 100644 --- a/shell/browser/extensions/electron_messaging_delegate.cc +++ b/shell/browser/extensions/electron_messaging_delegate.cc @@ -7,7 +7,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/logging.h" #include "base/values.h" #include "build/build_config.h" diff --git a/shell/browser/fake_location_provider.cc b/shell/browser/fake_location_provider.cc index 2e0553f30bf..a3d0af3ab95 100644 --- a/shell/browser/fake_location_provider.cc +++ b/shell/browser/fake_location_provider.cc @@ -4,7 +4,7 @@ #include "shell/browser/fake_location_provider.h" -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/time/time.h" namespace electron { diff --git a/shell/browser/file_select_helper.cc b/shell/browser/file_select_helper.cc index 01a85b6ff34..6ed80375e5f 100644 --- a/shell/browser/file_select_helper.cc +++ b/shell/browser/file_select_helper.cc @@ -10,8 +10,8 @@ #include #include -#include "base/bind.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/memory/ptr_util.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" diff --git a/shell/browser/file_select_helper_mac.mm b/shell/browser/file_select_helper_mac.mm index 55dc03525a4..de50ca9ebcf 100644 --- a/shell/browser/file_select_helper_mac.mm +++ b/shell/browser/file_select_helper_mac.mm @@ -9,10 +9,10 @@ #include -#include "base/bind.h" #include "base/files/file.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/mac/foundation_util.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index 4445a2b7b14..77b4b4f6327 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -203,7 +203,7 @@ void HidChooserContext::GetDevices( device_list.reserve(devices_.size()); for (const auto& pair : devices_) device_list.push_back(pair.second->Clone()); - base::SequencedTaskRunnerHandle::Get()->PostTask( + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(std::move(callback), std::move(device_list))); } diff --git a/shell/browser/hid/hid_chooser_controller.cc b/shell/browser/hid/hid_chooser_controller.cc index 8e4fbd5443e..11bb87a6fbf 100644 --- a/shell/browser/hid/hid_chooser_controller.cc +++ b/shell/browser/hid/hid_chooser_controller.cc @@ -6,9 +6,9 @@ #include -#include "base/bind.h" #include "base/command_line.h" #include "base/containers/contains.h" +#include "base/functional/bind.h" #include "base/ranges/algorithm.h" #include "base/stl_util.h" #include "gin/data_object_builder.h" diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index e7244dd0950..7ec03cd08cc 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -15,8 +15,8 @@ #include "base/command_line.h" #include "base/feature_list.h" #include "base/task/current_thread.h" +#include "base/task/single_thread_task_runner.h" #include "base/task/thread_pool/initialization_util.h" -#include "base/threading/thread_task_runner_handle.h" #include "base/trace_event/trace_event.h" #include "gin/array_buffer.h" #include "gin/v8_initializer.h" @@ -77,7 +77,7 @@ namespace electron { JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop, bool setup_wasm_streaming) : isolate_(Initialize(event_loop, setup_wasm_streaming)), - isolate_holder_(base::ThreadTaskRunnerHandle::Get(), + isolate_holder_(base::SingleThreadTaskRunner::GetCurrentDefault(), gin::IsolateHolder::kSingleThread, gin::IsolateHolder::kAllowAtomicsWait, gin::IsolateHolder::IsolateType::kUtility, diff --git a/shell/browser/lib/power_observer_linux.cc b/shell/browser/lib/power_observer_linux.cc index 615091ea574..881c40c0fb0 100644 --- a/shell/browser/lib/power_observer_linux.cc +++ b/shell/browser/lib/power_observer_linux.cc @@ -7,9 +7,9 @@ #include #include -#include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "device/bluetooth/dbus/bluez_dbus_thread_manager.h" diff --git a/shell/browser/lib/power_observer_linux.h b/shell/browser/lib/power_observer_linux.h index 99473f04859..c1d1453c4e8 100644 --- a/shell/browser/lib/power_observer_linux.h +++ b/shell/browser/lib/power_observer_linux.h @@ -7,7 +7,7 @@ #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "base/power_monitor/power_observer.h" #include "dbus/bus.h" diff --git a/shell/browser/login_handler.cc b/shell/browser/login_handler.cc index fbd41d202ba..446562c57e3 100644 --- a/shell/browser/login_handler.cc +++ b/shell/browser/login_handler.cc @@ -6,8 +6,8 @@ #include -#include "base/callback.h" -#include "base/threading/sequenced_task_runner_handle.h" +#include "base/functional/callback.h" +#include "base/task/sequenced_task_runner.h" #include "gin/arguments.h" #include "gin/dictionary.h" #include "shell/browser/api/electron_api_web_contents.h" @@ -34,7 +34,7 @@ LoginHandler::LoginHandler( auth_required_callback_(std::move(auth_required_callback)) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - base::SequencedTaskRunnerHandle::Get()->PostTask( + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&LoginHandler::EmitEvent, weak_factory_.GetWeakPtr(), auth_info, is_main_frame, url, response_headers, diff --git a/shell/browser/mac/electron_application.h b/shell/browser/mac/electron_application.h index d0edcaa453d..53e0b12be5b 100644 --- a/shell/browser/mac/electron_application.h +++ b/shell/browser/mac/electron_application.h @@ -5,7 +5,7 @@ #ifndef ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ #define ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/mac/scoped_nsobject.h" #include "base/mac/scoped_sending_event.h" diff --git a/shell/browser/mac/in_app_purchase.h b/shell/browser/mac/in_app_purchase.h index 6599e59ca67..48b3527f8be 100644 --- a/shell/browser/mac/in_app_purchase.h +++ b/shell/browser/mac/in_app_purchase.h @@ -7,7 +7,7 @@ #include -#include "base/callback.h" +#include "base/functional/callback.h" namespace in_app_purchase { diff --git a/shell/browser/mac/in_app_purchase.mm b/shell/browser/mac/in_app_purchase.mm index 8586a25869c..57414498793 100644 --- a/shell/browser/mac/in_app_purchase.mm +++ b/shell/browser/mac/in_app_purchase.mm @@ -7,7 +7,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/sys_string_conversions.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" diff --git a/shell/browser/mac/in_app_purchase_observer.h b/shell/browser/mac/in_app_purchase_observer.h index 99aae2d0551..1f9d54013b9 100644 --- a/shell/browser/mac/in_app_purchase_observer.h +++ b/shell/browser/mac/in_app_purchase_observer.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "third_party/abseil-cpp/absl/types/optional.h" diff --git a/shell/browser/mac/in_app_purchase_observer.mm b/shell/browser/mac/in_app_purchase_observer.mm index abf210960a5..066cd4a8154 100644 --- a/shell/browser/mac/in_app_purchase_observer.mm +++ b/shell/browser/mac/in_app_purchase_observer.mm @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/sys_string_conversions.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" diff --git a/shell/browser/mac/in_app_purchase_product.h b/shell/browser/mac/in_app_purchase_product.h index 0665ffdaf3a..17197d78233 100644 --- a/shell/browser/mac/in_app_purchase_product.h +++ b/shell/browser/mac/in_app_purchase_product.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace in_app_purchase { diff --git a/shell/browser/mac/in_app_purchase_product.mm b/shell/browser/mac/in_app_purchase_product.mm index da9a20fe531..6e261505d2d 100644 --- a/shell/browser/mac/in_app_purchase_product.mm +++ b/shell/browser/mac/in_app_purchase_product.mm @@ -8,7 +8,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/sys_string_conversions.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 3a6654e00da..0c16d8576a6 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -72,7 +72,7 @@ namespace { #if BUILDFLAG(IS_WIN) gfx::Size GetExpandedWindowSize(const NativeWindow* window, gfx::Size size) { - if (!window->transparent() || !ui::win::IsAeroGlassEnabled()) + if (!window->transparent()) return size; gfx::Size min_size = display::win::ScreenWin::ScreenToDIPSize( diff --git a/shell/browser/net/proxying_url_loader_factory.cc b/shell/browser/net/proxying_url_loader_factory.cc index eeff29cfcff..99c83df75e0 100644 --- a/shell/browser/net/proxying_url_loader_factory.cc +++ b/shell/browser/net/proxying_url_loader_factory.cc @@ -7,9 +7,9 @@ #include #include -#include "base/bind.h" -#include "base/callback_helpers.h" #include "base/command_line.h" +#include "base/functional/bind.h" +#include "base/functional/callback_helpers.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" diff --git a/shell/browser/net/proxying_websocket.cc b/shell/browser/net/proxying_websocket.cc index 0ed8edb01ae..60784266ce2 100644 --- a/shell/browser/net/proxying_websocket.cc +++ b/shell/browser/net/proxying_websocket.cc @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "content/public/browser/browser_thread.h" diff --git a/shell/browser/net/resolve_proxy_helper.cc b/shell/browser/net/resolve_proxy_helper.cc index 464facf89b4..474a3ec4940 100644 --- a/shell/browser/net/resolve_proxy_helper.cc +++ b/shell/browser/net/resolve_proxy_helper.cc @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/storage_partition.h" #include "mojo/public/cpp/bindings/pending_remote.h" diff --git a/shell/browser/net/url_pipe_loader.cc b/shell/browser/net/url_pipe_loader.cc index 53a9f406294..ff53323ffab 100644 --- a/shell/browser/net/url_pipe_loader.cc +++ b/shell/browser/net/url_pipe_loader.cc @@ -6,6 +6,7 @@ #include +#include "base/task/sequenced_task_runner.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/system/string_data_source.h" #include "services/network/public/cpp/shared_url_loader_factory.h" @@ -25,7 +26,7 @@ URLPipeLoader::URLPipeLoader( &URLPipeLoader::NotifyComplete, base::Unretained(this), net::ERR_FAILED)); // PostTask since it might destruct. - base::SequencedTaskRunnerHandle::Get()->PostTask( + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&URLPipeLoader::Start, weak_factory_.GetWeakPtr(), factory, std::move(request), annotation, std::move(upload_data))); diff --git a/shell/browser/osr/osr_host_display_client.h b/shell/browser/osr/osr_host_display_client.h index ebeacd53783..ed0a00eeb9d 100644 --- a/shell/browser/osr/osr_host_display_client.h +++ b/shell/browser/osr/osr_host_display_client.h @@ -7,7 +7,7 @@ #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/shared_memory_mapping.h" #include "components/viz/host/host_display_client.h" #include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h" diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index fbf72675bb5..2d71c219ec7 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -9,7 +9,7 @@ #include #include -#include "base/callback_helpers.h" +#include "base/functional/callback_helpers.h" #include "base/location.h" #include "base/memory/ptr_util.h" #include "base/task/single_thread_task_runner.h" @@ -219,7 +219,8 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView( ui::ContextFactory* context_factory = content::GetContextFactory(); compositor_ = std::make_unique( context_factory->AllocateFrameSinkId(), context_factory, - base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */, + base::SingleThreadTaskRunner::GetCurrentDefault(), + false /* enable_pixel_canvas */, false /* use_external_begin_frame_control */); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); compositor_->SetDelegate(this); @@ -417,7 +418,7 @@ void OffScreenRenderWidgetHostView::InitAsPopup( Show(); } -void OffScreenRenderWidgetHostView::UpdateCursor(const content::WebCursor&) {} +void OffScreenRenderWidgetHostView::UpdateCursor(const ui::Cursor&) {} content::CursorManager* OffScreenRenderWidgetHostView::GetCursorManager() { return cursor_manager_.get(); diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index d047e702941..4b8395ea7e9 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -123,7 +123,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, void InitAsPopup(content::RenderWidgetHostView* parent_host_view, const gfx::Rect& bounds, const gfx::Rect& anchor_rect) override; - void UpdateCursor(const content::WebCursor&) override; + void UpdateCursor(const ui::Cursor&) override; void SetIsLoading(bool is_loading) override; void TextInputStateChanged(const ui::mojom::TextInputState& params) override; void ImeCancelComposition(void) override; diff --git a/shell/browser/osr/osr_video_consumer.h b/shell/browser/osr/osr_video_consumer.h index 5427eb12516..bcefbf4eb55 100644 --- a/shell/browser/osr/osr_video_consumer.h +++ b/shell/browser/osr/osr_video_consumer.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "components/viz/host/client_frame_sink_video_capturer.h" #include "media/capture/mojom/video_capture_buffer.mojom-forward.h" diff --git a/shell/browser/printing/print_preview_message_handler.cc b/shell/browser/printing/print_preview_message_handler.cc index 60e949a94e4..b199677b92f 100644 --- a/shell/browser/printing/print_preview_message_handler.cc +++ b/shell/browser/printing/print_preview_message_handler.cc @@ -7,7 +7,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/memory/read_only_shared_memory_region.h" #include "base/memory/ref_counted.h" #include "base/memory/ref_counted_memory.h" diff --git a/shell/browser/printing/print_view_manager_electron.cc b/shell/browser/printing/print_view_manager_electron.cc index fbb646cd9f0..db45c05f841 100644 --- a/shell/browser/printing/print_view_manager_electron.cc +++ b/shell/browser/printing/print_view_manager_electron.cc @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "build/build_config.h" #include "components/printing/browser/print_to_pdf/pdf_print_utils.h" #include "printing/mojom/print.mojom.h" diff --git a/shell/browser/relauncher_win.cc b/shell/browser/relauncher_win.cc index c732e9f287c..b3804b3b007 100644 --- a/shell/browser/relauncher_win.cc +++ b/shell/browser/relauncher_win.cc @@ -20,6 +20,27 @@ namespace { const CharType* kWaitEventName = L"ElectronRelauncherWaitEvent"; +struct PROCESS_BASIC_INFORMATION { + union { + NTSTATUS ExitStatus; + PVOID padding_for_x64_0; + }; + PPEB PebBaseAddress; + KAFFINITY AffinityMask; + union { + KPRIORITY BasePriority; + PVOID padding_for_x64_1; + }; + union { + DWORD UniqueProcessId; + PVOID padding_for_x64_2; + }; + union { + DWORD InheritedFromUniqueProcessId; + PVOID padding_for_x64_3; + }; +}; + HANDLE GetParentProcessHandle(base::ProcessHandle handle) { NtQueryInformationProcessFunction NtQueryInformationProcess = nullptr; ResolveNTFunctionPtr("NtQueryInformationProcess", &NtQueryInformationProcess); diff --git a/shell/browser/serial/serial_chooser_controller.cc b/shell/browser/serial/serial_chooser_controller.cc index 017d951d4c0..d0aae7faa17 100644 --- a/shell/browser/serial/serial_chooser_controller.cc +++ b/shell/browser/serial/serial_chooser_controller.cc @@ -7,8 +7,8 @@ #include #include -#include "base/bind.h" #include "base/files/file_path.h" +#include "base/functional/bind.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "shell/browser/api/electron_api_session.h" diff --git a/shell/browser/special_storage_policy.cc b/shell/browser/special_storage_policy.cc index 351e831bef9..74541727bea 100644 --- a/shell/browser/special_storage_policy.cc +++ b/shell/browser/special_storage_policy.cc @@ -4,8 +4,8 @@ #include "shell/browser/special_storage_policy.h" -#include "base/bind.h" -#include "base/callback.h" +#include "base/functional/bind.h" +#include "base/functional/callback.h" #include "services/network/public/cpp/session_cookie_delete_predicate.h" namespace electron { diff --git a/shell/browser/ui/cocoa/electron_menu_controller.h b/shell/browser/ui/cocoa/electron_menu_controller.h index 29ba2a503b0..e87dc673b05 100644 --- a/shell/browser/ui/cocoa/electron_menu_controller.h +++ b/shell/browser/ui/cocoa/electron_menu_controller.h @@ -8,7 +8,7 @@ #import -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/mac/scoped_nsobject.h" #include "base/memory/weak_ptr.h" diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm index 243c2d3993d..c9a75630dbc 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.mm @@ -286,7 +286,7 @@ using FullScreenTransitionState = if (shell_->is_modal() && shell_->parent() && shell_->IsVisible()) { NSWindow* window = shell_->GetNativeWindow().GetNativeNSWindow(); NSWindow* sheetParent = [window sheetParent]; - base::ThreadTaskRunnerHandle::Get()->PostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(base::RetainBlock(^{ [sheetParent endSheet:window]; }))); diff --git a/shell/browser/ui/devtools_manager_delegate.cc b/shell/browser/ui/devtools_manager_delegate.cc index 8077fdefec3..6722ec64834 100644 --- a/shell/browser/ui/devtools_manager_delegate.cc +++ b/shell/browser/ui/devtools_manager_delegate.cc @@ -7,9 +7,9 @@ #include #include -#include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/functional/bind.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" diff --git a/shell/browser/ui/file_dialog_gtk.cc b/shell/browser/ui/file_dialog_gtk.cc index f0a00320a02..295f0988803 100644 --- a/shell/browser/ui/file_dialog_gtk.cc +++ b/shell/browser/ui/file_dialog_gtk.cc @@ -5,8 +5,8 @@ #include #include -#include "base/callback.h" #include "base/files/file_util.h" +#include "base/functional/callback.h" #include "base/strings/string_util.h" #include "electron/electron_gtk_stubs.h" #include "shell/browser/javascript_environment.h" diff --git a/shell/browser/ui/gtk/menu_gtk.h b/shell/browser/ui/gtk/menu_gtk.h index 86ad8083d9b..acfdfcd8b17 100644 --- a/shell/browser/ui/gtk/menu_gtk.h +++ b/shell/browser/ui/gtk/menu_gtk.h @@ -5,7 +5,7 @@ #ifndef ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_ #define ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_ -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "ui/base/glib/glib_signal.h" #include "ui/base/glib/scoped_gobject.h" diff --git a/shell/browser/ui/message_box.h b/shell/browser/ui/message_box.h index a3a763bc1e5..23727b28f35 100644 --- a/shell/browser/ui/message_box.h +++ b/shell/browser/ui/message_box.h @@ -8,7 +8,7 @@ #include #include -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/gfx/image/image_skia.h" diff --git a/shell/browser/ui/message_box_gtk.cc b/shell/browser/ui/message_box_gtk.cc index 40f026cfc0b..5498ef5503f 100644 --- a/shell/browser/ui/message_box_gtk.cc +++ b/shell/browser/ui/message_box_gtk.cc @@ -6,8 +6,8 @@ #include -#include "base/callback.h" #include "base/containers/contains.h" +#include "base/functional/callback.h" #include "base/no_destructor.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/shell/browser/ui/message_box_mac.mm b/shell/browser/ui/message_box_mac.mm index fe376daac8b..a874554e01c 100644 --- a/shell/browser/ui/message_box_mac.mm +++ b/shell/browser/ui/message_box_mac.mm @@ -11,8 +11,8 @@ #import -#include "base/callback.h" #include "base/containers/contains.h" +#include "base/functional/callback.h" #include "base/mac/mac_util.h" #include "base/mac/scoped_nsobject.h" #include "base/no_destructor.h" diff --git a/shell/browser/ui/run_all_unittests.cc b/shell/browser/ui/run_all_unittests.cc index eff83fde074..99c78acdb6f 100644 --- a/shell/browser/ui/run_all_unittests.cc +++ b/shell/browser/ui/run_all_unittests.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/test/launcher/unit_test_launcher.h" #include "base/test/test_suite.h" #include "build/build_config.h" diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index 068c1a0f61e..7e6a2c86a48 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -7,7 +7,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/i18n/rtl.h" #include "cc/paint/skia_paint_canvas.h" #include "content/public/browser/render_view_host.h" @@ -298,7 +298,7 @@ void AutofillPopupView::OnMouseExited(const ui::MouseEvent& event) { // Pressing return causes the cursor to hide, which will generate an // OnMouseExited event. Pressing return should activate the current selection // via AcceleratorPressed, so we need to let that run first. - base::ThreadTaskRunnerHandle::Get()->PostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&AutofillPopupView::ClearSelection, weak_ptr_factory_.GetWeakPtr())); } diff --git a/shell/browser/ui/views/electron_views_delegate_win.cc b/shell/browser/ui/views/electron_views_delegate_win.cc index e3d60fe230a..d20b6b111f6 100644 --- a/shell/browser/ui/views/electron_views_delegate_win.cc +++ b/shell/browser/ui/views/electron_views_delegate_win.cc @@ -9,7 +9,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/task/thread_pool.h" namespace { diff --git a/shell/browser/ui/views/global_menu_bar_registrar_x11.cc b/shell/browser/ui/views/global_menu_bar_registrar_x11.cc index 3e20af389a7..43af2c783a1 100644 --- a/shell/browser/ui/views/global_menu_bar_registrar_x11.cc +++ b/shell/browser/ui/views/global_menu_bar_registrar_x11.cc @@ -6,8 +6,8 @@ #include -#include "base/bind.h" #include "base/debug/leak_annotations.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "content/public/browser/browser_thread.h" #include "shell/browser/ui/views/global_menu_bar_x11.h" diff --git a/shell/browser/ui/views/submenu_button.cc b/shell/browser/ui/views/submenu_button.cc index d60bc789909..3b81938297e 100644 --- a/shell/browser/ui/views/submenu_button.cc +++ b/shell/browser/ui/views/submenu_button.cc @@ -11,7 +11,7 @@ #include "ui/gfx/color_utils.h" #include "ui/gfx/text_utils.h" #include "ui/views/animation/flood_fill_ink_drop_ripple.h" -#include "ui/views/animation/ink_drop_host_view.h" +#include "ui/views/animation/ink_drop_host.h" #include "ui/views/animation/ink_drop_impl.h" #include "ui/views/controls/button/label_button_border.h" diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index 21e83fe5090..b5b9de2d5ec 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -9,9 +9,9 @@ #include #include -#include "base/bind.h" -#include "base/callback_helpers.h" #include "base/command_line.h" +#include "base/functional/bind.h" +#include "base/functional/callback_helpers.h" #include "base/json/json_writer.h" #include "base/strings/escape.h" #include "base/strings/pattern.h" diff --git a/shell/browser/ui/win/notify_icon_host.cc b/shell/browser/ui/win/notify_icon_host.cc index bc6b7a20277..9d88a4a0037 100644 --- a/shell/browser/ui/win/notify_icon_host.cc +++ b/shell/browser/ui/win/notify_icon_host.cc @@ -7,7 +7,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "base/memory/weak_ptr.h" #include "base/stl_util.h" diff --git a/shell/browser/ui/win/taskbar_host.h b/shell/browser/ui/win/taskbar_host.h index 2ca139c6135..ffcb309f556 100644 --- a/shell/browser/ui/win/taskbar_host.h +++ b/shell/browser/ui/win/taskbar_host.h @@ -12,7 +12,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "shell/browser/native_window.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/image/image.h" diff --git a/shell/browser/usb/usb_chooser_context.cc b/shell/browser/usb/usb_chooser_context.cc index 79f101d8c0c..d970ac5ec67 100644 --- a/shell/browser/usb/usb_chooser_context.cc +++ b/shell/browser/usb/usb_chooser_context.cc @@ -8,14 +8,14 @@ #include #include -#include "base/bind.h" #include "base/containers/contains.h" +#include "base/functional/bind.h" #include "base/observer_list.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" -#include "base/threading/sequenced_task_runner_handle.h" +#include "base/task/sequenced_task_runner.h" #include "base/values.h" #include "build/build_config.h" #include "components/content_settings/core/common/content_settings.h" @@ -259,7 +259,7 @@ void UsbChooserContext::GetDevices( for (const auto& pair : devices_) { device_list.push_back(pair.second->Clone()); } - base::SequencedTaskRunnerHandle::Get()->PostTask( + base::SequencedTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(std::move(callback), std::move(device_list))); } diff --git a/shell/browser/usb/usb_chooser_controller.cc b/shell/browser/usb/usb_chooser_controller.cc index 87e5457884a..10a60e3c0f7 100644 --- a/shell/browser/usb/usb_chooser_controller.cc +++ b/shell/browser/usb/usb_chooser_controller.cc @@ -7,7 +7,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" diff --git a/shell/browser/zoom_level_delegate.cc b/shell/browser/zoom_level_delegate.cc index 02e6b392bdf..7ed07b4f657 100644 --- a/shell/browser/zoom_level_delegate.cc +++ b/shell/browser/zoom_level_delegate.cc @@ -9,8 +9,8 @@ #include #include -#include "base/bind.h" #include "base/files/file_path.h" +#include "base/functional/bind.h" #include "base/strings/string_number_conversions.h" #include "components/prefs/json_pref_store.h" #include "components/prefs/pref_filter.h" diff --git a/shell/common/api/object_life_monitor.cc b/shell/common/api/object_life_monitor.cc index 48320da5774..a9c3bb2f910 100644 --- a/shell/common/api/object_life_monitor.cc +++ b/shell/common/api/object_life_monitor.cc @@ -5,7 +5,7 @@ #include "shell/common/api/object_life_monitor.h" -#include "base/bind.h" +#include "base/functional/bind.h" namespace electron { diff --git a/shell/common/gin_converters/callback_converter.h b/shell/common/gin_converters/callback_converter.h index 8682ca94795..51238aba67e 100644 --- a/shell/common/gin_converters/callback_converter.h +++ b/shell/common/gin_converters/callback_converter.h @@ -7,7 +7,7 @@ #include -#include "base/callback_helpers.h" +#include "base/functional/callback_helpers.h" #include "shell/common/gin_helper/callback.h" namespace gin { diff --git a/shell/common/gin_helper/callback.h b/shell/common/gin_helper/callback.h index 777238c9156..7d11a3b53d2 100644 --- a/shell/common/gin_helper/callback.h +++ b/shell/common/gin_helper/callback.h @@ -8,7 +8,7 @@ #include #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "gin/dictionary.h" #include "shell/common/gin_converters/std_converter.h" #include "shell/common/gin_helper/function_template.h" diff --git a/shell/common/gin_helper/function_template.h b/shell/common/gin_helper/function_template.h index 265ddde5dbb..792e0980da8 100644 --- a/shell/common/gin_helper/function_template.h +++ b/shell/common/gin_helper/function_template.h @@ -7,8 +7,8 @@ #include -#include "base/bind.h" -#include "base/callback.h" +#include "base/functional/bind.h" +#include "base/functional/callback.h" #include "gin/arguments.h" #include "shell/common/gin_helper/arguments.h" #include "shell/common/gin_helper/destroyable.h" diff --git a/shell/common/gin_helper/trackable_object.cc b/shell/common/gin_helper/trackable_object.cc index ae0feafa48c..05919133179 100644 --- a/shell/common/gin_helper/trackable_object.cc +++ b/shell/common/gin_helper/trackable_object.cc @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/supports_user_data.h" #include "shell/browser/electron_browser_main_parts.h" #include "shell/common/gin_helper/locker.h" diff --git a/shell/common/gin_helper/trackable_object.h b/shell/common/gin_helper/trackable_object.h index 7f5b45c75fb..a4e3214418f 100644 --- a/shell/common/gin_helper/trackable_object.h +++ b/shell/common/gin_helper/trackable_object.h @@ -7,7 +7,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/memory/weak_ptr.h" #include "shell/common/gin_helper/cleaned_up_at_exit.h" #include "shell/common/gin_helper/event_emitter.h" diff --git a/shell/common/gin_helper/wrappable.cc b/shell/common/gin_helper/wrappable.cc index 63598693485..b9fd6e775e0 100644 --- a/shell/common/gin_helper/wrappable.cc +++ b/shell/common/gin_helper/wrappable.cc @@ -5,7 +5,6 @@ #include "shell/common/gin_helper/wrappable.h" #include "base/logging.h" -#include "base/threading/thread_task_runner_handle.h" #include "shell/common/gin_helper/dictionary.h" namespace gin_helper { diff --git a/shell/common/gin_helper/wrappable.h b/shell/common/gin_helper/wrappable.h index 4e1ece6c6fc..531d446f767 100644 --- a/shell/common/gin_helper/wrappable.h +++ b/shell/common/gin_helper/wrappable.h @@ -5,7 +5,7 @@ #ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_WRAPPABLE_H_ #define ELECTRON_SHELL_COMMON_GIN_HELPER_WRAPPABLE_H_ -#include "base/bind.h" +#include "base/functional/bind.h" #include "gin/per_isolate_data.h" #include "shell/common/gin_helper/constructor.h" diff --git a/shell/common/mac/main_application_bundle.mm b/shell/common/mac/main_application_bundle.mm index a73275b3f2e..db7f789db7f 100644 --- a/shell/common/mac/main_application_bundle.mm +++ b/shell/common/mac/main_application_bundle.mm @@ -10,7 +10,7 @@ #include "base/mac/foundation_util.h" #include "base/path_service.h" #include "base/strings/string_util.h" -#include "content/common/mac_helpers.h" +#include "content/browser/mac_helpers.h" namespace electron { diff --git a/shell/common/mouse_util.h b/shell/common/mouse_util.h index 6e8a0fb7cdf..cb1f96c3a97 100644 --- a/shell/common/mouse_util.h +++ b/shell/common/mouse_util.h @@ -6,8 +6,8 @@ #define ELECTRON_SHELL_COMMON_MOUSE_UTIL_H_ #include -#include "content/common/cursors/webcursor.h" #include "ipc/ipc_message_macros.h" +#include "ui/base/cursor/cursor.h" // IPC macros similar to the already existing ones in the chromium source. // We need these to listen to the cursor change IPC message while still diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 7f135bfc77d..169eaa2fa9a 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -20,7 +20,6 @@ #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" #include "base/task/single_thread_task_runner.h" -#include "base/threading/thread_task_runner_handle.h" #include "base/trace_event/trace_event.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_paths.h" @@ -660,7 +659,7 @@ void NodeBindings::StartPolling() { initialized_ = true; // The MessageLoop should have been created, remember the one in main thread. - task_runner_ = base::ThreadTaskRunnerHandle::Get(); + task_runner_ = base::SingleThreadTaskRunner::GetCurrentDefault(); // Run uv loop for once to give the uv__io_poll a chance to add all events. UvRunOnce(); diff --git a/shell/common/platform_util.cc b/shell/common/platform_util.cc index 276e43b4421..23e546bf850 100644 --- a/shell/common/platform_util.cc +++ b/shell/common/platform_util.cc @@ -6,7 +6,7 @@ #include -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/task/thread_pool.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" diff --git a/shell/common/platform_util.h b/shell/common/platform_util.h index 085c7e3a7d9..59004489d29 100644 --- a/shell/common/platform_util.h +++ b/shell/common/platform_util.h @@ -7,8 +7,8 @@ #include -#include "base/callback_forward.h" #include "base/files/file_path.h" +#include "base/functional/callback_forward.h" #include "build/build_config.h" class GURL; diff --git a/shell/common/platform_util_mac.mm b/shell/common/platform_util_mac.mm index 1647ab05fe1..9cb633eaa32 100644 --- a/shell/common/platform_util_mac.mm +++ b/shell/common/platform_util_mac.mm @@ -11,9 +11,9 @@ #import #import -#include "base/callback.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/functional/callback.h" #include "base/logging.h" #include "base/mac/foundation_util.h" #include "base/mac/mac_logging.h" diff --git a/shell/common/platform_util_win.cc b/shell/common/platform_util_win.cc index 54eb7de2eac..5ddcb49a35b 100644 --- a/shell/common/platform_util_win.cc +++ b/shell/common/platform_util_win.cc @@ -15,10 +15,10 @@ #include #include -#include "base/bind.h" -#include "base/callback_helpers.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" +#include "base/functional/callback_helpers.h" #include "base/logging.h" #include "base/stl_util.h" #include "base/strings/escape.h" diff --git a/shell/renderer/api/electron_api_crash_reporter_renderer.cc b/shell/renderer/api/electron_api_crash_reporter_renderer.cc index 05df96a68c9..a027e486b61 100644 --- a/shell/renderer/api/electron_api_crash_reporter_renderer.cc +++ b/shell/renderer/api/electron_api_crash_reporter_renderer.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#include "base/bind.h" +#include "base/functional/bind.h" #include "shell/common/gin_helper/dictionary.h" #include "shell/common/node_includes.h" diff --git a/shell/renderer/api/electron_api_spell_check_client.cc b/shell/renderer/api/electron_api_spell_check_client.cc index 77a2b428316..3dd7c86a62f 100644 --- a/shell/renderer/api/electron_api_spell_check_client.cc +++ b/shell/renderer/api/electron_api_spell_check_client.cc @@ -13,7 +13,7 @@ #include "base/logging.h" #include "base/numerics/safe_conversions.h" -#include "base/threading/thread_task_runner_handle.h" +#include "base/task/single_thread_task_runner.h" #include "components/spellcheck/renderer/spellcheck_worditerator.h" #include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/function_template.h" @@ -106,7 +106,7 @@ void SpellCheckClient::RequestCheckingOfText( pending_request_param_ = std::make_unique(text, std::move(completionCallback)); - base::ThreadTaskRunnerHandle::Get()->PostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&SpellCheckClient::SpellCheckText, AsWeakPtr())); } diff --git a/shell/renderer/api/electron_api_spell_check_client.h b/shell/renderer/api/electron_api_spell_check_client.h index c3a6b62c69f..7522157be5a 100644 --- a/shell/renderer/api/electron_api_spell_check_client.h +++ b/shell/renderer/api/electron_api_spell_check_client.h @@ -10,7 +10,7 @@ #include #include -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "components/spellcheck/renderer/spellcheck_worditerator.h" #include "third_party/blink/public/platform/web_spell_check_panel_host_client.h" diff --git a/shell/renderer/browser_exposed_renderer_interfaces.cc b/shell/renderer/browser_exposed_renderer_interfaces.cc index 04e82d7daa2..bc3ec525148 100644 --- a/shell/renderer/browser_exposed_renderer_interfaces.cc +++ b/shell/renderer/browser_exposed_renderer_interfaces.cc @@ -6,8 +6,8 @@ #include -#include "base/bind.h" -#include "base/threading/sequenced_task_runner_handle.h" +#include "base/functional/bind.h" +#include "base/task/sequenced_task_runner.h" #include "build/build_config.h" #include "electron/buildflags/buildflags.h" #include "mojo/public/cpp/bindings/binder_map.h" @@ -35,6 +35,6 @@ void ExposeElectronRendererInterfacesToBrowser( #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) binders->Add( base::BindRepeating(&BindSpellChecker, client), - base::SequencedTaskRunnerHandle::Get()); + base::SequencedTaskRunner::GetCurrentDefault()); #endif } diff --git a/shell/renderer/electron_autofill_agent.cc b/shell/renderer/electron_autofill_agent.cc index 359cba7fe1b..651a160007c 100644 --- a/shell/renderer/electron_autofill_agent.cc +++ b/shell/renderer/electron_autofill_agent.cc @@ -102,7 +102,7 @@ void AutofillAgent::TextFieldDidChange( return; weak_ptr_factory_.InvalidateWeakPtrs(); - base::ThreadTaskRunnerHandle::Get()->PostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&AutofillAgent::TextFieldDidChangeImpl, weak_ptr_factory_.GetWeakPtr(), element)); } diff --git a/shell/services/node/parent_port.cc b/shell/services/node/parent_port.cc index 59e2623dd7c..c0aac05c45f 100644 --- a/shell/services/node/parent_port.cc +++ b/shell/services/node/parent_port.cc @@ -33,7 +33,7 @@ void ParentPort::Initialize(blink::MessagePortDescriptor port) { connector_ = std::make_unique( port_.TakeHandleToEntangleWithEmbedder(), mojo::Connector::SINGLE_THREADED_SEND, - base::ThreadTaskRunnerHandle::Get()); + base::SingleThreadTaskRunner::GetCurrentDefault()); connector_->PauseIncomingMethodCallProcessing(); connector_->set_incoming_receiver(this); connector_->set_connection_error_handler( diff --git a/shell/utility/electron_content_utility_client.cc b/shell/utility/electron_content_utility_client.cc index a21b3543a31..5c681855bfb 100644 --- a/shell/utility/electron_content_utility_client.cc +++ b/shell/utility/electron_content_utility_client.cc @@ -8,7 +8,6 @@ #include "base/command_line.h" #include "base/no_destructor.h" -#include "base/threading/sequenced_task_runner_handle.h" #include "content/public/utility/utility_thread.h" #include "mojo/public/cpp/bindings/service_factory.h" #include "sandbox/policy/mojom/sandbox.mojom.h" @@ -102,7 +101,7 @@ void ElectronContentUtilityClient::ExposeInterfacesToBrowser( #if BUILDFLAG(ENABLE_PRINTING) && BUILDFLAG(IS_WIN) binders->Add( base::BindRepeating(printing::PdfToEmfConverterFactory::Create), - base::ThreadTaskRunnerHandle::Get()); + base::SingleThreadTaskRunner::GetCurrentDefault()); #endif } } diff --git a/spec/api-browser-window-spec.ts b/spec/api-browser-window-spec.ts index e6e101f6129..e169b045c1c 100644 --- a/spec/api-browser-window-spec.ts +++ b/spec/api-browser-window-spec.ts @@ -4,6 +4,7 @@ import * as path from 'path'; import * as fs from 'fs'; import * as qs from 'querystring'; import * as http from 'http'; +import * as os from 'os'; import { AddressInfo } from 'net'; import { app, BrowserWindow, BrowserView, dialog, ipcMain, OnBeforeSendHeadersListenerDetails, protocol, screen, webContents, session, WebContents } from 'electron/main'; @@ -3939,13 +3940,24 @@ describe('BrowserWindow module', () => { }); it('should save page to disk with MHTML', async () => { + /* Use temp directory for saving MHTML file since the write handle + * gets passed to untrusted process and chromium will deny exec access to + * the path. To perform this task, chromium requires that the path is one + * of the browser controlled paths, refs https://chromium-review.googlesource.com/c/chromium/src/+/3774416 + */ + const tmpDir = await fs.promises.mkdtemp(path.resolve(os.tmpdir(), 'electron-mhtml-save-')); + const savePageMHTMLPath = path.join(tmpDir, 'save_page.html'); const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(fixtures, 'pages', 'save_page', 'index.html')); - await w.webContents.savePage(savePageHtmlPath, 'MHTML'); + await w.webContents.savePage(savePageMHTMLPath, 'MHTML'); - expect(fs.existsSync(savePageHtmlPath)).to.be.true('html path'); + expect(fs.existsSync(savePageMHTMLPath)).to.be.true('html path'); expect(fs.existsSync(savePageJsPath)).to.be.false('js path'); expect(fs.existsSync(savePageCssPath)).to.be.false('css path'); + try { + await fs.promises.unlink(savePageMHTMLPath); + await fs.promises.rmdir(tmpDir); + } catch {} }); it('should save page to disk with HTMLComplete', async () => { diff --git a/spec/api-media-handler-spec.ts b/spec/api-media-handler-spec.ts index e54a2be2067..4db626aca43 100644 --- a/spec/api-media-handler-spec.ts +++ b/spec/api-media-handler-spec.ts @@ -55,7 +55,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', video: true, audio: false, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(mediaRequest.videoRequested).to.be.true(); expect(mediaRequest.audioRequested).to.be.false(); @@ -78,7 +78,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', video: true, audio: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(ok).to.be.false(); expect(message).to.equal('Could not start video source'); @@ -104,7 +104,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', navigator.mediaDevices.getDisplayMedia({ video: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(ok).to.be.false(); expect(callbackError?.message).to.equal('Video was requested, but no video stream was provided'); @@ -131,7 +131,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', video: true, audio: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(ok).to.be.false(); expect(callbackError?.message).to.equal('Video was requested, but no video stream was provided'); @@ -154,7 +154,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', video: true, audio: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(ok).to.be.true(); }); @@ -178,7 +178,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', video: true, audio: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(ok).to.be.false(); expect(callbackError.message).to.equal('Video was requested, but no video stream was provided'); @@ -200,7 +200,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', video: true, audio: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); // This is a little surprising... apparently chrome will generate a stream // for this non-existent web contents? @@ -238,7 +238,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', video: true, audio: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(ok).to.be.true(message); }); @@ -259,7 +259,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', video: true, audio: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(ok).to.be.true(message); }); @@ -277,7 +277,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', navigator.mediaDevices.getDisplayMedia({ video: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(requestHandlerCalled).to.be.true(); expect(ok).to.be.true(message); }); @@ -354,7 +354,7 @@ ifdescribe(features.isDesktopCapturerEnabled())('setDisplayMediaRequestHandler', navigator.mediaDevices.getDisplayMedia({ video: true, }).then(x => ({ok: x instanceof MediaStream}), e => ({ok: false, message: e.message})) - `); + `, true); expect(ok).to.be.false(); expect(message).to.equal('Not supported'); }); diff --git a/spec/api-web-contents-spec.ts b/spec/api-web-contents-spec.ts index e2a1ec039b6..656c83f4ff0 100644 --- a/spec/api-web-contents-spec.ts +++ b/spec/api-web-contents-spec.ts @@ -2049,12 +2049,15 @@ describe('webContents module', () => { describe('PictureInPicture video', () => { afterEach(closeAllWindows); it('works as expected', async function () { - const w = new BrowserWindow({ show: false, webPreferences: { sandbox: true } }); + const w = new BrowserWindow({ webPreferences: { sandbox: true } }); + + // TODO(codebytere): figure out why this workaround is needed and remove. + // It is not germane to the actual test. + await w.loadFile(path.join(fixturesPath, 'blank.html')); + await w.loadFile(path.join(fixturesPath, 'api', 'picture-in-picture.html')); - if (!await w.webContents.executeJavaScript('document.createElement(\'video\').canPlayType(\'video/webm; codecs="vp8.0"\')')) { - this.skip(); - } + await w.webContents.executeJavaScript('document.createElement(\'video\').canPlayType(\'video/webm; codecs="vp8.0"\')', true); const result = await w.webContents.executeJavaScript( `runTest(${features.isPictureInPictureEnabled()})`, true); diff --git a/spec/chromium-spec.ts b/spec/chromium-spec.ts index 5719388afd8..658abb089b3 100644 --- a/spec/chromium-spec.ts +++ b/spec/chromium-spec.ts @@ -1325,7 +1325,7 @@ describe('chromium features', () => { it('fails with "not supported" for getDisplayMedia', async () => { const w = new BrowserWindow({ show: false }); w.loadFile(path.join(fixturesPath, 'pages', 'blank.html')); - const { ok, err } = await w.webContents.executeJavaScript('navigator.mediaDevices.getDisplayMedia({video: true}).then(s => ({ok: true}), e => ({ok: false, err: e.message}))'); + const { ok, err } = await w.webContents.executeJavaScript('navigator.mediaDevices.getDisplayMedia({video: true}).then(s => ({ok: true}), e => ({ok: false, err: e.message}))', true); expect(ok).to.be.false(); expect(err).to.equal('Not supported'); }); @@ -2027,7 +2027,8 @@ describe('chromium features', () => { }); }); - ifdescribe(process.platform !== 'win32' && process.platform !== 'linux')('webgl', () => { + // This is intentionally disabled on arm macs: https://chromium-review.googlesource.com/c/chromium/src/+/4143761 + ifdescribe(process.platform === 'darwin' && process.arch !== 'arm64')('webgl', () => { it('can be gotten as context in canvas', async () => { const w = new BrowserWindow({ show: false }); w.loadURL('about:blank');