Commit Graph

4 Commits

Author SHA1 Message Date
Jenny Messerly 2c304d997f [dartdevc] fix #36372, make JS Array constructor property usable from JS
The `new array.constructor()` pattern is occasionally used in JS
(presumably, to get the array subtype if one is available). GopherJS in
particular does this. This fixes DDC's generic `JSArray<T>` to support
this pattern, for all values of T. This also makes JSArray work like
all other "native" types in DDC, where the "constructor" property
is the JS constructor for that native type.

Change-Id: I5270bd648d3d60cf07b8548fcd8c9b9d1a3018d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99940
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-04-22 22:43:14 +00:00
Vijay Menon 8602a8446e Fix LazyJsType check
This type is used for JS instanceof checks.  dart.dynamic doesn't work for that.  In general, this fall back looks dodgy (with or without this change), but this unblocks an internal user.

Change-Id: Id7401bbbef1aeddd93f40932b84f1928b4238edb
Reviewed-on: https://dart-review.googlesource.com/28121
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2017-12-11 16:51:48 +00:00
Vijay Menon 416b55437a Limit renaming on external members
Fixes #31489

Change-Id: Iece82eaf0bcd83dfc6f2335214b084b0d9e06de0
Reviewed-on: https://dart-review.googlesource.com/25180
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2017-12-05 16:17:12 +00:00
Jaime Wren e160f89499 Migrated test block 215 to Dart 2.0
Change-Id: Idea1235650b94fc77455cd46297803d3a169a791
Reviewed-on: https://dart-review.googlesource.com/3708
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2017-09-13 19:13:19 +00:00