MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getFromJSPromise

Method getFromJSPromise

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

Source from the content-addressed store, hash-verified

46}
47
48JSValueRef JSPromiseCancel::getFromJSPromise(IJavaScriptContext& jsContext,
49 const JSValue& jsPromise,
50 JSExceptionTracker& exceptionTracker) {
51 if (!jsContext.isValueObject(jsPromise)) {
52 return jsContext.newUndefined();
53 }
54
55 return jsContext.getObjectProperty(jsPromise, getCancelPropertyKey(jsContext), exceptionTracker);
56}
57
58bool JSPromiseCancel::isJSPromiseCancelable(IJavaScriptContext& jsContext, const JSValue& jsPromise) {
59 return jsContext.hasObjectProperty(jsPromise, getCancelPropertyKey(jsContext));

Callers

nothing calls this directly

Calls 4

getCancelPropertyKeyFunction · 0.85
newUndefinedMethod · 0.80
isValueObjectMethod · 0.45
getObjectPropertyMethod · 0.45

Tested by

no test coverage detected