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

Method valueToFunction

valdi/src/valdi/jscore/JavaScriptCoreContext.cpp:591–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589 return Valdi::JSValueRef();
590 }
591
592 auto defineDataProperty = [&](JSObjectRef object,
593 std::string_view name,
594 const Valdi::JSValue& value,
595 bool writable,
596 bool enumerable,
597 bool configurable) -> bool {
598 auto propertyName = newPropertyName(name);
599 JSValueRef exception = nullptr;
600 JSObjectSetProperty(getJSGlobalContext(),
601 object,
602 fromValdiJSPropertyName(propertyName.get()),
603 fromValdiJSValue(value).valueRef,
604 toJSCorePropertyAttributes(writable, enumerable, configurable),
605 &exception);
606 if (exception != nullptr) {
607 storeException(exceptionTracker, exception);

Callers

nothing calls this directly

Calls 3

asObjectRefMethod · 0.80
fromValdiJSValueFunction · 0.70

Tested by

no test coverage detected