| 78 | CHECK_JSRT_ERROR_CODE(JsGetProperty(global, promiseConstructorId, &promiseConstructor)); |
| 79 | |
| 80 | struct CallbackStruct { |
| 81 | static JsValueRef CALLBACK Callback(JsValueRef callee, bool isConstructCall, JsValueRef* arguments, unsigned short argumentCount, void* callbackState) { |
| 82 | return (reinterpret_cast<CallbackStruct*>(callbackState))->Callback(callee, isConstructCall, arguments, argumentCount); |
| 83 | } |
| 84 | |
| 85 | JsValueRef Callback(JsValueRef callee, bool isConstructCall, JsValueRef* arguments, unsigned short argumentCount) { |
| 86 | *resolve = arguments[1]; |
| 87 | *reject = arguments[2]; |
| 88 | |
| 89 | return JS_INVALID_REFERENCE; |
| 90 | } |
| 91 | |
| 92 | JsValueRef* resolve{}; |
| 93 | JsValueRef* reject{}; |
| 94 | } cbs{ resolve, reject }; |
| 95 | |
| 96 | JsValueRef callbackFunction{}; |
| 97 | CHECK_JSRT_ERROR_CODE(JsCreateFunction(&CallbackStruct::Callback, &cbs, &callbackFunction)); |
nothing calls this directly
no outgoing calls
no test coverage detected