diff --git a/BUILD.gn b/BUILD.gn index 6966cd3c5c9f..c3d7f685bc8b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -490,13 +490,6 @@ source_set("electron_lib") { ] } - if (is_linux) { - deps += [ - "//components/crash/content/browser", - "//ui/gtk:gtk_config", - ] - } - if (is_mac) { deps += [ "//components/remote_cocoa/app_shim", @@ -559,11 +552,14 @@ source_set("electron_lib") { ":electron_gtk_stubs", ":libnotify_loader", "//build/config/linux/gtk", + "//components/crash/content/browser", "//dbus", "//device/bluetooth", + "//third_party/crashpad/crashpad/client", "//ui/base/ime/linux", "//ui/events/devices/x11", "//ui/events/platform/x11", + "//ui/gtk:gtk_config", "//ui/linux:linux_ui", "//ui/linux:linux_ui_factory", "//ui/views/controls/webview", diff --git a/DEPS b/DEPS index b6f91c4e5ec3..5fddbf10409b 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '108.0.5329.0', + '108.0.5355.0', 'node_version': 'v16.17.1', 'nan_version': diff --git a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch index db565208cc36..858b0a7ff484 100644 --- a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch +++ b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch @@ -20,7 +20,7 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57 case ssl_open_record_error: diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc -index 1b2e9f41da12c3a3863d7862ccf95f1d6c54e8f4..4f5bdf7240e741c498e0927abd7aff06cb914f0c 100644 +index a6ca0ab96266475384429e73970de18d4ba09912..c7e7bd02f2484f91bf55df1400e94804e61ea914 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc @@ -1319,7 +1319,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { @@ -48,10 +48,10 @@ index 1b2e9f41da12c3a3863d7862ccf95f1d6c54e8f4..4f5bdf7240e741c498e0927abd7aff06 void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export, diff --git a/ssl/ssl_test.cc b/ssl/ssl_test.cc -index 2627362daf72423c15bfcc4e3d2fb82ffc1bdb33..a9a695a4029f3563145ec0f8864cae366de90bc3 100644 +index 3709a4694f3c9be67fd918f125f023b5aa660971..3507f4ef5bd4444c2499b06a5e312ab54f08bc3b 100644 --- a/ssl/ssl_test.cc +++ b/ssl/ssl_test.cc -@@ -8509,11 +8509,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { +@@ -8358,11 +8358,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { EXPECT_EQ(ret, 0); EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_ZERO_RETURN); @@ -63,7 +63,7 @@ index 2627362daf72423c15bfcc4e3d2fb82ffc1bdb33..a9a695a4029f3563145ec0f8864cae36 // Although the client has seen close_notify, it should continue to report // |SSL_ERROR_SYSCALL| when its writes fail. ret = SSL_write(client.get(), data, sizeof(data)); -@@ -8521,22 +8516,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { +@@ -8370,22 +8365,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) { EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_SYSCALL); EXPECT_TRUE(write_failed); write_failed = false; diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 77ac984a3a50..bae4246c9417 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -63,10 +63,7 @@ feat_add_onclose_to_messageport.patch allow_in-process_windows_to_have_different_web_prefs.patch refactor_expose_cursor_changes_to_the_webcontentsobserver.patch crash_allow_setting_more_options.patch -breakpad_treat_node_processes_as_browser_processes.patch upload_list_add_loadsync_method.patch -breakpad_allow_getting_string_values_for_crash_keys.patch -crash_allow_disabling_compression_on_linux.patch allow_setting_secondary_label_via_simplemenumodel.patch feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch fix_patch_out_profile_refs_in_accessibility_ui.patch @@ -116,10 +113,9 @@ add_maximized_parameter_to_linuxui_getwindowframeprovider.patch revert_spellcheck_fully_launch_spell_check_delayed_initialization.patch add_electron_deps_to_license_credits_file.patch fix_crash_loading_non-standard_schemes_in_iframes.patch -disable_optimization_guide_for_preconnect_feature.patch fix_return_v8_value_from_localframe_requestexecutescript.patch create_browser_v8_snapshot_file_name_fuse.patch feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch -cherry-pick-c83640db21b5.patch fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +preconnect_manager.patch fix_remove_caption-removing_style_call.patch diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 3f95323956ce..c4adba844091 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index 160763ceb331840027f4e150c8f905111bfa04c6..41504c1b62b6a6fe3509ce7c0732dc3c20fe76d0 100644 +index 5c3bcea34087025ecab1959fd2d55fe5c5369142..7b019632914eb1bd4ebef9468d20c7c7f2560a94 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -241,6 +241,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index 160763ceb331840027f4e150c8f905111bfa04c6..41504c1b62b6a6fe3509ce7c0732dc3c // We are experiencing what appear to be memory-stomp issues in the GPU // process. These issues seem to be impacting the task executor and listeners // registered to it. Create the task executor on the heap to guard against -@@ -323,7 +327,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -325,7 +329,6 @@ int GpuMain(MainFunctionParams parameters) { const_cast(&command_line), gpu_preferences); const bool dead_on_arrival = !init_success; diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 354d37249a8f..ad5177053c07 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index 158c3764a375f8df32e25e12351b0dcf4efaac17..0acaa8858f2667124b702f9a8f4d2f28adf36d61 100644 +index 0af40eb8f556aa29c8b7e1bdd0d62b1fb7b38791..b3ae64cf8836fdd3634bfd24fc2f8a25e1735da5 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h -@@ -135,6 +135,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -136,6 +136,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, virtual void DidHandleOnloadEvents() {} virtual void DidCreateScriptContext(v8::Local context, int32_t world_id) {} @@ -23,10 +23,10 @@ index 158c3764a375f8df32e25e12351b0dcf4efaac17..0acaa8858f2667124b702f9a8f4d2f28 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index adab8f27a3947c6a0f326a284f6bad158d2da639..c99603c883a67b28c812e05c1133555abc8d34dc 100644 +index fb0483af59b0e289bd716a3417a545233f17be1f..6a7e5ab92e6fa23762794efc3031ce982836c20e 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4351,6 +4351,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4365,6 +4365,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -123,7 +123,7 @@ index c974fa2f7c7f9c2aa5f075ec4aeb887d0b104453..b4ed9b2fadcfad7676387045b8581eb8 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 05f6e4002766fec006a55b2edf621f6b0b1a0d59..a9f6d89d0310732d7d26c0e9f8461ecadc87dbee 100644 +index ba841a41c1387c2cac3578bc01524b0a1868f74d..d2ce9ae524025cc06028b4ca80d04c580dc29b44 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h @@ -366,6 +366,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index fa65db11044a..e2362d1bf4b1 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 8650bbf10070021c6ead3a3b315de6125a8a24cd..6c8c4fcaa78a580dd5bc8b66645e17a61dff31ce 100644 +index 564822b722580aa20adf728ca4706a853c285c8b..175a803839efd10226476285bfc506d01ef2626d 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -667,6 +667,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -675,6 +675,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -72,7 +72,7 @@ index f3b681ec44c57f69c57390f31bd951cef8de3f0c..2fbe866ddf50d7eb324b0e2e4d120f4c // 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 03b884bf2b0b4f1eaa084ecfda76e926226e8495..74c35b16d5778a5ac0618b9395a855995e9d0296 100644 +index 50cae526561de69c7b6b3b5d2467946ee92fcb23..fe35e9c6b8c51e61f0f89c8feca03a36f756d432 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -3808,13 +3808,21 @@ PageScheduler* WebViewImpl::Scheduler() const { diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index d099a414bf54..3333220358af 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 25cf5f42eee6f81cb09c464a55b59f08675ad7e4..01e00224d28ec6f706f1315d8ba9880501babd4b 100644 +index b7c1c9e1db6e7366912447cd4c2e3d4ac6f131e6..65689678cafabd61b273ef8350f4c11394384945 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc @@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) { @@ -49,7 +49,7 @@ index 25cf5f42eee6f81cb09c464a55b59f08675ad7e4..01e00224d28ec6f706f1315d8ba98805 // 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 88d0d5a62daff16b62749b01837a3475555d9f42..076d5e45c2c5a15c23a2b24eaa1a0b25c33a8949 100644 +index 79bb5259e80c4708e1b93876b6aa8cd3e8dca66c..175b2a77d696a60fa8209809edc758912a11e83a 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -548,10 +548,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { @@ -63,7 +63,7 @@ index 88d0d5a62daff16b62749b01837a3475555d9f42..076d5e45c2c5a15c23a2b24eaa1a0b25 if (!Client()) return false; -@@ -597,6 +593,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -599,6 +595,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index c33b278fffb3..682d4d8af76e 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index a39ab4ff7721b750b1cf40039aae3fe6ca16f2e1..b35ef893af39d752971c9f7348cea72bc951bfef 100644 +index dfd4ff9d338683214566345f1c6a0a3add12094c..6c14f780e7cc1478385da23e843256f101206220 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -44,6 +44,20 @@ config("no_asm_config") { diff --git a/patches/chromium/breakpad_allow_getting_string_values_for_crash_keys.patch b/patches/chromium/breakpad_allow_getting_string_values_for_crash_keys.patch deleted file mode 100644 index e1b4d6812197..000000000000 --- a/patches/chromium/breakpad_allow_getting_string_values_for_crash_keys.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Tue, 5 May 2020 12:36:39 -0700 -Subject: breakpad: allow getting string values for crash keys - -Linux is currently recording both crashpad and breakpad keys on linux -(because upstream is experimenting with crashpad-on-linux). We can fetch -the string values for crashpad keys on win/mac, and they're easily -available on linux too, this just exposes them. - -Should be upstreamed, or failing that, deleted once crashpad is enabled -on linux. If removing this patch doesn't cause a compile failure, it's -fine to delete! - -diff --git a/components/crash/core/common/crash_key.h b/components/crash/core/common/crash_key.h -index 90c37dadd07d7c278bcdc2de972a6be17ef17fbc..73312f2a78998eb6ca6266edbd8af7759d1d9581 100644 ---- a/components/crash/core/common/crash_key.h -+++ b/components/crash/core/common/crash_key.h -@@ -219,6 +219,10 @@ class CrashKeyStringCombined : public internal::CrashKeyStringCombinedImpl { - crashpad_key_.Set(value); - } - -+ const base::StringPiece value() const { -+ return crashpad_key_.value(); -+ } -+ - private: - CrashKeyStringBreakpad breakpad_key_; - crashpad::StringAnnotation crashpad_key_; diff --git a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch b/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch deleted file mode 100644 index 7718f215e7a5..000000000000 --- a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Thu, 30 Apr 2020 17:04:13 -0700 -Subject: breakpad: treat node processes as browser processes - -On Linux, to avoid the need to pass breakpad FDs to child node processes -spawned by child_process.fork(), each child process must re-initialize -breakpad independently, as a "browser" process. This patches -//components/crash so that it will correctly report 'ptype=node' as a -crash annotation. - -diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index 24d436ed26cf85d0c7307bcd6999a3f110423c45..c2bd854664edfd589f30804c7dd2997c8fe0f104 100644 ---- a/components/crash/core/app/breakpad_linux.cc -+++ b/components/crash/core/app/breakpad_linux.cc -@@ -719,8 +719,13 @@ bool CrashDone(const MinidumpDescriptor& minidump, - log_path[log_path_len] = '\0'; - info.log_filename = log_path; - #endif -- info.process_type = "browser"; -- info.process_type_length = 7; -+ if (g_is_node) { -+ info.process_type = "node"; -+ info.process_type_length = 4; -+ } else { -+ info.process_type = "browser"; -+ info.process_type_length = 7; -+ } - info.distro = base::g_linux_distro; - info.distro_length = my_strlen(base::g_linux_distro); - info.upload = upload; -@@ -2027,8 +2032,13 @@ void InitCrashReporter(const std::string& process_type) { - process_type == kWebViewSingleProcessType || - process_type == kBrowserProcessType || - #endif -+ process_type == "node" || - process_type.empty(); - -+ if (process_type == "node") { -+ g_is_node = true; -+ } -+ - #if !BUILDFLAG(IS_CHROMEOS) - SetUploadURL(GetCrashReporterClient()->GetUploadUrl()); - #endif diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch index e7b3cc748cbd..fa65566678e1 100644 --- a/patches/chromium/build_disable_partition_alloc_on_mac.patch +++ b/patches/chromium/build_disable_partition_alloc_on_mac.patch @@ -9,7 +9,7 @@ and can be removed when the crash in fork is resolved. Related issue: https://github.com/electron/electron/issues/32718 diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni -index 44ace8017bdf9ce2ddb996e30ee03dbdc6274fb9..e2ce9f6c57e55f6a9257bb2e58e99895ca52f8c6 100644 +index 2e63825db7a41ecbb044547dbfe318767d743a4e..e245960ab5a714293cc08b556988a28e37f120ff 100644 --- a/build_overrides/partition_alloc.gni +++ b/build_overrides/partition_alloc.gni @@ -40,7 +40,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug) diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index 6f6f78b63d1b..380ca584edf2 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this patch. diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 63676cdc719e543d6982b0f894ad88d65c139f57..7f288b72470f765155a55edd2914f0d4571a3fd2 100644 +index b12b4e65be8ad29054f5fdd98600888726b1d068..d67683efeabed3209eac553ff050ec2e5974f496 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -181,11 +181,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 63676cdc719e543d6982b0f894ad88d65c139f57..7f288b72470f765155a55edd2914f0d4 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index b0eb1273091ecdb79a789de0b5ccc95cb8d6b235..e8a9aab57e5f6edd73e13d7cf14a2c6c69b0938a 100644 +index cb7cbdca15b12f5735d20777cb3b2fd8d3129061..7ce770bde9e70ac7f3aceb3dd7c14f4a19c76bfc 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4676,7 +4676,7 @@ static_library("browser") { +@@ -4679,7 +4679,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. @@ -46,10 +46,10 @@ index b0eb1273091ecdb79a789de0b5ccc95cb8d6b235..e8a9aab57e5f6edd73e13d7cf14a2c6c sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index e334004ece09359f687cf3d47452f805c57ba69f..8724def124cdc811a065538517f8a68185ab8084 100644 +index e368f894735d19ff166997b8f72379a8988541ac..141308ad441cd6864318533071dd033f1499ebf3 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -6113,7 +6113,6 @@ test("unit_tests") { +@@ -6153,7 +6153,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index e334004ece09359f687cf3d47452f805c57ba69f..8724def124cdc811a065538517f8a681 "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:crash_reporter_client_win_unit_tests", -@@ -6138,6 +6137,10 @@ test("unit_tests") { +@@ -6178,6 +6177,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index e334004ece09359f687cf3d47452f805c57ba69f..8724def124cdc811a065538517f8a681 ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -7064,7 +7067,7 @@ test("unit_tests") { +@@ -7103,7 +7106,7 @@ test("unit_tests") { } deps += [ @@ -77,7 +77,7 @@ index e334004ece09359f687cf3d47452f805c57ba69f..8724def124cdc811a065538517f8a681 "//chrome/browser/autofill_assistant/password_change/vector_icons:vector_icons", "//chrome/browser/enterprise/connectors/analysis:features", "//chrome/browser/media/router:test_support", -@@ -7187,6 +7190,10 @@ test("unit_tests") { +@@ -7226,6 +7229,10 @@ test("unit_tests") { } } diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 7ce327c3f69e..29aeb6364379 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 b8268a932ff774feb18bf61ede65fdd99cf95938..58caea552e2892c12365a79ce5148559f784264b 100644 +index f00a5c63bb8f6c61f1a89cb38cf1ea253a353e25..94690c49a771cb5ff873696bf0926972e7276d50 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -7320,6 +7320,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -7443,6 +7443,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 b8268a932ff774feb18bf61ede65fdd99cf95938..58caea552e2892c12365a79ce5148559 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b904e7bebfd8ac67d90974c923b657a2099b30cf..df0dff67e23423a5a527a93dac27a6fe19e2aaf0 100644 +index 04bd45199b0dbed365f42ccb1a2fda070091c54d..6db9441a458a1293118fd3fbbe6f439fafb730b4 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4003,6 +4003,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4004,6 +4004,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index b904e7bebfd8ac67d90974c923b657a2099b30cf..df0dff67e23423a5a527a93dac27a6fe new_contents_impl->GetController().SetSessionStorageNamespace( partition_config, session_storage_namespace); -@@ -4047,12 +4055,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4048,12 +4056,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -68,7 +68,7 @@ index 683ea0bc548ed4978873d44c0ce7db6933585eda..e6241d0b14660a8aec09aab2271162c2 // 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 b30318ca59f7a3b6967e2fab0b67551ee3558b75..0c960245b1039f42e712373dd52df41d09a95992 100644 +index f31156ba6ea6d6229198d129c5b56cfa1847c5fc..41f3dac6323bda9d1a10bcb8678fe3da3e195160 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -622,6 +622,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -81,7 +81,7 @@ index b30318ca59f7a3b6967e2fab0b67551ee3558b75..0c960245b1039f42e712373dd52df41d 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 d9b15a5491e6156f036c57558c351d878a829fbd..faae9fd7b3355c15a3088d8041cf6ee699cd6c71 100644 +index 65d57c0efa1b268f0cbe4b49bd64a51d1da3cdc0..2dcea7a09b8521020e0821e18cbd45219caca639 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -163,6 +163,7 @@ class NetworkService; @@ -150,10 +150,10 @@ index 7119f2fe8397a1bd3472af5b00346672ed90f2b1..f33bc7ec4bce4b6a4c38462110b68aae // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 64d106a94beabd22048a8557afb0e8a627515af0..adab8f27a3947c6a0f326a284f6bad158d2da639 100644 +index d7f19a4efc3540d8bac48d00c37436362043f074..fb0483af59b0e289bd716a3417a545233f17be1f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6194,6 +6194,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6210,6 +6210,10 @@ WebView* RenderFrameImpl::CreateNewWindow( /*openee_can_access_opener_origin=*/true, !GetWebFrame()->IsAllowedToDownload(), GetWebFrame()->IsAdFrame()); @@ -165,7 +165,7 @@ index 64d106a94beabd22048a8557afb0e8a627515af0..adab8f27a3947c6a0f326a284f6bad15 // moved on send. bool is_background_tab = diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index d3ae5f373be0cd0e0a930357a4861302b8ba3d36..7040d790725000a9e994c4270b8de80de9b8a373 100644 +index 815df247101f8a2824daf5a6c37b7835c581bf30..09f6af8ef73afe2e3f864fc5b30b6a83146d8a80 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc @@ -482,6 +482,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( @@ -212,10 +212,10 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e } // 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 1edafb783a6a6f82ddb40c889cceee20fcfab996..5c3260bed70a162ce3dbd096542adbc73f4ccee8 100644 +index fe5e2a61ec5a794b05bfc6a8eb1f69e105b69ed6..9f18da7c62951ecaf767ab9ead773c6e005c1dd8 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2133,6 +2133,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2145,6 +2145,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window, completed_url); diff --git a/patches/chromium/cherry-pick-c83640db21b5.patch b/patches/chromium/cherry-pick-c83640db21b5.patch deleted file mode 100644 index 723f455e3fa9..000000000000 --- a/patches/chromium/cherry-pick-c83640db21b5.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Wed, 5 Oct 2022 06:03:23 +0000 -Subject: build: set DTSDKBuild correctly when generating plist files - -Currently we set DTSDKBuild to the version of the SDK used to build -Chromium. This value is supposed to be the build version (this is -what xcode sets it to for instance). We read this value out of the -SDK directly and use it instead. - -Change-Id: Ieb7990f13095683ad8c026f027b2605ae39523a4 - -diff --git a/build/config/mac/mac_sdk.gni b/build/config/mac/mac_sdk.gni -index 98bedab98c2cd808387bca779221fab7297b37ee..d39350ed74d5c9493006266375664a9808e97af7 100644 ---- a/build/config/mac/mac_sdk.gni -+++ b/build/config/mac/mac_sdk.gni -@@ -40,6 +40,11 @@ declare_args() { - # will fail. - mac_sdk_official_version = "12.3" - -+ # The SDK build version used when making official builds. This is a single -+ # exact version found at "System/Library/CoreServices/SystemVersion.plist" -+ # inside the SDK. -+ mac_sdk_official_build_version = "21E226" -+ - # Production builds should use hermetic Xcode. If you want to do production - # builds with system Xcode to test new SDKs, set this. - # Don't set this on any bots. -@@ -103,11 +108,13 @@ if (use_system_xcode) { - find_sdk_args = [ - "--print_sdk_path", - "--print_bin_path", -+ "--print_sdk_build", - mac_sdk_min, - ] - find_sdk_lines = - exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines") -- mac_sdk_version = find_sdk_lines[2] -+ mac_sdk_version = find_sdk_lines[3] -+ mac_sdk_build_version = find_sdk_lines[2] - if (mac_sdk_path == "") { - mac_sdk_path = find_sdk_lines[0] - mac_bin_path = find_sdk_lines[1] -@@ -116,6 +123,7 @@ if (use_system_xcode) { - } - } else { - mac_sdk_version = mac_sdk_official_version -+ mac_sdk_build_version = mac_sdk_official_build_version - _dev = _hermetic_xcode_path + "/Contents/Developer" - _sdk = "MacOSX${mac_sdk_version}.sdk" - mac_sdk_path = _dev + "/Platforms/MacOSX.platform/Developer/SDKs/$_sdk" -diff --git a/build/config/mac/rules.gni b/build/config/mac/rules.gni -index fbd84cc68bf6b19cf99d4010331bb469a1d33194..f613a049bdfa643d01b05e3cfcae72dc5ad9da97 100644 ---- a/build/config/mac/rules.gni -+++ b/build/config/mac/rules.gni -@@ -41,7 +41,7 @@ template("mac_info_plist") { - apple_info_plist(target_name) { - format = "xml1" - extra_substitutions = [ -- "MAC_SDK_BUILD=$mac_sdk_version", -+ "MAC_SDK_BUILD=$mac_sdk_build_version", - "MAC_SDK_NAME=$mac_sdk_name$mac_sdk_version", - "MACOSX_DEPLOYMENT_TARGET=$mac_deployment_target", - "CHROMIUM_MIN_SYSTEM_VERSION=$mac_min_system_version", -diff --git a/build/mac/find_sdk.py b/build/mac/find_sdk.py -index bb36874fd44d441d07c9f150288c1d21b215d550..50c1e3c1db90ede392ba6f7903fe48e8e5de2d77 100755 ---- a/build/mac/find_sdk.py -+++ b/build/mac/find_sdk.py -@@ -24,6 +24,7 @@ Sample Output: - from __future__ import print_function - - import os -+import plistlib - import re - import subprocess - import sys -@@ -51,6 +52,9 @@ def main(): - parser.add_option("--print_bin_path", - action="store_true", dest="print_bin_path", default=False, - help="Additionally print the path the toolchain bin dir.") -+ parser.add_option("--print_sdk_build", -+ action="store_true", dest="print_sdk_build", default=False, -+ help="Additionally print the build version of the SDK.") - options, args = parser.parse_args() - if len(args) != 1: - parser.error('Please specify a minimum SDK version') -@@ -80,20 +84,30 @@ def main(): - if not sdks: - raise Exception('No %s+ SDK found' % min_sdk_version) - best_sdk = sorted(sdks, key=parse_version)[0] -+ sdk_name = 'MacOSX' + best_sdk + '.sdk' -+ sdk_path = os.path.join(sdk_dir, sdk_name) - - if options.print_sdk_path: -- sdk_name = 'MacOSX' + best_sdk + '.sdk' -- print(os.path.join(sdk_dir, sdk_name)) -+ print(sdk_path) - - if options.print_bin_path: - bin_path = 'Toolchains/XcodeDefault.xctoolchain/usr/bin/' - print(os.path.join(dev_dir, bin_path)) - -- return best_sdk -+ if options.print_sdk_build: -+ system_version_plist = os.path.join(sdk_path, -+ 'System/Library/CoreServices/SystemVersion.plist') -+ with open(system_version_plist, 'rb') as f: -+ system_version_info = plistlib.load(f) -+ if 'ProductBuildVersion' not in system_version_info: -+ raise Exception('Failed to determine ProductBuildVersion' + -+ 'for SDK at path %s' % system_version_plist) -+ print(system_version_info['ProductBuildVersion']) -+ -+ print(best_sdk) - - - if __name__ == '__main__': - if sys.platform != 'darwin': - raise Exception("This script only runs on Mac") -- print(main()) -- sys.exit(0) -+ sys.exit(main()) diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index a1a5c514369c..c264947eb55a 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -18,10 +18,10 @@ index 109e9f4361ef7682f5223f7aacb33940e206fa3c..c9d27e1e522adef49b3dd268224ecefa /google_apis/internal /googleurl diff --git a/third_party/.gitignore b/third_party/.gitignore -index e83145bd5b7301167ece2fc96a0710e9419638d4..4bbd7bac9dcc1b925a33bd4a675d065d073df502 100644 +index bb50e8dd9c06049dbebc9952d5f49c7dea57b8f7..f11bec886fe4cc25cded88efd7d5ffef27fb82c8 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore -@@ -84,6 +84,7 @@ +@@ -85,6 +85,7 @@ /directxsdk /dom_distiller_js/dist /eigen3/src @@ -29,15 +29,15 @@ index e83145bd5b7301167ece2fc96a0710e9419638d4..4bbd7bac9dcc1b925a33bd4a675d065d /elfutils/src /emoji-segmenter/src /emoji-metadata/src -@@ -180,6 +181,7 @@ - /mocha +@@ -183,6 +184,7 @@ + /js_code_coverage/node_modules /mockito/src /nacl_sdk_binaries/ +/nan /nasm /nearby/src /neon_2_sse/src -@@ -244,6 +246,7 @@ +@@ -246,6 +248,7 @@ /speex /sqlite/src /sqlite4java/lib/ diff --git a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch index f1855579a4d4..01dac9f06d40 100644 --- a/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch +++ b/patches/chromium/chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch @@ -7,10 +7,10 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch actions in the non-client caption area. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index c6649fee262eb8c106d18875c6d739b1a944127e..bf66b64b6c717e640fd8bf855c5607d43423101c 100644 +index 9ca8ea82afdc9660384dd7224d810990f96bf5a5..65d4e0b5f99c398814f1746a8ab66528e766f373 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -1205,6 +1205,10 @@ void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged( +@@ -1213,6 +1213,10 @@ void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged( } } diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index ea0e7ce7188b..4ac9fb4cfd0e 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -108,7 +108,7 @@ index 1d49ec9a62ebc062ac825bebf471e2da99f4b65d..f19a6d112fe006b9a1eaa5dff375f6d2 } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 18ae737d8d03bc92e2f1005de28853bf99f3b2ca..3790ad21aba91ad5d9e33aae8d74253782a29d89 100644 +index a3853924c98fae1ecb32bbf5e3dfe98108a82b66..cd8f9f7f75a950860c52bf825413a53a23bd7cb3 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1814,12 +1814,11 @@ bool Browser::IsWebContentsCreationOverridden( @@ -127,7 +127,7 @@ index 18ae737d8d03bc92e2f1005de28853bf99f3b2ca..3790ad21aba91ad5d9e33aae8d742537 WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index b847b573c1204d9d4157cfc33bf388b3b8021698..0aee4c33880d35c2569617d1a4d6ff9efe758614 100644 +index e80e3d192f615140cad4f804cf08f8dbc8590834..d5980c0c190c03fef24561d1a224b52b1e900ffa 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -842,8 +842,7 @@ class Browser : public TabStripModelObserver, @@ -246,10 +246,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7 void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index c9b9041792f757bf00d2027f565058ed2d0e7052..1ca2c578463b66aae6592a587531f38dc954dec5 100644 +index d922a3a2fa6c2cbd9bf7563e17cb72ba5fb0fa49..b4ca9ba85766357a76560b8440fcd6901c0b00cb 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3930,8 +3930,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3931,8 +3931,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index 4b3ec25de6c4..9550fb86aaa7 100644 --- a/patches/chromium/chrome_key_systems.patch +++ b/patches/chromium/chrome_key_systems.patch @@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm, as its not supported in the current version of chrome. diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc -index 2ac7cf0e337b10a2de230d4bb28542315dd30555..4b553794a216021f5c9e481fa2c08313b65e0980 100644 +index 13fea00df7ea693ff10576be264f17eafe8f80bf..ee5966ee7e0503d9dd43b407e605952a73aff309 100644 --- a/chrome/renderer/media/chrome_key_systems.cc +++ b/chrome/renderer/media/chrome_key_systems.cc @@ -17,7 +17,9 @@ diff --git a/patches/chromium/crash_allow_disabling_compression_on_linux.patch b/patches/chromium/crash_allow_disabling_compression_on_linux.patch deleted file mode 100644 index 74f2e4ea7106..000000000000 --- a/patches/chromium/crash_allow_disabling_compression_on_linux.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jeremy Apthorp -Date: Thu, 14 May 2020 16:52:09 -0700 -Subject: crash: allow disabling compression on linux - -This makes compression optional on breakpad_linux. - -Upstream attempted here -https://chromium-review.googlesource.com/c/chromium/src/+/2198641, but -was denied. - -Ultimately we should remove the option to disable compression, and -subsequently remove this patch. - -diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index c2bd854664edfd589f30804c7dd2997c8fe0f104..a9ba02dd1a2474db7789fb55655d0503bb9485e6 100644 ---- a/components/crash/core/app/breakpad_linux.cc -+++ b/components/crash/core/app/breakpad_linux.cc -@@ -111,6 +111,8 @@ void SetUploadURL(const std::string& url) { - DCHECK(!g_upload_url); - g_upload_url = strdup(url.c_str()); - } -+ -+bool g_compress_uploads = true; - #endif - - bool g_is_node = false; -@@ -1324,56 +1326,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, - - #else // BUILDFLAG(IS_CHROMEOS) - -- // Compress |dumpfile| with gzip. -- const pid_t gzip_child = sys_fork(); -- if (gzip_child < 0) { -- static const char msg[] = "sys_fork() for gzip process failed.\n"; -- WriteLog(msg, sizeof(msg) - 1); -- sys__exit(1); -- } -- if (!gzip_child) { -- // gzip process. -- const char* args[] = { -- "/bin/gzip", -- "-f", // Do not prompt to verify before overwriting. -- dumpfile, -- nullptr, -- }; -- execve(args[0], const_cast(args), environ); -- static const char msg[] = "Cannot exec gzip.\n"; -- WriteLog(msg, sizeof(msg) - 1); -- sys__exit(1); -- } -- // Wait for gzip process. -- int status = 0; -- if (sys_waitpid(gzip_child, &status, 0) != gzip_child || -- !WIFEXITED(status) || WEXITSTATUS(status) != 0) { -- static const char msg[] = "sys_waitpid() for gzip process failed.\n"; -- WriteLog(msg, sizeof(msg) - 1); -- sys_kill(gzip_child, SIGKILL); -- sys__exit(1); -- } -+ if (g_compress_uploads) { -+ // Compress |dumpfile| with gzip. -+ const pid_t gzip_child = sys_fork(); -+ if (gzip_child < 0) { -+ static const char msg[] = "sys_fork() for gzip process failed.\n"; -+ WriteLog(msg, sizeof(msg) - 1); -+ sys__exit(1); -+ } -+ if (!gzip_child) { -+ // gzip process. -+ const char* args[] = { -+ "/bin/gzip", -+ "-f", // Do not prompt to verify before overwriting. -+ dumpfile, -+ nullptr, -+ }; -+ execve(args[0], const_cast(args), environ); -+ static const char msg[] = "Cannot exec gzip.\n"; -+ WriteLog(msg, sizeof(msg) - 1); -+ sys__exit(1); -+ } -+ // Wait for gzip process. -+ int status = 0; -+ if (sys_waitpid(gzip_child, &status, 0) != gzip_child || -+ !WIFEXITED(status) || WEXITSTATUS(status) != 0) { -+ static const char msg[] = "sys_waitpid() for gzip process failed.\n"; -+ WriteLog(msg, sizeof(msg) - 1); -+ sys_kill(gzip_child, SIGKILL); -+ sys__exit(1); -+ } - -- static const char kGzipExtension[] = ".gz"; -- const size_t gzip_file_size = my_strlen(dumpfile) + sizeof(kGzipExtension); -- char* const gzip_file = reinterpret_cast(allocator->Alloc( -- gzip_file_size)); -- my_strlcpy(gzip_file, dumpfile, gzip_file_size); -- my_strlcat(gzip_file, kGzipExtension, gzip_file_size); -+ static const char kGzipExtension[] = ".gz"; -+ const size_t gzip_file_size = my_strlen(dumpfile) + sizeof(kGzipExtension); -+ char* const gzip_file = -+ reinterpret_cast(allocator->Alloc(gzip_file_size)); -+ my_strlcpy(gzip_file, dumpfile, gzip_file_size); -+ my_strlcat(gzip_file, kGzipExtension, gzip_file_size); - -- // Rename |gzip_file| to |dumpfile| (the original file was deleted by gzip). -- if (rename(gzip_file, dumpfile)) { -- static const char msg[] = "Failed to rename gzipped file.\n"; -- WriteLog(msg, sizeof(msg) - 1); -- sys__exit(1); -+ // Rename |gzip_file| to |dumpfile| (the original file was deleted by gzip). -+ if (rename(gzip_file, dumpfile)) { -+ static const char msg[] = "Failed to rename gzipped file.\n"; -+ WriteLog(msg, sizeof(msg) - 1); -+ sys__exit(1); -+ } - } - - // The --header argument to wget looks like: - // --header=Content-Encoding: gzip - // --header=Content-Type: multipart/form-data; boundary=XYZ - // where the boundary has two fewer leading '-' chars -- static const char header_content_encoding[] = -+ static const char header_content_encoding_gzip[] = - "--header=Content-Encoding: gzip"; -+ static const char header_content_encoding_identity[] = -+ "--header=Content-Encoding: identity"; - static const char header_msg[] = - "--header=Content-Type: multipart/form-data; boundary="; - const size_t header_content_type_size = -@@ -1400,7 +1406,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, - static const char kWgetBinary[] = "/usr/bin/wget"; - const char* args[] = { - kWgetBinary, -- header_content_encoding, -+ g_compress_uploads ? header_content_encoding_gzip -+ : header_content_encoding_identity, - header_content_type, - post_file, - g_upload_url, -@@ -2041,6 +2048,7 @@ void InitCrashReporter(const std::string& process_type) { - - #if !BUILDFLAG(IS_CHROMEOS) - SetUploadURL(GetCrashReporterClient()->GetUploadUrl()); -+ g_compress_uploads = GetCrashReporterClient()->GetShouldCompressUploads(); - #endif - - if (is_browser_process) { diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index 8874dda9a0c1..558ecf447504 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -8,18 +8,6 @@ rate-limiting, compression and global annotations. This should be upstreamed. -diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index 22477fdfcc7aa9ce6ab5ddefe55ce278c5ede23f..24d436ed26cf85d0c7307bcd6999a3f110423c45 100644 ---- a/components/crash/core/app/breakpad_linux.cc -+++ b/components/crash/core/app/breakpad_linux.cc -@@ -113,6 +113,7 @@ void SetUploadURL(const std::string& url) { - } - #endif - -+bool g_is_node = false; - bool g_is_crash_reporter_enabled = false; - uint64_t g_process_start_time = 0; - pid_t g_pid = 0; diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc index 284dd099122df85d2cebf467cdb3a54b45a343eb..bb21ddbd2ee4d2952a4b753a5c553005f8dc46db 100644 --- a/components/crash/core/app/crash_reporter_client.cc diff --git a/patches/chromium/custom_protocols_plzserviceworker.patch b/patches/chromium/custom_protocols_plzserviceworker.patch index a80bcfd4f827..9479bf0cc582 100644 --- a/patches/chromium/custom_protocols_plzserviceworker.patch +++ b/patches/chromium/custom_protocols_plzserviceworker.patch @@ -8,7 +8,7 @@ Allow registering custom protocols to handle service worker main script fetching Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511 diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc -index fed1df784401595696251bcac6c542b1cf7757a1..eeccb431e137ea647cfb3e62386afd7c817bde49 100644 +index 15cf2ff03d50c10ab2423e326f8ac26585c67077..15542659edd07eaee42629ac9011524908835733 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc @@ -1676,6 +1676,28 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest( diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 7ae8bdb75a3f..708b661fbe36 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -82,7 +82,7 @@ index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index f32b8fdf9b00cf678dcbf2265e68bac53674fe5a..fbe090a18d10692ee8ef2aed0cd94cb696538515 100644 +index 4da983eee1abad065dd8a76a7efd308ef5897a09..5c34fda5db161ad1e563a953995bfe06f902b53f 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -142,7 +142,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { @@ -94,7 +94,7 @@ index f32b8fdf9b00cf678dcbf2265e68bac53674fe5a..fbe090a18d10692ee8ef2aed0cd94cb6 #endif } // namespace -@@ -444,6 +444,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { +@@ -452,6 +452,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { FROM_HERE, base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished, media_list_)); @@ -104,7 +104,7 @@ index f32b8fdf9b00cf678dcbf2265e68bac53674fe5a..fbe090a18d10692ee8ef2aed0cd94cb6 } void NativeDesktopMediaList::Worker::OnCaptureResult( -@@ -789,6 +792,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( +@@ -824,6 +827,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()), std::move(native_ids), thumbnail_size_)); diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 53218ea3bfa9..2544e5f71427 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 da77efbe86b691e0b1fa2773cc48fd6a3bd0b94f..fe0147778f667e43229548de8ff0e6639180966f 100644 +index e4db8136e957313da28b7ef2bcff4ec91eee5deb..bd4fbda15d8d73d92ec8684a66a4aaeea53990d1 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -1882,6 +1882,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( @@ -35,10 +35,10 @@ index da77efbe86b691e0b1fa2773cc48fd6a3bd0b94f..fe0147778f667e43229548de8ff0e663 // If we are likely to software composite the resource, we use sRGB because // software compositing is unable to perform color conversion. diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index ed65d3d86f73759c6bcd06b7b3daae69c16419df..443044170f72accbd8c10b79db95b69b77cb0825 100644 +index d9b3e3cbeb7fcf2dc410245167ccffa4828ae5b8..540ec189f33ad35aaae612e11cf5fc18a746f4b6 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h -@@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings { +@@ -96,6 +96,8 @@ class CC_EXPORT LayerTreeSettings { bool use_rgba_4444 = false; bool unpremultiply_and_dither_low_bit_depth_tiles = false; @@ -81,10 +81,10 @@ index 5ca2e3b7999fb0c8da4953c6a20352a4b9de675d..86b4f9d2d1882e5706fd559e01442b02 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index af72005a3385b826d38aac13bb9dcb31e13b9045..f69f294fe079e21fa91f64a6d9a90096660265fd 100644 +index f52718f68a21d257fd51fcad6b8fef94cd339673..e4e8885b53ec990729e2ca38cdab5757af4cd1dc 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc -@@ -224,6 +224,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( +@@ -230,6 +230,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( // Command-line switches to propagate to the GPU process. static const char* const kSwitchNames[] = { @@ -93,10 +93,10 @@ index af72005a3385b826d38aac13bb9dcb31e13b9045..f69f294fe079e21fa91f64a6d9a90096 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 0606b76ac16553ed446f3e3b5d3369aa1c32d72c..bc755d2f68cd5e336e4057283fa2d8f76172e35b 100644 +index d0b9284fcd1120722b751a462f7018353e7b07c3..6c6a50e6f5f78a5e1caaf539bde4893b4a8bd0a8 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -199,6 +199,7 @@ +@@ -200,6 +200,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -104,7 +104,7 @@ index 0606b76ac16553ed446f3e3b5d3369aa1c32d72c..bc755d2f68cd5e336e4057283fa2d8f7 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3221,6 +3222,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3231,6 +3232,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[] = { @@ -156,10 +156,10 @@ index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace4714 } 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 e00ae57eac11a72769cd9330dbb666df6381fa8b..2b0c1fb21f9feb7f7ba7489bb96a046a0842dcbe 100644 +index 191a45bd3844d3b1ea652e7df164d7b7c11767da..754998229bb1fb92ac8cbf783839a60b92db0320 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 @@ +@@ -25,6 +25,7 @@ #include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "ui/base/ui_base_features.h" #include "ui/base/ui_base_switches.h" @@ -167,7 +167,7 @@ index e00ae57eac11a72769cd9330dbb666df6381fa8b..2b0c1fb21f9feb7f7ba7489bb96a046a #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -183,6 +184,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -184,6 +185,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); diff --git a/patches/chromium/disable_freezing_flags_after_init_in_node.patch b/patches/chromium/disable_freezing_flags_after_init_in_node.patch index 8aab33368d31..cd93b7bba1db 100644 --- a/patches/chromium/disable_freezing_flags_after_init_in_node.patch +++ b/patches/chromium/disable_freezing_flags_after_init_in_node.patch @@ -15,7 +15,7 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor node initialization to not update flags after V8 initialization. diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc -index 69f5528f0f6f3bfe6dab949b26dee9276aa115c6..81d637e84ef11681146beee74b1d27b23b16f11d 100644 +index ff83822653e2e661eb0ce9e3a1a90c045b25fdb1..f7141cb915ab8028117264ecd8ebfdb53b1079f0 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc @@ -241,6 +241,9 @@ RenderProcessImpl::RenderProcessImpl() diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index dd949a8fb33f..cb8566ec1504 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,7 +6,7 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 5b2d9bf9783f23d95be5e512dcf3e6ec9cb5151f..02e1780f15d15426e641077d06351d19f46ebaa8 100644 +index 0133090585389abafc843d7f7258d3d2281a5b54..a81933bcbb926659ba9dc8c775ce022a0f7bdafb 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -819,6 +819,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -34,7 +34,7 @@ index 688c6b226d83996e29f5aebc542163fe6b53e77a..a57beb8ba60416db6bc8d99eea0c450d // |routing_id| must not be MSG_ROUTING_NONE. // If this object outlives |delegate|, DetachDelegate() must be called when diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index d65137df978bcad6138f13251d4af3b8971aeadd..148d9f1c28c4810767306ee3884128c9bd0684ce 100644 +index 8b712a21e7ee1d2375c28af6a2f8d7279220138c..96c24edf6e4044a3ced0a87ecbd7a56f36f5d3d3 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -604,7 +604,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_optimization_guide_for_preconnect_feature.patch b/patches/chromium/disable_optimization_guide_for_preconnect_feature.patch deleted file mode 100644 index 15b5ef9f8383..000000000000 --- a/patches/chromium/disable_optimization_guide_for_preconnect_feature.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: John Kleinschmidt -Date: Thu, 1 Sep 2022 11:31:24 -0400 -Subject: disable optimization guide for preconnect feature - -The optimization guide component -(https://source.chromium.org/chromium/chromium/src/+/main:components/optimization_guide/) -is not enabled for Electron, but the preconnect feature uses the resource prefetch -predictor code which includes this component. This patch disables the optimization guide -component code in the resource prefetch predictor code since it is unused and including -it causes compilation problems on Windows. - -diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc -index 603c4094711700a5ae5b3769f161fc9149ccac75..e54844f7d331d60b9780d89747ecc333a4176c5d 100644 ---- a/chrome/browser/predictors/resource_prefetch_predictor.cc -+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc -@@ -100,10 +100,12 @@ PreconnectPrediction& PreconnectPrediction::operator=( - PreconnectPrediction& PreconnectPrediction::operator=( - PreconnectPrediction&& other) = default; - -+#if 0 - OptimizationGuidePrediction::OptimizationGuidePrediction() = default; - OptimizationGuidePrediction::OptimizationGuidePrediction( - const OptimizationGuidePrediction& prediction) = default; - OptimizationGuidePrediction::~OptimizationGuidePrediction() = default; -+#endif - - //////////////////////////////////////////////////////////////////////////////// - // ResourcePrefetchPredictor static functions. -diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h -index 60b0eaabd98695838fffd9a7255fd017fe2a01f0..a3d12988d28ef5be0507994d0ef3922aea44b22c 100644 ---- a/chrome/browser/predictors/resource_prefetch_predictor.h -+++ b/chrome/browser/predictors/resource_prefetch_predictor.h -@@ -26,7 +26,9 @@ - #include "components/history/core/browser/history_service_observer.h" - #include "components/history/core/browser/history_types.h" - #include "components/keyed_service/core/keyed_service.h" -+#if 0 - #include "components/optimization_guide/content/browser/optimization_guide_decider.h" -+#endif - #include "components/sqlite_proto/key_value_data.h" - #include "net/base/network_isolation_key.h" - #include "services/network/public/mojom/fetch_api.mojom-forward.h" -@@ -110,6 +112,7 @@ struct PreconnectPrediction { - std::vector prefetch_requests; - }; - -+#if 0 - // Stores a result of a prediction from the optimization guide. - struct OptimizationGuidePrediction { - OptimizationGuidePrediction(); -@@ -121,6 +124,7 @@ struct OptimizationGuidePrediction { - std::vector predicted_subresources; - absl::optional optimization_guide_prediction_arrived; - }; -+#endif - - // Contains logic for learning what can be prefetched and for kicking off - // speculative prefetching. diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index a77699323316..7b802d4384ae 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0 Make SetAspectRatio accept 0 as valid input, which would reset to null. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index 9541251b0f38df95f668e260fce086a56b910a2e..c6649fee262eb8c106d18875c6d739b1a944127e 100644 +index 0d5595767664eaaefb650fe372b4d686403f3fc5..9ca8ea82afdc9660384dd7224d810990f96bf5a5 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -566,7 +566,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { +@@ -574,7 +574,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { } void DesktopWindowTreeHostWin::SetAspectRatio(const gfx::SizeF& aspect_ratio) { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index a4154593a3e7..1693d7768419 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 41754f183010f804b0bd0db6cb82958812f8513d..6fcaa7da6b0be085e9f8969f7571bce053fe4015 100644 +index b1ac2fd235d3fc424d15b5c5991d7026a0f85090..6dc46954b070795de082d8542f8bae56d7b52dd4 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1415,6 +1415,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1409,6 +1409,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index 41754f183010f804b0bd0db6cb82958812f8513d..6fcaa7da6b0be085e9f8969f7571bce0 // 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 366870e27981debdf7dc5ed0fa191c3b4f8268a7..dc2111daff67b7812dca687bbdfd65b5f6eb4026 100644 +index 5b0a62302719f2aca565d933be4391ce59894f01..f16ba305b84c46ffbbef66d95c3f04bc8cc4f7e3 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -300,6 +300,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -298,6 +298,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 366870e27981debdf7dc5ed0fa191c3b4f8268a7..dc2111daff67b7812dca687bbdfd65b5 void SetEnableReferrers(bool enable_referrers) override; void SetEnablePreconnect(bool enable_preconnect) override; diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index cb0c5625d50301ea33f7baf3919cde276df6106f..25cd848fb9f04aa86a2c4b3bc4ee2d4a0b3c75c1 100644 +index cc820d3cc7217263e23cd5aeea97dcf736e4be77..8dd936e47c8c528ee2ca777788da5df98342dc7c 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1107,6 +1107,9 @@ interface NetworkContext { +@@ -1108,6 +1108,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index cb0c5625d50301ea33f7baf3919cde276df6106f..25cd848fb9f04aa86a2c4b3bc4ee2d4a SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index f24aba08e49ed7c649e60b18fb3138cda7c85477..d3d0c2434796d36df84a7cc037f72d9ec5e534f9 100644 +index c19a06999a65d7510f4e43f9c72384f693358f2e..ea1a137892b928dbfdc9c7241acfaf23b2633e84 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -134,6 +134,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -135,6 +135,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/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index f96997f5f591..093cc5c7071e 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 74c35b16d5778a5ac0618b9395a855995e9d0296..071b4eb6d0954d248942273effcc2d87c11caadf 100644 +index fe35e9c6b8c51e61f0f89c8feca03a36f756d432..775d81466dea650bb849cf6fb1a97662781a9b2d 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -164,6 +164,7 @@ @@ -23,7 +23,7 @@ index 74c35b16d5778a5ac0618b9395a855995e9d0296..071b4eb6d0954d248942273effcc2d87 #include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h" -@@ -1807,6 +1808,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1811,6 +1812,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_add_onclose_to_messageport.patch b/patches/chromium/feat_add_onclose_to_messageport.patch index f048906894b0..45733473cd5c 100644 --- a/patches/chromium/feat_add_onclose_to_messageport.patch +++ b/patches/chromium/feat_add_onclose_to_messageport.patch @@ -10,7 +10,7 @@ get this standardised, but in lieu of that, this makes MessagePort a whole bunch more useful! diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc -index ce4769d9c6f1756947cef382e83b55cece5ed0e5..0b3a900ba8029fbec276a947948f67e540933017 100644 +index 6da49190731463ad3b6ea524d933b2dcc6b3b09a..ffd17302846663abdd5e7ef1782081f88a565db7 100644 --- a/third_party/blink/renderer/core/messaging/message_port.cc +++ b/third_party/blink/renderer/core/messaging/message_port.cc @@ -174,6 +174,7 @@ void MessagePort::close() { 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 a0ef8bc1c568..37a8043429a9 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,7 +13,7 @@ uses internally for things like menus and devtools. We can remove this patch once it has in some shape been upstreamed. diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc -index 8260b496a498f06ddf91f0b9525ce7f56a66f310..fc28dcfefcd815de12954e7e6eec680a65a8f83a 100644 +index bf77c08ecf45bc9da36b99442b7ce14df3f8a4fc..cc2e46107f645dfc7c0265c93aeca037e6094559 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc @@ -132,6 +132,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, @@ -26,7 +26,7 @@ index 8260b496a498f06ddf91f0b9525ce7f56a66f310..fc28dcfefcd815de12954e7e6eec680a } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 2285728e0c3dc6539e436b2d775b5816fac32766..af1dcf1e550d7eeec1b38f75ab0f0af9867a57e2 100644 +index 03cf4a5080e77983abcf0b40b7621d33bd7005cb..a23aea98f14bb7dac8f9c5ca7df22349bf61478f 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h @@ -406,6 +406,23 @@ class NATIVE_THEME_EXPORT NativeTheme { @@ -53,7 +53,7 @@ index 2285728e0c3dc6539e436b2d775b5816fac32766..af1dcf1e550d7eeec1b38f75ab0f0af9 // 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 -@@ -586,6 +603,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -587,6 +604,7 @@ class NATIVE_THEME_EXPORT NativeTheme { PageColors page_colors_ = PageColors::kOff; PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; 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 14e9eb5d03d0..978c7b658e85 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -81,10 +81,10 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index f2c661fb373a3e2b5fcd7c3da7d5ae00bec3c01f..002fa5d7119fda27cd308eefa7cdc54767a46019 100644 +index f8ceaa5f44852c8c37aee80205b8ed5edff11beb..b4a3ff7859425b11e5d640a81e8ab9653efa51fe 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -136,6 +136,8 @@ viz_component("service") { +@@ -137,6 +137,8 @@ viz_component("service") { "display_embedder/skia_output_surface_impl_on_gpu.h", "display_embedder/skia_render_copy_results.cc", "display_embedder/skia_render_copy_results.h", @@ -516,10 +516,10 @@ index dc270ca19b0b29f863afdadf7b63fe9dad674a87..98843a7102bea4ab106ad4c84ecb1871 // Creating output surface failed. The host can send a new request, possibly // with a different compositing mode. diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index 47f54d2f0a30cd5de1784b0d51fef12c273c4fc9..341904d3d2ae3aad88b730bbf61d2e99c1808485 100644 +index 4c5bf12286fbce150106b412cdc303093a5505a8..af4c8fa380dd2c8f738955afc459fdff09b7029d 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc -@@ -384,8 +384,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -388,8 +388,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( mojo::AssociatedRemote display_private; root_params->display_private = display_private.BindNewEndpointAndPassReceiver(); diff --git a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch index 24ce1f51c108..8cdb43d73c36 100644 --- a/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch +++ b/patches/chromium/fix_allow_guest_webcontents_to_enter_fullscreen.patch @@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 1e867b8eddb510bb8564b4d26e8c649d40022dba..6c99fee1af1bcd64f3e6647132bd132f0ea111ec 100644 +index d40229af898fe65df610f229751da201f437d95c..6d0dbdfa625dc1ab90cc9e86b5f7f4706dfd8149 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3458,7 +3458,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -3459,7 +3459,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame, options)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch index 61fa0e1400bd..c64f96d290d3 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index c672ad5573a2a8f89d203a88cba2a53e52b1d7fb..fcec9c7dd1fd33be068c05b84cd52401be02b079 100644 +index 14dfb45da60c0552be10c8998ec126db1e7be202..bf89fb878e2bddf98558e6d6e9db8b00d525baf2 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -6642,10 +6642,11 @@ std::pair NavigationRequest:: +@@ -6716,10 +6716,11 @@ std::pair NavigationRequest:: if (IsForMhtmlSubframe()) return origin_with_debug_info; @@ -37,10 +37,10 @@ index c672ad5573a2a8f89d203a88cba2a53e52b1d7fb..fcec9c7dd1fd33be068c05b84cd52401 } diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h -index ed79f436761c21367ddfaf044e4c749f87975b64..153168ec693a0bec8eb83c204f10989afcef11c7 100644 +index 246afdee0f86004598e84703bd29126a9b864801..633e419651d4d9a70347e81eec18630a51899a40 100644 --- a/content/browser/renderer_host/render_frame_host_impl.h +++ b/content/browser/renderer_host/render_frame_host_impl.h -@@ -2612,6 +2612,17 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -2662,6 +2662,17 @@ class CONTENT_EXPORT RenderFrameHostImpl kIframeNestedWithinFencedFrame }; @@ -58,7 +58,7 @@ index ed79f436761c21367ddfaf044e4c749f87975b64..153168ec693a0bec8eb83c204f10989a protected: friend class RenderFrameHostFactory; -@@ -2957,17 +2968,6 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -3008,17 +3019,6 @@ class CONTENT_EXPORT RenderFrameHostImpl // relevant. void ResetWaitingState(); diff --git a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch index 802ebc95d663..12380734c9e0 100644 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem or support it enough to fix the crash. diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index 6e51c82afddded02c0a9538d2aeddf355b36ca10..8835429ce7e204eab21020a828c7348b482da4a9 100644 +index faa76a4083ad33bf8262fa322b9bfdd885320e8f..5ef867b567fc8f1dd230ab46de7f8b3b05e47b38 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.ts +++ b/chrome/browser/resources/pdf/pdf_viewer.ts -@@ -860,26 +860,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -860,26 +860,12 @@ export class PdfViewerElement extends PdfViewerBaseElement { dataArray = [result.dataToSave]; } @@ -48,7 +48,7 @@ index 6e51c82afddded02c0a9538d2aeddf355b36ca10..8835429ce7e204eab21020a828c7348b } /** -@@ -987,30 +973,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -987,30 +973,12 @@ export class PdfViewerElement extends PdfViewerBaseElement { fileName = fileName + '.pdf'; } diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 5bd3d5ea2673..e1931630ec73 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,7 +8,7 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index bec172bcb51c1232ba48c3bb70242b4674f54a86..ddafa37c3c6bce25228c16eeb924eacf6ade0500 100644 +index fee4259850b016a11ce15dc1e0c1b0d7cba342f9..00af441fea3cf6ea5d13713cc7488ac584cdd43d 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -1870,7 +1870,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch index b065f747f969..9faf7e82c8f7 100644 --- a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -15,10 +15,10 @@ node does not change in this case. chromium-bug: https://crbug.com/1369605 diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc -index beb340cc38c2f82c224793b26813bead85817c85..f43fbd03646406255845cfbb02ce31d3602edf2a 100644 +index bf9a7159266b6985c463e8491bf75f1f94449f9e..55a08ce16512a6c42dffbdfb7001a3cfe312a408 100644 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc -@@ -992,6 +992,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties( +@@ -993,6 +993,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties( return viz::ScopedSurfaceIdAllocator(std::move(allocation_task)); } @@ -45,10 +45,10 @@ index f7f9a981003ba1e3fefc9fc0f2b2bcf921c0a4d5..cd69daf186a6ec22fb70a2a36568e544 // RenderFrameMetadataProvider::Observer implementation. void OnRenderFrameMetadataChangedBeforeActivation( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6c99fee1af1bcd64f3e6647132bd132f0ea111ec..a5d175b17cdae078997bf081fa36106bb5885779 100644 +index 6d0dbdfa625dc1ab90cc9e86b5f7f4706dfd8149..497a2f4cc2ac00c8025db80dffea61a880fe1818 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -7926,7 +7926,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -7927,7 +7927,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch index 518b88236350..5291ba280310 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -64,10 +64,10 @@ index acc31345b556a4daf8a189cf7a9f302926e7cfdb..1f57875bb31f0e92829a0380e6f0f357 #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 076d5e45c2c5a15c23a2b24eaa1a0b25c33a8949..62cd3dd5ecf27ca1273dc9249cd2d601e580281a 100644 +index 175b2a77d696a60fa8209809edc758912a11e83a..86cdb09f3d87cdc6970a288f50848c78687f6f36 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -2577,6 +2577,7 @@ void LocalFrame::RequestExecuteScript( +@@ -2526,6 +2526,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -75,7 +75,7 @@ index 076d5e45c2c5a15c23a2b24eaa1a0b25c33a8949..62cd3dd5ecf27ca1273dc9249cd2d601 BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -2607,7 +2608,8 @@ void LocalFrame::RequestExecuteScript( +@@ -2556,7 +2557,8 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( ToScriptState(DomWindow(), *world), std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, @@ -86,10 +86,10 @@ index 076d5e45c2c5a15c23a2b24eaa1a0b25c33a8949..62cd3dd5ecf27ca1273dc9249cd2d601 void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() { diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h -index 078f42051b5743420f9e93f1abc6a6519fb158a5..a38dd9fe5aacbffaf96add280a66797b48455a61 100644 +index baac5c90c88991dc4b3ced175a8830f8d4cf1935..3b7f6a708fb41df297f9017daa6ec815ea1c418b 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -752,6 +752,7 @@ class CORE_EXPORT LocalFrame final +@@ -762,6 +762,7 @@ class CORE_EXPORT LocalFrame final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -205,7 +205,7 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0 const mojom::blink::UserActivationOption user_activation_option_; const mojom::blink::LoadEventBlockingOption blocking_option_; diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index 8a7eb9945f0d2fcdc2ca450f4768341273a07acc..3a5137110ed8e3a3a1fca28cea5cc9c8b6ef7313 100644 +index 682a6bb23e341e05901a85e2b2d7947146e971a0..b3153edb3ef02a26376b8d43a839f2f2af98670a 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc @@ -1101,14 +1101,15 @@ void WebLocalFrameImpl::RequestExecuteScript( @@ -227,7 +227,7 @@ index 8a7eb9945f0d2fcdc2ca450f4768341273a07acc..3a5137110ed8e3a3a1fca28cea5cc9c8 v8::MaybeLocal WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled( diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -index 8480cf8bfde8642484b428969b6f745697b8d598..5a0cf14a2705285592d813cc08a788d7faa828b3 100644 +index ecdea72246e3becac72b408bb9e22ffea1842672..d9fd6624a9495598726a50c2d53c902cbe866782 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h @@ -192,6 +192,7 @@ class CORE_EXPORT WebLocalFrameImpl final diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 80e43582fbe9..d01442be838a 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 326015c006b928912c11c34a302614402e739b61..80739c52d7c3622f15313a36858bdd75fff5ddc3 100644 +index d1700997390777100002fb0a2f4a5fc0e961fb15..1a08dabef38c67b7ccfc5522e91b0322a9b6e82e 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3287,6 +3287,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3306,6 +3306,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index 326015c006b928912c11c34a302614402e739b61..80739c52d7c3622f15313a36858bdd75 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index faae9fd7b3355c15a3088d8041cf6ee699cd6c71..74e3be8d2afe158ea4214986f8c19850d7356a91 100644 +index 2dcea7a09b8521020e0821e18cbd45219caca639..0a128058163ec4adcdfb051d5c2e0f6c8394b81b 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -272,6 +272,11 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 21a537ee60ce..7b961b4e2c32 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch Add electron resources file to the list of resource ids generation. diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index 2d5cdcca9505e7b46383fb37f179c13a15f9a96b..2a2eb66f27c4dd650a1fb38813159268ab184785 100644 +index 01f27f9eb13bd8fbd3f2d77dee16b29bdebc5a73..3eae0887c8ac3a62122e90576199877e158b377f 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1039,6 +1039,11 @@ +@@ -1032,6 +1032,11 @@ "includes": [4960], }, diff --git a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index 767337f95d51..3ab127c56339 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1: Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index 06c7e479bfd5c734d828488a2f693ebbe553bc44..a2d5412500eccb46c108970b8c81a7656368fe07 100755 +index a6adc31330f50a9495ef335b6c5d99e5d8f45e39..a85d5bb16ab0ce8a0193c54af282d49424a5b40b 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -302,6 +302,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch index 7e2d6bbf009a..73e84178da8b 100644 --- a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -21,7 +21,7 @@ index 8743c12ee7c1cae05e9a0a45f2e2b676f06167ae..c8791908ddc8e65e8e9aa1c908e43be5 properties->supports_global_application_menus = true; properties->app_modal_dialogs_use_event_blocker = true; diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h -index f5bcde9bb123a18fd49dc7272d0037350b3944b7..c8fb95090336ec48facd3140bb02409ad8755e95 100644 +index b250b8efd9319d77f6573b6ad7938bed1a6f60f3..dda998d6cab1c19e776b4e60cbd0ff6d892d5c1c 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h @@ -125,6 +125,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 4ff3fe98dfaf..0bc79e9ac73f 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -44,10 +44,10 @@ index 89b9323c08cfed0d3ea3a0ec1beaa0bdfabe343e..d000b7f43f393d297a3715ea4279537b } // namespace diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index fb835b2d02a2f0dd01afb73d11dc9651a583b9cf..d98ce7bbc69ffd9d246f6f81d096a84838c8a105 100644 +index eb178455e92ae0c5f6d5033ffc1990b711466a83..9b4f909501f6cbc50a7d88cef679add9e6c454d2 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -@@ -565,10 +565,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -566,10 +566,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -105,10 +105,10 @@ index abd19b8613e52a6f4c9404f509ab7ed5a61046a6..35945493a02996e88b0c53caf107c435 } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index fda9114d759cfb2db9ef7f981b82ae5f73c2f758..cd81c5481976e0a355230bae6a9ee2a362236b6f 100644 +index 67473b500bc8305bc21ec0324001ea5a64612aee..964acff055c3e192813b7793894b3fde8940facb 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -21,7 +21,9 @@ +@@ -22,7 +22,9 @@ #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" #include "ui/accessibility/ax_role_properties.h" #include "ui/accessibility/platform/ax_private_webkit_constants_mac.h" @@ -118,7 +118,7 @@ index fda9114d759cfb2db9ef7f981b82ae5f73c2f758..cd81c5481976e0a355230bae6a9ee2a3 namespace { -@@ -619,6 +621,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -621,6 +623,7 @@ void PostAnnouncementNotification(NSString* announcement) { if ([NSApp isActive]) return window == [NSApp accessibilityFocusedWindow]; @@ -126,7 +126,7 @@ index fda9114d759cfb2db9ef7f981b82ae5f73c2f758..cd81c5481976e0a355230bae6a9ee2a3 // TODO(accessibility): We need a solution to the problem described below. // If the window is NSAccessibilityRemoteUIElement, there are some challenges: // 1. NSApp is the browser which spawned the PWA, and what it considers the -@@ -646,6 +649,7 @@ void PostAnnouncementNotification(NSString* announcement) { +@@ -648,6 +651,7 @@ void PostAnnouncementNotification(NSString* announcement) { // from within the app shim content. if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) return true; diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index 302f2bb9cabd..afecec4c17bc 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -16,7 +16,7 @@ cases where performance improves when disabling remote CoreAnimation (remote CoreAnimation is really only about battery usage). diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h -index 1d20388c0acf533efe74dbaed9abae49ae7d6953..c08f4b8482e5cf1cb1afae71168059e9f238d276 100644 +index 8d1b4e5bf4f95dc890a956b616860f955da5b929..9914fba92b472fbe52c1f14e695b213122350842 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h @@ -21,7 +21,9 @@ @@ -29,7 +29,7 @@ index 1d20388c0acf533efe74dbaed9abae49ae7d6953..c08f4b8482e5cf1cb1afae71168059e9 @class CALayer; namespace ui { -@@ -113,7 +115,9 @@ class ImageTransportSurfaceOverlayMac : public gl::GLSurface, +@@ -117,7 +119,9 @@ class ImageTransportSurfaceOverlayMac : public gl::GLSurface, base::WeakPtr delegate_; bool use_remote_layer_api_; @@ -39,7 +39,7 @@ index 1d20388c0acf533efe74dbaed9abae49ae7d6953..c08f4b8482e5cf1cb1afae71168059e9 std::unique_ptr ca_layer_tree_coordinator_; gfx::Size pixel_size_; -@@ -204,7 +208,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::GLSurfaceEGL, +@@ -212,7 +216,9 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::GLSurfaceEGL, base::WeakPtr delegate_; bool use_remote_layer_api_; @@ -50,10 +50,10 @@ index 1d20388c0acf533efe74dbaed9abae49ae7d6953..c08f4b8482e5cf1cb1afae71168059e9 gfx::Size pixel_size_; diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -index ef6930b8b9aea2aed8890f056e8117beec5f75e2..88d498279b66facffb9078c52d4e3f74fbac44d7 100644 +index 3bf9a1c4ca3fc41bc912852b291a1484da29e00a..eda48669fc091122004733d3585e2dc9cf81c35b 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -60,6 +60,7 @@ +@@ -61,6 +61,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); @@ -61,7 +61,7 @@ index ef6930b8b9aea2aed8890f056e8117beec5f75e2..88d498279b66facffb9078c52d4e3f74 // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -68,6 +69,7 @@ +@@ -69,6 +70,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -69,7 +69,7 @@ index ef6930b8b9aea2aed8890f056e8117beec5f75e2..88d498279b66facffb9078c52d4e3f74 } ImageTransportSurfaceOverlayMac::~ImageTransportSurfaceOverlayMac() { -@@ -145,7 +147,9 @@ +@@ -146,7 +148,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { @@ -79,7 +79,7 @@ index ef6930b8b9aea2aed8890f056e8117beec5f75e2..88d498279b66facffb9078c52d4e3f74 } else { IOSurfaceRef io_surface = ca_layer_tree_coordinator_->GetIOSurfaceForDisplay(); -@@ -379,6 +383,7 @@ +@@ -378,6 +382,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); @@ -87,7 +87,7 @@ index ef6930b8b9aea2aed8890f056e8117beec5f75e2..88d498279b66facffb9078c52d4e3f74 // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -387,6 +392,7 @@ +@@ -386,6 +391,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -95,7 +95,7 @@ index ef6930b8b9aea2aed8890f056e8117beec5f75e2..88d498279b66facffb9078c52d4e3f74 } ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() { -@@ -465,7 +471,9 @@ +@@ -464,7 +470,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index e6ec901909f0..d8985abdd907 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -166,7 +166,7 @@ index 644990412b4d67789faffc65c4f1114fa96c8f42..085ceafcda3f66b27cec2aedde86ac7c void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 04a5bbef30bdd1827f455b8288faf9fbd86f103e..1e6b91961c3e32aa223383b444d075ada9688b0b 100644 +index cfec184939ea205dfcc0b1066eeca5c5275596aa..d0dca967df81f6a3d321cd046532bd4cb21e1619 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -180,6 +180,12 @@ source_set("audio") { @@ -183,7 +183,7 @@ index 04a5bbef30bdd1827f455b8288faf9fbd86f103e..1e6b91961c3e32aa223383b444d075ad "AudioToolbox.framework", "AudioUnit.framework", diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc -index 7da5704e2ee919b711b105641f6535b9fe08e396..a2c9e6232d7dc2490833b46b3f257ea1c636f0f1 100644 +index f2e38845218fe585085ca4ad9dc364ce2fdf3546..516bd4ae829d67e9d53b783671a2f6039800e2df 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc @@ -885,7 +885,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( diff --git a/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch b/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch index d5f3a59a10b1..5ca4d856faa1 100644 --- a/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch +++ b/patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch @@ -9,7 +9,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm -index ebd0b0c66f690e1f21b917b53cb6a7ee58a31806..f5d97304223d6be5482a951ecbf31b3d0efb7348 100644 +index b9858f5c8d9abcdea0ef40d8b0bc9c2606e977f5..72ffad13176771955f24b81bf73cf1d40faed56d 100644 --- a/ui/gfx/platform_font_mac.mm +++ b/ui/gfx/platform_font_mac.mm @@ -25,9 +25,11 @@ @@ -24,7 +24,7 @@ index ebd0b0c66f690e1f21b917b53cb6a7ee58a31806..f5d97304223d6be5482a951ecbf31b3d namespace { -@@ -220,7 +222,13 @@ NSInteger ToNSFontManagerWeight(Weight weight) { +@@ -228,7 +230,13 @@ NSInteger ToNSFontManagerWeight(Weight weight) { // TODO(avi, etienneb): Figure out this font stuff. base::ScopedCFTypeRef descriptor( CTFontCopyFontDescriptor(font)); 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 d824ea896093..d3555e2f0f49 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 f9acfee6133ec05e49db779ef9ebfda5803cb8df..41754f183010f804b0bd0db6cb82958812f8513d 100644 +index a5974ea868cfca930794f522038844138a02b3ce..b1ac2fd235d3fc424d15b5c5991d7026a0f85090 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -133,6 +133,11 @@ +@@ -132,6 +132,11 @@ #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index f9acfee6133ec05e49db779ef9ebfda5803cb8df..41754f183010f804b0bd0db6cb829588 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -441,6 +446,91 @@ bool GetFullDataFilePath( +@@ -440,6 +445,91 @@ bool GetFullDataFilePath( } // namespace @@ -114,7 +114,7 @@ index f9acfee6133ec05e49db779ef9ebfda5803cb8df..41754f183010f804b0bd0db6cb829588 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -746,6 +836,13 @@ void NetworkContext::SetClient( +@@ -742,6 +832,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -128,7 +128,7 @@ index f9acfee6133ec05e49db779ef9ebfda5803cb8df..41754f183010f804b0bd0db6cb829588 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2326,6 +2423,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2322,6 +2419,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get()); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,10 +139,10 @@ index f9acfee6133ec05e49db779ef9ebfda5803cb8df..41754f183010f804b0bd0db6cb829588 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 6161e89321162f0a9d0e7f939bd79243200ea5f2..366870e27981debdf7dc5ed0fa191c3b4f8268a7 100644 +index 7a0d76107bf45fd4d1e638b9b66965c4ace4e893..5b0a62302719f2aca565d933be4391ce59894f01 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -104,6 +104,7 @@ class URLMatcher; +@@ -102,6 +102,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -150,7 +150,7 @@ index 6161e89321162f0a9d0e7f939bd79243200ea5f2..366870e27981debdf7dc5ed0fa191c3b class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -240,6 +241,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -238,6 +239,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -159,20 +159,20 @@ index 6161e89321162f0a9d0e7f939bd79243200ea5f2..366870e27981debdf7dc5ed0fa191c3b void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -832,6 +835,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -838,6 +841,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) + RemoteCertVerifier* remote_cert_verifier_ = nullptr; + - // CertNetFetcher used by the context's CertVerifier. May be nullptr if - // CertNetFetcher is not used by the current platform, or if the actual - // net::CertVerifier is instantiated outside of the network service. + // Created on-demand. Null if unused. + std::unique_ptr internal_host_resolver_; + // Map values set to non-null only if that HostResolver has its own private diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 2fa526f526e36255ae043047177c7e099bb50359..cb0c5625d50301ea33f7baf3919cde276df6106f 100644 +index 88e964da0580c757a7612a8faf272d2a61a0c811..cc820d3cc7217263e23cd5aeea97dcf736e4be77 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -284,6 +284,17 @@ struct NetworkContextFilePaths { +@@ -285,6 +285,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -190,7 +190,7 @@ index 2fa526f526e36255ae043047177c7e099bb50359..cb0c5625d50301ea33f7baf3919cde27 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -852,6 +863,9 @@ interface NetworkContext { +@@ -853,6 +864,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 3a8df7f155ab..9fa2d7d69c62 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -133,10 +133,10 @@ index 05fb3299e4eea19aeef8eb618ec81cb721a36cae..46d1cd2f96d68d36f6dd080fd69ffced const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index d075a2f1ed29a693009c3f993ab24c1fbc8cd1c7..d3c552ed96023475de1215c505978278f04766ec 100644 +index a0de2c6d5f027fefa052a4b87882685d4e347cd8..446a67010214e68d5981c74e9c3923cec16edc60 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2067,8 +2067,9 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2068,8 +2068,9 @@ void RenderProcessHostImpl::CreateNotificationService( // For workers: if (render_frame_id == MSG_ROUTING_NONE) { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -148,7 +148,7 @@ index d075a2f1ed29a693009c3f993ab24c1fbc8cd1c7..d3c552ed96023475de1215c505978278 return; } -@@ -2076,7 +2077,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2077,7 +2078,7 @@ void RenderProcessHostImpl::CreateNotificationService( RenderFrameHost* rfh = RenderFrameHost::FromID(GetID(), render_frame_id); CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch index ea1efd28d04f..34fb2eb92a0b 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,19 +8,13 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index ccbfada8363e40a81e6634757ff6d99a28986654..836706a6d17951283b01259afbe0b3acc2228049 100644 +index a0ea99233f8d890f34da329dd90b4c791eb8e64b..6e097af16731e7c9a624a33014f393dc618f74ed 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -237,6 +237,16 @@ - E_CPONLY(kColorOverlayScrollbarStrokeHoveredLight) \ - E_CPONLY(kColorProgressBar) \ - E_CPONLY(kColorProgressBarPaused) \ -+ E_CPONLY(kColorPwaSecurityChipForeground) \ -+ E_CPONLY(kColorPwaSecurityChipForegroundDangerous) \ -+ E_CPONLY(kColorPwaSecurityChipForegroundPolicyCert) \ -+ E_CPONLY(kColorPwaSecurityChipForegroundSecure) \ -+ E_CPONLY(kColorPwaToolbarBackground) \ -+ E_CPONLY(kColorPwaToolbarForeground) \ +@@ -240,6 +240,10 @@ + E_CPONLY(kColorReadAnythingForegroundDark) \ + E_CPONLY(kColorReadAnythingForegroundLight) \ + E_CPONLY(kColorReadAnythingForegroundYellow) \ + E_CPONLY(kColorResultsTableNormalBackground) \ + E_CPONLY(kColorResultsTableHoveredBackground) \ + E_CPONLY(kColorResultsTableNormalText) \ @@ -28,7 +22,7 @@ index ccbfada8363e40a81e6634757ff6d99a28986654..836706a6d17951283b01259afbe0b3ac E_CPONLY(kColorSeparator) \ E_CPONLY(kColorShadowBase) \ E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ -@@ -291,6 +301,7 @@ +@@ -294,6 +298,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ @@ -37,13 +31,13 @@ index ccbfada8363e40a81e6634757ff6d99a28986654..836706a6d17951283b01259afbe0b3ac #if BUILDFLAG(IS_CHROMEOS) diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc -index 9f16d549f88563aa00e0e10ee51237342711cff2..c7e72cf38713988db751e5e760ba688979109d2c 100644 +index 2b8697cac1a1fa7ce2c7abfb436dc38d334c93ec..2952397d1f9f6a44ace0e3c7cd2bce92a0217df3 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc -@@ -151,6 +151,17 @@ void AddUiColorMixer(ColorProvider* provider, - gfx::kGoogleGreyAlpha500); - mixer[kColorProgressBarPaused] = {kColorDisabledForeground}; - mixer[kColorProgressBar] = {kColorAccent}; +@@ -154,6 +154,17 @@ void AddUiColorMixer(ColorProvider* provider, + mixer[kColorReadAnythingForegroundDark] = {gfx::kGoogleGrey200}; + mixer[kColorReadAnythingForegroundLight] = {gfx::kGoogleGrey800}; + mixer[kColorReadAnythingForegroundYellow] = {gfx::kGoogleGrey800}; + mixer[kColorResultsTableNormalBackground] = {SK_ColorWHITE}; + mixer[kColorResultsTableHoveredBackground] = + SetAlpha(kColorResultsTableNormalText, 0x0D); @@ -58,7 +52,7 @@ index 9f16d549f88563aa00e0e10ee51237342711cff2..c7e72cf38713988db751e5e760ba6889 mixer[kColorSeparator] = {kColorMidground}; mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; mixer[kColorShadowValueAmbientShadowElevationThree] = -@@ -232,6 +243,7 @@ void AddUiColorMixer(ColorProvider* provider, +@@ -235,6 +246,7 @@ void AddUiColorMixer(ColorProvider* provider, mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; mixer[kColorTreeNodeForegroundSelectedUnfocused] = { kColorTreeNodeForegroundSelectedFocused}; diff --git a/patches/chromium/preconnect_manager.patch b/patches/chromium/preconnect_manager.patch new file mode 100644 index 000000000000..ff871bb3c968 --- /dev/null +++ b/patches/chromium/preconnect_manager.patch @@ -0,0 +1,107 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Thu, 13 Oct 2022 20:30:12 +0900 +Subject: Preconnect manager + +* Patch disables the profile related changes added in +https://chromium-review.googlesource.com/c/chromium/src/+/3928470. +* Also avoids including chrome/browser/predictors/resource_prefetch_predictor.h +in favor of defining PreconnectRequest in this file since we don't build +the header. + +diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc +index 48b500a8ead699ef9d30d3219f41a913711bc4a0..f3e9c87c5ce29a4e9dc8204413f47a761408a373 100644 +--- a/chrome/browser/predictors/preconnect_manager.cc ++++ b/chrome/browser/predictors/preconnect_manager.cc +@@ -10,9 +10,11 @@ + #include "base/containers/adapters.h" + #include "base/metrics/histogram_macros.h" + #include "base/trace_event/trace_event.h" ++#if 0 + #include "chrome/browser/predictors/resource_prefetch_predictor.h" + #include "chrome/browser/prefetch/prefetch_prefs.h" + #include "chrome/browser/profiles/profile.h" ++#endif + #include "content/public/browser/browser_context.h" + #include "content/public/browser/browser_task_traits.h" + #include "content/public/browser/browser_thread.h" +@@ -23,6 +25,20 @@ namespace predictors { + + const bool kAllowCredentialsOnPreconnectByDefault = true; + ++// NOTE(nornagon): this is copied from ++// //chrome/browser/predictors/resource_prefetch_predictor.cc we don't need ++// anything in that file other than this constructor. ++PreconnectRequest::PreconnectRequest( ++ const url::Origin& origin, ++ int num_sockets, ++ const net::NetworkAnonymizationKey& network_anonymization_key) ++ : origin(origin), ++ num_sockets(num_sockets), ++ network_anonymization_key(network_anonymization_key) { ++ DCHECK_GE(num_sockets, 0); ++ DCHECK(!network_anonymization_key.IsEmpty()); ++} ++ + PreconnectedRequestStats::PreconnectedRequestStats(const url::Origin& origin, + bool was_preconnected) + : origin(origin), was_preconnected(was_preconnected) {} +@@ -83,11 +99,14 @@ PreconnectManager::PreconnectManager(base::WeakPtr delegate, + PreconnectManager::~PreconnectManager() = default; + + bool PreconnectManager::IsEnabled() { ++#if 0 + Profile* profile = Profile::FromBrowserContext(browser_context_); + if (!profile) { + return false; + } + return prefetch::IsSomePreloadingEnabled(*profile->GetPrefs()); ++#endif ++ return true; + } + + void PreconnectManager::Start(const GURL& url, +diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h +index d3cd85950261b66be42a22772b6344ab5cb63267..3346bb79dd1f945c4c86c664a82637ef0ce6229c 100644 +--- a/chrome/browser/predictors/preconnect_manager.h ++++ b/chrome/browser/predictors/preconnect_manager.h +@@ -18,7 +18,9 @@ + #include "base/time/time.h" + #include "chrome/browser/predictors/proxy_lookup_client_impl.h" + #include "chrome/browser/predictors/resolve_host_client_impl.h" ++#if 0 + #include "chrome/browser/predictors/resource_prefetch_predictor.h" ++#endif + #include "net/base/network_anonymization_key.h" + #include "url/gurl.h" + +@@ -34,7 +36,28 @@ class NetworkContext; + + namespace predictors { + +-struct PreconnectRequest; ++// Stores all values needed to trigger a preconnect/preresolve job to a single ++// origin. ++struct PreconnectRequest { ++ // |network_anonymization_key| specifies the key that network requests for the ++ // preconnected URL are expected to use. If a request is issued with a ++ // different key, it may not use the preconnected socket. It has no effect ++ // when |num_sockets| == 0. ++ PreconnectRequest( ++ const url::Origin& origin, ++ int num_sockets, ++ const net::NetworkAnonymizationKey& network_anonymization_key); ++ PreconnectRequest(const PreconnectRequest&) = default; ++ PreconnectRequest(PreconnectRequest&&) = default; ++ PreconnectRequest& operator=(const PreconnectRequest&) = default; ++ PreconnectRequest& operator=(PreconnectRequest&&) = default; ++ ++ url::Origin origin; ++ // A zero-value means that we need to preresolve a host only. ++ int num_sockets = 0; ++ bool allow_credentials = true; ++ net::NetworkAnonymizationKey network_anonymization_key; ++}; + + struct PreconnectedRequestStats { + PreconnectedRequestStats(const url::Origin& origin, bool was_preconnected); diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index f94d03590235..fecde5008d69 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,10 +11,10 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. diff --git a/BUILD.gn b/BUILD.gn -index 629be8570b8ceb18a9c334a54f6248d4c991e2a5..09ea60878e7e04ee046e1d37e0787288bb28855a 100644 +index a6b18dea1236535e4c802c4c1abceefb69609b17..76bc010c7a4af291fff8d44c0e5c54b93f355b87 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -997,7 +997,6 @@ if (is_win) { +@@ -980,7 +980,6 @@ if (is_win) { "//media:media_unittests", "//media/midi:midi_unittests", "//net:net_unittests", @@ -22,7 +22,7 @@ index 629be8570b8ceb18a9c334a54f6248d4c991e2a5..09ea60878e7e04ee046e1d37e0787288 "//sql:sql_unittests", "//third_party/breakpad:symupload($host_toolchain)", "//ui/base:ui_base_unittests", -@@ -1006,6 +1005,10 @@ if (is_win) { +@@ -989,6 +988,10 @@ if (is_win) { "//ui/views:views_unittests", "//url:url_unittests", ] @@ -34,7 +34,7 @@ index 629be8570b8ceb18a9c334a54f6248d4c991e2a5..09ea60878e7e04ee046e1d37e0787288 } diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc -index e5566f069e3e54ee0b7ddd5ea377889cf1c9690f..6845a3f6376160991f0e90cd1647ea3aa00963a8 100644 +index a1372cc90fc84b159e9952fa747e36360ae1a170..429b93910457675347b3b80e232e71aa4021a3ff 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc @@ -90,6 +90,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { @@ -121,10 +121,10 @@ index 51bab147b3c353313e91b1ff09b735bfdde9b19a..d311ed33b2cf8fc459af7c3b7dd0c0ff #if BUILDFLAG(IS_CHROMEOS) diff --git a/chrome/browser/printing/print_job_worker_oop.cc b/chrome/browser/printing/print_job_worker_oop.cc -index 8a126ddc655271416eda3d035caeb2c6778537b1..a2b6b19846bddf918efb75a53ea58dcfdddbc9d5 100644 +index 6e9486405552e990d6c8fe13691c9951194b9f66..bdf46827498db33c7550a559699e59bdc089d89b 100644 --- a/chrome/browser/printing/print_job_worker_oop.cc +++ b/chrome/browser/printing/print_job_worker_oop.cc -@@ -356,7 +356,7 @@ void PrintJobWorkerOop::OnFailure() { +@@ -359,7 +359,7 @@ void PrintJobWorkerOop::OnFailure() { } void PrintJobWorkerOop::ShowErrorDialog() { @@ -575,7 +575,7 @@ index 220a751903f8bec318e5d7f48f35333b3b1c155b..60c54f6e407ba89894847b7e34f0ea9e // Tells the browser that there are invalid printer settings. ShowInvalidPrinterSettingsError(); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index d8b08c6b366f86baf9f5577153e96ba82eb747ad..a539bcb155bb49706ee213102d217d3f3bdc29bb 100644 +index 96c1116ec6dd9f7c1ccbe067db599af0b48be20a..93a938690deb64247dcf2143123cf9e7132eab5f 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -44,6 +44,7 @@ @@ -633,7 +633,7 @@ index d8b08c6b366f86baf9f5577153e96ba82eb747ad..a539bcb155bb49706ee213102d217d3f print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -2101,7 +2106,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2097,7 +2102,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -643,7 +643,7 @@ index d8b08c6b366f86baf9f5577153e96ba82eb747ad..a539bcb155bb49706ee213102d217d3f // Check if |this| is still valid. if (!weak_this) return; -@@ -2116,7 +2122,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2112,7 +2118,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -654,7 +654,7 @@ index d8b08c6b366f86baf9f5577153e96ba82eb747ad..a539bcb155bb49706ee213102d217d3f // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -2124,7 +2132,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2120,7 +2128,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -663,7 +663,7 @@ index d8b08c6b366f86baf9f5577153e96ba82eb747ad..a539bcb155bb49706ee213102d217d3f DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -2143,8 +2151,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2139,8 +2147,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -680,7 +680,7 @@ index d8b08c6b366f86baf9f5577153e96ba82eb747ad..a539bcb155bb49706ee213102d217d3f // Check if |this| is still valid. if (!self) return; -@@ -2410,36 +2425,52 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2406,36 +2421,52 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -745,7 +745,7 @@ index d8b08c6b366f86baf9f5577153e96ba82eb747ad..a539bcb155bb49706ee213102d217d3f notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2566,7 +2597,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2562,7 +2593,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -755,10 +755,10 @@ index d8b08c6b366f86baf9f5577153e96ba82eb747ad..a539bcb155bb49706ee213102d217d3f std::move(quit_closure).Run(); }, diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 0f291a40155fb4616bf5feb4c0882892b777b07f..5af22ca607f9bb7e6de129d72bd867c9b977aa2f 100644 +index 51a5497b809cda82b223138f43507172a9f066ae..71227492fd87e577518f3bf55ded37b08872061b 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h -@@ -255,7 +255,7 @@ class PrintRenderFrameHelper +@@ -253,7 +253,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: @@ -767,7 +767,7 @@ index 0f291a40155fb4616bf5feb4c0882892b777b07f..5af22ca607f9bb7e6de129d72bd867c9 void PrintWithParams(mojom::PrintPagesParamsPtr params, PrintWithParamsCallback callback) override; #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -328,7 +328,9 @@ class PrintRenderFrameHelper +@@ -326,7 +326,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -778,7 +778,7 @@ index 0f291a40155fb4616bf5feb4c0882892b777b07f..5af22ca607f9bb7e6de129d72bd867c9 // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -337,12 +339,14 @@ class PrintRenderFrameHelper +@@ -335,12 +337,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -796,10 +796,10 @@ index 0f291a40155fb4616bf5feb4c0882892b777b07f..5af22ca607f9bb7e6de129d72bd867c9 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 732dd4c8e3f578ddfc60bffa60eece8cd94e3486..eadad51f8316ea54369e4c8e42b5428131f5bafc 100644 +index a82ab440893d22424366c969d6765a10ee05ea86..a68bc27a93a38f5a1cb0c3dc225def6290dbf688 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -2815,8 +2815,9 @@ source_set("browser") { +@@ -2819,8 +2819,9 @@ source_set("browser") { "//ppapi/shared_impl", ] @@ -812,18 +812,18 @@ index 732dd4c8e3f578ddfc60bffa60eece8cd94e3486..eadad51f8316ea54369e4c8e42b54281 if (is_chromeos) { sources += [ diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc -index 54a951972aef1cfedd6e3f7db246d801683b70af..4284539fc5bce2018ae06c1e5ee207ac388c01dd 100644 +index aa59ef2ea780af3e881be9a984eef5d309586dc4..c5bd3ed36ff3f4d1fe75ef2c6a1d40d655c0bbe0 100644 --- a/content/browser/utility_sandbox_delegate_win.cc +++ b/content/browser/utility_sandbox_delegate_win.cc -@@ -96,6 +96,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetConfig* config) { +@@ -99,6 +99,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetConfig* config) { return true; } +#if BUILDFLAG(ENABLE_PRINTING) // Sets the sandbox policy for the print backend service process. - void PrintBackendPreSpawnTarget(sandbox::TargetConfig* config) { + bool PrintBackendPreSpawnTarget(sandbox::TargetConfig* config) { DCHECK(!config->IsConfigured()); -@@ -161,6 +162,7 @@ bool XrCompositingPreSpawnTarget(sandbox::TargetConfig* config, +@@ -192,6 +193,7 @@ bool XrCompositingPreSpawnTarget(sandbox::TargetConfig* config, return true; } 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 cbfa7ce82961..c6e504ef3a46 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,7 +30,7 @@ index 5f1eea557b549a6db081ff925ba9995b0591d9fa..62c5ef52ec774623f2cfc7c269973a26 // RenderWidgetHost on the primary main frame, and false otherwise. virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 02e1780f15d15426e641077d06351d19f46ebaa8..cb571e4c5b72cd970b8759368b2be44b5b816d92 100644 +index a81933bcbb926659ba9dc8c775ce022a0f7bdafb..bc0d1fab2160fa476c875a6a5e549c878c855795 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -2093,6 +2093,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { @@ -43,10 +43,10 @@ index 02e1780f15d15426e641077d06351d19f46ebaa8..cb571e4c5b72cd970b8759368b2be44b void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index df0dff67e23423a5a527a93dac27a6fe19e2aaf0..c9b9041792f757bf00d2027f565058ed2d0e7052 100644 +index 6db9441a458a1293118fd3fbbe6f439fafb730b4..d922a3a2fa6c2cbd9bf7563e17cb72ba5fb0fa49 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4590,6 +4590,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4591,6 +4591,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,7 +59,7 @@ index df0dff67e23423a5a527a93dac27a6fe19e2aaf0..c9b9041792f757bf00d2027f565058ed RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index bc64d1d0c75b5c68a29cc26025dbd9e2c4086a3e..bec172bcb51c1232ba48c3bb70242b4674f54a86 100644 +index 185b2f060ed466b470c4ba6cfb637c4be29b2689..fee4259850b016a11ce15dc1e0c1b0d7cba342f9 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -978,6 +978,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 0a6d55f654c6..18e913788864 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe as well? terrifying. diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc -index 5e4ab4b65d33354b6cf7b4d33a5aea32891acd31..1489a78a80b2c9ef525365cacccd6bbb29d84046 100644 +index b0c9044e9978ff38ecd730541e512bbe73e45a27..aecd5ef1019188a593f23436b5392f57805620b0 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc @@ -706,6 +706,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 2ea77dd5073e..5f7f2839f054 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/patches/chromium/resource_file_conflict.patch @@ -52,7 +52,7 @@ 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 fc66534a1ad2aced6fe429f76bc4ec0ad3eb13d0..63676cdc719e543d6982b0f894ad88d65c139f57 100644 +index 58879beacaeed450abf6a6e753f75f592a0e5460..b12b4e65be8ad29054f5fdd98600888726b1d068 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -1552,7 +1552,7 @@ if (is_chrome_branded && !is_android) { diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 51911323d092..33b055b78964 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 c728e50d50483197f79234f7b8e2d18eec873c69..a5d07abdfb317b3e30790d484ea2f9e5de5b6e66 100644 +index 17b628006b06fd07c902ef2dcf1de4d5ac918dea..0b49ae9d5312e5fb2ad75ddb1812aa0777ef6e0c 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1270,7 +1270,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1273,7 +1273,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch index b1353462497e..33a05423137e 100644 --- a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -15,7 +15,7 @@ short-circuit all the permissions checks in MSDC for now to allow us to unduplicate this code. diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc -index 92d7ecfb514d8a59d6b95f8dfb5363f851ae3aaa..d985909070be522ce2a1573c9d62736dea9e5e55 100644 +index 7dbbcc13901dcd8b7a9ca9c9bdce4f924c1c6a55..5de44c5c20c92a1793060492f925519d6b8befe5 100644 --- a/components/webrtc/media_stream_devices_controller.cc +++ b/components/webrtc/media_stream_devices_controller.cc @@ -92,10 +92,13 @@ void MediaStreamDevicesController::RequestPermissions( @@ -32,8 +32,8 @@ index 92d7ecfb514d8a59d6b95f8dfb5363f851ae3aaa..d985909070be522ce2a1573c9d62736d content::PermissionResult permission_status = permission_controller->GetPermissionResultForCurrentDocument( blink::PermissionType::AUDIO_CAPTURE, rfh); -@@ -106,10 +109,12 @@ void MediaStreamDevicesController::RequestPermissions( - content::PermissionStatusSource::FEATURE_POLICY); +@@ -110,10 +113,12 @@ void MediaStreamDevicesController::RequestPermissions( + content::PermissionStatusSource::FENCED_FRAME); return; } +#endif @@ -45,15 +45,15 @@ index 92d7ecfb514d8a59d6b95f8dfb5363f851ae3aaa..d985909070be522ce2a1573c9d62736d content::PermissionResult permission_status = permission_controller->GetPermissionResultForCurrentDocument( blink::PermissionType::VIDEO_CAPTURE, rfh); -@@ -120,6 +125,7 @@ void MediaStreamDevicesController::RequestPermissions( - content::PermissionStatusSource::FEATURE_POLICY); +@@ -128,6 +133,7 @@ void MediaStreamDevicesController::RequestPermissions( + content::PermissionStatusSource::FENCED_FRAME); return; } +#endif permission_types.push_back(blink::PermissionType::VIDEO_CAPTURE); -@@ -131,6 +137,7 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -139,6 +145,7 @@ void MediaStreamDevicesController::RequestPermissions( // pan-tilt-zoom permission and there are suitable PTZ capable devices // available. if (request.request_pan_tilt_zoom_permission && has_pan_tilt_zoom_camera) { @@ -61,7 +61,7 @@ index 92d7ecfb514d8a59d6b95f8dfb5363f851ae3aaa..d985909070be522ce2a1573c9d62736d permission_status = permission_controller->GetPermissionResultForCurrentDocument( blink::PermissionType::CAMERA_PAN_TILT_ZOOM, rfh); -@@ -140,6 +147,7 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -148,6 +155,7 @@ void MediaStreamDevicesController::RequestPermissions( controller->RunCallback(/*blocked_by_permissions_policy=*/false); return; } @@ -69,7 +69,7 @@ index 92d7ecfb514d8a59d6b95f8dfb5363f851ae3aaa..d985909070be522ce2a1573c9d62736d permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM); } -@@ -426,6 +434,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -434,6 +442,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( return false; } @@ -77,7 +77,7 @@ index 92d7ecfb514d8a59d6b95f8dfb5363f851ae3aaa..d985909070be522ce2a1573c9d62736d // TODO(raymes): This function wouldn't be needed if // PermissionManager::RequestPermissions returned a denial reason. content::PermissionResult result = -@@ -436,6 +445,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -444,6 +453,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( DCHECK_EQ(blink::mojom::PermissionStatus::DENIED, result.status); return true; } diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index eddda49f061b..a1672393ea17 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 d3c552ed96023475de1215c505978278f04766ec..0606b76ac16553ed446f3e3b5d3369aa1c32d72c 100644 +index 446a67010214e68d5981c74e9c3923cec16edc60..d0b9284fcd1120722b751a462f7018353e7b07c3 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1765,9 +1765,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1766,9 +1766,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); diff --git a/patches/chromium/sysroot.patch b/patches/chromium/sysroot.patch index 6b833780b4df..a9874103810f 100644 --- a/patches/chromium/sysroot.patch +++ b/patches/chromium/sysroot.patch @@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds, which include extra deps that Electron needs (e.g. libnotify) diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py -index 7c18388b0082f766ae397daaa326ecfb26900ea7..e054db236481a6789d3304e60d92be5b98b8fae5 100755 +index d7e36862f48e8a2e3dff406f1183df26ca1ef700..e702004c4bc8afbad0ba42fe45511d30dc445f6e 100755 --- a/build/linux/sysroot_scripts/install-sysroot.py +++ b/build/linux/sysroot_scripts/install-sysroot.py @@ -41,9 +41,11 @@ except ImportError: @@ -24,7 +24,7 @@ index 7c18388b0082f766ae397daaa326ecfb26900ea7..e054db236481a6789d3304e60d92be5b VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el') -@@ -106,7 +108,7 @@ def GetSysrootDict(target_platform, target_arch): +@@ -107,7 +109,7 @@ def GetSysrootDict(target_platform, target_arch): if target_arch not in VALID_ARCHS: raise Error('Unknown architecture: %s' % target_arch) diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index b35a24632ccb..558372e3456b 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 1ca2c578463b66aae6592a587531f38dc954dec5..1e867b8eddb510bb8564b4d26e8c649d40022dba 100644 +index b4ca9ba85766357a76560b8440fcd6901c0b00cb..d40229af898fe65df610f229751da201f437d95c 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3081,6 +3081,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3082,6 +3082,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -26,7 +26,7 @@ index 1ca2c578463b66aae6592a587531f38dc954dec5..1e867b8eddb510bb8564b4d26e8c649d std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3091,6 +3098,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3092,6 +3099,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 7122bae6d546..dc6b91523fad 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,10 +14,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 58caea552e2892c12365a79ce5148559f784264b..c8c096196431295618aeb8dc25c014ee31c172e0 100644 +index 94690c49a771cb5ff873696bf0926972e7276d50..e6df759eff45383f809a98994bfae3b1d79807ef 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6595,6 +6595,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6718,6 +6718,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 28b8de9557d3..3d3bff45f250 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index 69e9da01fd70890a3df6c3c3959f87feb9ea316e..ce8cbdd6ce54bb2e0f1e6371679fc0d1 // 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 1ba99a9f9302eb9e7b5d4c6376fe096bf88934ec..805495bb957445e9a95aaa9f6790b13531e1685a 100644 +index 9a29b47834bd99129c73397e8873cedc8cf7f014..c3adc4563f0c5d8e50dc1f5acdd61f314b21493d 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -864,6 +864,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -867,6 +867,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index 1ba99a9f9302eb9e7b5d4c6376fe096bf88934ec..805495bb957445e9a95aaa9f6790b135 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 e607746a2ef60ec400a25faaa1768fcaefd60c2a..3ed35a51a70b035f5b4ba5ca46a3f15c893fd503 100644 +index bb3be5a46b3dfd9f279c780d501a264cf4fc5be7..799cec3e793b1acf33864bea4d49b3544634781b 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -180,6 +180,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -181,6 +181,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 e607746a2ef60ec400a25faaa1768fcaefd60c2a..3ed35a51a70b035f5b4ba5ca46a3f15c 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 18008b93d906637bada69e6fe66adf94f50690f4..a4c6696c35c6d6560c725f818eec8c25dc714736 100644 +index 4bbd5c412ff46a865de52c07c0f91b2bd05ce476..9b4559f6dd51cec07a4fdc7da35ce645906f1a74 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -626,6 +626,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -633,6 +633,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index 18008b93d906637bada69e6fe66adf94f50690f4..a4c6696c35c6d6560c725f818eec8c25 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 2378878d3f31ff9ad47611920630da509d4751d1..2918beb4bb4ca2e1687e3564178bdcbb923742ef 100644 +index 8bb4af88c478ba374682ee7fd56616336c1176b6..b5ab51bf0e8277794303046748ca43ed8cbcf9ba 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -744,6 +744,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -745,6 +745,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 05539b82b0e3..bd8eca6ea170 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -35,10 +35,10 @@ index ce8cbdd6ce54bb2e0f1e6371679fc0d1438ae69c..4de6b91b2f182be488249bf2a47b376a // 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 805495bb957445e9a95aaa9f6790b13531e1685a..0702f5e6f2c0bad147b9f58c0a2e2d990000f4ff 100644 +index c3adc4563f0c5d8e50dc1f5acdd61f314b21493d..3460a40fb904ad0a976f53d5a53004692a75e380 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -876,6 +876,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -879,6 +879,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index 805495bb957445e9a95aaa9f6790b13531e1685a..0702f5e6f2c0bad147b9f58c0a2e2d99 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 3ed35a51a70b035f5b4ba5ca46a3f15c893fd503..367564b0eb6ca13374ac277f183d055de7cfb103 100644 +index 799cec3e793b1acf33864bea4d49b3544634781b..c4f354300035bede81187ba490178e717a448665 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -180,6 +180,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -181,6 +181,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 3ed35a51a70b035f5b4ba5ca46a3f15c893fd503..367564b0eb6ca13374ac277f183d055d 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 a4c6696c35c6d6560c725f818eec8c25dc714736..305b7873ee67c3dfb03c83b62cdd2b3759b963de 100644 +index 9b4559f6dd51cec07a4fdc7da35ce645906f1a74..66f5268054cd00a8aa0f22cf5197a329b1ce38e5 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -626,6 +626,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -633,6 +633,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch index e94b4197ec86..aef3e5eb7369 100644 --- a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch +++ b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch @@ -12,10 +12,10 @@ upstream a more durable approach to allowing us to do this, at which point this patch can be removed. diff --git a/front_end/entrypoints/shell/BUILD.gn b/front_end/entrypoints/shell/BUILD.gn -index 848d6edb722a88aa2d1b42290e65d677f5107acf..86e1c70d7693db0f1a6df32f0413c45f4854e586 100644 +index 72617d7036162ab3ab86c85df3f81b6e5a8c685d..aab471b56d785b372e5aa9aaddc792584700d16e 100644 --- a/front_end/entrypoints/shell/BUILD.gn +++ b/front_end/entrypoints/shell/BUILD.gn -@@ -31,6 +31,7 @@ devtools_entrypoint("shell") { +@@ -30,6 +30,7 @@ devtools_entrypoint("shell") { "../../ui/legacy/components/perf_ui:meta", "../../ui/legacy/components/quick_open:meta", "../../ui/legacy/components/source_frame:meta", @@ -24,10 +24,10 @@ index 848d6edb722a88aa2d1b42290e65d677f5107acf..86e1c70d7693db0f1a6df32f0413c45f visibility = [ diff --git a/front_end/entrypoints/shell/shell.ts b/front_end/entrypoints/shell/shell.ts -index 89255a0927a647ca32d1a9508853425a3207b441..f0e1e32f80d79e400ad139818edce60aff6aeb89 100644 +index b22591ee606ef449817aef1f9bd5ff0c024d1c05..a14c0e0a381ae838d44d4c7f2cc252c24380b602 100644 --- a/front_end/entrypoints/shell/shell.ts +++ b/front_end/entrypoints/shell/shell.ts -@@ -20,6 +20,7 @@ import '../../models/logs/logs-meta.js'; +@@ -18,6 +18,7 @@ import '../../models/logs/logs-meta.js'; import '../main/main-meta.js'; import '../../ui/legacy/components/perf_ui/perf_ui-meta.js'; import '../../ui/legacy/components/quick_open/quick_open-meta.js'; diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 137715b60c37..d335c5f4af47 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 b25e58693e3f0e65c8daa1e64d4fc797f4ec28cc..b0ff7930632c4717d2dcf0aeeae576dba628d3f9 100644 +index bd6252bbce6c8232104b10a11395a83c272b3863..d6d3ab0cafe13334441594ab80cc62b46b79c50b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -634,7 +634,7 @@ config("internal_config") { @@ -21,7 +21,7 @@ index b25e58693e3f0e65c8daa1e64d4fc797f4ec28cc..b0ff7930632c4717d2dcf0aeeae576db defines += [ "BUILDING_V8_SHARED" ] } -@@ -6048,7 +6048,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6072,7 +6072,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index 15f4a16fee8e..401b60573bfe 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 fbc7b058a57d4ea282ecc159d165217a24371bff..58dbd7e2e0811e5e8cfe8e057ce72d67d780a918 100644 +index 14b7c541b3a9261fe1b5b0ee2e65be6bdd029f37..0bc26565403fa1a9827ced3bc6a49ca87bbf46c0 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9255,7 +9255,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9283,7 +9283,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 e78087cf02b2..dc5b05d103a2 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 c9fd31f2db427359b1274505e69f6c344244f537..b67ebe5d41830884716902eab6ebd81fb5fa0e4c 100644 +index cda24079b700d0cde451ef84cc2e19345040f32d..f4b89fe682b0454729a00b0e9c929b8e9af74d5d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -634,6 +634,10 @@ config("internal_config") { diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index 25d4788946e1..4c6ac1412015 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index fc0ef9a829db8fd74c6c555d69a6f902d2e81f0e..2d58a7646e4390dd2a920e9a749ebefec1e3c349 100644 +index e1df081a5c72c5d021d46b535ad3eca1fd8661ef..c3a0cbf15a329d0e4e68aa5fd379352a1cc061ba 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -941,7 +941,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -953,7 +953,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; // Utility superclass for stack-allocated objects that must be updated // on gc. It provides two ways for the gc to update instances, either // iterating or updating after gc. diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index f93fb5d3f12f..5d96acce38af 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 b0ff7930632c4717d2dcf0aeeae576dba628d3f9..c9fd31f2db427359b1274505e69f6c344244f537 100644 +index d6d3ab0cafe13334441594ab80cc62b46b79c50b..cda24079b700d0cde451ef84cc2e19345040f32d 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -6060,7 +6060,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -6084,7 +6084,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch index 585763a0ffed..823cfe0821f6 100644 --- a/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch @@ -6,7 +6,7 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions This attribute can only be used in all contexts in Visual Studio 2019 diff --git a/include/v8config.h b/include/v8config.h -index 207afac8b0adeba656c0094cd2435dd6eec58a1a..2c613f70f4729fdbced7b5b2655434c7f146fc7a 100644 +index a959be130d5319751ce32740e9d6ac0df5194162..5c2c78d978eb46775a2f1ebffac13a15cff1728d 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -471,10 +471,13 @@ path. Add it with -I to the command line diff --git a/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch b/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch index b5df8687b953..8783d763efae 100644 --- a/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch +++ b/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch @@ -18,19 +18,19 @@ This patch can be removed when streams support rab/gsab, or when support is synchronized across both v8 and node. diff --git a/src/objects/js-array-buffer.cc b/src/objects/js-array-buffer.cc -index 3622a30f5d9d2ce4bd322086c39a9dd4c4fc7cd9..531fea719b3d739496da08110338f11e4afdf944 100644 +index a1aca2a9dfef5a2b843ff345ae30506578d6f0c1..d580b70cd94b646cb86f1c035981c4a587d7b6c2 100644 --- a/src/objects/js-array-buffer.cc +++ b/src/objects/js-array-buffer.cc @@ -71,9 +71,9 @@ void JSArrayBuffer::Attach(std::shared_ptr backing_store) { DCHECK_NOT_NULL(backing_store); DCHECK_EQ(is_shared(), backing_store->is_shared()); - DCHECK_EQ(is_resizable(), backing_store->is_resizable()); + DCHECK_EQ(is_resizable_by_js(), backing_store->is_resizable_by_js()); - DCHECK_IMPLIES( -- !backing_store->is_wasm_memory() && !backing_store->is_resizable(), +- !backing_store->is_wasm_memory() && !backing_store->is_resizable_by_js(), - backing_store->byte_length() == backing_store->max_byte_length()); -+ // DCHECK_IMPLIES( -+ // !backing_store->is_wasm_memory() && !backing_store->is_resizable(), -+ // backing_store->byte_length() == backing_store->max_byte_length()); ++ //DCHECK_IMPLIES( ++ // !backing_store->is_wasm_memory() && !backing_store->is_resizable_by_js(), ++ // backing_store->byte_length() == backing_store->max_byte_length()); DCHECK(!was_detached()); Isolate* isolate = GetIsolate(); diff --git a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch index 73048af02e91..4ea28281865f 100644 --- a/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch +++ b/patches/v8/revert_runtime_dhceck_terminating_exception_in_microtasks.patch @@ -18,10 +18,10 @@ index f58636fee555d782e18b7521c0c4f28ed60b3a52..6b0c63b34ff09f70cb9a4fe419f3b9bb StoreRoot(RootIndex::kCurrentMicrotask, microtask); TNode saved_entered_context_count = GetEnteredContextCount(); diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc -index 15b109393f5670364d82b2720a76f12f2d38ca11..bbc7aa4d04227b3abbdaa4af8dce50f5d5af98df 100644 +index 68dd0da0750948d74bdcfeff4b25693e6d03855e..4b9bf906b90762749011ab7c21c43d9e862f1fda 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc -@@ -6221,12 +6221,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { +@@ -6257,12 +6257,6 @@ void CodeStubAssembler::SetPendingMessage(TNode message) { StoreFullTaggedNoWriteBarrier(pending_message, message); } @@ -35,10 +35,10 @@ index 15b109393f5670364d82b2720a76f12f2d38ca11..bbc7aa4d04227b3abbdaa4af8dce50f5 int type) { return Word32Equal(instance_type, Int32Constant(type)); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h -index b9c4ee893de4b86fe84957a926be91077fb72c8e..282f580dce18deb0a5561458f47d354cde3c68bb 100644 +index 6d654b5d5fa3f996ed488e51f58b14a297531cdf..2f705993ba1de7dec89d6edcb46ada63cf29cc92 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h -@@ -2563,7 +2563,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler +@@ -2586,7 +2586,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler TNode GetPendingMessage(); void SetPendingMessage(TNode message); diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index 6eac4cf48471..939fcead55ef 100644 --- a/patches/v8/workaround_an_undefined_symbol_error.patch +++ b/patches/v8/workaround_an_undefined_symbol_error.patch @@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file, this error no longer seems to happen. diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc -index d2782e530f22ce80e54506caef3f8aa41d1221ca..c5698d823555d1e218a216023caa0d5e245e0325 100644 +index dc06c743a02d30340c00e96a3320735827ac45b7..37fd007ebb435cdcd33f8e40612e38233e2a711c 100644 --- a/src/codegen/arm64/assembler-arm64.cc +++ b/src/codegen/arm64/assembler-arm64.cc -@@ -3606,6 +3606,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, +@@ -3616,6 +3616,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, ImmMoveWide(static_cast(imm)) | ShiftMoveWide(shift)); } @@ -39,10 +39,10 @@ index d2782e530f22ce80e54506caef3f8aa41d1221ca..c5698d823555d1e218a216023caa0d5e const Operand& operand, FlagsUpdate S, AddSubOp op) { DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits()); diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h -index f55197f0307212f81b06b892316e01f96c709c59..d07a9d93ddf478c7920ea00c0511c8d593b966cb 100644 +index 68f773a92436c3696c257cf16a6cd90ebe190472..ff7111971fd4614994419fcf1f211a0f1752338f 100644 --- a/src/codegen/arm64/assembler-arm64.h +++ b/src/codegen/arm64/assembler-arm64.h -@@ -2112,11 +2112,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2115,11 +2115,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { return rm.code() << Rm_offset; } @@ -55,7 +55,7 @@ index f55197f0307212f81b06b892316e01f96c709c59..d07a9d93ddf478c7920ea00c0511c8d5 static Instr Ra(CPURegister ra) { DCHECK_NE(ra.code(), kSPRegInternalCode); -@@ -2140,15 +2136,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2143,15 +2139,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { // These encoding functions allow the stack pointer to be encoded, and // disallow the zero register. diff --git a/script/sysroots.json b/script/sysroots.json index 7cf8e9945ff7..25624b4462af 100644 --- a/script/sysroots.json +++ b/script/sysroots.json @@ -1,36 +1,43 @@ { "bullseye_amd64": { - "Sha1Sum": "8068722ee05e9c672f9c29f32fd08acc0539d0e8", + "Key": "20220331T153654Z-0", + "Sha1Sum": "f515568ba23311d4ae5cb40354d012d4e52f756f", "SysrootDir": "debian_bullseye_amd64-sysroot", "Tarball": "debian_bullseye_amd64_sysroot.tar.xz" }, "bullseye_arm": { - "Sha1Sum": "835cb5f1f40618de7cbd411e83128adc5697e426", + "Key": "20220331T153654Z-0", + "Sha1Sum": "19d5f186b437c9445feb69aee1bdd74635373c83", "SysrootDir": "debian_bullseye_arm-sysroot", "Tarball": "debian_bullseye_arm_sysroot.tar.xz" }, "bullseye_arm64": { - "Sha1Sum": "14c1ca201a217daff6a90f5369bbf2b42cde8d77", + "Key": "20220331T153654Z-0", + "Sha1Sum": "ff12c709d8ac2687651479b6bd616893e21457f1", "SysrootDir": "debian_bullseye_arm64-sysroot", "Tarball": "debian_bullseye_arm64_sysroot.tar.xz" }, "bullseye_armel": { - "Sha1Sum": "fd3a85168f63c5c112ec8d77a35d4a71d18413fd", + "Key": "20220331T153654Z-0", + "Sha1Sum": "bd4c83f4f6912ddf95d389c339e2a6700e4d7daa", "SysrootDir": "debian_bullseye_armel-sysroot", "Tarball": "debian_bullseye_armel_sysroot.tar.xz" }, "bullseye_i386": { - "Sha1Sum": "eae4513553575d956ed369bbcc77acc506831b47", + "Key": "20220331T153654Z-0", + "Sha1Sum": "154f0bcaa42e0eafbaa50d6963dc48ea5f239d3c", "SysrootDir": "debian_bullseye_i386-sysroot", "Tarball": "debian_bullseye_i386_sysroot.tar.xz" }, "bullseye_mips": { - "Sha1Sum": "811c47f1fab10a37da30ac97f958757527c8331f", + "Key": "20220331T153654Z-0", + "Sha1Sum": "dff1c425913276099a08e57878297f4b21b0f9fc", "SysrootDir": "debian_bullseye_mips-sysroot", "Tarball": "debian_bullseye_mips_sysroot.tar.xz" }, "bullseye_mips64el": { - "Sha1Sum": "d491017f0feff2e45dfa78e65d3c286aeb2d4c5f", + "Key": "20220331T153654Z-0", + "Sha1Sum": "09f5f77d6a2ed6843ffbc66c7eafcaa417964d8a", "SysrootDir": "debian_bullseye_mips64el-sysroot", "Tarball": "debian_bullseye_mips64el_sysroot.tar.xz" } diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index b70ace445c95..8aed325bd888 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -58,7 +58,6 @@ #if BUILDFLAG(IS_LINUX) #include "base/nix/xdg_util.h" -#include "components/crash/core/app/breakpad_linux.h" #include "v8/include/v8-wasm-trap-handler-posix.h" #include "v8/include/v8.h" #endif @@ -372,15 +371,11 @@ void ElectronMainDelegate::PreSandboxStartup() { // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != ::switches::kZygoteProcess && !process_type.empty()) { ElectronCrashReporterClient::Create(); - if (crash_reporter::IsCrashpadEnabled()) { - if (command_line->HasSwitch( - crash_reporter::switches::kCrashpadHandlerPid)) { - crash_reporter::InitializeCrashpad(false, process_type); - crash_reporter::SetFirstChanceExceptionHandler( - v8::TryHandleWebAssemblyTrapPosix); - } - } else { - breakpad::InitCrashReporter(process_type); + if (command_line->HasSwitch( + crash_reporter::switches::kCrashpadHandlerPid)) { + crash_reporter::InitializeCrashpad(false, process_type); + crash_reporter::SetFirstChanceExceptionHandler( + v8::TryHandleWebAssemblyTrapPosix); } } #endif @@ -503,15 +498,10 @@ void ElectronMainDelegate::ZygoteForked() { base::CommandLine::ForCurrentProcess(); std::string process_type = command_line->GetSwitchValueASCII(::switches::kProcessType); - if (crash_reporter::IsCrashpadEnabled()) { - if (command_line->HasSwitch( - crash_reporter::switches::kCrashpadHandlerPid)) { - crash_reporter::InitializeCrashpad(false, process_type); - crash_reporter::SetFirstChanceExceptionHandler( - v8::TryHandleWebAssemblyTrapPosix); - } - } else { - breakpad::InitCrashReporter(process_type); + if (command_line->HasSwitch(crash_reporter::switches::kCrashpadHandlerPid)) { + crash_reporter::InitializeCrashpad(false, process_type); + crash_reporter::SetFirstChanceExceptionHandler( + v8::TryHandleWebAssemblyTrapPosix); } // Reset the command line for the newly spawned process. diff --git a/shell/app/electron_main_linux.cc b/shell/app/electron_main_linux.cc index d06bded3f839..5c83366d4acc 100644 --- a/shell/app/electron_main_linux.cc +++ b/shell/app/electron_main_linux.cc @@ -37,9 +37,5 @@ int main(int argc, char* argv[]) { params.argc = argc; params.argv = const_cast(argv); base::CommandLine::Init(params.argc, params.argv); - // TODO(https://crbug.com/1176772): Remove when Chrome Linux is fully migrated - // to Crashpad. - base::CommandLine::ForCurrentProcess()->AppendSwitch( - ::switches::kEnableCrashpad); return content::ContentMain(std::move(params)); } diff --git a/shell/app/node_main.cc b/shell/app/node_main.cc index 593e35df8368..1c75cd0163ba 100644 --- a/shell/app/node_main.cc +++ b/shell/app/node_main.cc @@ -30,10 +30,6 @@ #include "shell/common/node_bindings.h" #include "shell/common/node_includes.h" -#if BUILDFLAG(IS_LINUX) -#include "components/crash/core/app/breakpad_linux.h" -#endif - #if BUILDFLAG(IS_WIN) #include "chrome/child/v8_crashpad_support_win.h" #endif @@ -41,7 +37,6 @@ #if !defined(MAS_BUILD) #include "components/crash/core/app/crashpad.h" // nogncheck #include "shell/app/electron_crash_reporter_client.h" -#include "shell/browser/api/electron_api_crash_reporter.h" #include "shell/common/crash_keys.h" #endif @@ -100,35 +95,6 @@ void ClearCrashKeyStub(const std::string& key) {} namespace electron { -#if BUILDFLAG(IS_LINUX) -void CrashReporterStart(gin_helper::Dictionary options) { - std::string submit_url; - bool upload_to_server = true; - bool ignore_system_crash_handler = false; - bool rate_limit = false; - bool compress = false; - std::map global_extra; - std::map extra; - options.Get("submitURL", &submit_url); - options.Get("uploadToServer", &upload_to_server); - options.Get("ignoreSystemCrashHandler", &ignore_system_crash_handler); - options.Get("rateLimit", &rate_limit); - options.Get("compress", &compress); - options.Get("extra", &extra); - options.Get("globalExtra", &global_extra); - - std::string product_name; - if (options.Get("productName", &product_name)) - global_extra["_productName"] = product_name; - std::string company_name; - if (options.Get("companyName", &company_name)) - global_extra["_companyName"] = company_name; - api::crash_reporter::Start(submit_url, upload_to_server, - ignore_system_crash_handler, rate_limit, compress, - global_extra, extra, true); -} -#endif - v8::Local GetParameters(v8::Isolate* isolate) { std::map keys; #if !defined(MAS_BUILD) @@ -144,15 +110,12 @@ int NodeMain(int argc, char* argv[]) { v8_crashpad_support::SetUp(); #endif -#if !defined(MAS_BUILD) - ElectronCrashReporterClient::Create(); -#endif - +// TODO(deepak1556): Enable crashpad support on linux for +// ELECTRON_RUN_AS_NODE processes. +// Refs https://github.com/electron/electron/issues/36030 #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_MAC) && !defined(MAS_BUILD)) + ElectronCrashReporterClient::Create(); crash_reporter::InitializeCrashpad(false, "node"); -#endif - -#if !defined(MAS_BUILD) crash_keys::SetCrashKeysFromCommandLine( *base::CommandLine::ForCurrentProcess()); crash_keys::SetPlatformCrashKey(); @@ -225,10 +188,6 @@ int NodeMain(int argc, char* argv[]) { // Setup process.crashReporter in child node processes gin_helper::Dictionary reporter = gin::Dictionary::CreateEmpty(isolate); -#if BUILDFLAG(IS_LINUX) - reporter.SetMethod("start", &CrashReporterStart); -#endif - reporter.SetMethod("getParameters", &GetParameters); #if defined(MAS_BUILD) reporter.SetMethod("addExtraParameter", &SetCrashKeyStub); diff --git a/shell/browser/api/electron_api_crash_reporter.cc b/shell/browser/api/electron_api_crash_reporter.cc index 76fd7ef64d4a..d5ab294c713d 100644 --- a/shell/browser/api/electron_api_crash_reporter.cc +++ b/shell/browser/api/electron_api_crash_reporter.cc @@ -43,7 +43,6 @@ #include "base/containers/span.h" #include "base/files/file_util.h" #include "base/guid.h" -#include "components/crash/core/app/breakpad_linux.h" #include "components/crash/core/common/crash_keys.h" #include "components/upload_list/combining_upload_list.h" #include "v8/include/v8-wasm-trap-handler-posix.h" @@ -149,28 +148,15 @@ void Start(const std::string& submit_url, ? "node" : command_line->GetSwitchValueASCII(::switches::kProcessType); #if BUILDFLAG(IS_LINUX) - if (::crash_reporter::IsCrashpadEnabled()) { - for (const auto& pair : extra) - electron::crash_keys::SetCrashKey(pair.first, pair.second); - { - base::ThreadRestrictions::ScopedAllowIO allow_io; - ::crash_reporter::InitializeCrashpad(process_type.empty(), process_type); - } - if (ignore_system_crash_handler) { - crashpad::CrashpadInfo::GetCrashpadInfo() - ->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled); - } - } else { - ::crash_keys::SetMetricsClientIdFromGUID(GetClientId()); - auto& global_crash_keys = GetGlobalCrashKeysMutable(); - for (const auto& pair : global_extra) { - global_crash_keys[pair.first] = pair.second; - } - for (const auto& pair : extra) - electron::crash_keys::SetCrashKey(pair.first, pair.second); - for (const auto& pair : global_extra) - electron::crash_keys::SetCrashKey(pair.first, pair.second); - breakpad::InitCrashReporter(process_type); + for (const auto& pair : extra) + electron::crash_keys::SetCrashKey(pair.first, pair.second); + { + base::ThreadRestrictions::ScopedAllowIO allow_io; + ::crash_reporter::InitializeCrashpad(process_type.empty(), process_type); + } + if (ignore_system_crash_handler) { + crashpad::CrashpadInfo::GetCrashpadInfo() + ->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled); } #elif BUILDFLAG(IS_MAC) for (const auto& pair : extra) @@ -213,17 +199,15 @@ scoped_refptr CreateCrashUploadList() { crash_dir_path.AppendASCII(CrashUploadList::kReporterLogFilename); scoped_refptr result = base::MakeRefCounted(upload_log_path); - if (crash_reporter::IsCrashpadEnabled()) { - // Crashpad keeps the records of C++ crashes (segfaults, etc) in its - // internal database. The JavaScript error reporter writes JS error upload - // records to the older text format. Combine the two to present a complete - // list to the user. - // TODO(nornagon): what is "The JavaScript error reporter", and do we care - // about it? - std::vector> uploaders = { - base::MakeRefCounted(), std::move(result)}; - result = base::MakeRefCounted(std::move(uploaders)); - } + // Crashpad keeps the records of C++ crashes (segfaults, etc) in its + // internal database. The JavaScript error reporter writes JS error upload + // records to the older text format. Combine the two to present a complete + // list to the user. + // TODO(nornagon): what is "The JavaScript error reporter", and do we care + // about it? + std::vector> uploaders = { + base::MakeRefCounted(), std::move(result)}; + result = base::MakeRefCounted(std::move(uploaders)); return result; #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) } diff --git a/shell/browser/api/electron_api_desktop_capturer.cc b/shell/browser/api/electron_api_desktop_capturer.cc index 63fa340e273b..980e8ae9ec12 100644 --- a/shell/browser/api/electron_api_desktop_capturer.cc +++ b/shell/browser/api/electron_api_desktop_capturer.cc @@ -282,7 +282,7 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) { base::UTF8ToWide(device_name.c_str(), device_name.size(), &wide_device_name); const int64_t device_id = - display::win::DisplayInfo::DeviceIdFromDeviceName( + display::win::internal::DisplayInfo::DeviceIdFromDeviceName( wide_device_name.c_str()); source.display_id = base::NumberToString(device_id); } diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 1319249ad84b..c70f692a3426 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -39,6 +39,7 @@ #include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "net/base/completion_repeating_callback.h" #include "net/base/load_flags.h" +#include "net/base/network_anonymization_key.h" #include "net/http/http_auth_handler_factory.h" #include "net/http/http_auth_preferences.h" #include "net/http/http_cache.h" @@ -99,23 +100,6 @@ using content::BrowserThread; using content::StoragePartition; -namespace predictors { -// NOTE(nornagon): this is copied from -// //chrome/browser/predictors/resource_prefetch_predictor.cc we don't need -// anything in that file other than this constructor. Without it we get a link -// error. Probably upstream the constructor should be moved to -// preconnect_manager.cc. -PreconnectRequest::PreconnectRequest( - const url::Origin& origin, - int num_sockets, - const net::NetworkIsolationKey& network_isolation_key) - : origin(origin), - num_sockets(num_sockets), - network_isolation_key(network_isolation_key) { - DCHECK_GE(num_sockets, 0); -} -} // namespace predictors - namespace { struct ClearStorageDataOptions { @@ -162,6 +146,30 @@ uint32_t GetQuotaMask(const std::vector& quota_types) { return quota_mask; } +base::Value::Dict createProxyConfig(ProxyPrefs::ProxyMode proxy_mode, + std::string const& pac_url, + std::string const& proxy_server, + std::string const& bypass_list) { + if (proxy_mode == ProxyPrefs::MODE_DIRECT) { + return ProxyConfigDictionary::CreateDirect(); + } + + if (proxy_mode == ProxyPrefs::MODE_SYSTEM) { + return ProxyConfigDictionary::CreateSystem(); + } + + if (proxy_mode == ProxyPrefs::MODE_AUTO_DETECT) { + return ProxyConfigDictionary::CreateAutoDetect(); + } + + if (proxy_mode == ProxyPrefs::MODE_PAC_SCRIPT) { + const bool pac_mandatory = true; + return ProxyConfigDictionary::CreatePacScript(pac_url, pac_mandatory); + } + + return ProxyConfigDictionary::CreateFixedServers(proxy_server, bypass_list); +} + } // namespace namespace gin { @@ -517,26 +525,10 @@ v8::Local Session::SetProxy(gin::Arguments* args) { } } - std::unique_ptr proxy_config; - if (proxy_mode == ProxyPrefs::MODE_DIRECT) { - proxy_config = - std::make_unique(ProxyConfigDictionary::CreateDirect()); - } else if (proxy_mode == ProxyPrefs::MODE_SYSTEM) { - proxy_config = - std::make_unique(ProxyConfigDictionary::CreateSystem()); - } else if (proxy_mode == ProxyPrefs::MODE_AUTO_DETECT) { - proxy_config = std::make_unique( - ProxyConfigDictionary::CreateAutoDetect()); - } else if (proxy_mode == ProxyPrefs::MODE_PAC_SCRIPT) { - proxy_config = - std::make_unique(ProxyConfigDictionary::CreatePacScript( - pac_url, true /* pac_mandatory */)); - } else { - proxy_config = std::make_unique( - ProxyConfigDictionary::CreateFixedServers(proxy_rules, bypass_list)); - } browser_context_->in_memory_pref_store()->SetValue( - proxy_config::prefs::kProxy, std::move(proxy_config), + proxy_config::prefs::kProxy, + base::Value{ + createProxyConfig(proxy_mode, pac_url, proxy_rules, bypass_list)}, WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); base::ThreadTaskRunnerHandle::Get()->PostTask( @@ -955,7 +947,8 @@ static void StartPreconnectOnUI(ElectronBrowserContext* browser_context, url::Origin origin = url::Origin::Create(url); std::vector requests = { {url::Origin::Create(url), num_sockets_to_preconnect, - net::NetworkIsolationKey(origin, origin)}}; + net::NetworkAnonymizationKey(net::SchemefulSite(origin), + net::SchemefulSite(origin))}}; browser_context->GetPreconnectManager()->Start(url, requests); } diff --git a/shell/browser/browser_process_impl.cc b/shell/browser/browser_process_impl.cc index 1d6fccb5e0b5..5e66aa407039 100644 --- a/shell/browser/browser_process_impl.cc +++ b/shell/browser/browser_process_impl.cc @@ -54,33 +54,29 @@ void BrowserProcessImpl::ApplyProxyModeFromCommandLine( auto* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kNoProxyServer)) { - pref_store->SetValue( - proxy_config::prefs::kProxy, - std::make_unique(ProxyConfigDictionary::CreateDirect()), - WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); + pref_store->SetValue(proxy_config::prefs::kProxy, + base::Value(ProxyConfigDictionary::CreateDirect()), + WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); } else if (command_line->HasSwitch(switches::kProxyPacUrl)) { std::string pac_script_url = command_line->GetSwitchValueASCII(switches::kProxyPacUrl); - pref_store->SetValue( - proxy_config::prefs::kProxy, - std::make_unique(ProxyConfigDictionary::CreatePacScript( - pac_script_url, false /* pac_mandatory */)), - WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); + pref_store->SetValue(proxy_config::prefs::kProxy, + base::Value(ProxyConfigDictionary::CreatePacScript( + pac_script_url, false /* pac_mandatory */)), + WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); } else if (command_line->HasSwitch(switches::kProxyAutoDetect)) { pref_store->SetValue(proxy_config::prefs::kProxy, - std::make_unique( - ProxyConfigDictionary::CreateAutoDetect()), + base::Value(ProxyConfigDictionary::CreateAutoDetect()), WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); } else if (command_line->HasSwitch(switches::kProxyServer)) { std::string proxy_server = command_line->GetSwitchValueASCII(switches::kProxyServer); std::string bypass_list = command_line->GetSwitchValueASCII(switches::kProxyBypassList); - pref_store->SetValue( - proxy_config::prefs::kProxy, - std::make_unique(ProxyConfigDictionary::CreateFixedServers( - proxy_server, bypass_list)), - WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); + pref_store->SetValue(proxy_config::prefs::kProxy, + base::Value(ProxyConfigDictionary::CreateFixedServers( + proxy_server, bypass_list)), + WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); } } diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 253adedb8139..f98f0d676b93 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -186,10 +186,7 @@ #include "content/public/common/child_process_host.h" #endif -#if BUILDFLAG(IS_LINUX) && !defined(MAS_BUILD) -#include "base/debug/leak_annotations.h" -#include "components/crash/content/browser/crash_handler_host_linux.h" -#include "components/crash/core/app/breakpad_linux.h" // nogncheck +#if BUILDFLAG(IS_LINUX) #include "components/crash/core/app/crash_switches.h" // nogncheck #include "components/crash/core/app/crashpad.h" // nogncheck #endif @@ -308,67 +305,9 @@ const extensions::Extension* GetEnabledExtensionFromEffectiveURL( #endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) #if BUILDFLAG(IS_LINUX) -breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( - const std::string& process_type) { - base::FilePath dumps_path; - base::PathService::Get(electron::DIR_CRASH_DUMPS, &dumps_path); - { - ANNOTATE_SCOPED_MEMORY_LEAK; - bool upload = ElectronCrashReporterClient::Get()->GetCollectStatsConsent(); - breakpad::CrashHandlerHostLinux* crash_handler = - new breakpad::CrashHandlerHostLinux(process_type, dumps_path, upload); - crash_handler->StartUploaderThread(); - return crash_handler; - } -} - int GetCrashSignalFD(const base::CommandLine& command_line) { - if (crash_reporter::IsCrashpadEnabled()) { - int fd; - pid_t pid; - return crash_reporter::GetHandlerSocket(&fd, &pid) ? fd : -1; - } - - // Extensions have the same process type as renderers. - if (command_line.HasSwitch(extensions::switches::kExtensionProcess)) { - static breakpad::CrashHandlerHostLinux* crash_handler = nullptr; - if (!crash_handler) - crash_handler = CreateCrashHandlerHost("extension"); - return crash_handler->GetDeathSignalSocket(); - } - - std::string process_type = - command_line.GetSwitchValueASCII(::switches::kProcessType); - - if (process_type == ::switches::kRendererProcess) { - static breakpad::CrashHandlerHostLinux* crash_handler = nullptr; - if (!crash_handler) - crash_handler = CreateCrashHandlerHost(process_type); - return crash_handler->GetDeathSignalSocket(); - } - - if (process_type == ::switches::kPpapiPluginProcess) { - static breakpad::CrashHandlerHostLinux* crash_handler = nullptr; - if (!crash_handler) - crash_handler = CreateCrashHandlerHost(process_type); - return crash_handler->GetDeathSignalSocket(); - } - - if (process_type == ::switches::kGpuProcess) { - static breakpad::CrashHandlerHostLinux* crash_handler = nullptr; - if (!crash_handler) - crash_handler = CreateCrashHandlerHost(process_type); - return crash_handler->GetDeathSignalSocket(); - } - - if (process_type == ::switches::kUtilityProcess) { - static breakpad::CrashHandlerHostLinux* crash_handler = nullptr; - if (!crash_handler) - crash_handler = CreateCrashHandlerHost(process_type); - return crash_handler->GetDeathSignalSocket(); - } - - return -1; + int fd; + return crash_reporter::GetHandlerSocket(&fd, nullptr) ? fd : -1; } #endif // BUILDFLAG(IS_LINUX) @@ -566,42 +505,22 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches( command_line->GetSwitchValueASCII(::switches::kProcessType); #if BUILDFLAG(IS_LINUX) - bool enable_crash_reporter = false; - if (crash_reporter::IsCrashpadEnabled()) { - command_line->AppendSwitch(::switches::kEnableCrashpad); - enable_crash_reporter = true; - - int fd; - pid_t pid; - - if (crash_reporter::GetHandlerSocket(&fd, &pid)) { - command_line->AppendSwitchASCII( - crash_reporter::switches::kCrashpadHandlerPid, - base::NumberToString(pid)); - } - } else { - enable_crash_reporter = breakpad::IsCrashReporterEnabled(); + pid_t pid; + if (crash_reporter::GetHandlerSocket(nullptr, &pid)) { + command_line->AppendSwitchASCII( + crash_reporter::switches::kCrashpadHandlerPid, + base::NumberToString(pid)); } // Zygote Process gets booted before any JS runs, accessing GetClientId // will end up touching DIR_USER_DATA path provider and this will // configure default value because app.name from browser_init has // not run yet. - if (enable_crash_reporter && process_type != ::switches::kZygoteProcess) { + if (process_type != ::switches::kZygoteProcess) { std::string switch_value = api::crash_reporter::GetClientId() + ",no_channel"; command_line->AppendSwitchASCII(::switches::kEnableCrashReporter, switch_value); - if (!crash_reporter::IsCrashpadEnabled()) { - for (const auto& pair : api::crash_reporter::GetGlobalCrashKeys()) { - if (!switch_value.empty()) - switch_value += ","; - switch_value += pair.first; - switch_value += "="; - switch_value += pair.second; - } - command_line->AppendSwitchASCII(switches::kGlobalCrashKeys, switch_value); - } } #endif @@ -1508,9 +1427,7 @@ bool ElectronBrowserClient::WillCreateURLLoaderFactory( std::vector> ElectronBrowserClient::WillCreateURLLoaderRequestInterceptors( content::NavigationUIData* navigation_ui_data, - int frame_tree_node_id, - const scoped_refptr& - network_loader_factory) { + int frame_tree_node_id) { std::vector> interceptors; #if BUILDFLAG(ENABLE_PDF_VIEWER) diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index ccff2a3a480b..00af11c48b00 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -236,9 +236,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, std::vector> WillCreateURLLoaderRequestInterceptors( content::NavigationUIData* navigation_ui_data, - int frame_tree_node_id, - const scoped_refptr& - network_loader_factory) override; + int frame_tree_node_id) override; bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel( base::StringPiece scheme, bool is_embedded_origin_secure) override; diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 79a78d5cf4d1..a74c932ef75a 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -230,7 +230,7 @@ int ElectronBrowserMainParts::GetExitCode() const { } int ElectronBrowserMainParts::PreEarlyInitialization() { - field_trial_list_ = std::make_unique(nullptr); + field_trial_list_ = std::make_unique(); #if BUILDFLAG(IS_POSIX) HandleSIGCHLD(); #endif diff --git a/shell/browser/file_select_helper.cc b/shell/browser/file_select_helper.cc index dbd8b341fb67..69c8197ae450 100644 --- a/shell/browser/file_select_helper.cc +++ b/shell/browser/file_select_helper.cc @@ -79,7 +79,7 @@ FileSelectHelper::FileSelectHelper() FileSelectHelper::~FileSelectHelper() { // There may be pending file dialogs, we need to tell them that we've gone // away so they don't try and call back to us. - if (select_file_dialog_.get()) + if (select_file_dialog_) select_file_dialog_->ListenerDestroyed(); } diff --git a/shell/browser/file_select_helper.h b/shell/browser/file_select_helper.h index 3e6c20184035..793a63bd2323 100644 --- a/shell/browser/file_select_helper.h +++ b/shell/browser/file_select_helper.h @@ -200,7 +200,7 @@ class FileSelectHelper : public base::RefCountedThreadSafe< scoped_refptr listener_; // Dialog box used for choosing files to upload from file form fields. - std::unique_ptr select_file_dialog_; + scoped_refptr select_file_dialog_; std::unique_ptr select_file_types_; // The type of file dialog last shown. This is SELECT_NONE if an diff --git a/shell/browser/hid/hid_chooser_context.h b/shell/browser/hid/hid_chooser_context.h index 6e7bf2262f64..e748eeb39615 100644 --- a/shell/browser/hid/hid_chooser_context.h +++ b/shell/browser/hid/hid_chooser_context.h @@ -16,6 +16,7 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/unguessable_token.h" +#include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/web_contents.h" #include "mojo/public/cpp/bindings/associated_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" diff --git a/shell/browser/net/resolve_proxy_helper.cc b/shell/browser/net/resolve_proxy_helper.cc index d18e26a7b879..464facf89b47 100644 --- a/shell/browser/net/resolve_proxy_helper.cc +++ b/shell/browser/net/resolve_proxy_helper.cc @@ -10,6 +10,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/storage_partition.h" #include "mojo/public/cpp/bindings/pending_remote.h" +#include "net/base/network_anonymization_key.h" #include "net/proxy_resolution/proxy_info.h" #include "services/network/public/mojom/network_context.mojom.h" #include "shell/browser/electron_browser_context.h" @@ -56,7 +57,7 @@ void ResolveProxyHelper::StartPendingRequest() { browser_context_->GetDefaultStoragePartition() ->GetNetworkContext() ->LookUpProxyForURL(pending_requests_.front().url, - net::NetworkIsolationKey(), + net::NetworkAnonymizationKey(), std::move(proxy_lookup_client)); } diff --git a/shell/browser/serial/electron_serial_delegate.h b/shell/browser/serial/electron_serial_delegate.h index add2c4471f1e..4f6559c28e70 100644 --- a/shell/browser/serial/electron_serial_delegate.h +++ b/shell/browser/serial/electron_serial_delegate.h @@ -10,6 +10,7 @@ #include #include "base/memory/weak_ptr.h" +#include "base/scoped_observation.h" #include "content/public/browser/serial_delegate.h" #include "shell/browser/serial/serial_chooser_context.h" #include "shell/browser/serial/serial_chooser_controller.h" diff --git a/shell/common/crash_keys.cc b/shell/common/crash_keys.cc index d084adc25781..ec56e25520e4 100644 --- a/shell/common/crash_keys.cc +++ b/shell/common/crash_keys.cc @@ -27,14 +27,7 @@ namespace electron::crash_keys { namespace { -#if BUILDFLAG(IS_LINUX) -// Breakpad has a flawed system of calculating the number of chunks -// we add 127 bytes to force an extra chunk -constexpr size_t kMaxCrashKeyValueSize = 20479; -#else constexpr size_t kMaxCrashKeyValueSize = 20320; -#endif - static_assert(kMaxCrashKeyValueSize < crashpad::Annotation::kValueMaxSize, "max crash key value length above what crashpad supports"); @@ -53,14 +46,8 @@ std::deque& GetExtraCrashKeyNames() { } // namespace constexpr uint32_t kMaxCrashKeyNameLength = 40; -#if BUILDFLAG(IS_LINUX) -static_assert(kMaxCrashKeyNameLength <= - crash_reporter::internal::kCrashKeyStorageKeySize, - "max crash key name length above what breakpad supports"); -#else static_assert(kMaxCrashKeyNameLength <= crashpad::Annotation::kNameMaxLength, "max crash key name length above what crashpad supports"); -#endif void SetCrashKey(const std::string& key, const std::string& value) { // Chrome DCHECK()s if we try to set an annotation with a name longer than @@ -122,18 +109,6 @@ bool IsRunningAsNode() { } // namespace void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { -#if BUILDFLAG(IS_LINUX) - if (command_line.HasSwitch(switches::kGlobalCrashKeys)) { - std::vector> global_crash_keys; - base::SplitStringIntoKeyValuePairs( - command_line.GetSwitchValueASCII(switches::kGlobalCrashKeys), '=', ',', - &global_crash_keys); - for (const auto& pair : global_crash_keys) { - SetCrashKey(pair.first, pair.second); - } - } -#endif - // NB. this is redundant with the 'ptype' key that //components/crash // reports; it's present for backwards compatibility. static crash_reporter::CrashKeyString<16> process_type_key("process_type"); diff --git a/shell/common/options_switches.cc b/shell/common/options_switches.cc index 94ffb637ff12..4a6bef3a694f 100644 --- a/shell/common/options_switches.cc +++ b/shell/common/options_switches.cc @@ -267,8 +267,6 @@ const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port"; // If set, NTLM v2 is disabled for POSIX platforms. const char kDisableNTLMv2[] = "disable-ntlm-v2"; -const char kGlobalCrashKeys[] = "global-crash-keys"; - const char kEnableWebSQL[] = "enable-websql"; } // namespace switches diff --git a/shell/common/options_switches.h b/shell/common/options_switches.h index d8f481906791..6c86d56799ac 100644 --- a/shell/common/options_switches.h +++ b/shell/common/options_switches.h @@ -130,8 +130,6 @@ extern const char kAuthNegotiateDelegateWhitelist[]; extern const char kEnableAuthNegotiatePort[]; extern const char kDisableNTLMv2[]; -extern const char kGlobalCrashKeys[]; - extern const char kEnableWebSQL[]; } // namespace switches diff --git a/spec/api-crash-reporter-spec.ts b/spec/api-crash-reporter-spec.ts index df082327fbf6..438fa6cad35b 100644 --- a/spec/api-crash-reporter-spec.ts +++ b/spec/api-crash-reporter-spec.ts @@ -166,7 +166,9 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_ expect(crash.mainProcessSpecific).to.equal('mps'); }); - ifit(!isLinuxOnArm)('when a node process crashes', async () => { + // TODO(deepak1556): Re-enable this test once + // https://github.com/electron/electron/issues/36030 is resolved. + ifit(process.platform !== 'linux')('when a node process crashes', async () => { const { port, waitForCrash } = await startServer(); runCrashApp('node', port); const crash = await waitForCrash(); @@ -279,7 +281,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_ setTimeout(() => process.crash()); }, port); const crash = await waitForCrash(); - expect(stitchLongCrashParam(crash, 'longParam')).to.have.lengthOf(160 * 127 + (process.platform === 'linux' ? 159 : 0), 'crash should have truncated longParam'); + expect(stitchLongCrashParam(crash, 'longParam')).to.have.lengthOf(160 * 127, 'crash should have truncated longParam'); }); it('should omit extra keys with names longer than the maximum', async () => { diff --git a/spec/fixtures/apps/crash/main.js b/spec/fixtures/apps/crash/main.js index 5adb5873fe25..23f51362a78c 100644 --- a/spec/fixtures/apps/crash/main.js +++ b/spec/fixtures/apps/crash/main.js @@ -51,10 +51,8 @@ app.whenReady().then(() => { w.loadURL(`about:blank?set_extra=${setExtraParameters ? 1 : 0}`); w.webContents.on('render-process-gone', () => process.exit(0)); } else if (crashType === 'node') { - const crashesDir = path.join(app.getPath('temp'), `${app.name} Crashes`); - const version = app.getVersion(); const crashPath = path.join(__dirname, 'node-crash.js'); - const child = childProcess.fork(crashPath, [url, version, crashesDir], { silent: true }); + const child = childProcess.fork(crashPath, { silent: true }); child.on('exit', () => process.exit(0)); } else { console.error(`Unrecognized crash type: '${crashType}'`); diff --git a/spec/fixtures/apps/crash/node-crash.js b/spec/fixtures/apps/crash/node-crash.js index 1d3d45c6c4e5..f446b96100ec 100644 --- a/spec/fixtures/apps/crash/node-crash.js +++ b/spec/fixtures/apps/crash/node-crash.js @@ -1,11 +1 @@ -if (process.platform === 'linux') { - process.crashReporter.start({ - submitURL: process.argv[2], - productName: 'Zombies', - compress: false, - globalExtra: { - _version: process.argv[3] - } - }); -} process.nextTick(() => process.crash());