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

Function jsArrayGetLength

valdi/src/valdi/runtime/JavaScript/JavaScriptUtils.cpp:481–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479 const ReferenceInfoBuilder& referenceInfoBuilder,
480 JSExceptionTracker& exceptionTracker) {
481 auto* valueMarshaller = jsContext.getValueMarshaller();
482
483 if (valueMarshaller == nullptr) {
484 return untypedJsObjectToValue(jsContext, jsValue, referenceInfoBuilder, exceptionTracker);
485 }
486
487 auto output = valueMarshaller->tryUnwrap(jsValue, exceptionTracker);
488 if (!exceptionTracker) {
489 return output;
490 }
491
492 if (output.isUndefined()) {
493 // No proxy objects found in the object, marshall as a plain map

Callers 6

jsArrayToValueFunction · 0.85
newArrayIteratorMethod · 0.85
setProtobufRepeatedFieldFunction · 0.85
getMessageIndexesFunction · 0.85
codepointsToStrMethod · 0.85

Calls 4

getPropertyNameCachedMethod · 0.80
getMethod · 0.65
getObjectPropertyMethod · 0.45
valueToIntMethod · 0.45

Tested by

no test coverage detected