Skip to content

Commit

Permalink
[unreal]将std map替换成tmap后( b823ab9 ),tmap可能会因为插入操作而导致外部查找结果失效
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Jul 7, 2022
1 parent 4fac86b commit d6e3dbf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,9 @@ void FJsEnvImpl::TsConstruct(UTypeScriptGeneratedClass* Class, UObject* Object)
JSObject = FindOrAdd(Isolate, Context, Object->GetClass(), Object)->ToObject(Context).ToLocalChecked();
GeneratedObjectMap.Emplace(Object, v8::UniquePersistent<v8::Value>(MainIsolate, JSObject));
UnBind(Class, Object);

// FindOrAdd may change BindInfoMap, cause a rehash
BindInfoPtr = BindInfoMap.Find(Class);
}
else
{
Expand Down

0 comments on commit d6e3dbf

Please sign in to comment.