зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1784091: Update unscopable names for Array grouping. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D154266
This commit is contained in:
Родитель
b4cd6b075b
Коммит
bcdadebfbb
|
@ -4881,8 +4881,8 @@ static bool array_proto_finish(JSContext* cx, JS::HandleObject ctor,
|
|||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
if (cx->realm()->creationOptions().getArrayGroupingEnabled()) {
|
||||
if (!DefineDataProperty(cx, unscopables, cx->names().groupBy, value) ||
|
||||
!DefineDataProperty(cx, unscopables, cx->names().groupByToMap, value)) {
|
||||
if (!DefineDataProperty(cx, unscopables, cx->names().group, value) ||
|
||||
!DefineDataProperty(cx, unscopables, cx->names().groupToMap, value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ if (typeof getRealmConfiguration === "undefined") {
|
|||
}
|
||||
|
||||
if (!getBuildConfiguration().release_or_beta && getRealmConfiguration().enableArrayGrouping) {
|
||||
expectedKeys.push("groupBy", "groupByToMap");
|
||||
expectedKeys.push("group", "groupToMap");
|
||||
}
|
||||
|
||||
if (getBuildConfiguration()['change-array-by-copy'] && getRealmConfiguration().enableChangeArrayByCopy) {
|
||||
|
|
|
@ -225,9 +225,8 @@
|
|||
MACRO_(global, global, "global") \
|
||||
MACRO_(globalThis, globalThis, "globalThis") \
|
||||
MACRO_(group, group, "group") \
|
||||
MACRO_(groupBy, groupBy, "groupBy") \
|
||||
MACRO_(groupByToMap, groupByToMap, "groupByToMap") \
|
||||
MACRO_(groups, groups, "groups") \
|
||||
MACRO_(groupToMap, groupToMap, "groupToMap") \
|
||||
MACRO_(h11, h11, "h11") \
|
||||
MACRO_(h12, h12, "h12") \
|
||||
MACRO_(h23, h23, "h23") \
|
||||
|
|
|
@ -2247,8 +2247,8 @@ JS_PUBLIC_API bool js::ShouldIgnorePropertyDefinition(JSContext* cx,
|
|||
#ifdef NIGHTLY_BUILD
|
||||
if (key == JSProto_Array &&
|
||||
!cx->realm()->creationOptions().getArrayGroupingEnabled() &&
|
||||
(id == NameToId(cx->names().groupBy) ||
|
||||
id == NameToId(cx->names().groupByToMap))) {
|
||||
(id == NameToId(cx->names().group) ||
|
||||
id == NameToId(cx->names().groupToMap))) {
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче