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

Unified Diff: runtime/vm/debugger.cc

Issue 2294883004: Don't return negative token positions in stack traces. (Closed)
Patch Set: Created 4 years, 4 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/observatory/tests/service/service_test_common.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index e485255ff6b6c4f6110c74b2f97e335ab8438946..a4afc16275873e52c3b3dac54563a4b5253b7e86 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -1050,7 +1050,11 @@ void ActivationFrame::PrintToJSONObject(JSONObject* jsobj,
bool full) {
const Script& script = Script::Handle(SourceScript());
jsobj->AddProperty("type", "Frame");
- jsobj->AddLocation(script, TokenPos());
+ TokenPosition pos = TokenPos();
+ if (pos.IsSynthetic()) {
+ pos = pos.FromSynthetic();
+ }
+ jsobj->AddLocation(script, pos);
jsobj->AddProperty("function", function(), !full);
jsobj->AddProperty("code", code());
if (full) {
« no previous file with comments | « runtime/observatory/tests/service/service_test_common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698