Skip to content

Commit

Permalink
Fixed a problem where some type's token hash was not properly cached
Browse files Browse the repository at this point in the history
  • Loading branch information
liiir1985 committed Aug 12, 2020
1 parent 8b910a8 commit 43db587
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ILRuntime/Runtime/Enviorment/AppDomain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ internal IType GetType(object token, IType contextType, IMethod contextMethod)
if (valid)
{
mapTypeToken[hash] = res;
mapTypeToken[res.GetHashCode()] = res;
if (!string.IsNullOrEmpty(res.FullName))
mapType[res.FullName] = res;
}
Expand All @@ -786,10 +787,8 @@ internal IType GetType(object token, IType contextType, IMethod contextMethod)
}
mapTypeToken[hash] = res;
}
else
{
mapTypeToken[res.GetHashCode()] = res;
}
mapTypeToken[res.GetHashCode()] = res;

if (!string.IsNullOrEmpty(res.FullName))
mapType[res.FullName] = res;
return res;
Expand Down

0 comments on commit 43db587

Please sign in to comment.