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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart

Issue 2934623003: fix #29753, use ES5 constructors for ddc (Closed)
Patch Set: rebase Created 3 years, 6 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
Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
index 39a350fd9b76352664853c398f4aec741e233c25..a19c5af599db97cde1ac904535a6ca6e2541551a 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
@@ -157,7 +157,7 @@ wrapType(type) {
if (JS('bool', '#.hasOwnProperty(#)', type, _typeObject)) {
return JS('', '#[#]', type, _typeObject);
}
- return JS('', '#[#] = new #(#)', type, _typeObject, WrappedType, type);
+ return JS('', '#[#] = #', type, _typeObject, new WrappedType(type));
}
var _lazyJSTypes = JS('', 'new Map()');
@@ -167,7 +167,7 @@ lazyJSType(getJSTypeCallback, name) {
if (JS('bool', '#.has(#)', _lazyJSTypes, key)) {
return JS('', '#.get(#)', _lazyJSTypes, key);
}
- var ret = JS('', 'new #(#, #)', LazyJSType, getJSTypeCallback, name);
+ var ret = new LazyJSType(getJSTypeCallback, name);
JS('', '#.set(#, #)', _lazyJSTypes, key, ret);
return ret;
}
@@ -178,7 +178,7 @@ lazyAnonymousJSType(name) {
if (JS('bool', '#.has(#)', _lazyJSTypes, name)) {
return JS('', '#.get(#)', _lazyJSTypes, name);
}
- var ret = JS('', 'new #(null, #)', LazyJSType, name);
+ var ret = new LazyJSType(null, name);
JS('', '#.set(#, #)', _lazyJSTypes, name, ret);
return ret;
}

Powered by Google App Engine
This is Rietveld 408576698