refactor: unfilter unresponsive events (#44667)
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
---------
This commit is contained in:
parent
e95e6fac0d
commit
b88e1aba10
7 changed files with 107 additions and 60 deletions
|
@ -134,3 +134,4 @@ fix_software_compositing_infinite_loop.patch
|
|||
ui_add_missing_shortcut_text_for_vkey_command_on_linux.patch
|
||||
osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch
|
||||
cherry-pick-923797bac925.patch
|
||||
refactor_unfilter_unresponsive_events.patch
|
||||
|
|
51
patches/chromium/refactor_unfilter_unresponsive_events.patch
Normal file
51
patches/chromium/refactor_unfilter_unresponsive_events.patch
Normal file
|
@ -0,0 +1,51 @@
|
|||
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 ad1f4c8f5dbe0da06955205e5c8a34908c04a0cd..fc720ea3ef4a45da258075f87da239fa9c3b0e82 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -9410,29 +9410,17 @@ 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;
|
||||
base::UmaHistogramBoolean("Renderer.Unresponsive.Visibility", visible);
|
||||
|
||||
- // 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;
|
||||
- }
|
||||
-
|
||||
base::UmaHistogramBoolean(
|
||||
"Renderer.Unresponsive.PageVisible.WidgetVisibility",
|
||||
!render_widget_host->is_hidden());
|
||||
|
||||
- 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