| 25 | JSPromiseCancel::~JSPromiseCancel() = default; |
| 26 | |
| 27 | JSValueRef JSPromiseCancel::operator()(JSFunctionNativeCallContext& callContext) noexcept { |
| 28 | auto promise = _promise.lock(); |
| 29 | if (promise != nullptr) { |
| 30 | promise->cancel(); |
| 31 | } |
| 32 | |
| 33 | return callContext.getContext().newUndefined(); |
| 34 | } |
| 35 | |
| 36 | void JSPromiseCancel::attachToJSPromise(IJavaScriptContext& jsContext, |
| 37 | const JSValue& jsPromise, |
nothing calls this directly
no test coverage detected