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

Method setObjectProperty

valdi/src/valdi/jscore/JavaScriptCoreContext.cpp:852–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850 Valdi::JSExceptionTracker& exceptionTracker) {
851 JSValueRef exception = nullptr;
852 auto stringRef = JSValueToStringCopy(getJSGlobalContext(), fromValdiJSValue(value).valueRef, &exception);
853 if (exception != nullptr) {
854 storeException(exceptionTracker, exception);
855 return Valdi::StringBox();
856 }
857
858 auto cppString = jsStringtoStdString(stringRef);
859 JSStringRelease(stringRef);
860 return cppString;
861}
862
863Valdi::Ref<Valdi::StaticString> JavaScriptCoreContext::valueToStaticString(

Callers

nothing calls this directly

Calls 5

toPropertyAttributesFunction · 0.85
asObjectRefOrThrowMethod · 0.80
fromValdiJSValueFunction · 0.70
fromValdiJSPropertyNameFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected