Index: runtime/vm/thread.cc |
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc |
index 16091844b0ee92302c0885f62fb57482e5b61685..dc54d6a01a2f1247565635c47a29582929588ca4 100644 |
--- a/runtime/vm/thread.cc |
+++ b/runtime/vm/thread.cc |
@@ -70,6 +70,7 @@ Thread::Thread(Isolate* isolate) |
store_buffer_block_(NULL), |
vm_tag_(0), |
task_kind_(kUnknownTask), |
+ async_stack_trace_(StackTrace::null()), |
dart_stream_(NULL), |
os_thread_(NULL), |
thread_lock_(new Monitor()), |
@@ -303,6 +304,27 @@ const char* Thread::TaskKindToCString(TaskKind kind) { |
} |
+RawStackTrace* Thread::async_stack_trace() const { |
+ return async_stack_trace_; |
+} |
+ |
+ |
+void Thread::set_async_stack_trace(const StackTrace& stack_trace) { |
+ ASSERT(!stack_trace.IsNull()); |
+ async_stack_trace_ = stack_trace.raw(); |
+} |
+ |
+ |
+void Thread::set_raw_async_stack_trace(RawStackTrace* raw_stack_trace) { |
+ async_stack_trace_ = raw_stack_trace; |
+} |
+ |
+ |
+void Thread::clear_async_stack_trace() { |
+ async_stack_trace_ = StackTrace::null(); |
+} |
+ |
+ |
bool Thread::EnterIsolate(Isolate* isolate) { |
const bool kIsMutatorThread = true; |
Thread* thread = isolate->ScheduleThread(kIsMutatorThread); |
@@ -681,6 +703,7 @@ void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor, |
visitor->VisitPointer(reinterpret_cast<RawObject**>(&active_exception_)); |
visitor->VisitPointer(reinterpret_cast<RawObject**>(&active_stacktrace_)); |
visitor->VisitPointer(reinterpret_cast<RawObject**>(&sticky_error_)); |
+ visitor->VisitPointer(reinterpret_cast<RawObject**>(&async_stack_trace_)); |
// Visit the api local scope as it has all the api local handles. |
ApiLocalScope* scope = api_top_scope_; |