Index: runtime/vm/object_service.cc |
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc |
index 41290fb7e8bde3432be7f9b30fa0c735583c4b19..1a861a370519b5b39766f6c7ff0474fee78656ba 100644 |
--- a/runtime/vm/object_service.cc |
+++ b/runtime/vm/object_service.cc |
@@ -430,18 +430,19 @@ void Script::PrintJSONImpl(JSONStream* stream, bool ref) const { |
const String& encoded_uri = String::Handle(String::EncodeIRI(uri)); |
ASSERT(!encoded_uri.IsNull()); |
const Library& lib = Library::Handle(FindLibrary()); |
- if (kind() == RawScript::kEvaluateTag) { |
+ if (lib.IsNull()) { |
jsobj.AddServiceId(*this); |
} else { |
- ASSERT(!lib.IsNull()); |
- jsobj.AddFixedServiceId("libraries/%" Pd "/scripts/%s", |
- lib.index(), encoded_uri.ToCString()); |
+ jsobj.AddFixedServiceId("libraries/%" Pd "/scripts/%s/%" Px64 "", |
+ lib.index(), encoded_uri.ToCString(), |
+ load_timestamp()); |
} |
jsobj.AddPropertyStr("uri", uri); |
jsobj.AddProperty("_kind", GetKindAsCString()); |
if (ref) { |
return; |
} |
+ jsobj.AddPropertyTimeMillis("_loadTime", load_timestamp()); |
if (!lib.IsNull()) { |
jsobj.AddProperty("library", lib); |
} |