| Index: cc/trees/proxy_impl.cc
|
| diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
|
| index 39040a4a9f7ab5528fdf64406211dc6d94b7587b..197ac4fe44067a115db609de324ff6a63eb10d32 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] = "";
|
| + 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,
|
|
|