MCPcopy Create free account
hub / github.com/Tencent/puerts / NewArrayBuffer

Function NewArrayBuffer

unity/native_src/Src/JSEngine.cpp:16–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14namespace puerts
15{
16 v8::Local<v8::ArrayBuffer> NewArrayBuffer(v8::Isolate* Isolate, void *Ptr, size_t Size)
17 {
18 v8::Local<v8::ArrayBuffer> Ab = v8::ArrayBuffer::New(Isolate, Size);
19 void* Buff = Ab->GetContents().Data();
20 ::memcpy(Buff, Ptr, Size);
21 return Ab;
22 }
23
24 static void EvalWithPath(const v8::FunctionCallbackInfo<v8::Value>& Info)
25 {

Callers 3

SetArrayBufferToOutValueFunction · 0.85
ReturnArrayBufferFunction · 0.85

Calls 3

NewFunction · 0.85
GetContentsMethod · 0.80
DataMethod · 0.45

Tested by

no test coverage detected