Update Array.prototype[Symbol.unscopables] (#65)
Add change-array-by-copy methods to Array.prototype[Symbol.unscopables].
This commit is contained in:
parent
feebfbc6ee
commit
48fc4bb26d
2 changed files with 14 additions and 4 deletions
16
quickjs.c
16
quickjs.c
|
@ -47090,8 +47090,20 @@ void JS_AddIntrinsicBaseObjects(JSContext *ctx)
|
||||||
/* XXX: create auto_initializer */
|
/* XXX: create auto_initializer */
|
||||||
{
|
{
|
||||||
/* initialize Array.prototype[Symbol.unscopables] */
|
/* initialize Array.prototype[Symbol.unscopables] */
|
||||||
char const unscopables[] = "copyWithin" "\0" "entries" "\0" "fill" "\0" "find" "\0"
|
static const char unscopables[] =
|
||||||
"findIndex" "\0" "flat" "\0" "flatMap" "\0" "includes" "\0" "keys" "\0" "values" "\0";
|
"copyWithin" "\0"
|
||||||
|
"entries" "\0"
|
||||||
|
"fill" "\0"
|
||||||
|
"find" "\0"
|
||||||
|
"findIndex" "\0"
|
||||||
|
"flat" "\0"
|
||||||
|
"flatMap" "\0"
|
||||||
|
"includes" "\0"
|
||||||
|
"keys" "\0"
|
||||||
|
"toReversed" "\0"
|
||||||
|
"toSorted" "\0"
|
||||||
|
"toSpliced" "\0"
|
||||||
|
"values" "\0";
|
||||||
const char *p = unscopables;
|
const char *p = unscopables;
|
||||||
obj1 = JS_NewObjectProto(ctx, JS_NULL);
|
obj1 = JS_NewObjectProto(ctx, JS_NULL);
|
||||||
for(p = unscopables; *p; p += strlen(p) + 1) {
|
for(p = unscopables; *p; p += strlen(p) + 1) {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
test262/test/annexB/language/eval-code/direct/script-decl-lex-collision-in-sloppy-mode.js:13: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all
|
test262/test/annexB/language/eval-code/direct/script-decl-lex-collision-in-sloppy-mode.js:13: Test262Error: Expected a SyntaxError to be thrown but no exception was thrown at all
|
||||||
test262/test/built-ins/Array/prototype/Symbol.unscopables/change-array-by-copy.js:19: Test262Error: obj should have an own property toReversed
|
|
||||||
test262/test/built-ins/Array/prototype/Symbol.unscopables/change-array-by-copy.js:19: strict mode: Test262Error: obj should have an own property toReversed
|
|
||||||
test262/test/built-ins/AsyncGeneratorPrototype/return/return-state-completed-broken-promise.js:53: TypeError: $DONE() not called
|
test262/test/built-ins/AsyncGeneratorPrototype/return/return-state-completed-broken-promise.js:53: TypeError: $DONE() not called
|
||||||
test262/test/built-ins/AsyncGeneratorPrototype/return/return-state-completed-broken-promise.js:53: strict mode: TypeError: $DONE() not called
|
test262/test/built-ins/AsyncGeneratorPrototype/return/return-state-completed-broken-promise.js:53: strict mode: TypeError: $DONE() not called
|
||||||
test262/test/built-ins/AsyncGeneratorPrototype/return/return-suspendedStart-broken-promise.js:34: TypeError: $DONE() not called
|
test262/test/built-ins/AsyncGeneratorPrototype/return/return-suspendedStart-broken-promise.js:34: TypeError: $DONE() not called
|
||||||
|
|
Loading…
Reference in a new issue