| 1033 | } |
| 1034 | |
| 1035 | void fxLoadModulesPromise(txMachine* the, txSlot* queue, txSlot* module, txSlot* promise, txCallback fulfilled, txCallback rejected) |
| 1036 | { |
| 1037 | txSlot* function; |
| 1038 | txSlot* home; |
| 1039 | txSlot* resolveLoadFunction; |
| 1040 | txSlot* rejectLoadFunction; |
| 1041 | |
| 1042 | mxPushUndefined(); |
| 1043 | mxPush(mxPromiseConstructor); |
| 1044 | mxPushSlot(promise); |
| 1045 | fx_Promise_resolveAux(the); |
| 1046 | mxPop(); |
| 1047 | mxPop(); |
| 1048 | promise = the->stack; |
| 1049 | |
| 1050 | function = fxNewHostFunction(the, fulfilled, 1, XS_NO_ID, mxLoadModulesFulfilledProfileID); |
| 1051 | home = mxFunctionInstanceHome(function); |
| 1052 | home->value.home.object = queue; |
| 1053 | home->value.home.module = module->value.reference; |
| 1054 | resolveLoadFunction = the->stack; |
| 1055 | |
| 1056 | function = fxNewHostFunction(the, rejected, 1, XS_NO_ID, mxLoadModulesRejectedProfileID); |
| 1057 | home = mxFunctionInstanceHome(function); |
| 1058 | home->value.home.object = queue; |
| 1059 | home->value.home.module = module->value.reference; |
| 1060 | rejectLoadFunction = the->stack; |
| 1061 | |
| 1062 | fxPromiseThen(the, promise->value.reference, resolveLoadFunction, rejectLoadFunction, C_NULL, C_NULL); |
| 1063 | |
| 1064 | mxPop(); |
| 1065 | mxPop(); |
| 1066 | } |
| 1067 | |
| 1068 | void fxLoadModules(txMachine* the, txSlot* queue) |
| 1069 | { |
no test coverage detected