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

Method valueToStaticString

valdi/src/valdi/hermes/HermesJavaScriptContext.cpp:828–844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826
827 auto symbolId = toSymbolID(propertyName);
828
829 if (enumerable) {
830 auto result = hermes::vm::JSObject::putNamedOrIndexed(std::move(jsObject),
831 *_runtime,
832 symbolId.get(),
833 toHandle(propertyValue),
834 hermes::vm::PropOpFlags().plusThrowOnError());
835
836 checkException(result.getStatus(), exceptionTracker);
837 } else {
838 auto result =
839 hermes::vm::JSObject::defineOwnProperty(std::move(jsObject),
840 *_runtime,
841 symbolId.get(),
842 hermes::vm::DefinePropertyFlags::getNewNonEnumerableFlags(),
843 toHandle(propertyValue));
844 checkException(result.getStatus(), exceptionTracker);
845 }
846}
847

Callers

nothing calls this directly

Calls 4

getStatusMethod · 0.80
toStringFunction · 0.70
getValueMethod · 0.65
lengthMethod · 0.45

Tested by

no test coverage detected