зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
9a0ec7b3f4
Коммит
dc1d9c7902
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче