Chromium Code Reviews| Index: cc/trees/proxy_impl.cc |
| diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc |
| index 39040a4a9f7ab5528fdf64406211dc6d94b7587b..a7284f333d1d9bc78c9b287eaec3eafcb67e6e0d 100644 |
| --- a/cc/trees/proxy_impl.cc |
| +++ b/cc/trees/proxy_impl.cc |
| @@ -4,10 +4,14 @@ |
| #include "cc/trees/proxy_impl.h" |
| +#include <string.h> |
| + |
| #include <algorithm> |
| #include <string> |
| #include "base/auto_reset.h" |
| +#include "base/debug/alias.h" |
| +#include "base/debug/dump_without_crashing.h" |
| #include "base/memory/ptr_util.h" |
| #include "base/trace_event/trace_event.h" |
| #include "base/trace_event/trace_event_argument.h" |
| @@ -223,6 +227,28 @@ void ProxyImpl::MainFrameWillHappenOnImplForTesting( |
| completion->Signal(); |
| } |
| +// TODO(sunnyps): Remove this code once crbug.com/668892 is fixed. |
| +NOINLINE void ProxyImpl::DumpForBeginMainFrameHang() { |
| + DCHECK(IsImplThread()); |
| + DCHECK(scheduler_); |
| + |
| + char stack_string[20000] = "\0"; |
|
vmpstr
2017/04/11 01:06:46
nit: = ""; (or = {}; or = {0};)
sunnyps
2017/04/11 18:22:48
Done.
|
| + base::debug::Alias(&stack_string); |
| + |
| + std::unique_ptr<base::trace_event::ConvertableToTraceFormat> scheduler_state = |
| + scheduler_->AsValue(); |
| + strncat(stack_string, scheduler_state->ToString().c_str(), |
| + arraysize(stack_string) - strlen(stack_string) - 1); |
| + |
| + std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
| + tile_manager_state = |
| + layer_tree_host_impl_->tile_manager()->ActivationStateAsValue(); |
| + strncat(stack_string, tile_manager_state->ToString().c_str(), |
| + arraysize(stack_string) - strlen(stack_string) - 1); |
| + |
| + base::debug::DumpWithoutCrashing(); |
| +} |
| + |
| void ProxyImpl::NotifyReadyToCommitOnImpl( |
| CompletionEvent* completion, |
| LayerTreeHost* layer_tree_host, |