MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxOnThenable

Function fxOnThenable

xs/sources/xsPromise.c:558–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558void fxOnThenable(txMachine* the)
559{
560 txSlot* resolveFunction = mxArgv(0);
561 txSlot* rejectFunction = mxArgv(1);
562 txSlot* thenFunction = mxArgv(2);
563 mxTry(the) {
564 /* THIS */
565 mxPushSlot(mxThis);
566 /* FUNCTION */
567 mxPushSlot(thenFunction);
568 mxCall();
569 /* ARGUMENTS */
570 mxPushSlot(resolveFunction);
571 mxPushSlot(rejectFunction);
572 mxRunCount(2);
573 mxPop();
574 }
575 mxCatch(the) {
576 fxRejectException(the, rejectFunction);
577 }
578}
579
580void fxPromiseThen(txMachine* the, txSlot* promise, txSlot* onFullfilled, txSlot* onRejected, txSlot* resolveFunction, txSlot* rejectFunction)
581{

Callers

nothing calls this directly

Calls 1

fxRejectExceptionFunction · 0.85

Tested by

no test coverage detected