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

Unified Diff: runtime/vm/debugger.cc

Issue 2632183002: Debugging in kernel shaping up. (Closed)
Patch Set: Created 3 years, 11 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
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 53bcba2632e17b1e2eb42aee4b611cb66b6ad185..275f4b8504f67ae450a8ecf2e3f1fbabf434c67f 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -2929,6 +2929,14 @@ bool Debugger::IsAtAsyncJump(ActivationFrame* top_frame) {
ASSERT(Instance::Cast(closure_or_null).IsClosure());
const Script& script = Script::Handle(zone, top_frame->SourceScript());
if (script.kind() == RawScript::kKernelTag) {
+ // Are we at a yield point (previous await)?
+ const Array& yields = Array::Handle(script.yields_seen());
+ intptr_t looking_for = top_frame->TokenPos().value();
+ Smi& value = Smi::Handle(zone);
+ for (int i = 0; i < yields.Length(); i++) {
+ value ^= yields.At(i);
+ if (value.Value() == looking_for) return true;
+ }
return false;
}
const TokenStream& tokens = TokenStream::Handle(zone, script.tokens());
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/kernel.h » ('j') | runtime/vm/kernel.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698