mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1186787 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in chrome/ with iterators. r=froydnj.
This commit is contained in:
parent
8d3d29c90a
commit
3f020eb96b
@ -396,26 +396,6 @@ SerializeURI(nsIURI* aURI,
|
||||
aURI->GetOriginCharset(aSerializedURI.charset);
|
||||
}
|
||||
|
||||
static PLDHashOperator
|
||||
EnumerateOverride(nsIURI* aURIKey,
|
||||
nsIURI* aURI,
|
||||
void* aArg)
|
||||
{
|
||||
nsTArray<OverrideMapping>* overrides =
|
||||
static_cast<nsTArray<OverrideMapping>*>(aArg);
|
||||
|
||||
SerializedURI chromeURI, overrideURI;
|
||||
|
||||
SerializeURI(aURIKey, chromeURI);
|
||||
SerializeURI(aURI, overrideURI);
|
||||
|
||||
OverrideMapping override = {
|
||||
chromeURI, overrideURI
|
||||
};
|
||||
overrides->AppendElement(override);
|
||||
return (PLDHashOperator)PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
void
|
||||
nsChromeRegistryChrome::SendRegisteredChrome(
|
||||
mozilla::dom::PContentParent* aParent)
|
||||
@ -447,7 +427,15 @@ nsChromeRegistryChrome::SendRegisteredChrome(
|
||||
rph->CollectSubstitutions(resources);
|
||||
}
|
||||
|
||||
mOverrideTable.EnumerateRead(&EnumerateOverride, &overrides);
|
||||
for (auto iter = mOverrideTable.Iter(); !iter.Done(); iter.Next()) {
|
||||
SerializedURI chromeURI, overrideURI;
|
||||
|
||||
SerializeURI(iter.Key(), chromeURI);
|
||||
SerializeURI(iter.UserData(), overrideURI);
|
||||
|
||||
OverrideMapping override = { chromeURI, overrideURI };
|
||||
overrides.AppendElement(override);
|
||||
}
|
||||
|
||||
if (aParent) {
|
||||
bool success = aParent->SendRegisterChrome(packages, resources, overrides,
|
||||
|
Loading…
Reference in New Issue
Block a user