MCPcopy Create free account
hub / github.com/Snapchat/Valdi / operator()

Method operator()

valdi/src/valdi/runtime/JavaScript/JSPromise.cpp:27–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25JSPromiseCancel::~JSPromiseCancel() = default;
26
27JSValueRef 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
36void JSPromiseCancel::attachToJSPromise(IJavaScriptContext& jsContext,
37 const JSValue& jsPromise,

Callers

nothing calls this directly

Calls 7

newUndefinedMethod · 0.80
getParameterMethod · 0.80
cancelMethod · 0.65
lockMethod · 0.45
getContextMethod · 0.45
onFailureMethod · 0.45

Tested by

no test coverage detected