mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1182966 - Part 1: Use nsTHashTable::Iterator in DomainSet::CloneSet. r=mrbkap
This commit is contained in:
parent
c69b22011a
commit
c5970e3cbb
@ -246,24 +246,17 @@ DomainSet::GetType(uint32_t* aType)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static
|
||||
PLDHashOperator
|
||||
DomainEnumerator(nsURIHashKey* aEntry, void* aUserArg)
|
||||
{
|
||||
InfallibleTArray<URIParams>* uris = static_cast<InfallibleTArray<URIParams>*>(aUserArg);
|
||||
nsIURI* key = aEntry->GetKey();
|
||||
|
||||
URIParams uri;
|
||||
SerializeURI(key, uri);
|
||||
|
||||
uris->AppendElement(uri);
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
void
|
||||
DomainSet::CloneSet(InfallibleTArray<URIParams>* aDomains)
|
||||
{
|
||||
mHashTable.EnumerateEntries(DomainEnumerator, aDomains);
|
||||
for (auto iter = mHashTable.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsIURI* key = iter.Get()->GetKey();
|
||||
|
||||
URIParams uri;
|
||||
SerializeURI(key, uri);
|
||||
|
||||
aDomains->AppendElement(uri);
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace mozilla */
|
||||
|
Loading…
Reference in New Issue
Block a user