Chromium Code Reviews| 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; |