mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1182977 (part 2) - Use PLDHashTable::Iterator in dom/storage/. r=khuey.
This commit is contained in:
parent
ee3e2620b4
commit
83e94c41f7
@ -170,24 +170,13 @@ DOMStorageDBThread::ShouldPreloadScope(const nsACString& aScope)
|
||||
return mScopesHavingData.Contains(aScope);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
PLDHashOperator
|
||||
GetScopesHavingDataEnum(nsCStringHashKey* aKey, void* aArg)
|
||||
{
|
||||
InfallibleTArray<nsCString>* scopes =
|
||||
static_cast<InfallibleTArray<nsCString>*>(aArg);
|
||||
scopes->AppendElement(aKey->GetKey());
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void
|
||||
DOMStorageDBThread::GetScopesHavingData(InfallibleTArray<nsCString>* aScopes)
|
||||
{
|
||||
MonitorAutoLock monitor(mThreadObserver->GetMonitor());
|
||||
mScopesHavingData.EnumerateEntries(GetScopesHavingDataEnum, aScopes);
|
||||
for (auto iter = mScopesHavingData.Iter(); !iter.Done(); iter.Next()) {
|
||||
aScopes->AppendElement(iter.Get()->GetKey());
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
Loading…
Reference in New Issue
Block a user