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

Unified Diff: pkg/dev_compiler/lib/js/common/dart_sdk.js

Issue 2468493003: Type-related fixes (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « pkg/dev_compiler/lib/js/amd/dart_sdk.js ('k') | pkg/dev_compiler/lib/js/es6/dart_sdk.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/js/common/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js
index 259b2e1e569b82c76368e0a605db3f5bf934b734..5070c1bb3044208874c564429ddfb1164421144c 100644
--- a/pkg/dev_compiler/lib/js/common/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js
@@ -1913,7 +1913,8 @@
if (result != null) return dart.wrapType(result);
let extension = dart.getExtensionType(obj);
if (extension != null) {
- return obj[dartx.runtimeType];
+ result = obj[dartx.runtimeType];
+ return result != null ? result : dart.wrapType(extension);
}
if (typeof obj == "function") {
return dart.wrapType(dart.getReifiedType(obj));
@@ -13199,6 +13200,10 @@
return _js_mirrors._dart.wrapType(obj);
};
dart.fn(_js_mirrors._wrap, dynamicTodynamic$());
+ _js_mirrors._runtimeType = function(obj) {
+ return _js_mirrors._wrap(_js_mirrors._dart.getReifiedType(obj));
+ };
+ dart.fn(_js_mirrors._runtimeType, dynamicTodynamic$());
_js_mirrors._unimplemented = function(t, i) {
dart.throw(new core.UnimplementedError(dart.str`${t}.${_js_mirrors.getName(i.memberName)} unimplemented`));
};
@@ -13311,7 +13316,7 @@
}
get type() {
if (this.reflectee == null) return mirrors.reflectClass(dart.wrapType(core.Null));
- return mirrors.ClassMirror._check(_js_mirrors.reflectType(core.Type._check(dart.runtimeType(this.reflectee))));
+ return mirrors.ClassMirror._check(_js_mirrors.reflectType(core.Type._check(_js_mirrors._runtimeType(this.reflectee))));
}
_(reflectee) {
this.reflectee = reflectee;
« no previous file with comments | « pkg/dev_compiler/lib/js/amd/dart_sdk.js ('k') | pkg/dev_compiler/lib/js/es6/dart_sdk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698