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

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

Side-by-side diff isn't available for this file because of its large size.
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/common/dart_sdk.js ('k') | pkg/dev_compiler/lib/js/legacy/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/es6/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/es6/dart_sdk.js b/pkg/dev_compiler/lib/js/es6/dart_sdk.js
index 04625a83ee48be2339df9580c9b28dc185b666b2..059648cde66dbdd24058b79127a6b8a828b65d35 100644
--- a/pkg/dev_compiler/lib/js/es6/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/es6/dart_sdk.js
@@ -1911,7 +1911,8 @@ dart.runtimeType = function(obj) {
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));
@@ -13197,6 +13198,10 @@ _js_mirrors._wrap = function(obj) {
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`));
};
@@ -13309,7 +13314,7 @@ _js_mirrors.JsInstanceMirror = class JsInstanceMirror extends _js_mirrors.JsObje
}
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/common/dart_sdk.js ('k') | pkg/dev_compiler/lib/js/legacy/dart_sdk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698