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

Method startDebugger

valdi/src/valdi/jscore/JavaScriptCoreContext.cpp:985–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

983 size_t byteOffset = 0;
984 if (type != kJSTypedArrayTypeArrayBuffer) {
985 bufferSize = JSObjectGetTypedArrayByteLength(contextRef, objectRef, &exception);
986 if (exception != nullptr) {
987 storeException(exceptionTracker, exception);
988 return Valdi::JSTypedArray();
989 }
990
991 byteOffset = JSObjectGetTypedArrayByteOffset(contextRef, objectRef, &exception);
992 if (exception != nullptr) {
993 storeException(exceptionTracker, exception);
994 return Valdi::JSTypedArray();
995 }
996 } else {
997 bufferSize = JSObjectGetArrayBufferByteLength(contextRef, arrayBufferRef, &exception);
998 if (exception != nullptr) {
999 storeException(exceptionTracker, exception);
1000 return Valdi::JSTypedArray();
1001 }
1002 }
1003
1004 // The Valdi TypedArray enum matches JSCore's kJSTypedArrayType
1005 auto arrayType = static_cast<Valdi::TypedArrayType>(type);
1006
1007 auto bufferStart = reinterpret_cast<Valdi::Byte*>(tempBuffer) + byteOffset;
1008

Callers

nothing calls this directly

Calls 3

getInternalPortMethod · 0.80
getExternalPortMethod · 0.80

Tested by

no test coverage detected