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

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

Issue 161333002: 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: Update status file for Safari. 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 6b58b6f457502afa755a0e95e3e08ac02c5545f3..0154824bf1bde1521303f615bb696e99416cc782 100644
--- a/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/sdk/lib/_internal/lib/js_mirrors.dart
@@ -878,10 +878,11 @@ class JsInstanceMirror extends JsObjectMirror implements InstanceMirror {
/// reflective information to know how to to invoke a specific member.
get _classInvocationCache {
String cacheName = Primitives.mirrorInvokeCacheName;
- var cache = JS('', r'#.constructor[#]', reflectee, cacheName);
+ var cacheHolder = (reflectee == null) ? getInterceptor(null) : reflectee;
+ var cache = JS('', r'#.constructor[#]', cacheHolder, cacheName);
if (cache == null) {
cache = JsCache.allocate();
- JS('void', r'#.constructor[#] = #', reflectee, cacheName, cache);
+ JS('void', r'#.constructor[#] = #', cacheHolder, cacheName, cache);
}
return cache;
}
@@ -1070,7 +1071,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', object);
+ String className = JS('String', '#.constructor.name', interceptor);
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