Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: runtime/vm/service.cc

Issue 2782703002: Include the awaiter stack trace in the service protocol (Closed)
Patch Set: rmacnak review Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scopes.cc ('k') | runtime/vm/service/service_dev.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « runtime/vm/scopes.cc ('k') | runtime/vm/service/service_dev.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698