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

Method getObjectProperty

valdi/src/valdi/v8/V8JavaScriptContext.cpp:526–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524 if (!local->IsArrayBuffer() && !local->IsSharedArrayBuffer()) {
525 exceptionTracker.onError("Cannot create typed array since provided object is not arraybuffer");
526 return JSValueRef();
527 }
528
529 auto arrayBufferUnpacked = v8::Local<v8::ArrayBuffer>::Cast(local);
530 const auto byteLength = arrayBufferUnpacked->ByteLength();
531 switch (type) {
532 case Int8Array: {
533 retval = v8::Int8Array::New(arrayBufferUnpacked, 0, byteLength / sizeof(int8_t));
534 } break;

Callers 1

mainFunction · 0.45

Calls 8

ToLocalMethod · 0.80
fromValdiJSValueFunction · 0.70
fromValdiJSPropertyNameFunction · 0.70
getMethod · 0.65
onErrorMethod · 0.65
CastFunction · 0.50
NewFunction · 0.50
GetMethod · 0.45

Tested by

no test coverage detected