• weinig@apple.com's avatar
    [JS] Implement Promise.all() · 7817ee1e
    weinig@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=126510
    
    Reviewed by Gavin Barraclough.
    
    Source/JavaScriptCore: 
    
    Add Promise.all() implementation and factor out performing resolves and rejects
    on deferreds to share a bit of code. Also moves the abruptRejection helper to
    JSPromiseDeferred so it can be used in JSPromiseFunctions.
    
    * runtime/CommonIdentifiers.h:
    * runtime/JSPromiseConstructor.cpp:
    (JSC::JSPromiseConstructorFuncCast):
    (JSC::JSPromiseConstructorFuncResolve):
    (JSC::JSPromiseConstructorFuncReject):
    (JSC::JSPromiseConstructorFuncAll):
    * runtime/JSPromiseDeferred.cpp:
    (JSC::updateDeferredFromPotentialThenable):
    (JSC::performDeferredResolve):
    (JSC::performDeferredReject):
    (JSC::abruptRejection):
    * runtime/JSPromiseDeferred.h:
    * runtime/JSPromiseFunctions.cpp:
    (JSC::promiseAllCountdownFunction):
    (JSC::createPromiseAllCountdownFunction):
    * runtime/JSPromiseFunctions.h:
    * runtime/JSPromiseReaction.cpp:
    (JSC::ExecutePromiseReactionMicrotask::run):
    
    LayoutTests: 
    
    Enabled and fix the existing Promise.all() test case.
    - Promise.all() and Promise.all({}) should reject by my reading of the spec.
    Also removes the Promise.all() shim used by the crypto tests.
    
    * crypto/subtle/resources/common.js:
    * js/dom/Promise-static-all-expected.txt:
    * js/dom/Promise-static-all.html:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7817ee1e
Name
Last commit
Last update
..
resources Loading commit data...
aes-cbc-192-encrypt-decrypt-expected.txt Loading commit data...
aes-cbc-192-encrypt-decrypt.html Loading commit data...
aes-cbc-256-encrypt-decrypt-expected.txt Loading commit data...
aes-cbc-256-encrypt-decrypt.html Loading commit data...
aes-cbc-encrypt-decrypt-expected.txt Loading commit data...
aes-cbc-encrypt-decrypt-with-padding-expected.txt Loading commit data...
aes-cbc-encrypt-decrypt-with-padding.html Loading commit data...
aes-cbc-encrypt-decrypt.html Loading commit data...
aes-cbc-generate-key-expected.txt Loading commit data...
aes-cbc-generate-key.html Loading commit data...
aes-cbc-import-jwk-expected.txt Loading commit data...
aes-cbc-import-jwk.html Loading commit data...
aes-cbc-invalid-length-expected.txt Loading commit data...
aes-cbc-invalid-length.html Loading commit data...
aes-cbc-unwrap-failure-expected.txt Loading commit data...
aes-cbc-unwrap-failure.html Loading commit data...
aes-cbc-unwrap-rsa-expected.txt Loading commit data...
aes-cbc-unwrap-rsa.html Loading commit data...
aes-cbc-wrap-rsa-expected.txt Loading commit data...
aes-cbc-wrap-rsa-non-extractable-expected.txt Loading commit data...
aes-cbc-wrap-rsa-non-extractable.html Loading commit data...
aes-cbc-wrap-rsa.html Loading commit data...
aes-cbc-wrong-key-class-expected.txt Loading commit data...
aes-cbc-wrong-key-class.html Loading commit data...
aes-export-key-expected.txt Loading commit data...
aes-export-key.html Loading commit data...
aes-kw-key-manipulation-expected.txt Loading commit data...
aes-kw-key-manipulation.html Loading commit data...
aes-kw-wrap-unwrap-aes-expected.txt Loading commit data...
aes-kw-wrap-unwrap-aes.html Loading commit data...
aes-postMessage-expected.txt Loading commit data...
aes-postMessage.html Loading commit data...
argument-conversion-expected.txt Loading commit data...
argument-conversion.html Loading commit data...
gc-2-expected.txt Loading commit data...
gc-2.html Loading commit data...
gc-3-expected.txt Loading commit data...
gc-3.html Loading commit data...
gc-expected.txt Loading commit data...
gc.html Loading commit data...
hmac-check-algorithm-expected.txt Loading commit data...
hmac-check-algorithm.html Loading commit data...
hmac-export-key-expected.txt Loading commit data...
hmac-export-key.html Loading commit data...
hmac-generate-key-expected.txt Loading commit data...
hmac-generate-key.html Loading commit data...
hmac-import-jwk-expected.txt Loading commit data...
hmac-import-jwk.html Loading commit data...
hmac-postMessage-expected.txt Loading commit data...
hmac-postMessage.html Loading commit data...
hmac-sign-verify-empty-key-expected.txt Loading commit data...
hmac-sign-verify-empty-key.html Loading commit data...
hmac-sign-verify-expected.txt Loading commit data...
hmac-sign-verify.html Loading commit data...
import-jwk-expected.txt Loading commit data...
import-jwk.html Loading commit data...
jwk-export-use-values-expected.txt Loading commit data...
jwk-export-use-values.html Loading commit data...
jwk-import-use-values-expected.txt Loading commit data...
jwk-import-use-values.html Loading commit data...
postMessage-worker-expected.txt Loading commit data...
postMessage-worker.html Loading commit data...
rsa-export-key-expected.txt Loading commit data...
rsa-export-key.html Loading commit data...
rsa-export-private-key-expected.txt Loading commit data...
rsa-export-private-key.html Loading commit data...
rsa-oaep-generate-non-extractable-key-expected.txt Loading commit data...
rsa-oaep-generate-non-extractable-key.html Loading commit data...
rsa-oaep-key-manipulation-expected.txt Loading commit data...
rsa-oaep-key-manipulation.html Loading commit data...
rsa-oaep-plaintext-length-expected.txt Loading commit data...
rsa-oaep-plaintext-length.html Loading commit data...
rsa-oaep-wrap-unwrap-aes-expected.txt Loading commit data...
rsa-oaep-wrap-unwrap-aes.html Loading commit data...
rsa-postMessage-expected.txt Loading commit data...
rsa-postMessage.html Loading commit data...
rsaes-pkcs1-v1_5-decrypt-expected.txt Loading commit data...
rsaes-pkcs1-v1_5-decrypt.html Loading commit data...
rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt Loading commit data...
rsaes-pkcs1-v1_5-wrap-unwrap-aes.html Loading commit data...
rsassa-pkcs1-v1_5-generate-key-expected.txt Loading commit data...
rsassa-pkcs1-v1_5-generate-key.html Loading commit data...
rsassa-pkcs1-v1_5-import-jwk-expected.txt Loading commit data...
rsassa-pkcs1-v1_5-import-jwk-small-key-expected.txt Loading commit data...
rsassa-pkcs1-v1_5-import-jwk-small-key.html Loading commit data...
rsassa-pkcs1-v1_5-import-jwk.html Loading commit data...
rsassa-pkcs1-v1_5-sign-verify-expected.txt Loading commit data...
rsassa-pkcs1-v1_5-sign-verify.html Loading commit data...
sha-1-expected.txt Loading commit data...
sha-1.html Loading commit data...
sha-224-expected.txt Loading commit data...
sha-224.html Loading commit data...
sha-256-expected.txt Loading commit data...
sha-256.html Loading commit data...
sha-384-expected.txt Loading commit data...
sha-384.html Loading commit data...
sha-512-expected.txt Loading commit data...
sha-512.html Loading commit data...
unwrapKey-check-usage-expected.txt Loading commit data...
unwrapKey-check-usage.html Loading commit data...
wrapKey-check-usage-expected.txt Loading commit data...
wrapKey-check-usage.html Loading commit data...