mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1202526 (part 4) - Avoid PL_DHashTableRawRemove() in nsPropertyTable. r=bz.
This assumes that it's safe to possibly shrink the table after the removal, i.e. there are no surprising subtleties with how this table is managed.
This commit is contained in:
parent
2b8f96d446
commit
1cdf909da8
@ -107,7 +107,7 @@ nsPropertyTable::TransferOrDeleteAllPropertiesFor(nsPropertyOwner aObject,
|
||||
break;
|
||||
}
|
||||
|
||||
PL_DHashTableRawRemove(&prop->mObjectValueMap, entry);
|
||||
prop->mObjectValueMap.RemoveEntry(entry);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -164,7 +164,7 @@ nsPropertyTable::GetPropertyInternal(nsPropertyOwner aObject,
|
||||
propValue = entry->value;
|
||||
if (aRemove) {
|
||||
// don't call propertyList->mDtorFunc. That's the caller's job now.
|
||||
PL_DHashTableRawRemove(&propertyList->mObjectValueMap, entry);
|
||||
propertyList->mObjectValueMap.RemoveEntry(entry);
|
||||
}
|
||||
rv = NS_OK;
|
||||
}
|
||||
@ -301,7 +301,7 @@ nsPropertyTable::PropertyList::DeletePropertyFor(nsPropertyOwner aObject)
|
||||
return false;
|
||||
|
||||
void* value = entry->value;
|
||||
PL_DHashTableRawRemove(&mObjectValueMap, entry);
|
||||
mObjectValueMap.RemoveEntry(entry);
|
||||
|
||||
if (mDtorFunc)
|
||||
mDtorFunc(const_cast<void*>(aObject.get()), mName, value, mDtorData);
|
||||
|
Loading…
Reference in New Issue
Block a user