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:
Adam Barth
2016-08-04 23:31:21 -07:00
committed by GitHub
parent 5f46f1488f
commit 2652ee2654
3 changed files with 31 additions and 0 deletions

View File

@@ -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",

View 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

View 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_