[errors] Correct 'Promise.allSettled.call()' error message
Originally, 'Promise.allSettled.call()' will throw "Promise.all called on non-object". It should be "Promise.allSettled called on non-object". Bug: v8:12122 Change-Id: Ib2c8eba32abec474feece3aaebf0e6c7d09c433a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3459923 Reviewed-by: Mathias Bynens <mathias@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/main@{#79085}
This commit is contained in:
parent
8568ac6587
commit
33d95eeb7d
1
AUTHORS
1
AUTHORS
@ -63,6 +63,7 @@ Anna Henningsen <anna@addaleax.net>
|
||||
Antoine du Hamel <duhamelantoine1995@gmail.com>
|
||||
Anton Bershanskiy <8knots@protonmail.com>
|
||||
Anton Bikineev <ant.bikineev@gmail.com>
|
||||
Ao Wang <wangao.james@bytedance.com>
|
||||
Archil Sharashenidze <achosharashenidze@gmail.com>
|
||||
Bangfu Tao <bangfu.tao@samsung.com>
|
||||
Ben Coe <bencoe@gmail.com>
|
||||
|
@ -319,12 +319,12 @@ Reject(JSAny) {
|
||||
transitioning macro GeneratePromiseAll<F1: type, F2: type>(
|
||||
implicit context: Context)(
|
||||
receiver: JSAny, iterable: JSAny, createResolveElementFunctor: F1,
|
||||
createRejectElementFunctor: F2): JSAny {
|
||||
createRejectElementFunctor: F2, message: constexpr string): JSAny {
|
||||
const nativeContext = LoadNativeContext(context);
|
||||
// Let C be the this value.
|
||||
// If Type(C) is not Object, throw a TypeError exception.
|
||||
const receiver = Cast<JSReceiver>(receiver)
|
||||
otherwise ThrowTypeError(MessageTemplate::kCalledOnNonObject, 'Promise.all');
|
||||
otherwise ThrowTypeError(MessageTemplate::kCalledOnNonObject, message);
|
||||
|
||||
// Let promiseCapability be ? NewPromiseCapability(C).
|
||||
// Don't fire debugEvent so that forwarding the rejection through all does
|
||||
@ -368,7 +368,7 @@ transitioning javascript builtin PromiseAll(
|
||||
js-implicit context: Context, receiver: JSAny)(iterable: JSAny): JSAny {
|
||||
return GeneratePromiseAll(
|
||||
receiver, iterable, PromiseAllResolveElementFunctor{},
|
||||
PromiseAllRejectElementFunctor{});
|
||||
PromiseAllRejectElementFunctor{}, 'Promise.all');
|
||||
}
|
||||
|
||||
// ES#sec-promise.allsettled
|
||||
@ -377,7 +377,7 @@ transitioning javascript builtin PromiseAllSettled(
|
||||
js-implicit context: Context, receiver: JSAny)(iterable: JSAny): JSAny {
|
||||
return GeneratePromiseAll(
|
||||
receiver, iterable, PromiseAllSettledResolveElementFunctor{},
|
||||
PromiseAllSettledRejectElementFunctor{});
|
||||
PromiseAllSettledRejectElementFunctor{}, 'Promise.allSettled');
|
||||
}
|
||||
|
||||
extern macro PromiseAllResolveElementSharedFunConstant(): SharedFunctionInfo;
|
||||
|
@ -525,27 +525,27 @@ KNOWN_OBJECTS = {
|
||||
("old_space", 0x04ac9): "StringSplitCache",
|
||||
("old_space", 0x04ed1): "RegExpMultipleCache",
|
||||
("old_space", 0x052d9): "BuiltinsConstantsTable",
|
||||
("old_space", 0x05701): "AsyncFunctionAwaitRejectSharedFun",
|
||||
("old_space", 0x05725): "AsyncFunctionAwaitResolveSharedFun",
|
||||
("old_space", 0x05749): "AsyncGeneratorAwaitRejectSharedFun",
|
||||
("old_space", 0x0576d): "AsyncGeneratorAwaitResolveSharedFun",
|
||||
("old_space", 0x05791): "AsyncGeneratorYieldResolveSharedFun",
|
||||
("old_space", 0x057b5): "AsyncGeneratorReturnResolveSharedFun",
|
||||
("old_space", 0x057d9): "AsyncGeneratorReturnClosedRejectSharedFun",
|
||||
("old_space", 0x057fd): "AsyncGeneratorReturnClosedResolveSharedFun",
|
||||
("old_space", 0x05821): "AsyncIteratorValueUnwrapSharedFun",
|
||||
("old_space", 0x05845): "PromiseAllResolveElementSharedFun",
|
||||
("old_space", 0x05869): "PromiseAllSettledResolveElementSharedFun",
|
||||
("old_space", 0x0588d): "PromiseAllSettledRejectElementSharedFun",
|
||||
("old_space", 0x058b1): "PromiseAnyRejectElementSharedFun",
|
||||
("old_space", 0x058d5): "PromiseCapabilityDefaultRejectSharedFun",
|
||||
("old_space", 0x058f9): "PromiseCapabilityDefaultResolveSharedFun",
|
||||
("old_space", 0x0591d): "PromiseCatchFinallySharedFun",
|
||||
("old_space", 0x05941): "PromiseGetCapabilitiesExecutorSharedFun",
|
||||
("old_space", 0x05965): "PromiseThenFinallySharedFun",
|
||||
("old_space", 0x05989): "PromiseThrowerFinallySharedFun",
|
||||
("old_space", 0x059ad): "PromiseValueThunkFinallySharedFun",
|
||||
("old_space", 0x059d1): "ProxyRevokeSharedFun",
|
||||
("old_space", 0x05705): "AsyncFunctionAwaitRejectSharedFun",
|
||||
("old_space", 0x05729): "AsyncFunctionAwaitResolveSharedFun",
|
||||
("old_space", 0x0574d): "AsyncGeneratorAwaitRejectSharedFun",
|
||||
("old_space", 0x05771): "AsyncGeneratorAwaitResolveSharedFun",
|
||||
("old_space", 0x05795): "AsyncGeneratorYieldResolveSharedFun",
|
||||
("old_space", 0x057b9): "AsyncGeneratorReturnResolveSharedFun",
|
||||
("old_space", 0x057dd): "AsyncGeneratorReturnClosedRejectSharedFun",
|
||||
("old_space", 0x05801): "AsyncGeneratorReturnClosedResolveSharedFun",
|
||||
("old_space", 0x05825): "AsyncIteratorValueUnwrapSharedFun",
|
||||
("old_space", 0x05849): "PromiseAllResolveElementSharedFun",
|
||||
("old_space", 0x0586d): "PromiseAllSettledResolveElementSharedFun",
|
||||
("old_space", 0x05891): "PromiseAllSettledRejectElementSharedFun",
|
||||
("old_space", 0x058b5): "PromiseAnyRejectElementSharedFun",
|
||||
("old_space", 0x058d9): "PromiseCapabilityDefaultRejectSharedFun",
|
||||
("old_space", 0x058fd): "PromiseCapabilityDefaultResolveSharedFun",
|
||||
("old_space", 0x05921): "PromiseCatchFinallySharedFun",
|
||||
("old_space", 0x05945): "PromiseGetCapabilitiesExecutorSharedFun",
|
||||
("old_space", 0x05969): "PromiseThenFinallySharedFun",
|
||||
("old_space", 0x0598d): "PromiseThrowerFinallySharedFun",
|
||||
("old_space", 0x059b1): "PromiseValueThunkFinallySharedFun",
|
||||
("old_space", 0x059d5): "ProxyRevokeSharedFun",
|
||||
}
|
||||
|
||||
# Lower 32 bits of first page addresses for various heap spaces.
|
||||
|
Loading…
Reference in New Issue
Block a user