зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1120476 (part 1) - Avoid using PLDHashTable::data in nsPropertyTable. r=froydnj.
--HG-- extra : rebase_source : bb9749edf5c8e1c0212ea5e4f1f7105d829714c7
This commit is contained in:
Родитель
2d7d331a93
Коммит
79c1bb81e4
|
@ -280,7 +280,7 @@ nsPropertyTable::GetPropertyListFor(nsIAtom* aPropertyName) const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
nsPropertyTable::PropertyList::PropertyList(nsIAtom *aName,
|
||||
NSPropertyDtorFunc aDtorFunc,
|
||||
void *aDtorData,
|
||||
|
@ -291,7 +291,7 @@ nsPropertyTable::PropertyList::PropertyList(nsIAtom *aName,
|
|||
mTransfer(aTransfer),
|
||||
mNext(nullptr)
|
||||
{
|
||||
PL_DHashTableInit(&mObjectValueMap, PL_DHashGetStubOps(), this,
|
||||
PL_DHashTableInit(&mObjectValueMap, PL_DHashGetStubOps(), nullptr,
|
||||
sizeof(PropertyListMapEntry));
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@ DestroyPropertyEnumerator(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
|||
uint32_t number, void *arg)
|
||||
{
|
||||
nsPropertyTable::PropertyList *propList =
|
||||
static_cast<nsPropertyTable::PropertyList*>(table->data);
|
||||
static_cast<nsPropertyTable::PropertyList*>(arg);
|
||||
PropertyListMapEntry* entry = static_cast<PropertyListMapEntry*>(hdr);
|
||||
|
||||
propList->mDtorFunc(const_cast<void*>(entry->key), propList->mName,
|
||||
|
@ -319,8 +319,7 @@ nsPropertyTable::PropertyList::Destroy()
|
|||
{
|
||||
// Enumerate any remaining object/value pairs and destroy the value object
|
||||
if (mDtorFunc)
|
||||
PL_DHashTableEnumerate(&mObjectValueMap, DestroyPropertyEnumerator,
|
||||
nullptr);
|
||||
PL_DHashTableEnumerate(&mObjectValueMap, DestroyPropertyEnumerator, this);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче