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

Function SetArrayBufferToOutValue

unity/native_src/Src/Puerts.cpp:356–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356V8_EXPORT void SetArrayBufferToOutValue(v8::Isolate* Isolate, v8::Value *Value, unsigned char *Bytes, int Length)
357{
358 if (Value->IsObject())
359 {
360 auto Context = Isolate->GetCurrentContext();
361 auto Outer = Value->ToObject(Context).ToLocalChecked();
362 v8::Local<v8::ArrayBuffer> Ab = puerts::NewArrayBuffer(Isolate, Bytes, Length);
363 auto ReturnVal = Outer->Set(Context, FV8Utils::V8String(Isolate, "value"), Ab);
364 }
365}
366
367V8_EXPORT void *GetObjectFromValue(v8::Isolate* Isolate, v8::Value *Value, int IsOut)
368{

Callers

nothing calls this directly

Calls 5

NewArrayBufferFunction · 0.85
IsObjectMethod · 0.80
ToObjectMethod · 0.80
ToLocalCheckedMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected