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

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

Issue 938123003: Prevent hang monitor restarts when hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 727a14ba9ad1d687441e5f590890d170c6f8dddd..da12c76ef0355de5b1840b35dc28d8a92d899ae1 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -864,11 +864,15 @@ bool RenderWidgetHostImpl::ScheduleComposite() {
}
void RenderWidgetHostImpl::StartHangMonitorTimeout(base::TimeDelta delay) {
+ if (is_hidden_)
+ return;
piman 2015/02/19 23:43:52 Do we need to restart it when we go visible (i.e.
jdduke (slow) 2015/02/23 16:03:26 Good question, and I don't really have the answer.
if (hang_monitor_timeout_)
hang_monitor_timeout_->Start(delay);
}
void RenderWidgetHostImpl::RestartHangMonitorTimeout() {
+ if (is_hidden_)
+ return;
if (hang_monitor_timeout_)
hang_monitor_timeout_->Restart(
base::TimeDelta::FromMilliseconds(hung_renderer_delay_ms_));
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698