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

Function jsValueToFunction

valdi/src/valdi/runtime/JavaScript/JavaScriptUtils.cpp:669–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

667 if (!exceptionTracker) {
668 return nullptr;
669 }
670
671 if (callableValueFunction != nullptr) {
672 // Unwrap the converted function if it is one
673 return callableValueFunction->getFunction(jsContext, exceptionTracker, false);
674 }
675
676 // Otherwise we create a bridged function
677 auto valueFunction = factory(jsContext, jsValue, referenceInfoBuilder.asFunction().build(), exceptionTracker);
678 if (valueFunction != nullptr) {

Callers 3

TEST_PFunction · 0.85
getGlobalOnMessageFunction · 0.85

Calls 4

throwInvalidTypeFunction · 0.85
jsFunctionToFunctionFunction · 0.85
isValueFunctionMethod · 0.45

Tested by 1

TEST_PFunction · 0.68