Skip to content

Commit

Permalink
[unreal]mixin要同步子类TakeJsObjectRef的设置,而不是true才同步
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Feb 21, 2024
1 parent 04a27ff commit 3d5454a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4320,14 +4320,11 @@ void FJsEnvImpl::Mixin(const v8::FunctionCallbackInfo<v8::Value>& Info)
bool IsReuseTemplate = false;
auto StructWrapper = GetStructWrapper(New, IsReuseTemplate);
StructWrapper->IsNativeTakeJsRef = TakeJsObjectRef;
if (TakeJsObjectRef)
for (auto& KV : TypeToTemplateInfoMap)
{
for (auto& KV : TypeToTemplateInfoMap)
if (New != KV.Key && KV.Key->IsChildOf(New))
{
if (New != KV.Key && KV.Key->IsChildOf(New))
{
KV.Value.StructWrapper->IsNativeTakeJsRef = true;
}
KV.Value.StructWrapper->IsNativeTakeJsRef = TakeJsObjectRef;
}
}
Info.GetReturnValue().Set(FindOrAdd(Isolate, Context, New->GetClass(), New));
Expand Down

0 comments on commit 3d5454a

Please sign in to comment.