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

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

Issue 163853004: Revert "Fix null.runtimeType, reflect(null).type.superinterfaces, and reflect(null).getField." (Closed) Base URL: https://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 | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/language/language_dart2js.status » ('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 0154824bf1bde1521303f615bb696e99416cc782..6b58b6f457502afa755a0e95e3e08ac02c5545f3 100644
--- a/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/sdk/lib/_internal/lib/js_mirrors.dart
@@ -878,11 +878,10 @@ class JsInstanceMirror extends JsObjectMirror implements InstanceMirror {
/// reflective information to know how to to invoke a specific member.
get _classInvocationCache {
String cacheName = Primitives.mirrorInvokeCacheName;
- var cacheHolder = (reflectee == null) ? getInterceptor(null) : reflectee;
- var cache = JS('', r'#.constructor[#]', cacheHolder, cacheName);
+ var cache = JS('', r'#.constructor[#]', reflectee, cacheName);
if (cache == null) {
cache = JsCache.allocate();
- JS('void', r'#.constructor[#] = #', cacheHolder, cacheName, cache);
+ JS('void', r'#.constructor[#] = #', reflectee, cacheName, cache);
}
return cache;
}
@@ -1071,7 +1070,7 @@ class JsInstanceMirror extends JsObjectMirror implements InstanceMirror {
// interceptor between multiple different instances of [InstanceMirror].
var interceptor = getInterceptor(object);
if (!useEval) return _newInterceptGetterNoEvalFn(name, interceptor);
- String className = JS('String', '#.constructor.name', interceptor);
+ String className = JS('String', '#.constructor.name', object);
var body = "(function $className\$$name(o){return i.$name(o)})";
return JS('', '(function(b,i){return eval(b)})(#,#)', body, interceptor);
}
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698