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

Function SetObjectToOutValue

unity/native_src/Src/Puerts.cpp:413–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413V8_EXPORT void SetObjectToOutValue(v8::Isolate* Isolate, v8::Value *Value, int ClassID, void* Ptr)
414{
415 if (Value->IsObject())
416 {
417 auto Context = Isolate->GetCurrentContext();
418 auto Outer = Value->ToObject(Context).ToLocalChecked();
419 auto JsEngine = FV8Utils::IsolateData<JSEngine>(Isolate);
420 auto ReturnVal = Outer->Set(Context, FV8Utils::V8String(Isolate, "value"), JsEngine->FindOrAddObject(Isolate, Context, ClassID, Ptr));
421 }
422}
423
424V8_EXPORT void SetNullToOutValue(v8::Isolate* Isolate, v8::Value *Value)
425{

Callers

nothing calls this directly

Calls 5

IsObjectMethod · 0.80
ToObjectMethod · 0.80
ToLocalCheckedMethod · 0.45
SetMethod · 0.45
FindOrAddObjectMethod · 0.45

Tested by

no test coverage detected