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

Unified Diff: runtime/vm/object.cc

Issue 2823253005: Fix #28740 demangle constructors in stack traces (A.A becomes new A) REDO (Closed)
Patch Set: Don't recurse in QualifiedName, just check the ending function kind for ctor Created 3 years, 8 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 | runtime/vm/object_test.cc » ('j') | 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 8282ed526b96608aaf603eaf34d873308727050b..cf1a50eb4b128dc5793840e04eefa03f62ad7390 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -7175,11 +7175,16 @@ RawString* Function::QualifiedName(NameVisibility name_visibility) const {
}
const Class& cls = Class::Handle(Owner());
if (!cls.IsTopLevel()) {
- result = String::Concat(Symbols::Dot(), result, Heap::kOld);
- const String& cls_name = String::Handle(name_visibility == kScrubbedName
- ? cls.ScrubbedName()
- : cls.UserVisibleName());
- result = String::Concat(cls_name, result, Heap::kOld);
+ if (fun.kind() == RawFunction::kConstructor) {
+ result = String::Concat(Symbols::ConstructorStacktracePrefix(), result,
+ Heap::kOld);
+ } else {
+ result = String::Concat(Symbols::Dot(), result, Heap::kOld);
+ const String& cls_name = String::Handle(name_visibility == kScrubbedName
+ ? cls.ScrubbedName()
+ : cls.UserVisibleName());
+ result = String::Concat(cls_name, result, Heap::kOld);
+ }
}
return result.raw();
}
« no previous file with comments | « no previous file | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698