From ed126eced457fcaa3c998b32f97d68576e7f362c Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Mon, 25 Jan 2021 08:46:00 -0800 Subject: [PATCH] chore: bump chromium to bf3f97675b5d9eade34526ebf730c (master) (#27305) Co-authored-by: Shelley Vohr --- DEPS | 2 +- .../add_didinstallconditionalfeatures.patch | 14 +++++----- ...rustedauthclient_to_urlloaderfactory.patch | 22 +++++++-------- patches/chromium/blink_local_frame.patch | 8 +++--- .../build_add_electron_tracing_category.patch | 4 +-- patches/chromium/can_create_window.patch | 26 ++++++++--------- ...screationoverridden_with_full_params.patch | 4 +-- ...esources_not_chrome_for_spellchecker.patch | 4 +-- patches/chromium/dcheck.patch | 6 ++-- ...ay_lock_the_protocol_scheme_registry.patch | 4 +-- .../disable_color_correct_rendering.patch | 18 ++++++------ .../disable_compositor_recycling.patch | 2 +- patches/chromium/disable_hidden.patch | 4 +-- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +-- ...xpose_setuseragent_on_networkcontext.patch | 16 +++++------ ...dd_set_theme_source_to_allow_apps_to.patch | 6 ++-- ..._scheduler_throttling_per_renderview.patch | 6 ++-- ...to_add_observers_on_created_hunspell.patch | 20 ++++++------- ...screen_rendering_with_viz_compositor.patch | 2 +- ...chdir_np_and_pthread_chdir_np_in_mas.patch | 6 ++-- ...ns_through_the_web_contents_delegate.patch | 4 +-- ...fix_use_electron_generated_resources.patch | 2 +- patches/chromium/frame_host_manager.patch | 26 ++++++++--------- .../mas_disable_remote_accessibility.patch | 8 +++--- patches/chromium/mas_no_private_api.patch | 10 ++++--- ...emote_certificate_verification_logic.patch | 26 ++++++++--------- patches/chromium/no_cache_storage_check.patch | 2 +- .../chromium/notification_provenance.patch | 4 +-- patches/chromium/printing.patch | 6 ++-- ...put_back_deleted_colors_for_autofill.patch | 4 +-- ...r_changes_to_the_webcontentsobserver.patch | 8 +++--- patches/chromium/resource_file_conflict.patch | 6 ++-- ...ove_contentrendererclient_shouldfork.patch | 14 +++++----- patches/chromium/scroll_bounce_flag.patch | 4 +-- .../support_mixed_sandbox_with_zygote.patch | 10 +++---- patches/chromium/web_contents.patch | 8 +++--- patches/chromium/webview_cross_drag.patch | 4 +-- .../worker_context_will_destroy.patch | 18 ++++++------ ...feat_add_hook_to_notify_script_ready.patch | 14 +++++----- patches/v8/add_realloc.patch | 4 +-- patches/v8/build_gn.patch | 6 ++-- ...disallow_copying_cppheapcreateparams.patch | 16 +++++------ patches/v8/dcheck.patch | 4 +-- ...export_private_v8_symbols_on_windows.patch | 2 +- patches/v8/expose_mksnapshot.patch | 4 +-- .../api/electron_api_data_pipe_holder.cc | 3 +- shell/browser/api/electron_api_url_loader.cc | 7 +++-- shell/browser/browser_process_impl.cc | 5 ---- shell/browser/browser_process_impl.h | 2 -- .../electron_management_api_delegate.cc | 7 +++++ .../electron_management_api_delegate.h | 2 ++ shell/common/gin_converters/net_converter.cc | 28 +++++++++++-------- shell/renderer/renderer_client_base.cc | 20 ++++++------- spec-main/extensions-spec.ts | 3 +- spec-main/webview-spec.ts | 6 ++-- 55 files changed, 245 insertions(+), 230 deletions(-) diff --git a/DEPS b/DEPS index 1d4d1c3d7e005..d0afa0b70ba9c 100644 --- a/DEPS +++ b/DEPS @@ -14,7 +14,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - 'caef502ee3aa264339194bfa02f5ecb3b8cba449', + '97adba472d4bf3f97675b5d9eade34526ebf730c', 'node_version': 'v14.15.4', 'nan_version': diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 0f7601d950f99..f7e19cfb5cbf6 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index b6b4e0b27ae971f45ab6d50b2eaede6c4d5b7a8d..b785e23bb7e9bb61cb4434ab0bd2b8df int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index b42f671279177bf5b58e4c4bd9ee1a83197f31f6..74301e21452af01ebbd5f945610c75cf66aed8a9 100644 +index 28236758298526d3ae367035ae7165d842d67a2b..2548f5fcb9872486b69de478ce9f5bb1fe14763c 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4676,6 +4676,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4673,6 +4673,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index b42f671279177bf5b58e4c4bd9ee1a83197f31f6..74301e21452af01ebbd5f945610c75cf int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index f55598ff3266a0e116e80d871a1948a3849cc82b..44f922f8f334dc65dee155bcfaa6f50c1a435b4a 100644 +index dac05dd0ddc22d9d4ab2628bf3423210a6e9cee8..76aa37a7f9062cd85084bb074fb1b8866e3efba0 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -658,6 +658,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -617,6 +617,8 @@ class CONTENT_EXPORT RenderFrameImpl blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index f55598ff3266a0e116e80d871a1948a3849cc82b..44f922f8f334dc65dee155bcfaa6f50c 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 03bbdf9d4049e3c78a9cb236625e2def2a5a39e2..d0a7382ccf78be6a7d3457db70c3b5ec6df07652 100644 +index d20c4427399a15a3626c7debfa691950f39ba740..f84d889c7c605d2ce55a20418c37a4337017043f 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -558,6 +558,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -568,6 +568,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -123,7 +123,7 @@ index 00780a63657423935bce8a6b35cc1d629b256d14..806e8a381e6089d0ade1492ecd7608f1 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 f380e3949be397a894146ab71398c17227779878..4ee4e1f0ae040fdf27c183a16e3102fcacf223a0 100644 +index fe5aeef63b5dba29adc0b960f96199308ef7b941..9504ffe0db55e429db6c360900f62cbbfce24704 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h @@ -336,6 +336,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { diff --git a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch index 48d45f2afcc71..48038ed13a768 100644 --- a/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch +++ b/patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch @@ -10,7 +10,7 @@ WebContents, and cancels the authentication if there's no WebContents available, which there isn't in the case of the 'net' module. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index cd4519d88c3bb8688e772eb0ed2d68e368a32052..12544d1a531ac353802f452d49713d309d4322bb 100644 +index ac70e294f915f326095675d222f44519e2683ed0..c46465e5596eab620e10faff172f37d71833869f 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -228,6 +228,25 @@ struct CTPolicy { @@ -49,10 +49,10 @@ index cd4519d88c3bb8688e772eb0ed2d68e368a32052..12544d1a531ac353802f452d49713d30 // the per-context allow patterns that is managed via NetworkContext // interface. This still respects the per-context block lists. diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index f33e95c18f54a337b0fab970060fb0740f5e204e..c8220cd5883e2d30a867061779158f630999c88f 100644 +index c02cabc51eb5a99c9857b8cb5a57e0793e04b863..4c87980dbad41372f3f23a9493877801ab4ed3d8 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -465,6 +465,7 @@ URLLoader::URLLoader( +@@ -461,6 +461,7 @@ URLLoader::URLLoader( base::WeakPtr keepalive_statistics_recorder, base::WeakPtr network_usage_accumulator, mojom::TrustedURLLoaderHeaderClient* url_loader_header_client, @@ -60,7 +60,7 @@ index f33e95c18f54a337b0fab970060fb0740f5e204e..c8220cd5883e2d30a867061779158f63 mojom::OriginPolicyManager* origin_policy_manager, std::unique_ptr trust_token_helper_factory, const cors::OriginAccessList* origin_access_list, -@@ -529,6 +530,11 @@ URLLoader::URLLoader( +@@ -525,6 +526,11 @@ URLLoader::URLLoader( header_client_.set_disconnect_handler( base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this))); } @@ -72,7 +72,7 @@ index f33e95c18f54a337b0fab970060fb0740f5e204e..c8220cd5883e2d30a867061779158f63 if (want_raw_headers_) { options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse | mojom::kURLLoadOptionSendSSLInfoForCertificateError; -@@ -1190,7 +1196,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -1170,7 +1176,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, // |this| may have been deleted. return; } @@ -81,7 +81,7 @@ index f33e95c18f54a337b0fab970060fb0740f5e204e..c8220cd5883e2d30a867061779158f63 OnAuthCredentials(base::nullopt); return; } -@@ -1206,11 +1212,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, +@@ -1186,11 +1192,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request, if (url_request->response_headers()) head->headers = url_request->response_headers(); head->auth_challenge_info = auth_info; @@ -108,10 +108,10 @@ index f33e95c18f54a337b0fab970060fb0740f5e204e..c8220cd5883e2d30a867061779158f63 auth_challenge_responder_receiver_.set_disconnect_handler( base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this))); diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index 600dd2f10bda513428c16ba6537e5a262f8f6b4b..814662e3bcc2c574ef8e63e607da77f03f655326 100644 +index 193733544750f8cdb07d76be80170f752947cec6..e2fcaeea674b3012d428911637748bb819aaf3e8 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -124,6 +124,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -129,6 +129,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader base::WeakPtr keepalive_statistics_recorder, base::WeakPtr network_usage_accumulator, mojom::TrustedURLLoaderHeaderClient* url_loader_header_client, @@ -119,7 +119,7 @@ index 600dd2f10bda513428c16ba6537e5a262f8f6b4b..814662e3bcc2c574ef8e63e607da77f0 mojom::OriginPolicyManager* origin_policy_manager, std::unique_ptr trust_token_helper_factory, -@@ -489,6 +490,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -494,6 +495,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader base::Optional fetch_window_id_; mojo::Remote header_client_; @@ -128,7 +128,7 @@ index 600dd2f10bda513428c16ba6537e5a262f8f6b4b..814662e3bcc2c574ef8e63e607da77f0 std::unique_ptr file_opener_for_upload_; diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc -index 9d7557376804030f444d57d3592bfdf763563188..4af9a8a78b64d45f134e7f3614f861d8c681e463 100644 +index adf7d7e9df186f032cb85d2aeba301c551442c78..07b3c4a219ecefa142efa10ba0b7efda16d755d6 100644 --- a/services/network/url_loader_factory.cc +++ b/services/network/url_loader_factory.cc @@ -77,6 +77,7 @@ URLLoaderFactory::URLLoaderFactory( @@ -139,7 +139,7 @@ index 9d7557376804030f444d57d3592bfdf763563188..4af9a8a78b64d45f134e7f3614f861d8 cors_url_loader_factory_(cors_url_loader_factory), cookie_observer_(std::move(params_->cookie_observer)) { DCHECK(context); -@@ -296,6 +297,7 @@ void URLLoaderFactory::CreateLoaderAndStart( +@@ -297,6 +298,7 @@ void URLLoaderFactory::CreateLoaderAndStart( std::move(keepalive_statistics_recorder), std::move(network_usage_accumulator), header_client_.is_bound() ? header_client_.get() : nullptr, diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 209c468fb9fc1..6331b2edb5cff 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 0d5d1bf784f63f00724cdcf71263752e7715ebf1..5b7869255ec81c4a7bd1e0918609aafe11849934 100644 +index 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd960bf871d9 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc @@ -135,14 +135,6 @@ bool Frame::Detach(FrameDetachType type) { @@ -49,10 +49,10 @@ index 0d5d1bf784f63f00724cdcf71263752e7715ebf1..5b7869255ec81c4a7bd1e0918609aafe // 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 bc44c0826be2b7b780b980ddf33285090e0278fb..59bcf6963ba53506d2324a782a18993d374de31a 100644 +index b0dda2fb6fd584cf6da2b11aeb1d6e1f310e0e22..33ebc10e9e98580107b0d419a0e2f55676bcb21e 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -627,10 +627,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -621,10 +621,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index bc44c0826be2b7b780b980ddf33285090e0278fb..59bcf6963ba53506d2324a782a18993d if (!Client()) return false; -@@ -668,6 +664,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -662,6 +658,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index c77dc13a765a0..b6540d92bd178 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index 2159fff98b948b05ddf738f6ad90df998686ad82..aaa852eab10809f7a85486447b8f019ce8e2e6b9 100644 +index ad3e86fb45ed6e115e62e89917fff8309a0e0705..c222819b9de97b988c9a2a49f971961e11665cad 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -74,6 +74,7 @@ +@@ -73,6 +73,7 @@ X("drmcursor") \ X("dwrite") \ X("DXVA Decoding") \ diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 1294746942fc7..baab68065c708 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 931162fd72d584307cb66645aec1150efc330021..e8b96a3295cc5bad2929c739ff1b5cc3017cf4c8 100644 +index 4214b353a94657b70280faec44c93889e7d7c400..b23fa9524e2632ee5784ecfce7d769ee17f723b2 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -5246,6 +5246,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -5286,6 +5286,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 931162fd72d584307cb66645aec1150efc330021..e8b96a3295cc5bad2929c739ff1b5cc3 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 65d404c093600fe0746a752f904191d06fa8d141..f86d10039dfec898565e168650d47d879f920231 100644 +index 496c364797997997f2886abc95db2e6f49d848c6..3981c2caabd0362530c27e0dee572a56aaac0caf 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3561,6 +3561,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3560,6 +3560,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index 65d404c093600fe0746a752f904191d06fa8d141..f86d10039dfec898565e168650d47d87 new_contents_impl->GetController().SetSessionStorageNamespace( partition_id, session_storage_namespace); -@@ -3602,12 +3610,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3601,12 +3609,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( AddDestructionObserver(new_contents_impl); } @@ -53,10 +53,10 @@ index 65d404c093600fe0746a752f904191d06fa8d141..f86d10039dfec898565e168650d47d87 observer->DidOpenRequestedURL(new_contents_impl, opener, params.target_url, params.referrer.To(), diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index 5a31b8758f609d8d11d1e2ca0f1581cd138149f3..b56a424926f1384907ac3ae2c8a7619bf06a90e6 100644 +index 182c6bf04e9937080efcedfc617fb9e072f10500..6fb3a1ee4a31e9a228e8ab04b1ce21c8af50ae74 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -299,6 +299,10 @@ struct CreateNewWindowParams { +@@ -330,6 +330,10 @@ struct CreateNewWindowParams { // The impression associated with the navigation in the new window, if // one is specified. Impression? impression; @@ -68,7 +68,7 @@ index 5a31b8758f609d8d11d1e2ca0f1581cd138149f3..b56a424926f1384907ac3ae2c8a7619b // 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 c366ae52a8ea35c768f6e506e0e5a54be9f217b7..91f04ded7cb3d539ec34c1f542023aea1738654e 100644 +index 4438e0417b3cc11fad98ce792eaaf12710539fae..e9e45bacdcc5ad09ac933ccaaa663e0d05a0ad33 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -544,6 +544,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -81,10 +81,10 @@ index c366ae52a8ea35c768f6e506e0e5a54be9f217b7..91f04ded7cb3d539ec34c1f542023aea 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 c61a07110421e58f0c86bc6d2436b865b21845b8..4337c4121573a8e010a3697c492d92f66a09ad13 100644 +index df6e463d1518b453aae79dffdda559a93eba1f9d..133aef45c3187fac0e47e1538df3252de1fdfb8c 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -153,6 +153,7 @@ class NetworkService; +@@ -154,6 +154,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index c61a07110421e58f0c86bc6d2436b865b21845b8..4337c4121573a8e010a3697c492d92f6 } // namespace network namespace sandbox { -@@ -877,6 +878,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -881,6 +882,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -220,10 +220,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6 } // 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 f1e2b209c058f70d2dfb0c88106a31823b8933c7..bbebe69d39d6006b62a3b53d242d56a77c3e01cf 100644 +index a20d3082ed631ff7c7066ce2f20ed687469b17ce..84b8fb235826c9a5de4dbbd79aa3b6af0ed786cf 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -1972,6 +1972,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2001,6 +2001,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, } WebWindowFeatures window_features = GetWindowFeaturesFromString(features); diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 9b479fe91a1cd..9b62052395d91 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -264,10 +264,10 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee 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 1dc2fa4a5cdf86eada6794a80a196f6ca3727fe8..be1a841f58baf700dcff1ffb74775af41cd95988 100644 +index d20ce60c04007a83e412defbf525a756788bd0cc..a733423a617638147602c49874e0fa60c7983460 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3522,8 +3522,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3521,8 +3521,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index f1ce4341fa769..3c05eb70891fc 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 89e618b57fc14d4a74192513bf82d98d5a706d84..4b3805bd205313dc35fed585683542d60a0a1ee5 100644 +index 5c26343c8eb94b4274f53bd823f730792d13e4b7..e8e70431c4fff82fdf84fb5f8db8ce11b7a17a29 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -6208,6 +6208,7 @@ static_library("browser") { +@@ -6206,6 +6206,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index aa71d7e03299f..f9155edf92486 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,14 +17,14 @@ 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/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc -index 66933a960afc2e6bcbbea36b3d013a5e541d8f42..22b53cde50483b22323dcf4dc413feef3a23798f 100644 +index d189ac6c2506e5b95aaa12a3b270f91c5a18ae19..ccbd634031671229196f7c68eb4a241366af2379 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc @@ -1306,8 +1306,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( return NAVIGATION_TYPE_NEW_SUBFRAME; } -- // We only clear the session history when navigating to a new page. +- // We only clear the session history in tests when navigating to a new entry. - DCHECK(!params.history_list_was_cleared); + // Electron does its own book keeping of navigation entries and we + // expect content to not track any, by clearing history list for @@ -33,7 +33,7 @@ index 66933a960afc2e6bcbbea36b3d013a5e541d8f42..22b53cde50483b22323dcf4dc413feef if (rfh->GetParent()) { // All manual subframes would be did_create_new_entry and handled above, so -@@ -1597,7 +1599,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( +@@ -1598,7 +1600,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry( new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon(); } diff --git a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch index 87b0ba336e653..c4f073f955185 100644 --- a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch +++ b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch @@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try re-submitting the patch. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index feea967031cef90e478a0afd7aa0842f269e77c4..9557dd169b5d3da58bee9e3d51b0fb3d222bba62 100644 +index 811017f5d4554c90b8e9f4b83135561cffc93ddd..d8c4a7b3189e02518bda2b2aa17d07351d354e26 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -677,7 +677,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { +@@ -700,7 +700,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { } #endif diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index d927f2174ba42..92311e020a96c 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,7 +20,7 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index 8ee627925dfe2a113b1e17e0ff0d4dae582772b4..83235163284397899b1c7444d43d88f93921f37d 100644 +index 3988b82b28eedcad0e776f109853b32672423684..803342c0eccf3ddd5e307cf1bc0c97c4b121d6aa 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -1770,6 +1770,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( @@ -35,7 +35,7 @@ index 8ee627925dfe2a113b1e17e0ff0d4dae582772b4..83235163284397899b1c7444d43d88f9 // If we are likely to software composite the resource, we use sRGB because diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index 3d411412c72f3d23f71529617e7d11fe34509c34..f7d66bc1e075c0313d16b3c426ebefa0f5c85d72 100644 +index 63f087b74b93efe884df3833865e9aa7af912508..eb41d143ed1dd622a362b0f008a725034d6e1a97 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -97,6 +97,8 @@ class CC_EXPORT LayerTreeSettings { @@ -241,10 +241,10 @@ index d5d68aa5a40b577d7d7b545cdc67f60e18acdf86..8ab5b75d7eee5f3e17b997abcd84f504 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 d32cf0c76ec294915f615f1702d0b656056ba1bc..c12a2c3575b8b078a663e00f204e97ca415aa63f 100644 +index 3da3babcc13efc598faf17a4349dae73b908c380..9fd391a313f8fedeffc948201a5caf373ba3b12d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -219,6 +219,7 @@ +@@ -220,6 +220,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -252,7 +252,7 @@ index d32cf0c76ec294915f615f1702d0b656056ba1bc..c12a2c3575b8b078a663e00f204e97ca #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" #include "url/origin.h" -@@ -3174,6 +3175,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3175,6 +3176,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[] = { @@ -261,7 +261,7 @@ index d32cf0c76ec294915f615f1702d0b656056ba1bc..c12a2c3575b8b078a663e00f204e97ca switches::kDisableInProcessStackTraces, sandbox::policy::switches::kDisableSeccompFilterSandbox, diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc -index 6532f5a49ffa359d355a8191dd144092bdb3fa1d..cdc18bdb3fe87df54e125c204fda485193410826 100644 +index 9bd9885624666a8d65b0b1bb710c79077321c451..ff5842db80d81adc8f17d2eef36e82d37dbdbe47 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc @@ -4,6 +4,7 @@ @@ -280,7 +280,7 @@ index 6532f5a49ffa359d355a8191dd144092bdb3fa1d..cdc18bdb3fe87df54e125c204fda4851 namespace blink { -@@ -105,6 +107,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const { +@@ -144,6 +146,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const { } gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const { @@ -293,7 +293,7 @@ index 6532f5a49ffa359d355a8191dd144092bdb3fa1d..cdc18bdb3fe87df54e125c204fda4851 } diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc -index 85f622015df490e7abe32935297863b541e7fa97..9a691d2f9823f80ff0afcd741740f9cb0f773585 100644 +index 2c8e7445e9226f4860a0d36284e0cf770dbaa233..6cabd21b8dd996578d9aa02a553d4e3bca5fde04 100644 --- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc +++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc @@ -24,6 +24,7 @@ @@ -304,7 +304,7 @@ index 85f622015df490e7abe32935297863b541e7fa97..9a691d2f9823f80ff0afcd741740f9cb #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -179,6 +180,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -177,6 +178,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index c5f72722ac27a..5b9be1192590a 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,7 +6,7 @@ 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 5c53aad7e3cb709cfa6ec841978722fdab07422d..103437c715e375b4da2c34911e26022d71ea65a9 100644 +index 30e1f5005e09cb1e23a7e86f35e6736bb5fa60f1..a832270eedd4a92d9cfb2beb07b2978c90250b94 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -478,7 +478,11 @@ diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 683ecb262ccc9..c311b83e7653a 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -34,10 +34,10 @@ index 3dd95dcf37cbc3b73b79b098524bf05666e1b9de..57cb297221c01994580e3a0f3546fbad const base::TimeDelta& delay) { new_content_rendering_delay_ = delay; 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 fdd49c9b8ab26224c5280771588edddd358baea4..2e4ea75a7c5db811f822ed5bd9454a400fbb19e2 100644 +index 70e2acf7cff6d5a08550c648330dc8a4b2a960a5..18ba6606b41c5394d70caa67685679decfcea5b5 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -602,7 +602,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -607,7 +607,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch index 155a4ad8b1b59..f24e97dbaa4da 100644 --- a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch +++ b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch @@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572 Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index fd0e06f2b56b9380b2aef25118976dc137f6f4b0..cef472b58013a6f08dda45c81bf3e00679fa6e4e 100644 +index 6d3138edd55c0522b7321e7ab8f2c8642142134d..e7df33b6e0a88377cc1b9ea1adc6385dd6646b5d 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2679,7 +2679,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() { +@@ -2685,7 +2685,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 15fe95203b235..9fa593dd2b6af 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970 DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings); }; diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index dd504a91fc8a1a105703ec7e9a3ae6bc9d32dfc7..6e802c43f66409989980aabde6a4c53f187d85fb 100644 +index 36aa76157b9e8fee6835eb32e7ae8ff4aec7330f..3e78f4ba2f4d4135e24e7a51d8fb3eac93d22968 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1104,6 +1104,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1128,6 +1128,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index dd504a91fc8a1a105703ec7e9a3ae6bc9d32dfc7..6e802c43f66409989980aabde6a4c53f // 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 99b2b865a2c5c507fd95ef7dbdb38a97fe528570..b512420f0ff5f34b750525f78176227621d25a77 100644 +index 0c1b8bde497921c26347064023c3cf310a70b2a6..06615953d20408654e5e09298e52b1cf3bb0f379 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -249,6 +249,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -250,6 +250,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 99b2b865a2c5c507fd95ef7dbdb38a97fe528570..b512420f0ff5f34b750525f781762276 void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index b9f9a0b76f51b466cab9fd1895ad0a736580c924..cd4519d88c3bb8688e772eb0ed2d68e368a32052 100644 +index 1a2e862862e1f6db0b18441509553082d5b049d9..ac70e294f915f326095675d222f44519e2683ed0 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1097,6 +1097,9 @@ interface NetworkContext { +@@ -1095,6 +1095,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index b9f9a0b76f51b466cab9fd1895ad0a736580c924..cd4519d88c3bb8688e772eb0ed2d68e3 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index d02c338ff5eee3cd6a0825d882359693adda5f20..19a32203009847900a1ce40fef4daa69198cac30 100644 +index 799165ed898f55e9a00589fa8917e0ae9093672a..67c517fd1bc03826352d524f2953d229ea2d7177 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -110,6 +110,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -112,6 +112,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/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index e9d4dc1f81376..b82e8f77e146d 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 @@ -26,10 +26,10 @@ index 6f9221b95d5609d6bc3395bd3a3c81670877fdd0..bd4cd7cf50ea7f8816b35b3150bea8c4 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 3df3fb356d5625974bfaf1550d451020fcd91547..80593f0474017cd36ae013d26789f09d07676f5a 100644 +index d254838cfb21ec2135691b84fd0432cbdbb92e24..f6a6e48ddd93ed1026cf216a59fa4a4d3d0b56d6 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -403,6 +403,22 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -402,6 +402,22 @@ class NATIVE_THEME_EXPORT NativeTheme { ColorId color_id, ColorScheme color_scheme = ColorScheme::kDefault) const; @@ -52,7 +52,7 @@ index 3df3fb356d5625974bfaf1550d451020fcd91547..80593f0474017cd36ae013d26789f09d // Returns a shared instance of the native theme that should be used for web // rendering. Do not use it in a normal application context (i.e. browser). // The returned object should not be deleted by the caller. This function is -@@ -553,6 +569,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -552,6 +568,7 @@ class NATIVE_THEME_EXPORT NativeTheme { bool forced_colors_ = false; PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; diff --git a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch index 0d47fbfe2e7df..a2e292f08dd1f 100644 --- a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -85,10 +85,10 @@ index fb648cda4e1aaa578cf271a60027e43b5d3a39d2..b567763c75832b742403356bb5deeaec // Visibility ----------------------------------------------------------- diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 58fd788037a734862023d6992a43adc21e86a5ba..35e63a095feb646252bf707ea9afc0dedab26c45 100644 +index 68688f094a68f9f29d7e8ec8d1158a0a4d7bb3f3..755d037d6f5046d4641b6532918125d1ca84cdd8 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3480,6 +3480,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3477,6 +3477,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 58fd788037a734862023d6992a43adc21e86a5ba..35e63a095feb646252bf707ea9afc0de void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3490,7 +3497,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3487,7 +3494,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( 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 f3dec57dc5325..b191339129a5c 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,7 +7,7 @@ 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 1a5d8bf3536b911b0eb29d3ec8a9f0b818ec055b..e96cbd5c3d4568eab7819d0c7b2c4549d46f9441 100644 +index d56c8c83de75185dec10085c299eff88f25f4666..ccf8434c278900346c29b7f1e5693d593632b2c4 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc @@ -475,6 +475,9 @@ void SpellcheckService::LoadDictionaries() { @@ -38,23 +38,23 @@ index 1a5d8bf3536b911b0eb29d3ec8a9f0b818ec055b..e96cbd5c3d4568eab7819d0c7b2c4549 + hunspell_observer_ = observer; +} + - bool SpellcheckService::LoadExternalDictionary(std::string language, - std::string locale, - std::string path, + void SpellcheckService::Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h -index 29ea018d1df9f34204d26766fe010e6b38def7da..68af07c361ee1934e3f76497429c9d30f0212283 100644 +index a810ed516cce5f491ea75ae2d0bbda65e066ad3e..fcfd3f5801a967fdd7b3e99094a35eddb1a31789 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h -@@ -141,6 +141,8 @@ class SpellcheckService : public KeyedService, +@@ -134,6 +134,8 @@ class SpellcheckService : public KeyedService, // dictionaries available. bool IsSpellcheckEnabled() const; + void SetHunspellObserver(SpellcheckHunspellDictionary::Observer* observer); + - // Load a dictionary from a given path. Format specifies how the dictionary - // is stored. Return value is true if successful. - bool LoadExternalDictionary(std::string language, -@@ -319,6 +321,8 @@ class SpellcheckService : public KeyedService, + // NotificationProfile implementation. + void Observe(int type, + const content::NotificationSource& source, +@@ -301,6 +303,8 @@ class SpellcheckService : public KeyedService, // A pointer to the BrowserContext which this service refers to. content::BrowserContext* context_; 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 f2df9dfb076ef..097510f816f36 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -455,7 +455,7 @@ index 2bb30e5318b6b48c2e6d4b1f64a6a36c68f963d1..9e805f27a9d7d1c0aa68cdf9f48895c0 waiting_on_draw_ack_ = true; diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index d22a77a7d4e9a26db6042d4a3c7182ef482bb3a6..2bd6112b27e86c981b731aa0777313867b9a7129 100644 +index 11ac1649ed0f5be1d12e8a30b8d170f86b8e9bb8..ade5afce4a5d3c9e44081a3b1ac971b595e7a5da 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc @@ -414,8 +414,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( diff --git a/patches/chromium/fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch b/patches/chromium/fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch index d66b5daace7ca..3260a967c23d7 100644 --- a/patches/chromium/fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch +++ b/patches/chromium/fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch @@ -7,7 +7,7 @@ Subject: Disable usage of pthread_fchdir_np and pthread_chdir_np in MAS builds. diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc -index c074f0d73eab1993b580f317c42480688e6669e6..2a86b0c6897efd10c483d0816b3f7a54f1e13d2a 100644 +index d3396d984086717e69d99cff3107ab09506b2b02..237e310b12eb9814f7da9103cf61d69e423b2920 100644 --- a/base/process/launch_mac.cc +++ b/base/process/launch_mac.cc @@ -27,8 +27,10 @@ extern "C" { @@ -21,7 +21,7 @@ index c074f0d73eab1993b580f317c42480688e6669e6..2a86b0c6897efd10c483d0816b3f7a54 int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim) API_AVAILABLE(macosx(10.14)); -@@ -103,21 +105,29 @@ class PosixSpawnFileActions { +@@ -96,21 +98,29 @@ class PosixSpawnFileActions { }; int ChangeCurrentThreadDirectory(const char* path) { @@ -51,7 +51,7 @@ index c074f0d73eab1993b580f317c42480688e6669e6..2a86b0c6897efd10c483d0816b3f7a54 } struct GetAppOutputOptions { -@@ -233,11 +243,13 @@ Process LaunchProcess(const std::vector& argv, +@@ -230,11 +240,13 @@ Process LaunchProcess(const std::vector& argv, file_actions.Inherit(STDERR_FILENO); } diff --git a/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch b/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch index ee5d9a83c430a..4978e34571c2f 100644 --- a/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch +++ b/patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch @@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced to true as then Chromiums assumptions around processes become correct. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index f86d10039dfec898565e168650d47d879f920231..2295f76179beebe4d74ec8485134bba03609fe59 100644 +index 3981c2caabd0362530c27e0dee572a56aaac0caf..81ecd2d06104aa125c95d40336e8192ec23a1206 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2972,11 +2972,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { +@@ -2971,11 +2971,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { WebContentsImpl* outermost = GetOutermostWebContents(); if (event.button == blink::WebPointerProperties::Button::kBack && outermost->controller_.CanGoBack()) { diff --git a/patches/chromium/fix_use_electron_generated_resources.patch b/patches/chromium/fix_use_electron_generated_resources.patch index 98fa670924c76..7a5d51deeba5b 100644 --- a/patches/chromium/fix_use_electron_generated_resources.patch +++ b/patches/chromium/fix_use_electron_generated_resources.patch @@ -12,7 +12,7 @@ as they will loaded as empty strings. * IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME on Windows diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc -index e8d79477eb7d0031ca64f76de2a18230521ff294..02c7630bb80ef06962b533cb29f8d13c68c80bd8 100644 +index 3256f23502945b573b3e739e7916346867913bdf..0c72fa489b65a923637c2dc09a5c815940aeac29 100644 --- a/chrome/browser/pdf/pdf_extension_util.cc +++ b/chrome/browser/pdf/pdf_extension_util.cc @@ -9,8 +9,7 @@ diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index b653f3e7f43f6..62ba001597794 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -42,10 +42,10 @@ index 65e627f2fa89352b0be27b5813d71a622bf1d326..113f4fd00f1cf994b39f64c9da387855 // another SiteInstance for the same site. void RegisterSiteInstance(SiteInstanceImpl* site_instance); diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index 6c29eb162f68f505ed3bb2e85c4f60ecda58f708..48b1383423c82bcd65f09d312a1d385123cef2ce 100644 +index 73a069bfa7e27c1cd8c5037237028d61d6c0716d..e5cf0906ed7e293665bddc991e40dad491eb61fa 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -1468,6 +1468,21 @@ void NavigationRequest::BeginNavigation() { +@@ -1490,6 +1490,21 @@ void NavigationRequest::BeginNavigation() { if (IsSameDocument()) { render_frame_host_ = frame_tree_node_->current_frame_host(); } else { @@ -67,7 +67,7 @@ index 6c29eb162f68f505ed3bb2e85c4f60ecda58f708..48b1383423c82bcd65f09d312a1d3851 // Select an appropriate RenderFrameHost. std::string frame_host_choice_reason; render_frame_host_ = -@@ -5303,6 +5318,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { +@@ -5338,6 +5353,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { {WILL_START_REQUEST, { WILL_REDIRECT_REQUEST, WILL_PROCESS_RESPONSE, @@ -75,7 +75,7 @@ index 6c29eb162f68f505ed3bb2e85c4f60ecda58f708..48b1383423c82bcd65f09d312a1d3851 READY_TO_COMMIT, DID_COMMIT, CANCELING, -@@ -5316,10 +5332,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { +@@ -5351,10 +5367,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const { WILL_FAIL_REQUEST, }}, {WILL_PROCESS_RESPONSE, { @@ -91,10 +91,10 @@ index 6c29eb162f68f505ed3bb2e85c4f60ecda58f708..48b1383423c82bcd65f09d312a1d3851 NOT_STARTED, DID_COMMIT, diff --git a/content/browser/renderer_host/navigation_request.h b/content/browser/renderer_host/navigation_request.h -index 6f293b4c88decb7306910707bfc59e7609966802..2109a1f42472e2e70b38bae1b58c4d130fb250cb 100644 +index 75a0258e27546237e1382083c0cc5fb2016e638c..a0b16ea67cd74f74058570a1ede64b305578bb09 100644 --- a/content/browser/renderer_host/navigation_request.h +++ b/content/browser/renderer_host/navigation_request.h -@@ -131,6 +131,10 @@ class CONTENT_EXPORT NavigationRequest +@@ -133,6 +133,10 @@ class CONTENT_EXPORT NavigationRequest // asynchronous. WILL_PROCESS_RESPONSE, @@ -106,10 +106,10 @@ index 6f293b4c88decb7306910707bfc59e7609966802..2109a1f42472e2e70b38bae1b58c4d13 READY_TO_COMMIT, diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 910338af8eb6b9e3551bbf4245007433ad1decac..1d5ab0a319b1c43d43a9c1e1e76de245cd5d6a4e 100644 +index 8c5937f1d4caab2d2554269be0bfee10925ddf7e..f276a55a8e097a63f02e7a038667ec381d331224 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -2679,6 +2679,16 @@ scoped_refptr +@@ -2703,6 +2703,16 @@ scoped_refptr RenderFrameHostManager::GetSiteInstanceForNavigationRequest( NavigationRequest* request, std::string* reason) { @@ -126,7 +126,7 @@ index 910338af8eb6b9e3551bbf4245007433ad1decac..1d5ab0a319b1c43d43a9c1e1e76de245 SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance(); // All children of MHTML documents must be MHTML documents. They all live in -@@ -2706,10 +2716,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2730,10 +2740,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( // // TODO(clamy): We should also consider as a candidate SiteInstance the // speculative SiteInstance that was computed on redirects. @@ -191,7 +191,7 @@ index 910338af8eb6b9e3551bbf4245007433ad1decac..1d5ab0a319b1c43d43a9c1e1e76de245 // Account for renderer-initiated reload as well. // Needed as a workaround for https://crbug.com/1045524, remove it when it is -@@ -2749,6 +2809,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2773,6 +2833,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -229,7 +229,7 @@ index 3dc0f0cf7f3e9b9e75cf053817e9ac5fba0182bc..16759a044e24ac3c0719a57e196fbf3e size_t GetRelatedActiveContentsCount() override; bool RequiresDedicatedProcess() override; diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index 91f04ded7cb3d539ec34c1f542023aea1738654e..729a1560facbf3cfe080c0188255f3d3ebeeb844 100644 +index e9e45bacdcc5ad09ac933ccaaa663e0d05a0ad33..780e3a085843a34e226838e24a3df0b62379e688 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -65,6 +65,21 @@ @@ -255,10 +255,10 @@ index 91f04ded7cb3d539ec34c1f542023aea1738654e..729a1560facbf3cfe080c0188255f3d3 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 4337c4121573a8e010a3697c492d92f66a09ad13..604dceb7cf068f6bb68fbd4e1d95182669aa9426 100644 +index 133aef45c3187fac0e47e1538df3252de1fdfb8c..7c14448a06f64a685797c604564118c4a3c45f24 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -254,8 +254,45 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -255,8 +255,45 @@ class CONTENT_EXPORT ContentBrowserClient { using IsClipboardPasteAllowedCallback = base::OnceCallback; diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index cdbf4b67fb1bd..90f57072d9c98 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -117,7 +117,7 @@ index 055d28d8c6f6cc6826db1f888b1ea0f535c3c716..1eedb217a700ffdc73d30c5daadf003d // 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 cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fdab07422d 100644 +index 5aba2a32bc12e7640286be13e5ed43ec52b404db..30e1f5005e09cb1e23a7e86f35e6736bb5fa60f1 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -234,8 +234,10 @@ @@ -131,7 +131,7 @@ index cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fd // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1379,8 +1381,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1385,8 +1387,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -142,7 +142,7 @@ index cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fd return [GetInProcessNSView() window]; } -@@ -1412,9 +1416,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1418,9 +1422,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -154,7 +154,7 @@ index cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fd } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -1901,12 +1907,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1907,12 +1913,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index d5d73ac6467c4..382682f6973d4 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -547,18 +547,20 @@ index a994f74bb68d1e57ffa787e159f0a6c69e7b6953..1d84f84b59b2bae75c10c00da730022e } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 19c038fea899cab6a9fede71f242b1cd7b7b888b..8f9cb7e6bc1003e6e64a3a5c4171f6ade933c5bc 100644 +index b50f468c7666150ed501566d36ebe4e1fd32227f..f992753b2b3d514e836655e0aa81d00a61d8083d 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc -@@ -231,6 +231,7 @@ class DnsConfigServicePosix::Watcher { +@@ -232,8 +232,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { - bool Watch() { + bool Watch() override { + CheckOnCorrectSequence(); +- bool success = true; +#ifndef MAS_BUILD if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged, base::Unretained(this)))) { LOG(ERROR) << "DNS config watch failed to start."; -@@ -247,6 +248,7 @@ class DnsConfigServicePosix::Watcher { +@@ -251,6 +251,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { success = false; } #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 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 79d6bc074f1d7..fb1473597bf6e 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ 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 238fc37e143eadb65d48de1ad34c5344148c235d..dd504a91fc8a1a105703ec7e9a3ae6bc9d32dfc7 100644 +index a75980730046a6f570e75461cf948414e7cf6580..36aa76157b9e8fee6835eb32e7ae8ff4aec7330f 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -115,6 +115,11 @@ +@@ -118,6 +118,11 @@ #include "services/network/url_loader.h" #include "services/network/url_request_context_builder_mojo.h" @@ -22,7 +22,7 @@ index 238fc37e143eadb65d48de1ad34c5344148c235d..dd504a91fc8a1a105703ec7e9a3ae6bc #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -373,6 +378,79 @@ bool SCTAuditingDelegate::IsSCTAuditingEnabled() { +@@ -376,6 +381,79 @@ bool SCTAuditingDelegate::IsSCTAuditingEnabled() { } // namespace @@ -102,7 +102,7 @@ index 238fc37e143eadb65d48de1ad34c5344148c235d..dd504a91fc8a1a105703ec7e9a3ae6bc constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -572,6 +650,13 @@ void NetworkContext::SetClient( +@@ -575,6 +653,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,7 +116,7 @@ index 238fc37e143eadb65d48de1ad34c5344148c235d..dd504a91fc8a1a105703ec7e9a3ae6bc void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -1853,8 +1938,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1877,8 +1962,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( "NetworkContext should pass CertVerifierServiceRemoteParams."; std::unique_ptr cert_verifier; @@ -127,7 +127,7 @@ index 238fc37e143eadb65d48de1ad34c5344148c235d..dd504a91fc8a1a105703ec7e9a3ae6bc } else { if (params_->cert_verifier_params && params_->cert_verifier_params->is_remote_params()) { -@@ -1882,7 +1968,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1906,7 +1992,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( cert_net_fetcher_ = base::MakeRefCounted(); @@ -136,7 +136,7 @@ index 238fc37e143eadb65d48de1ad34c5344148c235d..dd504a91fc8a1a105703ec7e9a3ae6bc } #if BUILDFLAG(IS_CT_SUPPORTED) -@@ -1906,9 +1992,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1930,9 +2016,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( // Whether the cert verifier is remote or in-process, we should wrap it in // caching and coalescing layers to avoid extra verifications and IPCs. @@ -148,7 +148,7 @@ index 238fc37e143eadb65d48de1ad34c5344148c235d..dd504a91fc8a1a105703ec7e9a3ae6bc #if BUILDFLAG(IS_CHROMEOS_ASH) cert_verifier_with_trust_anchors_ = -@@ -1920,10 +2006,24 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1944,10 +2030,24 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -176,10 +176,10 @@ index 238fc37e143eadb65d48de1ad34c5344148c235d..dd504a91fc8a1a105703ec7e9a3ae6bc #if BUILDFLAG(IS_CT_SUPPORTED) if (params_->enforce_chrome_ct_policy) { diff --git a/services/network/network_context.h b/services/network/network_context.h -index 022b586d786c21264dcc689a61be5c4d56fd9e71..99b2b865a2c5c507fd95ef7dbdb38a97fe528570 100644 +index b3c053ab425b923f1ae99d8d51f94acc58cfaa14..0c1b8bde497921c26347064023c3cf310a70b2a6 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -89,6 +89,7 @@ class DomainReliabilityMonitor; +@@ -90,6 +90,7 @@ class DomainReliabilityMonitor; namespace network { class CertVerifierWithTrustAnchors; @@ -187,7 +187,7 @@ index 022b586d786c21264dcc689a61be5c4d56fd9e71..99b2b865a2c5c507fd95ef7dbdb38a97 class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -193,6 +194,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -194,6 +195,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -196,7 +196,7 @@ index 022b586d786c21264dcc689a61be5c4d56fd9e71..99b2b865a2c5c507fd95ef7dbdb38a97 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -693,6 +696,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -698,6 +701,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif @@ -206,7 +206,7 @@ index 022b586d786c21264dcc689a61be5c4d56fd9e71..99b2b865a2c5c507fd95ef7dbdb38a97 // CertNetFetcher is not used by the current platform, or if the actual // net::CertVerifier is instantiated outside of the network service. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 5103b20abed953ddde12f421c3487acf16b5d18e..b9f9a0b76f51b466cab9fd1895ad0a736580c924 100644 +index 294b04445bd375b2e0afa4a68ef5586d6a83c688..1a2e862862e1f6db0b18441509553082d5b049d9 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -228,6 +228,17 @@ struct CTPolicy { diff --git a/patches/chromium/no_cache_storage_check.patch b/patches/chromium/no_cache_storage_check.patch index 6cae74e38218d..4657c218ee3b4 100644 --- a/patches/chromium/no_cache_storage_check.patch +++ b/patches/chromium/no_cache_storage_check.patch @@ -7,7 +7,7 @@ Do not check for unique origin in CacheStorage, in Electron we may have scripts running without an origin. diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc -index 0c0beb628e1a57ffd288e05203b75b82373932b0..2cd698a42391520de36594294e6f2ad243e70481 100644 +index 5e85bd8335d46b743700248241d059fed8924ec8..24e26ac4364818249e7ab29a08f5f73301ae190e 100644 --- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc +++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc @@ -107,7 +107,7 @@ class LegacyCacheStorage::CacheLoader { diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index ef6c0c44bc052..f1257a4fe4cd6 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -108,10 +108,10 @@ index f9b6a18aa73968506ddeca13de69b368f4ca8606..d45cb1c32be1b5c76840dafcd96fd06c mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 85aaafeae6433f6f93f419d2c7be24447fb7ad53..75f44a4dbd1e5a62b69578e385f8c7b170c6153b 100644 +index 6eb6699bad25f92bbcd2267d5cd9f92acdf8e5ca..7662384242619d32f5133757674fddae40615873 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2090,7 +2090,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2091,7 +2091,7 @@ void RenderProcessHostImpl::CreateNotificationService( mojo::PendingReceiver receiver) { DCHECK_CURRENTLY_ON(BrowserThread::UI); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 2e7ff75177834..0c03235d2aebc 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -385,7 +385,7 @@ index dfbaf97a1c3d73d324095f46a4ea73d68d5188cc..d5fd684fe8cef92ec0432143d284ff0c // Tells the RenderFrame to switch the CSS to print media type, render every // requested page using the print preview document's frame/node, and then diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 96bee841f51e340f7c91925b1d5e76c10dd0e6f7..8dcfa1fb449a575b6ce4d611b1a736a17dbd856b 100644 +index d741272adb91a0cfa35af937edf42d88203ae987..08c4c5914810eea5885be46cfa0f87c4265cf027 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -38,6 +38,7 @@ @@ -516,7 +516,7 @@ index 96bee841f51e340f7c91925b1d5e76c10dd0e6f7..8dcfa1fb449a575b6ce4d611b1a736a1 // Check if |this| is still valid. if (!self) return; -@@ -2106,7 +2147,9 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2109,7 +2150,9 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -527,7 +527,7 @@ index 96bee841f51e340f7c91925b1d5e76c10dd0e6f7..8dcfa1fb449a575b6ce4d611b1a736a1 mojom::PrintPagesParams settings; settings.params = mojom::PrintParams::New(); GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params); -@@ -2130,12 +2173,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -2133,12 +2176,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } diff --git a/patches/chromium/put_back_deleted_colors_for_autofill.patch b/patches/chromium/put_back_deleted_colors_for_autofill.patch index d998a13eb1174..7636092fbcbdd 100644 --- a/patches/chromium/put_back_deleted_colors_for_autofill.patch +++ b/patches/chromium/put_back_deleted_colors_for_autofill.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/gtk/native_theme_gtk.cc b/ui/gtk/native_theme_gtk.cc -index 5964c643e591af6f65f82210e8b6feaef5706ed1..db9fb8be26b86b9708c6599203187f754d6da9e5 100644 +index 6a864ebf186ee22b5a3495562f25f473e51fece0..50c2c58fe6ce0bb3ab14f3dc80b4b2f90eedf8ac 100644 --- a/ui/gtk/native_theme_gtk.cc +++ b/ui/gtk/native_theme_gtk.cc -@@ -357,6 +357,29 @@ base::Optional SkColorFromColorId( +@@ -356,6 +356,29 @@ base::Optional SkColorFromColorId( case ui::NativeTheme::kColorId_TableHeaderSeparator: return GetBorderColor("GtkTreeView#treeview.view GtkButton#button"); 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 b4fe255098857..0bb76b161cde6 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -43,10 +43,10 @@ index 603db59e5ef4f4dd07350fdeee883eb896966ecd..8f61a9677e5f5b6278c989c492965613 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index bcedde3b0f8f5112e25e5ae1c78a24b77bcc85d8..1dc2fa4a5cdf86eada6794a80a196f6ca3727fe8 100644 +index 3ea1b844a80f85da1d4e3c47d0a33d0e9eeb02ef..d20ce60c04007a83e412defbf525a756788bd0cc 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4120,6 +4120,12 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4119,6 +4119,12 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -60,10 +60,10 @@ index bcedde3b0f8f5112e25e5ae1c78a24b77bcc85d8..1dc2fa4a5cdf86eada6794a80a196f6c RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index bd4c845cd98958360baffb075e7068c4274d9dcd..a205c2dafe97e3096d31846438e0c2da82a64458 100644 +index 4b09bb93269a9c9d25824992660c3613119ad3d4..90d4919d793b99f73a9bad85fbb0b41b380e8845 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -959,6 +959,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -965,6 +965,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, blink::mojom::FrameVisibility visibility) override; void SendScreenRects() override; TextInputManager* GetTextInputManager() override; diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 946a3e5bd0f09..993241e3e07a0 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 317e9702abf82a60f75929c3c139bf3283e47da0..ce7a2a1a0edd6f486b53778897e438311f83967e 100644 +index 5eeb0d0c2598bbcff4981dcb6f43cae82ec37c99..f2d498b5fa6811acf62996b9b048aed5210ce8bb 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1408,7 +1408,7 @@ if (is_chrome_branded && !is_android) { +@@ -1416,7 +1416,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 317e9702abf82a60f75929c3c139bf3283e47da0..ce7a2a1a0edd6f486b53778897e43831 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1428,6 +1428,12 @@ if (!is_android) { +@@ -1436,6 +1436,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch index ddd3828bd0163..2d193daeb7e5d 100644 --- a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch +++ b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch @@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th are required to be NAPI or context aware (Electron v11), this patch can be removed. diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc -index fea876ec7fa3cf0d3c11dad64750837b28658bef..a87d23b7d2171663fa55c78d390bc3b8279a04f1 100644 +index e72dd633107c2a4841d814e5b1dffd8f275fbaab..19561f1c30f9610edccb2d15e456eae00a7fdd34 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1277,6 +1277,25 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel() { +@@ -1280,6 +1280,25 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel() { #endif } @@ -39,7 +39,7 @@ index fea876ec7fa3cf0d3c11dad64750837b28658bef..a87d23b7d2171663fa55c78d390bc3b8 WebLocalFrame* frame, ui::PageTransition transition_type, diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h -index 857b350afe980dd79e4c76ebd3cb1be461457f0a..1cac9fc1d8d92d5afe02aa1d1dba05895d4d2672 100644 +index 30718f6b057fcca8eef7516cb48720c4137c3cb4..7a1f4ad8e73cf141ac7c60a9aced2b81cbc61812 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h @@ -122,6 +122,11 @@ class ChromeContentRendererClient @@ -55,7 +55,7 @@ index 857b350afe980dd79e4c76ebd3cb1be461457f0a..1cac9fc1d8d92d5afe02aa1d1dba0589 override; void WillSendRequest(blink::WebLocalFrame* frame, diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc -index 78174b924c7b8429d1400b51f4a560d750cc0af6..20eee821969cfa32a61cc0c16e216d3821253d77 100644 +index 18e13633bc5f2be2830f6c10f4a46783c57720d4..e9123e07996f511e66ce23e28bcfc2f8ecedd6c5 100644 --- a/content/public/renderer/content_renderer_client.cc +++ b/content/public/renderer/content_renderer_client.cc @@ -117,6 +117,14 @@ bool ContentRendererClient::HandleNavigation( @@ -74,7 +74,7 @@ index 78174b924c7b8429d1400b51f4a560d750cc0af6..20eee821969cfa32a61cc0c16e216d38 blink::WebLocalFrame* frame, ui::PageTransition transition_type, diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 16d0dd4456f214b14fbdf224ba938ebb1cb63106..4dc340938d54597a315ebb441d769dccb398757d 100644 +index 357df68c64071ef7dca98ce4aab885dd936b1c49..f501a2ab0bd6d4664dad13913671c4d7d5a96c1e 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -210,6 +210,13 @@ class CONTENT_EXPORT ContentRendererClient { @@ -92,10 +92,10 @@ index 16d0dd4456f214b14fbdf224ba938ebb1cb63106..4dc340938d54597a315ebb441d769dcc // |url|. If the function returns a valid |new_url|, the request must be // updated to use it. diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 74301e21452af01ebbd5f945610c75cf66aed8a9..fd0e06f2b56b9380b2aef25118976dc137f6f4b0 100644 +index 2548f5fcb9872486b69de478ce9f5bb1fe14763c..6d3138edd55c0522b7321e7ab8f2c8642142134d 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -5461,6 +5461,23 @@ void RenderFrameImpl::BeginNavigation( +@@ -5438,6 +5438,23 @@ void RenderFrameImpl::BeginNavigation( // we can do a per-frame check here rather than a process-wide check. bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) || (enabled_bindings_ & kWebUIBindingsPolicyMask); diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 85c99e8f68d34..246c10dd7b8a3 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 5c7bba51a2ddccbc94851d8968528755ece91b3e..95ca8aad74cd2d2ed77421f0cfc090dc6f6978d8 100644 +index 77b13bd51e1d9b51d40096b9c57c0d66486ec287..a54626a53de9ef005c8c0c43c0ab5a4bced5d9ae 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1303,7 +1303,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1294,7 +1294,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 99de1e56b7844..9259cae7e4150 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 75f44a4dbd1e5a62b69578e385f8c7b170c6153b..d32cf0c76ec294915f615f1702d0b656056ba1bc 100644 +index 7662384242619d32f5133757674fddae40615873..3da3babcc13efc598faf17a4349dae73b908c380 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -400,6 +400,11 @@ class RendererSandboxedProcessLauncherDelegate +@@ -401,6 +401,11 @@ class RendererSandboxedProcessLauncherDelegate { } @@ -37,7 +37,7 @@ index 75f44a4dbd1e5a62b69578e385f8c7b170c6153b..d32cf0c76ec294915f615f1702d0b656 ~RendererSandboxedProcessLauncherDelegate() override = default; #if defined(OS_WIN) -@@ -421,6 +426,9 @@ class RendererSandboxedProcessLauncherDelegate +@@ -422,6 +427,9 @@ class RendererSandboxedProcessLauncherDelegate #if BUILDFLAG(USE_ZYGOTE_HANDLE) ZygoteHandle GetZygote() override { @@ -47,7 +47,7 @@ index 75f44a4dbd1e5a62b69578e385f8c7b170c6153b..d32cf0c76ec294915f615f1702d0b656 const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -435,10 +443,13 @@ class RendererSandboxedProcessLauncherDelegate +@@ -436,10 +444,13 @@ class RendererSandboxedProcessLauncherDelegate return sandbox::policy::SandboxType::kRenderer; } @@ -62,7 +62,7 @@ index 75f44a4dbd1e5a62b69578e385f8c7b170c6153b..d32cf0c76ec294915f615f1702d0b656 }; const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey"; -@@ -1815,11 +1826,18 @@ bool RenderProcessHostImpl::Init() { +@@ -1816,11 +1827,18 @@ bool RenderProcessHostImpl::Init() { cmd_line->PrependWrapper(renderer_prefix); AppendRendererCommandLine(cmd_line.get()); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index bca1cf51f2e28..b816251bcbf29 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 2295f76179beebe4d74ec8485134bba03609fe59..bcedde3b0f8f5112e25e5ae1c78a24b77bcc85d8 100644 +index 81ecd2d06104aa125c95d40336e8192ec23a1206..3ea1b844a80f85da1d4e3c47d0a33d0e9eeb02ef 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2726,6 +2726,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2725,6 +2725,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -25,7 +25,7 @@ index 2295f76179beebe4d74ec8485134bba03609fe59..bcedde3b0f8f5112e25e5ae1c78a24b7 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2736,6 +2742,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2735,6 +2741,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -34,7 +34,7 @@ index 2295f76179beebe4d74ec8485134bba03609fe59..bcedde3b0f8f5112e25e5ae1c78a24b7 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index a67421e6ddba4fa54e8f6a9d7ec34df07ca0121e..d81892ebf337407795a9ccca7a97d0837f46ca8f 100644 +index 05efddc8d80fad9be7f4276d51a80ab0b747e484..c558236eb621ae6a67468afaa1b8431b9857a35f 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -87,8 +87,11 @@ class BrowserContext; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 3fc1cf5972fa9..ecaddd89c65ea 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,10 +8,10 @@ This allows dragging and dropping between s. Originally landed in https://github.com/electron/libchromiumcontent/pull/267 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index b68f773406739d0db8bf4db892ff535ad91b50be..972fc06125deafcd0bf59c69a3e64ec4de6fd8fd 100644 +index 6c527e2955a3962dc21eb8a8e579c92f980f1418..0c678c609a68000864b0b8498a64d588d7723b32 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -795,9 +795,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { +@@ -797,9 +797,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { bool WebContentsViewAura::IsValidDragTarget( RenderWidgetHostImpl* target_rwh) const { diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 8fd84d41f7b0f..bd3a0fd26c369 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,10 +10,10 @@ 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 7006cdc4b290a49a39be30036c4bd8e19eadeb0f..16d0dd4456f214b14fbdf224ba938ebb1cb63106 100644 +index a4695ba832fc5ae6f458baf38bbf7efa95dc610e..357df68c64071ef7dca98ce4aab885dd936b1c49 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -375,6 +375,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -374,6 +374,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,7 +26,7 @@ index 7006cdc4b290a49a39be30036c4bd8e19eadeb0f..16d0dd4456f214b14fbdf224ba938ebb // 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 903703feaed1fbc4c15cede60bc474171972d898..c93e9e7019ed67e05afd0da33690240ddea2690f 100644 +index d21f7e95c856853116b317bc76dac6750037c941..6f8d94872d0419da5907d4cf3617c9a1582cc11f 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -898,6 +898,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { @@ -43,10 +43,10 @@ index 903703feaed1fbc4c15cede60bc474171972d898..c93e9e7019ed67e05afd0da33690240d 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 b854f5bc6e3893d64aad14024055ca5f0d879a56..d15e267e8a00da74fc8cef910dba0d023d86c923 100644 +index c8470ab1919a3b23793373495df02051798e81b3..801eaf387e3af6b800b65a667d356e5b26e57fcf 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -192,6 +192,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -194,6 +194,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 b854f5bc6e3893d64aad14024055ca5f0d879a56..d15e267e8a00da74fc8cef910dba0d02 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 46bdf2e6a7b6271cb358c4fd32dbc2f3bec3d891..72c06499ce641493b88dd0328199b8ef4fd6f2c2 100644 +index e43136e0621f5d5db93f18140abab684006afae8..8dfef4f1d53c61aae04f46040a7cec683534b870 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -688,6 +688,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -690,6 +690,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index 46bdf2e6a7b6271cb358c4fd32dbc2f3bec3d891..72c06499ce641493b88dd0328199b8ef 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 7a04127a6141a696332698f65e22e8ce5d326abd..1b352e13134d2a95bcaf714480e79f91554be438 100644 +index 2e66c480af8993d28d4bca0bcb31743541019914..edb621dbe888444a15035581891500b959d10d48 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -739,6 +739,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -735,6 +735,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { nested_runner_->QuitNow(); } 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 a5c65443ec7fc..daf24b50171ba 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,10 +19,10 @@ 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 4dc340938d54597a315ebb441d769dccb398757d..d6c7afa226202b0c7add7ae73ed6aff6b6f2b6e5 100644 +index f501a2ab0bd6d4664dad13913671c4d7d5a96c1e..e633d1755405feeae8c45c0bcbf90f672aacadc5 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -382,6 +382,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -381,6 +381,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,7 +35,7 @@ index 4dc340938d54597a315ebb441d769dccb398757d..d6c7afa226202b0c7add7ae73ed6aff6 // 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 c93e9e7019ed67e05afd0da33690240ddea2690f..6f30f457b1e4854c00176340431876acee66dca8 100644 +index 6f8d94872d0419da5907d4cf3617c9a1582cc11f..9f24498f35719aca325bb7a34c7141408812370e 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc @@ -910,6 +910,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( @@ -52,10 +52,10 @@ index c93e9e7019ed67e05afd0da33690240ddea2690f..6f30f457b1e4854c00176340431876ac 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 d15e267e8a00da74fc8cef910dba0d023d86c923..4334e2f874eb729bdb496ff0cf724e3b381fc29e 100644 +index 801eaf387e3af6b800b65a667d356e5b26e57fcf..364b832172f2c0008f5ae62048c74bd39ff4fafc 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -192,6 +192,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -194,6 +194,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 d15e267e8a00da74fc8cef910dba0d023d86c923..4334e2f874eb729bdb496ff0cf724e3b 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 72c06499ce641493b88dd0328199b8ef4fd6f2c2..816fcff1a11028cc8dd3f66dfb95d262c5531590 100644 +index 8dfef4f1d53c61aae04f46040a7cec683534b870..685f38c7604cd0b3393851b4fe74fbd75c4c2672 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -688,6 +688,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -690,6 +690,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/v8/add_realloc.patch b/patches/v8/add_realloc.patch index a0b7b5b8e3f3a..23c74912c9211 100644 --- a/patches/v8/add_realloc.patch +++ b/patches/v8/add_realloc.patch @@ -12,7 +12,7 @@ when we override ReallocateBufferMemory, so we therefore need to implement Realloc on the v8 side. diff --git a/include/v8.h b/include/v8.h -index e9235d17955089433ef27d3d10c1b5994862b550..d89a5bbed03d8782885b7b9c69d1513c03b1de76 100644 +index 439613c3c9b003ad7a94bfeed8cae184c2677c5a..5b6ba7f444994c5e8a5079f9f399a15d4a34ff24 100644 --- a/include/v8.h +++ b/include/v8.h @@ -5275,6 +5275,13 @@ class V8_EXPORT ArrayBuffer : public Object { @@ -30,7 +30,7 @@ index e9235d17955089433ef27d3d10c1b5994862b550..d89a5bbed03d8782885b7b9c69d1513c * Free the memory block of size |length|, pointed to by |data|. * That memory is guaranteed to be previously allocated by |Allocate|. diff --git a/src/api/api.cc b/src/api/api.cc -index 325a25fa1e37ff618c8ad57633c060d4e50d949f..39d877942bcf17a01b32c0e6325a47b798f81262 100644 +index bace7f4fbd0d37244aa890eff00b9726775c419e..e405464fec98fbee0e6dbc35b7fc655c7cbc2dc6 100644 --- a/src/api/api.cc +++ b/src/api/api.cc @@ -545,6 +545,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 7e8bda6a25966..9a23ea3168ebc 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,7 +9,7 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 843c569370ec8f3efef602ed413fa2dddf0ec321..86018a9d25285ded2565dc7c4fc8fe52a109f809 100644 +index 98ebd461469ef911b38a09dbc01c1823ff8adab9..a7c96aad93b5aee8d8a4cccbc81d140d6315b203 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -432,7 +432,7 @@ config("internal_config") { @@ -21,7 +21,7 @@ index 843c569370ec8f3efef602ed413fa2dddf0ec321..86018a9d25285ded2565dc7c4fc8fe52 defines += [ "BUILDING_V8_SHARED" ] } } -@@ -4666,7 +4666,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4668,7 +4668,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 843c569370ec8f3efef602ed413fa2dddf0ec321..86018a9d25285ded2565dc7c4fc8fe52 deps = [ ":v8_libbase", -@@ -4703,6 +4703,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -4705,6 +4705,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/chore_disallow_copying_cppheapcreateparams.patch b/patches/v8/chore_disallow_copying_cppheapcreateparams.patch index 4ca745c8b7220..e51bf4cfca2f1 100644 --- a/patches/v8/chore_disallow_copying_cppheapcreateparams.patch +++ b/patches/v8/chore_disallow_copying_cppheapcreateparams.patch @@ -30,15 +30,15 @@ index 8a0d9cb9a0737e1642d666754926485b06136e98..31cb7545a37911f64597476eb4c4eb40 /** diff --git a/include/v8.h b/include/v8.h -index d89a5bbed03d8782885b7b9c69d1513c03b1de76..ca9fe11a9b0af970ffd6ad32998c2fc6ac8e73f7 100644 +index 5b6ba7f444994c5e8a5079f9f399a15d4a34ff24..142684417bca56f6e9304594c9c3a2d51656ee26 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -49,7 +49,7 @@ class BooleanObject; - class CFunction; - class Context; - class CppHeap; +@@ -93,7 +93,7 @@ class Utils; + class Value; + class WasmMemoryObject; + class WasmModuleObject; -struct CppHeapCreateParams; +class CppHeapCreateParams; - class Data; - class Date; - class External; + template + class GlobalValueMap; + template diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 87dabf95c5c50..28983a324f4bf 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 39d877942bcf17a01b32c0e6325a47b798f81262..68089eb223224ad8fcc695acefb914a6b400700b 100644 +index e405464fec98fbee0e6dbc35b7fc655c7cbc2dc6..f38621c55f7f4b9d0c6e19fcc185abfd92007a93 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9002,7 +9002,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9005,7 +9005,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { 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 16ff27fb78b87..0ae7948fb1fa9 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,7 +12,7 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index e5d7df92bfe69558c178d9b833c9fd8363de6195..5fdca0203cb2db3eb532b14d8f2229c9ee74e4ec 100644 +index 909bf7b26806efeb8258ec5832cf79bbaf312813..ffeae5047a86b3d46b5994830af011010bdd0dc9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -432,6 +432,10 @@ config("internal_config") { diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 25862b5b60fe4..76958df72ac78 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 86018a9d25285ded2565dc7c4fc8fe52a109f809..e5d7df92bfe69558c178d9b833c9fd8363de6195 100644 +index a7c96aad93b5aee8d8a4cccbc81d140d6315b203..909bf7b26806efeb8258ec5832cf79bbaf312813 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -4677,7 +4677,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -4679,7 +4679,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/shell/browser/api/electron_api_data_pipe_holder.cc b/shell/browser/api/electron_api_data_pipe_holder.cc index 23e29ecdfff65..229999e67c2c8 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.cc +++ b/shell/browser/api/electron_api_data_pipe_holder.cc @@ -146,7 +146,8 @@ gin::WrapperInfo DataPipeHolder::kWrapperInfo = {gin::kEmbedderNativeGin}; DataPipeHolder::DataPipeHolder(const network::DataElement& element) : id_(base::NumberToString(++g_next_id)) { - data_pipe_.Bind(element.CloneDataPipeGetter()); + data_pipe_.Bind( + element.As().CloneDataPipeGetter()); } DataPipeHolder::~DataPipeHolder() = default; diff --git a/shell/browser/api/electron_api_url_loader.cc b/shell/browser/api/electron_api_url_loader.cc index 4c3d3f17b31ec..afe48e40cd27f 100644 --- a/shell/browser/api/electron_api_url_loader.cc +++ b/shell/browser/api/electron_api_url_loader.cc @@ -492,8 +492,11 @@ gin::Handle SimpleURLLoaderWrapper::Create( args->isolate(), body_func, data_pipe_getter.InitWithNewPipeAndPassReceiver()) .ToV8(); - request->request_body = new network::ResourceRequestBody(); - request->request_body->SetToChunkedDataPipe(std::move(data_pipe_getter)); + request->request_body = + base::MakeRefCounted(); + request->request_body->SetToChunkedDataPipe( + std::move(data_pipe_getter), + network::ResourceRequestBody::ReadOnlyOnce(false)); } } diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index bde499d6c0832..1bad228805ef0 100644 --- a/shell/browser/browser_process_impl.cc +++ b/shell/browser/browser_process_impl.cc @@ -243,11 +243,6 @@ BrowserProcessImpl::floc_sorting_lsh_clusters_service() { return nullptr; } -optimization_guide::OptimizationGuideService* -BrowserProcessImpl::optimization_guide_service() { - return nullptr; -} - component_updater::ComponentUpdateService* BrowserProcessImpl::component_updater() { return nullptr; diff --git a/shell/browser/browser_process_impl.h b/shell/browser/browser_process_impl.h index d9d9e52f60abc..d50f32769ae75 100644 --- a/shell/browser/browser_process_impl.h +++ b/shell/browser/browser_process_impl.h @@ -81,8 +81,6 @@ class BrowserProcessImpl : public BrowserProcess { override; federated_learning::FlocSortingLshClustersService* floc_sorting_lsh_clusters_service() override; - optimization_guide::OptimizationGuideService* optimization_guide_service() - override; component_updater::ComponentUpdateService* component_updater() override; MediaFileSystemRegistry* media_file_system_registry() override; WebRtcLogUploader* webrtc_log_uploader() override; 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 b251470fa5687..8ff3048552147 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.cc +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.cc @@ -232,3 +232,10 @@ GURL ElectronManagementAPIDelegate::GetIconURL( CHECK(icon_url.is_valid()); return icon_url; } + +GURL ElectronManagementAPIDelegate::GetEffectiveUpdateURL( + const extensions::Extension& extension, + content::BrowserContext* context) const { + // TODO(codebytere): we do not currently support ExtensionManagement. + return GURL::EmptyGURL(); +} diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.h b/shell/browser/extensions/api/management/electron_management_api_delegate.h index ab18a1f9bfe2f..553956132713c 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.h +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.h @@ -81,6 +81,8 @@ class ElectronManagementAPIDelegate : public extensions::ManagementAPIDelegate { int icon_size, ExtensionIconSet::MatchType match, bool grayscale) const override; + GURL GetEffectiveUpdateURL(const extensions::Extension& extension, + content::BrowserContext* context) const override; }; #endif // SHELL_BROWSER_EXTENSIONS_API_MANAGEMENT_ELECTRON_MANAGEMENT_API_DELEGATE_H_ diff --git a/shell/common/gin_converters/net_converter.cc b/shell/common/gin_converters/net_converter.cc index edca26c8a870d..c92c99e258160 100644 --- a/shell/common/gin_converters/net_converter.cc +++ b/shell/common/gin_converters/net_converter.cc @@ -255,22 +255,28 @@ v8::Local Converter::ToV8( const auto& element = elements[i]; gin::Dictionary upload_data(isolate, v8::Object::New(isolate)); switch (element.type()) { - case network::mojom::DataElementType::kFile: + case network::mojom::DataElement::Tag::kFile: { + const auto& element_file = element.As(); upload_data.Set("type", "file"); - upload_data.Set("file", element.path().value()); - upload_data.Set("filePath", base::Value(element.path().AsUTF8Unsafe())); - upload_data.Set("offset", static_cast(element.offset())); - upload_data.Set("length", static_cast(element.length())); + upload_data.Set("file", element_file.path().value()); + upload_data.Set("filePath", + base::Value(element_file.path().AsUTF8Unsafe())); + upload_data.Set("offset", static_cast(element_file.offset())); + upload_data.Set("length", static_cast(element_file.length())); upload_data.Set("modificationTime", - element.expected_modification_time().ToDoubleT()); + element_file.expected_modification_time().ToDoubleT()); break; - case network::mojom::DataElementType::kBytes: + } + case network::mojom::DataElement::Tag::kBytes: { upload_data.Set("type", "rawData"); - upload_data.Set("bytes", node::Buffer::Copy(isolate, element.bytes(), - element.length()) - .ToLocalChecked()); + const auto& bytes = element.As().bytes(); + const char* data = reinterpret_cast(bytes.data()); + upload_data.Set( + "bytes", + node::Buffer::Copy(isolate, data, bytes.size()).ToLocalChecked()); break; - case network::mojom::DataElementType::kDataPipe: { + } + case network::mojom::DataElement::Tag::kDataPipe: { upload_data.Set("type", "blob"); // TODO(zcbenz): After the NetworkService refactor, the old blobUUID API // becomes unnecessarily complex, we should deprecate the getBlobData diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index e897f82d15c3e..01503e5b9b674 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -113,6 +113,14 @@ RendererClientBase::RendererClientBase() { ParseSchemesCLISwitch(command_line, switches::kStreamingSchemes); for (const std::string& scheme : streaming_schemes_list) media::AddStreamingScheme(scheme.c_str()); + // Parse --secure-schemes=scheme1,scheme2 + std::vector secure_schemes_list = + ParseSchemesCLISwitch(command_line, switches::kSecureSchemes); + for (const std::string& scheme : secure_schemes_list) + url::AddSecureScheme(scheme.data()); + // In Chrome we should set extension's origins to match the pages they can + // work on, but in Electron currently we just let extensions do anything. + url::AddSecureScheme(extensions::kExtensionScheme); // We rely on the unique process host id which is notified to the // renderer process via command line switch from the content layer, // if this switch is removed from the content layer for some reason, @@ -177,7 +185,7 @@ void RendererClientBase::RenderThreadStarted() { blink::WebCustomElement::AddEmbedderCustomElementName("webview"); blink::WebCustomElement::AddEmbedderCustomElementName("browserplugin"); - WTF::String extension_scheme("chrome-extension"); + WTF::String extension_scheme(extensions::kExtensionScheme); // Extension resources are HTTP-like and safe to expose to the fetch API. The // rules for the fetch API are consistent with XHR. blink::SchemeRegistry::RegisterURLSchemeAsSupportingFetchAPI( @@ -186,19 +194,9 @@ void RendererClientBase::RenderThreadStarted() { // Blink's strict first-party origin checks. blink::SchemeRegistry::RegisterURLSchemeAsFirstPartyWhenTopLevel( extension_scheme); - // In Chrome we should set extension's origins to match the pages they can - // work on, but in Electron currently we just let extensions do anything. - blink::SchemeRegistry::RegisterURLSchemeAsSecure(extension_scheme); blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy( extension_scheme); - // Parse --secure-schemes=scheme1,scheme2 - std::vector secure_schemes_list = - ParseSchemesCLISwitch(command_line, switches::kSecureSchemes); - for (const std::string& scheme : secure_schemes_list) - blink::SchemeRegistry::RegisterURLSchemeAsSecure( - WTF::String::FromUTF8(scheme.data(), scheme.length())); - std::vector fetch_enabled_schemes = ParseSchemesCLISwitch(command_line, switches::kFetchSchemes); for (const std::string& scheme : fetch_enabled_schemes) { diff --git a/spec-main/extensions-spec.ts b/spec-main/extensions-spec.ts index 787c2f9c6a7b2..4da100bc128ae 100644 --- a/spec-main/extensions-spec.ts +++ b/spec-main/extensions-spec.ts @@ -459,7 +459,8 @@ describe('chrome extensions', () => { const showLastPanel = () => { // this is executed in the devtools context, where UI is a global const { UI } = (window as any); - const lastPanelId = UI.inspectorView._tabbedPane._tabs.peekLast().id; + const tabs = UI.inspectorView._tabbedPane._tabs; + const lastPanelId = tabs[tabs.length - 1].id; UI.inspectorView.showPanel(lastPanelId); }; devToolsWebContents.executeJavaScript(`(${showLastPanel})()`, false).then(() => { diff --git a/spec-main/webview-spec.ts b/spec-main/webview-spec.ts index e9de935e245cf..1ae50a80581bc 100644 --- a/spec-main/webview-spec.ts +++ b/spec-main/webview-spec.ts @@ -206,8 +206,10 @@ describe(' tag', function () { const showPanelIntervalId = setInterval(function () { if (!webContents.isDestroyed() && webContents.devToolsWebContents) { webContents.devToolsWebContents.executeJavaScript('(' + function () { - const lastPanelId: any = (window as any).UI.inspectorView._tabbedPane._tabs.peekLast().id; - (window as any).UI.inspectorView.showPanel(lastPanelId); + const { UI } = (window as any); + const tabs = UI.inspectorView._tabbedPane._tabs; + const lastPanelId: any = tabs[tabs.length - 1].id; + UI.inspectorView.showPanel(lastPanelId); }.toString() + ')()'); } else { clearInterval(showPanelIntervalId);