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

Unified Diff: sdk/lib/_internal/lib/js_mirrors.dart

Issue 148223008: Make reflectClassByName work with interceptor names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update lib test expectations. Created 6 years, 11 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 | tests/compiler/dart2js_extra/reflect_native_types_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_mirrors.dart
diff --git a/sdk/lib/_internal/lib/js_mirrors.dart b/sdk/lib/_internal/lib/js_mirrors.dart
index 5d077a4bfb7d70e8264a95443da48fbe21aef006..4c6df6230f940021ba79dcb12f6f60cb64bf7e65 100644
--- a/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/sdk/lib/_internal/lib/js_mirrors.dart
@@ -524,6 +524,12 @@ TypeMirror reflectClassByMangledName(String mangledName) {
var classMirrors;
TypeMirror reflectClassByName(Symbol symbol, String mangledName) {
+ int separatorIndex = mangledName.indexOf('/');
+ if (separatorIndex > -1) {
+ // This is an interceptor name, where the first part is the nice name used
+ // for printing the type name.
+ mangledName = mangledName.substring(separatorIndex + 1);
+ }
if (classMirrors == null) classMirrors = JsCache.allocate();
var mirror = JsCache.fetch(classMirrors, mangledName);
if (mirror != null) return mirror;
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/reflect_native_types_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698