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 5b294b15efe2313e691c99ac35fdbd1194222552..75c5e3f70ecca20f7c840a4c0be74c1f0f180be8 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.cc |
+++ b/content/browser/renderer_host/render_widget_host_impl.cc |
@@ -288,8 +288,6 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, |
is_focused_(false), |
hung_renderer_delay_( |
base::TimeDelta::FromMilliseconds(kHungRendererDelayMs)), |
- hang_monitor_reason_( |
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN), |
hang_monitor_event_type_(blink::WebInputEvent::Undefined), |
last_event_type_(blink::WebInputEvent::Undefined), |
new_content_rendering_delay_( |
@@ -948,26 +946,19 @@ bool RenderWidgetHostImpl::ScheduleComposite() { |
void RenderWidgetHostImpl::StartHangMonitorTimeout( |
base::TimeDelta delay, |
- blink::WebInputEvent::Type event_type, |
- RendererUnresponsiveType hang_monitor_reason) { |
+ blink::WebInputEvent::Type event_type) { |
if (!hang_monitor_timeout_) |
return; |
if (!hang_monitor_timeout_->IsRunning()) |
hang_monitor_event_type_ = event_type; |
last_event_type_ = event_type; |
hang_monitor_timeout_->Start(delay); |
- hang_monitor_reason_ = hang_monitor_reason; |
} |
void RenderWidgetHostImpl::RestartHangMonitorTimeoutIfNecessary() { |
if (!hang_monitor_timeout_) |
return; |
if (in_flight_event_count_ > 0 && !is_hidden_) { |
clamy
2017/03/09 13:40:40
nit: no longer need for braces.
Avi (use Gerrit)
2017/03/09 15:31:21
Done.
|
- if (hang_monitor_reason_ == |
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN) { |
- hang_monitor_reason_ = |
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_IN_FLIGHT_EVENTS; |
- } |
hang_monitor_timeout_->Restart(hung_renderer_delay_); |
} |
} |
@@ -980,8 +971,6 @@ void RenderWidgetHostImpl::DisableHangMonitorForTesting() { |
void RenderWidgetHostImpl::StopHangMonitorTimeout() { |
if (hang_monitor_timeout_) { |
clamy
2017/03/09 13:40:40
Same here.
Avi (use Gerrit)
2017/03/09 15:31:21
Done.
|
hang_monitor_timeout_->Stop(); |
- hang_monitor_reason_ = |
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN; |
} |
RendererIsResponsive(); |
} |
@@ -1704,12 +1693,9 @@ void RenderWidgetHostImpl::RendererIsUnresponsive() { |
Source<RenderWidgetHost>(this), |
NotificationService::NoDetails()); |
is_unresponsive_ = true; |
- RendererUnresponsiveType reason = hang_monitor_reason_; |
- hang_monitor_reason_ = |
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNKNOWN; |
if (delegate_) |
- delegate_->RendererUnresponsive(this, reason); |
+ delegate_->RendererUnresponsive(this); |
// Do not add code after this since the Delegate may delete this |
// RenderWidgetHostImpl in RendererUnresponsive. |
@@ -2113,9 +2099,7 @@ void RenderWidgetHostImpl::IncrementInFlightEventCount( |
blink::WebInputEvent::Type event_type) { |
++in_flight_event_count_; |
if (!is_hidden_) { |
clamy
2017/03/09 13:40:41
Same here.
Avi (use Gerrit)
2017/03/09 15:31:21
Done.
|
- StartHangMonitorTimeout( |
- hung_renderer_delay_, event_type, |
- RendererUnresponsiveType::RENDERER_UNRESPONSIVE_IN_FLIGHT_EVENTS); |
+ StartHangMonitorTimeout(hung_renderer_delay_, event_type); |
} |
} |