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

Unified Diff: third_party/pkg/di/lib/reflected_type.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « third_party/pkg/di/lib/module.dart ('k') | third_party/pkg/di/lib/static_injector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/di/lib/reflected_type.dart
===================================================================
--- third_party/pkg/di/lib/reflected_type.dart (revision 33054)
+++ third_party/pkg/di/lib/reflected_type.dart (working copy)
@@ -6,20 +6,14 @@
override: 'di.src.reflected_type')
import 'dart:mirrors';
-Map<ClassMirror, Type> _cache = <ClassMirror, Type>{};
-
// Horrible hack to work around: http://dartbug.com/12607
Type getReflectedTypeWorkaround(ClassMirror cls) {
// On Dart VM, just return reflectedType.
if (1.0 is! int) return cls.reflectedType;
- if (!cls.isOriginalDeclaration) {
- cls = cls.originalDeclaration;
- }
- if (_cache[cls] == null) {
- var mangledName = reflect(cls).getField(_mangledNameField).reflectee;
- _cache[cls] = _jsHelper.invoke(#createRuntimeType, [mangledName]).reflectee;
- }
- return _cache[cls];
+
+ var mangledName = reflect(cls).getField(_mangledNameField).reflectee;
+ Type type = _jsHelper.invoke(#createRuntimeType, [mangledName]).reflectee;
+ return type;
}
final LibraryMirror _jsHelper =
« no previous file with comments | « third_party/pkg/di/lib/module.dart ('k') | third_party/pkg/di/lib/static_injector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698