зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1182977 (part 2) - Use PLDHashTable::Iterator in dom/storage/. r=khuey.
--HG-- extra : rebase_source : 7aeac7d3d093bb3360de179b8259bc98449b308e
This commit is contained in:
Родитель
3b0b38b4d9
Коммит
35a54c92f0
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче