Commit 5919f157 authored by rvargas's avatar rvargas Committed by Commit bot

Extend the hang monitor timeout when an event ack is received.

The hang monitor is supposed to wait for 30 seconds of inactivity before
deciding that a renderer is not responsive. This CL makes sure that when
waiting for multiple input events, receiving an ack is correctly interpreted
as a responsive renderer (for that moment)

BUG=336198

Review URL: https://codereview.chromium.org/535653002

Cr-Commit-Position: refs/heads/master@{#293060}
parent 8416a6b9
......@@ -1779,9 +1779,13 @@ void RenderWidgetHostImpl::IncrementInFlightEventCount() {
void RenderWidgetHostImpl::DecrementInFlightEventCount() {
DCHECK_GE(in_flight_event_count_, 0);
// Cancel pending hung renderer checks since the renderer is responsive.
if (decrement_in_flight_event_count() <= 0)
if (decrement_in_flight_event_count() <= 0) {
// Cancel pending hung renderer checks since the renderer is responsive.
StopHangMonitorTimeout();
} else {
// The renderer is responsive, but there are in-flight events to wait for.
RestartHangMonitorTimeout();
}
}
void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment