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

Function getTypedArrayType

valdi/src/valdi/hermes/HermesJavaScriptContext.cpp:942–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940
941 hermes::vm::ScopedNativeCallFrame callFrame(*_runtime,
942 static_cast<uint32_t>(callContext.getParameterSize()),
943 handle.getHermesValue(),
944 handle.getHermesValue(),
945 objHandle.getHermesValue());
946
947 auto callResult = doCall(callFrame, handle, callContext);
948
949 if (!checkException(callResult.getStatus(), callContext.getExceptionTracker())) {
950 return newUndefined();
951 }
952
953 auto resultValue = callResult->get();
954 return toJSValueRef(resultValue.isObject() ? resultValue : objHandle.getHermesValue());
955}
956
957void HermesJavaScriptContext::visitObjectPropertyNames(const JSValue& object,
958 JSExceptionTracker& exceptionTracker,
959 IJavaScriptPropertyNamesVisitor& visitor) {
960 hermes::vm::GCScope gcScope(*_runtime);
961 auto jsObject = toJSObject(object, exceptionTracker);
962 if (!jsObject) {
963 return;
964 }
965
966 uint32_t beginIndex;
967 uint32_t endIndex;
968 auto result = hermes::vm::getForInPropertyNames(*_runtime, std::move(jsObject), beginIndex, endIndex);

Callers 1

valueToTypedArrayMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected