Add glue::PrintStackTrace() (flutter/engine#2869)
We don't have a way to print stack traces on Fuchsia yet. This patch isolates this base dependency in //glue.
This commit is contained in:
@@ -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",
|
||||
|
||||
15
engine/src/flutter/glue/stack_trace.cc
Normal file
15
engine/src/flutter/glue/stack_trace.cc
Normal file
@@ -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
|
||||
14
engine/src/flutter/glue/stack_trace.h
Normal file
14
engine/src/flutter/glue/stack_trace.h
Normal file
@@ -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_
|
||||
Reference in New Issue
Block a user