| Index: runtime/vm/json_stream.cc
|
| diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
|
| index 4851875703cd3b4c12c6e552b63d2a039c1169fc..ddc760ca5c7b1ef671b27cd5a87ae9b00f1233b8 100644
|
| --- a/runtime/vm/json_stream.cc
|
| +++ b/runtime/vm/json_stream.cc
|
| @@ -749,14 +749,14 @@ void JSONObject::AddFixedServiceId(const char* format, ...) const {
|
|
|
|
|
| void JSONObject::AddLocation(const Script& script,
|
| - intptr_t token_pos,
|
| - intptr_t end_token_pos) const {
|
| + TokenDescriptor token_pos,
|
| + TokenDescriptor end_token_pos) const {
|
| JSONObject location(this, "location");
|
| location.AddProperty("type", "SourceLocation");
|
| location.AddProperty("script", script);
|
| - location.AddProperty("tokenPos", token_pos);
|
| - if (end_token_pos >= 0) {
|
| - location.AddProperty("endTokenPos", end_token_pos);
|
| + location.AddProperty("tokenPos", token_pos.value());
|
| + if (end_token_pos.IsReal()) {
|
| + location.AddProperty("endTokenPos", end_token_pos.value());
|
| }
|
| }
|
|
|
| @@ -767,7 +767,7 @@ void JSONObject::AddLocation(const BreakpointLocation* bpt_loc) const {
|
| Zone* zone = Thread::Current()->zone();
|
| Library& library = Library::Handle(zone);
|
| Script& script = Script::Handle(zone);
|
| - intptr_t token_pos;
|
| + TokenDescriptor token_pos = TokenDescriptor::kNoSource;
|
| bpt_loc->GetCodeLocation(&library, &script, &token_pos);
|
| AddLocation(script, token_pos);
|
| }
|
| @@ -780,7 +780,7 @@ void JSONObject::AddUnresolvedLocation(
|
| Zone* zone = Thread::Current()->zone();
|
| Library& library = Library::Handle(zone);
|
| Script& script = Script::Handle(zone);
|
| - intptr_t token_pos;
|
| + TokenDescriptor token_pos = TokenDescriptor::kNoSource;
|
| bpt_loc->GetCodeLocation(&library, &script, &token_pos);
|
|
|
| JSONObject location(this, "location");
|
| @@ -800,7 +800,7 @@ void JSONObject::AddUnresolvedLocation(
|
| }
|
| } else {
|
| // This unresolved breakpoint was requested at some function entry.
|
| - location.AddProperty("tokenPos", token_pos);
|
| + location.AddProperty("tokenPos", token_pos.value());
|
| }
|
| }
|
|
|
|
|