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

Method visitObjectPropertyNames

valdi/src/valdi/jscore/JavaScriptCoreContext.cpp:964–983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

962 if (type == kJSTypedArrayTypeNone) {
963 exceptionTracker.onError(Valdi::Error("Object ref must point to a typed array"));
964 return Valdi::JSTypedArray();
965 }
966
967 auto arrayBufferRef = objectRef;
968 if (type != kJSTypedArrayTypeArrayBuffer) {
969 arrayBufferRef = JSObjectGetTypedArrayBuffer(contextRef, objectRef, &exception);
970 if (exception != nullptr) {
971 storeException(exceptionTracker, exception);
972 return Valdi::JSTypedArray();
973 }
974 }
975
976 void* tempBuffer = JSObjectGetArrayBufferBytesPtr(contextRef, arrayBufferRef, &exception);
977 if (exception != nullptr) {
978 storeException(exceptionTracker, exception);
979 return Valdi::JSTypedArray();
980 }
981
982 size_t bufferSize = 0;
983 size_t byteOffset = 0;
984 if (type != kJSTypedArrayTypeArrayBuffer) {
985 bufferSize = JSObjectGetTypedArrayByteLength(contextRef, objectRef, &exception);
986 if (exception != nullptr) {

Callers

nothing calls this directly

Calls 4

asObjectRefOrThrowMethod · 0.80
fromValdiJSValueFunction · 0.70
toValdiJSPropertyNameFunction · 0.70
visitPropertyNameMethod · 0.45

Tested by

no test coverage detected