refactor: unfilter unresponsive events (#44629)
* feat: internal -unresponsive event
* Reland "refactor: JSify BrowserWindow unresponsive handling"
This reverts commit ef7ae78ed4
.
* fix: emit unresponsive if close not prevented
---------
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
This commit is contained in:
parent
946ab5f1d7
commit
41b5d7e312
7 changed files with 103 additions and 60 deletions
|
@ -133,4 +133,5 @@ osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch
|
|||
feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
|
||||
chore_partial_revert_of.patch
|
||||
fix_software_compositing_infinite_loop.patch
|
||||
refactor_unfilter_unresponsive_events.patch
|
||||
build_disable_thin_lto_mac.patch
|
||||
|
|
47
patches/chromium/refactor_unfilter_unresponsive_events.patch
Normal file
47
patches/chromium/refactor_unfilter_unresponsive_events.patch
Normal file
|
@ -0,0 +1,47 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Maddock <smaddock@slack-corp.com>
|
||||
Date: Tue, 12 Nov 2024 17:30:42 -0500
|
||||
Subject: refactor: unfilter unresponsive events
|
||||
|
||||
RendererUnresponsive events are filtered out when
|
||||
* DisableHangMonitor switch is set
|
||||
* WebContents is awaiting a clipboard scan
|
||||
* Any remote debugger is attached
|
||||
* Any local debugger is attached
|
||||
* Visibility state is not visible
|
||||
* Renderer process is not initialized
|
||||
|
||||
This CL removes these filters so the unresponsive event can still be
|
||||
accessed from our JS event. The filtering is moved into Electron's code.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 319800cec84a968b0e442fc760c8e1d701bda2ed..459663af86272fe1e23a6a163e01c67fc5f8a66d 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9464,25 +9464,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
base::RepeatingClosure hang_monitor_restarter) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
|
||||
"render_widget_host", render_widget_host);
|
||||
- if (ShouldIgnoreUnresponsiveRenderer()) {
|
||||
+ if (IsBeingDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool visible = GetVisibility() == Visibility::VISIBLE;
|
||||
RecordRendererUnresponsiveMetrics(visible, render_widget_host);
|
||||
|
||||
- // Do not report hangs (to task manager, to hang renderer dialog, etc.) for
|
||||
- // invisible tabs (like extension background page, background tabs). See
|
||||
- // https://crbug.com/881812 for rationale and for choosing the visibility
|
||||
- // (rather than process priority) as the signal here.
|
||||
- if (!visible) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (!render_widget_host->renderer_initialized()) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
CrashRepHandlingOutcome outcome =
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kNoErrorDialogs)
|
Loading…
Add table
Add a link
Reference in a new issue