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

Unified Diff: cc/trees/proxy_main.cc

Issue 2790173005: cc: Dump scheduler and tile manager state when commit is blocked. (Closed)
Patch Set: cc: Dump scheduler and tile manager state when commit is blocked. Created 3 years, 8 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
« cc/trees/proxy_impl.cc ('K') | « cc/trees/proxy_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy_main.cc
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc
index de79051d4b38e3395e219f1054e431150859bd37..f76315d49c4f773c123b4b479e6fd809caa5f6b4 100644
--- a/cc/trees/proxy_main.cc
+++ b/cc/trees/proxy_main.cc
@@ -265,7 +265,16 @@ void ProxyMain::BeginMainFrame(
base::Unretained(proxy_impl_.get()), &completion,
layer_tree_host_, begin_main_frame_start_time,
hold_commit_for_activation));
- completion.Wait();
+ // TODO(sunnyps): Remove this code once crbug.com/668892 is fixed.
+ // content/common/content_constants_internal.cc defines hung renderer delay
+ // as 30s so choose something less than that but still sufficiently long.
+ constexpr base::TimeDelta kDumpDelay = base::TimeDelta::FromSeconds(20);
vmpstr 2017/04/11 01:06:46 nit: static?
sunnyps 2017/04/11 18:22:48 Done.
+ if (!completion.TimedWait(kDumpDelay)) {
+ ImplThreadTaskRunner()->PostTask(
+ FROM_HERE, base::Bind(&ProxyImpl::DumpForBeginMainFrameHang,
+ base::Unretained(proxy_impl_.get())));
+ completion.Wait();
vmpstr 2017/04/11 01:06:46 nit: this will DCHECK since we've already waited.
sunnyps 2017/04/11 18:22:48 Changed TimedWait to set waited_ to false if wait
+ }
}
current_pipeline_stage_ = NO_PIPELINE_STAGE;
« cc/trees/proxy_impl.cc ('K') | « cc/trees/proxy_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698