MCPcopy Index your code
hub / github.com/nodejs/node / jobPromiseThen

Function jobPromiseThen

lib/internal/crypto/util.js:780–792  ·  view source on GitHub ↗
(promise, onFulfilled, onRejected)

Source from the content-addressed store, hash-verified

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.
780function 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

Callers 6

deriveKeyImplFunction · 0.85
unwrapKeyImplFunction · 0.85
encapsulateKeyImplFunction · 0.85
decapsulateKeyImplFunction · 0.85
asyncDigestFunction · 0.85
ecdhDeriveBitsFunction · 0.85

Calls 2

setOwnPropertyFunction · 0.85
settleJobPromiseFunction · 0.85

Tested by

no test coverage detected