Index: runtime/vm/exceptions.cc |
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc |
index bc0bd111aee300701ac2704b7fdd3c3213c8f448..4837f17106b575a9195e6efb2bae8d67afa2c936 100644 |
--- a/runtime/vm/exceptions.cc |
+++ b/runtime/vm/exceptions.cc |
@@ -6,6 +6,8 @@ |
#include "platform/address_sanitizer.h" |
+#include "lib/stacktrace.h" |
+ |
#include "vm/dart_api_impl.h" |
#include "vm/dart_entry.h" |
#include "vm/debugger.h" |
@@ -19,6 +21,7 @@ |
#include "vm/symbols.h" |
#include "vm/tags.h" |
+ |
namespace dart { |
DECLARE_FLAG(bool, trace_deoptimization); |
@@ -369,18 +372,7 @@ static RawField* LookupStackTraceField(const Instance& instance) { |
RawStackTrace* Exceptions::CurrentStackTrace() { |
- Zone* zone = Thread::Current()->zone(); |
- RegularStackTraceBuilder frame_builder(zone); |
- BuildStackTrace(&frame_builder); |
- |
- // Create arrays for code and pc_offset tuples of each frame. |
- const Array& full_code_array = |
- Array::Handle(zone, Array::MakeArray(frame_builder.code_list())); |
- const Array& full_pc_offset_array = |
- Array::Handle(zone, Array::MakeArray(frame_builder.pc_offset_list())); |
- const StackTrace& full_stacktrace = StackTrace::Handle( |
- StackTrace::New(full_code_array, full_pc_offset_array)); |
- return full_stacktrace.raw(); |
+ return GetStackTraceForException(); |
} |