Improve terminology for internal promise state
Per the spec [1], a resolved promise may be “pending, fulfilled, or rejected”, but previously V8 incorrectly used the term “resolved” instead of “fulfilled”. This change is user-observable through the `d8` REPL and the DevTools Console. Corresponding DevTools CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2141673 Corresponding Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/2144095 [1]: https://tc39.es/ecma262/#sec-properties-of-promise-instances Bug: v8:6751, v8:5416 Change-Id: I6c5302c280d01cf681c6358add3d2e88fbffa36f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2144011 Commit-Queue: Mathias Bynens <mathias@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#67086}
This commit is contained in:
parent
e24b8bf751
commit
93b4f186dd
@ -5889,7 +5889,7 @@ void JSPromise::set_status(Promise::PromiseState status) {
|
||||
const char* JSPromise::Status(v8::Promise::PromiseState status) {
|
||||
switch (status) {
|
||||
case v8::Promise::kFulfilled:
|
||||
return "resolved";
|
||||
return "fulfilled";
|
||||
case v8::Promise::kPending:
|
||||
return "pending";
|
||||
case v8::Promise::kRejected:
|
||||
|
@ -42,7 +42,7 @@ expression: Promise.resolve(42)
|
||||
{
|
||||
name : [[PromiseStatus]]
|
||||
type : string
|
||||
value : resolved
|
||||
value : fulfilled
|
||||
}
|
||||
{
|
||||
name : [[PromiseValue]]
|
||||
@ -251,7 +251,7 @@ expression: Promise.resolve(42)
|
||||
{
|
||||
name : [[PromiseStatus]]
|
||||
type : string
|
||||
value : resolved
|
||||
value : fulfilled
|
||||
}
|
||||
{
|
||||
name : [[PromiseValue]]
|
||||
|
@ -163,7 +163,7 @@ expression: Promise.resolve(42)
|
||||
name : [[PromiseStatus]]
|
||||
value : {
|
||||
type : string
|
||||
value : resolved
|
||||
value : fulfilled
|
||||
}
|
||||
}
|
||||
[1] : {
|
||||
|
@ -1567,7 +1567,7 @@ Running test: testPromise
|
||||
[0] : {
|
||||
name : [[PromiseStatus]]
|
||||
type : string
|
||||
value : resolved
|
||||
value : fulfilled
|
||||
}
|
||||
[1] : {
|
||||
name : [[PromiseValue]]
|
||||
|
Loading…
Reference in New Issue
Block a user