Index: runtime/vm/object_service.cc |
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc |
index e95e8e317524b4831fa70f703777c59b022783c7..d4fc827ce49f6b8aafe568be9abe817517858b5f 100644 |
--- a/runtime/vm/object_service.cc |
+++ b/runtime/vm/object_service.cc |
@@ -408,7 +408,8 @@ void Field::PrintJSONImpl(JSONStream* stream, bool ref) const { |
} else { |
jsobj.AddProperty("_guardLength", guarded_list_length()); |
} |
- const class Script& script = Script::Handle(Script()); |
+ const Class& origin_cls = Class::Handle(Origin()); |
+ const class Script& script = Script::Handle(origin_cls.script()); |
if (!script.IsNull()) { |
jsobj.AddLocation(script, token_pos()); |
} |