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

Unified Diff: runtime/lib/mirrors_patch.dart

Issue 53883002: Ensure constructorName symbols include private manglings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
Index: runtime/lib/mirrors_patch.dart
diff --git a/runtime/lib/mirrors_patch.dart b/runtime/lib/mirrors_patch.dart
index b3f2d4d530907dc4328caa590c307ab8ec493c58..97e60ceb169e57166b8531341e27a85a228b6253 100644
--- a/runtime/lib/mirrors_patch.dart
+++ b/runtime/lib/mirrors_patch.dart
@@ -48,12 +48,17 @@ patch TypeMirror reflectType(Type key) {
patch class MirrorSystem {
/* patch */ static String getName(Symbol symbol) {
String string = _symbol_dev.Symbol.getName(symbol);
- if (string.contains(' with ')) return string;
+ if (string.contains(' with ')) {
+ // Constructor names of anonymous mixin applications
+ var at_pos = string.indexOf('@');
+ if (at_pos == -1) return string;
+ return string.substring(0, at_pos);
+ }
return _unmangleName(string);
}
/* patch */ static Symbol getSymbol(String name, [LibraryMirror library]) {
if (library is! LibraryMirror ||
- ((name[0] == '_') && (library == null))) {
+ ((name.length > 0) && (name[0] == '_') && (library == null))) {
throw new ArgumentError(library);
}
if (library != null) name = _mangleName(name, library._reflectee);

Powered by Google App Engine
This is Rietveld 408576698