| 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 8d2390a91305f963ac4fda2f743aedaa71d82852..90afecd8290a9633cee6f2b9de069c68d3f5951a 100644
|
| --- a/content/browser/renderer_host/render_widget_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
| @@ -967,6 +967,8 @@ void RenderWidgetHostImpl::ProcessIgnoreInputEventsChanged(
|
| void RenderWidgetHostImpl::StartHangMonitorTimeout(
|
| base::TimeDelta delay,
|
| blink::WebInputEvent::Type event_type) {
|
| + if (hang_start_time_.is_null())
|
| + hang_start_time_ = TimeTicks::Now();
|
| if (!hang_monitor_timeout_)
|
| return;
|
| if (!hang_monitor_timeout_->IsRunning())
|
| @@ -976,18 +978,29 @@ void RenderWidgetHostImpl::StartHangMonitorTimeout(
|
| }
|
|
|
| void RenderWidgetHostImpl::RestartHangMonitorTimeoutIfNecessary() {
|
| - if (!hang_monitor_timeout_)
|
| - return;
|
| - if (in_flight_event_count_ > 0 && !is_hidden_)
|
| - hang_monitor_timeout_->Restart(hung_renderer_delay_);
|
| + if (in_flight_event_count_ > 0 && !is_hidden_) {
|
| + LogHangMonitorUnresponsive();
|
| + hang_start_time_ = TimeTicks::Now();
|
| + if (hang_monitor_timeout_)
|
| + hang_monitor_timeout_->Restart(hung_renderer_delay_);
|
| + }
|
| }
|
|
|
| void RenderWidgetHostImpl::StopHangMonitorTimeout() {
|
| + LogHangMonitorUnresponsive();
|
| + hang_start_time_ = TimeTicks();
|
| if (hang_monitor_timeout_)
|
| hang_monitor_timeout_->Stop();
|
| RendererIsResponsive();
|
| }
|
|
|
| +void RenderWidgetHostImpl::LogHangMonitorUnresponsive() {
|
| + if (!hang_start_time_.is_null()) {
|
| + UMA_HISTOGRAM_TIMES("MPArch.RWH_HangMonitorUnresponsive",
|
| + TimeTicks::Now() - hang_start_time_);
|
| + }
|
| +}
|
| +
|
| void RenderWidgetHostImpl::StartNewContentRenderingTimeout(
|
| uint32_t next_source_id) {
|
| current_content_source_id_ = next_source_id;
|
|
|