(promise, onFulfilled, onRejected)
| 778 | // promise's species. These promises are internal WebCrypto intermediates, so |
| 779 | // make that lookup stay on the promise itself instead of user-mutated state. |
| 780 | function jobPromiseThen(promise, onFulfilled, onRejected) { |
| 781 | const { |
| 782 | promise: resultPromise, |
| 783 | resolve, |
| 784 | reject, |
| 785 | } = PromiseWithResolvers(); |
| 786 | setOwnProperty(promise, 'constructor', undefined); |
| 787 | PromisePrototypeThen( |
| 788 | promise, |
| 789 | (value) => settleJobPromise(onFulfilled, resolve, reject, value, false), |
| 790 | (value) => settleJobPromise(onRejected, resolve, reject, value, true)); |
| 791 | return resultPromise; |
| 792 | } |
| 793 | |
| 794 | // In WebCrypto, the publicExponent option in RSA is represented as a |
| 795 | // WebIDL "BigInteger"... that is, a Uint8Array that allows an arbitrary |
no test coverage detected