зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1599769 - Part 1: Ship Promise.any. r=jwalden.
Differential Revision: https://phabricator.services.mozilla.com/D76393
This commit is contained in:
Родитель
be9fb07ce4
Коммит
033a5e6ba7
|
@ -3683,7 +3683,6 @@ static bool PromiseAllSettledElementFunction(JSContext* cx, unsigned argc,
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
// Promise.any (Stage 3 proposal)
|
||||
// https://tc39.es/proposal-promise-any/
|
||||
//
|
||||
|
@ -3692,7 +3691,6 @@ static bool Promise_static_any(JSContext* cx, unsigned argc, Value* vp) {
|
|||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
return CommonPromiseCombinator(cx, args, CombinatorKind::Any);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Promise.any (Stage 3 proposal)
|
||||
// https://tc39.es/proposal-promise-any/
|
||||
|
@ -5854,9 +5852,7 @@ static const JSPropertySpec promise_properties[] = {
|
|||
static const JSFunctionSpec promise_static_methods[] = {
|
||||
JS_FN("all", Promise_static_all, 1, 0),
|
||||
JS_FN("allSettled", Promise_static_allSettled, 1, 0),
|
||||
#ifdef NIGHTLY_BUILD
|
||||
JS_FN("any", Promise_static_any, 1, 0),
|
||||
#endif
|
||||
JS_FN("race", Promise_static_race, 1, 0),
|
||||
JS_FN("reject", Promise_reject, 1, 0),
|
||||
JS_FN("resolve", js::Promise_static_resolve, 1, 0),
|
||||
|
|
|
@ -41,7 +41,6 @@ FEATURE_CHECK_NEEDED = {
|
|||
RELEASE_OR_BETA = set([
|
||||
"Intl.DateTimeFormat-fractionalSecondDigits",
|
||||
"Intl.DateTimeFormat-dayPeriod",
|
||||
"Promise.any",
|
||||
"AggregateError",
|
||||
])
|
||||
|
||||
|
|
|
@ -274,10 +274,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=933681
|
|||
gPrototypeProperties['Promise'] =
|
||||
["constructor", "catch", "then", "finally", Symbol.toStringTag];
|
||||
gConstructorProperties['Promise'] =
|
||||
constructorProps(["resolve", "reject", "all", "allSettled", "race", Symbol.species]);
|
||||
if (isNightlyBuild) {
|
||||
gConstructorProperties['Promise'].push("any");
|
||||
}
|
||||
constructorProps(["resolve", "reject", "all", "allSettled", "any", "race", Symbol.species]);
|
||||
|
||||
gPrototypeProperties['ArrayBuffer'] =
|
||||
["constructor", "byteLength", "slice", Symbol.toStringTag];
|
||||
|
|
Загрузка…
Ссылка в новой задаче