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

Unified Diff: runtime/vm/object.cc

Issue 1290563003: Demangle library names in the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 7357dbdc2578da490e0d4d8a55a56c371f0dd6ec..4d643122d6564aa4e34fcfccc5ec4b737f273981 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -10131,13 +10131,15 @@ const char* Library::ToCString() const {
void Library::PrintJSONImpl(JSONStream* stream, bool ref) const {
- const char* library_name = String::Handle(name()).ToCString();
intptr_t id = index();
ASSERT(id >= 0);
JSONObject jsobj(stream);
AddCommonObjectProperties(&jsobj, "Library", ref);
jsobj.AddFixedServiceId("libraries/%" Pd "", id);
- jsobj.AddProperty("name", library_name);
+ const String& vm_name = String::Handle(name());
+ const String& user_name =
+ String::Handle(String::IdentifierPrettyName(vm_name));
+ AddNameProperties(&jsobj, user_name, vm_name);
const String& library_url = String::Handle(url());
jsobj.AddPropertyStr("uri", library_url);
if (ref) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698