Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index 69410ee3684dffd7f3d500a58c2be8140f5ee337..528a825d7cce88a5a8ae14cf14d387e3232fa980 100644 |
--- a/runtime/vm/service.cc |
+++ b/runtime/vm/service.cc |
@@ -1345,6 +1345,7 @@ static bool GetStack(Thread* thread, JSONStream* js) { |
DebuggerStackTrace* stack = isolate->debugger()->StackTrace(); |
DebuggerStackTrace* async_causal_stack = |
isolate->debugger()->AsyncCausalStackTrace(); |
+ DebuggerStackTrace* awaiter_stack = isolate->debugger()->AwaiterStackTrace(); |
// Do we want the complete script object and complete local variable objects? |
// This is true for dump requests. |
const bool full = BoolParameter::Parse(js->LookupParam("_full"), false); |
@@ -1373,6 +1374,17 @@ static bool GetStack(Thread* thread, JSONStream* js) { |
} |
} |
+ if (awaiter_stack != NULL) { |
+ JSONArray jsarr(&jsobj, "awaiterFrames"); |
+ intptr_t num_frames = awaiter_stack->Length(); |
+ for (intptr_t i = 0; i < num_frames; i++) { |
+ ActivationFrame* frame = awaiter_stack->FrameAt(i); |
+ JSONObject jsobj(&jsarr); |
+ frame->PrintToJSONObject(&jsobj, full); |
+ jsobj.AddProperty("index", i); |
+ } |
+ } |
+ |
{ |
MessageHandler::AcquiredQueues aq(isolate->message_handler()); |
jsobj.AddProperty("messages", aq.queue()); |