| 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 666eb2928624addf63257443bac06471965721c4..17c42b5d38ee991b683b2ec9a1ad4d23be8c558b 100644
|
| --- a/content/browser/renderer_host/render_widget_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
| @@ -907,12 +907,24 @@ void RenderWidgetHostImpl::StartHangMonitorTimeout(
|
| RenderWidgetHostDelegate::RendererUnresponsiveType hang_monitor_reason) {
|
| if (!hang_monitor_timeout_)
|
| return;
|
| - hang_monitor_timeout_->Start(delay);
|
| +
|
| hang_monitor_reason_ = hang_monitor_reason;
|
| +
|
| + // If the renderer is known to be unresponsive, don't bother waiting for it.
|
| + if (known_unresponsive_renderer_count_ > 0)
|
| + hang_monitor_timeout_->Start(base::TimeDelta());
|
| + else
|
| + hang_monitor_timeout_->Start(delay);
|
| }
|
|
|
| void RenderWidgetHostImpl::RestartHangMonitorTimeout() {
|
| - if (hang_monitor_timeout_)
|
| + if (!hang_monitor_timeout_)
|
| + return;
|
| +
|
| + // If the renderer is known to be unresponsive, don't bother waiting for it.
|
| + if (known_unresponsive_renderer_count_ > 0)
|
| + hang_monitor_timeout_->Restart(base::TimeDelta());
|
| + else
|
| hang_monitor_timeout_->Restart(hung_renderer_delay_);
|
| }
|
|
|
| @@ -930,6 +942,12 @@ void RenderWidgetHostImpl::StopHangMonitorTimeout() {
|
| RendererIsResponsive();
|
| }
|
|
|
| +void RenderWidgetHostImpl::SetHangMonitorKnownUnresponsive(bool unresponsive) {
|
| + int count = unresponsive ? 1 : -1;
|
| + known_unresponsive_renderer_count_ += count;
|
| + DCHECK_GE(known_unresponsive_renderer_count_, 0);
|
| +}
|
| +
|
| void RenderWidgetHostImpl::StartNewContentRenderingTimeout() {
|
| // It is possible for a compositor frame to arrive before the browser is
|
| // notified about the page being committed, in which case no timer is
|
|
|