WebKit Bugzilla
Attachment 369095 Details for
Bug 197600
: Implement Promise.allSettled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
bug-197600-20190506083358.patch (text/plain), 2.74 KB, created by
Dean Jackson
on 2019-05-05 15:33:59 PDT
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Dean Jackson
Created:
2019-05-05 15:33:59 PDT
Size:
2.74 KB
patch
obsolete
>Subversion Revision: 244950 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 7d960395584de6aa830c033c9f0c21d4162c62f6..ecadb9aa9ccd0c8d0ece8d9b795ca18a53f9bc60 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-05-05 Dean Jackson <dino@apple.com> >+ >+ Implement Promise.allSettled >+ https://bugs.webkit.org/show_bug.cgi?id=197600 >+ <rdar://problem/50483885> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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): Added. >+ * runtime/JSPromiseConstructor.cpp: Add ref to allSettled. >+ > 2019-05-04 Tadeu Zagallo <tzagallo@apple.com> > > TypedArrays should not store properties that are canonical numeric indices >diff --git a/Source/JavaScriptCore/builtins/PromiseConstructor.js b/Source/JavaScriptCore/builtins/PromiseConstructor.js >index b13d146b7796cbd1ca476c124001ea536bce9588..1458b8805c1964623b8ae282748858091f20c0b4 100644 >--- a/Source/JavaScriptCore/builtins/PromiseConstructor.js >+++ b/Source/JavaScriptCore/builtins/PromiseConstructor.js >@@ -75,6 +75,25 @@ function all(iterable) > return promiseCapability.@promise; > } > >+function allSettled(iterable) >+{ >+ "use strict"; >+ >+ if (!@isObject(this)) >+ @throwTypeError("|this| is not a object"); >+ >+ var promiseCapability = @newPromiseCapability(this); >+ >+ return promiseCapability.@all.@call(@undefined, @Array.@from(iterable, function (item) { >+ var itemPromise = promiseCapability.@resolve.@call(@undefined, item); >+ return itemPromise.then(function (value) { >+ return { status: 'fulfilled', value }; >+ }, function (reason) { >+ return { status: 'rejected', reason }; >+ }); >+ })); >+} >+ > function race(iterable) > { > "use strict"; >diff --git a/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp b/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp >index 74177c4b6a2556df21172317d1a5a5c4ba9282dc..053fed21cac809037d341905fc318fe11940913f 100644 >--- a/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp >+++ b/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp >@@ -57,6 +57,7 @@ const ClassInfo JSPromiseConstructor::s_info = { "Function", &Base::s_info, &pro > reject JSBuiltin DontEnum|Function 1 > race JSBuiltin DontEnum|Function 1 > all JSBuiltin DontEnum|Function 1 >+ allSettled JSBuiltin DontEnum|Function 1 > @end > */ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197600
:
369095
|
369096
|
369149
|
369161
|
370789