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

Method valueToFunction

valdi/src/valdi/quickjs/QuickJSJavaScriptContext.cpp:875–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873void QuickJSJavaScriptContext::setObjectProperty(const Valdi::JSValue& object,
874 const std::string_view& propertyName,
875 const Valdi::JSValue& propertyValue,
876 bool enumerable,
877 Valdi::JSExceptionTracker& exceptionTracker) {
878 auto guard = _threadAccessChecker.guard();
879 // JS_SetProperty() automatically releases the given value.
880 auto retainedJsValue = JS_DupValue(_context, fromValdiJSValue(propertyValue));
881
882 if (VALDI_LIKELY(enumerable)) {

Callers

nothing calls this directly

Calls 4

getObjectCallableFunction · 0.85
guardMethod · 0.80
fromValdiJSValueFunction · 0.70
RefInterface · 0.50

Tested by

no test coverage detected