Implement Promise.allSettled
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 May 2019 21:28:09 +0000 (21:28 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 May 2019 21:28:09 +0000 (21:28 +0000)
commitc03edcca84e3c67ecf28edc46edc6a662bf69c04
treeb523e20e4e0963353e5f210ae4abfd1c04d418ea
parent78e7664f3029724d27ee19a0d68b15d90b4a65ad
Implement Promise.allSettled
https://bugs.webkit.org/show_bug.cgi?id=197600
<rdar://problem/50483885>

Reviewed by Keith Miller.

JSTests:

Start testing Promise.allSettled. We pass most of the tests.
The ones that fail are similar to the Promise.all tests we already fail.

* test262/config.yaml: Remove Promise.allSettled from skipped tests.
* test262/expectations.yaml: Add new expectations for allSettled tests.

Source/JavaScriptCore:

Implement Promise.allSettled
https://github.com/tc39/proposal-promise-allSettled/

Shipping in Firefox since version 68.
Shipping in V8 since https://chromium.googlesource.com/v8/v8.git/+/1f6d27e8df819b448712dface6ad367fb8de426b

* builtins/PromiseConstructor.js:
(allSettled.newResolveRejectElements.resolveElement):
(allSettled.newResolveRejectElements.rejectElement):
(allSettled.newResolveRejectElements):
(allSettled): Added.
* runtime/JSPromiseConstructor.cpp: Add ref to allSettled.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/test262/config.yaml
JSTests/test262/expectations.yaml
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/PromiseConstructor.js
Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp