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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/js_mirrors.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
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/utils.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
index cdfe24bd071d97d84e16c80928dad28c1d5a440b..2e99d2ad64efb955d0391787291305a34f87be4d 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
@@ -442,9 +442,8 @@ class JsClassMirror extends JsMirror implements ClassMirror {
// TODO(vsm): Support factory constructors and named arguments.
var name = getName(constructorName);
assert(namedArgs == null || namedArgs.isEmpty);
- var instance = (name == 'new' || name == '')
- ? JS('', 'new #(...#)', _unwrap(_cls), args)
- : JS('', 'new (#.#)(...#)', _unwrap(_cls), name, args);
+ if (name == '') name = 'new';
+ var instance = JS('', 'new (#.#)(...#)', _unwrap(_cls), name, args);
return reflect(instance);
}
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698