Skip to content

Commit dc8e00b

Browse files
committed
Revert "Workaround #537"
Undoing this. Paul fixed this in 1.17. We'll need to run with 1.17 builds going forward, but we need that for other reasons. Fixes #537 [email protected] Review URL: https://codereview.chromium.org/1936693002 .
1 parent 6d8dc11 commit dc8e00b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pkg/dev_compiler/lib/runtime/dart_sdk.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29344,8 +29344,8 @@ dart_library.library('dart_sdk', null, /* Imports */[
2934429344
const _checkInsertIndex = Symbol('_checkInsertIndex');
2934529345
js.JsArray$ = dart.generic(E => {
2934629346
class JsArray extends dart.mixin(js.JsObject, collection.ListMixin$(E)) {
29347-
static new() {
29348-
return new (js.JsArray$(E))._fromJs([]);
29347+
JsArray() {
29348+
super._fromJs([]);
2934929349
}
2935029350
from(other) {
2935129351
super._fromJs((() => {
@@ -29446,7 +29446,7 @@ dart_library.library('dart_sdk', null, /* Imports */[
2944629446
dart.defineNamedConstructor(JsArray, '_fromJs');
2944729447
dart.setSignature(JsArray, {
2944829448
constructors: () => ({
29449-
new: [js.JsArray$(E), []],
29449+
JsArray: [js.JsArray$(E), []],
2945029450
from: [js.JsArray$(E), [core.Iterable$(E)]],
2945129451
_fromJs: [js.JsArray$(E), [dart.dynamic]]
2945229452
}),

pkg/dev_compiler/tool/input_sdk/lib/js/dart2js/js_dart2js.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ class JsArray<E> extends JsObject with ListMixin<E> {
317317
/**
318318
* Creates a new JavaScript array.
319319
*/
320-
// TODO(vsm): Making this a factory to workaround #537.
321-
factory JsArray() { return new JsArray._fromJs([]); }
320+
JsArray() : super._fromJs([]);
322321

323322
/**
324323
* Creates a new JavaScript array and initializes it to the contents of

0 commit comments

Comments
 (0)