This snuck in as part of my previous ConditionalWeakTable changes. We don't need the secondary here, and it's more expensive to get than just the primary.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4a5647ee5c5e04484c7211bcac7249d35e290977
DependentHandle depHnd = _entries[entriesIndex].depHnd;
if (hashCode != -1 && depHnd.IsAllocated)
{
- object primary, secondary;
- depHnd.GetPrimaryAndSecondary(out primary, out secondary);
- if (primary != null)
+ if (depHnd.GetPrimary() != null)
{
// Entry is used and has not expired. Link it into the appropriate bucket list.
newEntries[newEntriesIndex].HashCode = hashCode;