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

Unified Diff: runtime/vm/object_service.cc

Issue 2703373010: Change Library service protocol ids (Closed)
Patch Set: fix test Created 3 years, 10 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/vm/debugger_test.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_service.cc
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 31c46cdf9ebcf4e14e6e0dedfa6184ee3a0e8771..5591052ae7fa3223f6af1c6f9293fae4ff856c78 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -448,8 +448,9 @@ void Script::PrintJSONImpl(JSONStream* stream, bool ref) const {
if (lib.IsNull()) {
jsobj.AddServiceId(*this);
} else {
- jsobj.AddFixedServiceId("libraries/%" Pd "/scripts/%s/%" Px64 "",
- lib.index(), encoded_uri, load_timestamp());
+ const String& lib_id = String::Handle(lib.private_key());
+ jsobj.AddFixedServiceId("libraries/%s/scripts/%s/%" Px64 "",
+ lib_id.ToCString(), encoded_uri, load_timestamp());
}
jsobj.AddPropertyStr("uri", uri);
jsobj.AddProperty("_kind", GetKindAsCString());
@@ -499,11 +500,10 @@ void Script::PrintJSONImpl(JSONStream* stream, bool ref) const {
void Library::PrintJSONImpl(JSONStream* stream, bool ref) const {
- intptr_t id = index();
- ASSERT(id >= 0);
+ const String& id = String::Handle(private_key());
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Library", ref);
- jsobj.AddFixedServiceId("libraries/%" Pd "", id);
+ jsobj.AddFixedServiceId("libraries/%s", id.ToCString());
const String& vm_name = String::Handle(name());
const String& scrubbed_name = String::Handle(String::ScrubName(vm_name));
AddNameProperties(&jsobj, scrubbed_name.ToCString(), vm_name.ToCString());
« no previous file with comments | « runtime/vm/debugger_test.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698