Skip to content

Commit

Permalink
[unreal]处理内存重用导致的Check failed: Handle not reset in first callback. Se…
Browse files Browse the repository at this point in the history
…e comments on |v8::WeakCallbackInfo| fix #1930
  • Loading branch information
chexiongsheng committed Dec 3, 2024
1 parent 8815721 commit 88c3ab3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion unreal/Puerts/Source/JsEnv/Private/CppObjectMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void FCppObjectMapper::BindCppObject(
FObjectCacheNode* CacheNodePtr;
if (Iter != CDataCache.end())
{
CacheNodePtr = Iter->second.Add(ClassDefinition->TypeId);
CacheNodePtr = &Iter->second;
}
else
{
Expand Down
6 changes: 1 addition & 5 deletions unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2913,11 +2913,7 @@ void FJsEnvImpl::BindStruct(
}
#endif
auto CacheNodePtr = StructCache.Find(Ptr);
if (CacheNodePtr)
{
CacheNodePtr = CacheNodePtr->Add(ScriptStructWrapper->Struct.Get());
}
else
if (!CacheNodePtr)
{
CacheNodePtr = &StructCache.Emplace(Ptr, FObjectCacheNode(ScriptStructWrapper->Struct.Get()));
}
Expand Down

0 comments on commit 88c3ab3

Please sign in to comment.