Repository navigation
fix: report renderer hangs independently of system sleep and window visibility - #53760
Merged
Conversation
…isibility (#53529) * fix: don't report a renderer unresponsive right after the system wakes The input event ack timeout that drives the `unresponsive` event runs on base::TimeTicks, which keeps counting through system sleep on Windows (QPC) but stands still on macOS and Linux. A timeout armed before the machine sleeps therefore fires the moment it wakes, while every process is still paging back in, and the renderer is reported unresponsive (RenderWidgetHostImpl::OnInputEventAckTimeout -> RendererUnresponsive); apps commonly answer that by killing and reloading the renderer. The GPU watchdog already pauses across suspend for the same reason (GpuWatchdogThread is a PowerSuspendObserver); the renderer hang monitor has no power awareness. WebContents::RendererUnresponsive() now checks base::PowerMonitor: when the system is suspended, or resumed less than input::kHungRendererDelay ago, it runs the hang monitor restarter it is handed instead of emitting the event, so a renderer that is still stuck a full delay after the wake is reported as before. The testing binding gains simulatePowerEvent() so the spec can drive base::PowerMonitor's suspend/resume. * fix: don't emit responsive when a hung renderer's window is hidden RenderWidgetHostImpl::WasHidden() stopped the hang monitor with StopInputEventAckTimeout(), which also declares the renderer responsive. A window that hangs and is then minimized, occluded or screen-locked therefore emitted `responsive` without recovering, and the real recovery later emitted nothing, so neither event could be trusted. Hiding now pauses the timeout instead (folded into refactor_unfilter_unresponsive_events.patch, which exists to make these events usable from Electron); showing the window re-arms it and a real input ack still emits `responsive`. * chore: update patches * chore: reference upstream CL in patch description Co-authored-by: Shelley Vohr <[email protected]>
5 tasks done
jkleinsc
approved these changes
Sep 9, 2026
MarshallOfSound
approved these changes
Sep 9, 2026
MarshallOfSound
deleted the
trop/45-x-y-bp-fix-report-renderer-hangs-independently-of-system-sleep-and-window-visibility-1788940770405
branch
September 9, 2026 21:45
|
Release Notes Persisted
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #53529
See that PR for details.
Notes: Fixed
webContentsemittingunresponsiveright after the system wakes from sleep on Windows, and emittingresponsivewhen a hung window was hidden rather than when it recovered.