mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Revert "Enable Array.prototype.values"
This reverts commit 424ed1b165e50f2e71c082c0c70fcda2a2764d18.
This commit is contained in:
parent
2653da27b3
commit
ef6478af8c
3 changed files with 17 additions and 10 deletions
|
|
@ -3165,7 +3165,9 @@ static const JSFunctionSpec array_methods[] = {
|
|||
JS_SELF_HOSTED_SYM_FN(iterator, "ArrayValues", 0,0),
|
||||
JS_SELF_HOSTED_FN("entries", "ArrayEntries", 0,0),
|
||||
JS_SELF_HOSTED_FN("keys", "ArrayKeys", 0,0),
|
||||
#ifdef NIGHTLY_BUILD
|
||||
JS_SELF_HOSTED_FN("values", "ArrayValues", 0,0),
|
||||
#endif
|
||||
|
||||
/* ES7 additions */
|
||||
JS_SELF_HOSTED_FN("includes", "ArrayIncludes", 2,0),
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/licenses/publicdomain/ */
|
||||
|
||||
assertEq(Array.prototype.values, Array.prototype[Symbol.iterator]);
|
||||
assertEq(Array.prototype.values.name, "values");
|
||||
assertEq(Array.prototype.values.length, 0);
|
||||
if (Array.prototype.values) {
|
||||
assertEq(Array.prototype.values, Array.prototype[Symbol.iterator]);
|
||||
assertEq(Array.prototype.values.name, "values");
|
||||
assertEq(Array.prototype.values.length, 0);
|
||||
|
||||
function valuesUnscopeable() {
|
||||
var values = "foo";
|
||||
with ([1, 2, 3]) {
|
||||
assertEq(indexOf, Array.prototype.indexOf);
|
||||
assertEq(values, "foo");
|
||||
function valuesUnscopeable() {
|
||||
var values = "foo";
|
||||
with ([1, 2, 3]) {
|
||||
assertEq(indexOf, Array.prototype.indexOf);
|
||||
assertEq(values, "foo");
|
||||
}
|
||||
}
|
||||
valuesUnscopeable();
|
||||
}
|
||||
valuesUnscopeable();
|
||||
|
||||
if (typeof reportCompare === 'function')
|
||||
reportCompare(0, 0);
|
||||
|
|
|
|||
|
|
@ -198,7 +198,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681
|
|||
"pop", "shift", "unshift", "splice", "concat", "slice", "lastIndexOf", "indexOf",
|
||||
"includes", "forEach", "map", "reduce", "reduceRight", "filter", "some", "every", "find",
|
||||
"findIndex", "copyWithin", "fill", Symbol.iterator, Symbol.unscopables, "entries", "keys",
|
||||
"values", "constructor"];
|
||||
"constructor"];
|
||||
if (isNightlyBuild) {
|
||||
gPrototypeProperties['Array'].push("values");
|
||||
}
|
||||
gConstructorProperties['Array'] =
|
||||
constructorProps(["join", "reverse", "sort", "push", "pop", "shift",
|
||||
"unshift", "splice", "concat", "slice", "isArray",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue