Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(810)

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2482453002: Don't restart the hang renderer timeout on messages ack'd from the compositor thread. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 2335a60fa9e27504129300f8935b3a8e6eef7961..b59008c6bffbb14bef412f7897ddbe12a0f092d6 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1906,12 +1906,16 @@ void RenderWidgetHostImpl::IncrementInFlightEventCount(
}
}
-void RenderWidgetHostImpl::DecrementInFlightEventCount() {
+void RenderWidgetHostImpl::DecrementInFlightEventCount(
+ InputEventAckLocation location) {
if (decrement_in_flight_event_count() <= 0) {
// Cancel pending hung renderer checks since the renderer is responsive.
StopHangMonitorTimeout();
} else {
- RestartHangMonitorTimeoutIfNecessary();
+ // Only restart the hang monitor timer if we got a response from the
+ // main thread.
+ if (location == InputEventAckLocation::INPUT_EVENT_ACK_LOCATION_MAIN_THREAD)
+ RestartHangMonitorTimeoutIfNecessary();
}
}

Powered by Google App Engine
This is Rietveld 408576698