diff --git a/engine/src/flutter/glue/BUILD.gn b/engine/src/flutter/glue/BUILD.gn index 0b0bcaa172..773ae0da53 100644 --- a/engine/src/flutter/glue/BUILD.gn +++ b/engine/src/flutter/glue/BUILD.gn @@ -5,6 +5,8 @@ source_set("glue") { sources = [ "movable_wrapper.h", + "stack_trace.cc", + "stack_trace.h", "task_runner_adaptor.cc", "task_runner_adaptor.h", "trace_event.h", diff --git a/engine/src/flutter/glue/stack_trace.cc b/engine/src/flutter/glue/stack_trace.cc new file mode 100644 index 0000000000..7369f20bbe --- /dev/null +++ b/engine/src/flutter/glue/stack_trace.cc @@ -0,0 +1,15 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "glue/stack_trace.h" + +#include "base/debug/stack_trace.h" + +namespace glue { + +void PrintStackTrace() { + base::debug::StackTrace().Print(); +} + +} // namespace glue diff --git a/engine/src/flutter/glue/stack_trace.h b/engine/src/flutter/glue/stack_trace.h new file mode 100644 index 0000000000..f7129e1157 --- /dev/null +++ b/engine/src/flutter/glue/stack_trace.h @@ -0,0 +1,14 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef GLUE_STACK_TRACE_H_ +#define GLUE_STACK_TRACE_H_ + +namespace glue { + +void PrintStackTrace(); + +} // namespace glue + +#endif // GLUE_STACK_TRACE_H_