зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1182976 - Part 2: Get rid of the Helper class in QuotaManager::OpenDirectoryInternal; r=janv
This commit is contained in:
Родитель
86e260f37c
Коммит
1dc0b53b20
|
@ -3168,21 +3168,6 @@ QuotaManager::OpenDirectoryInternal(Nullable<PersistenceType> aPersistenceType,
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
class MOZ_STACK_CLASS Helper final
|
||||
{
|
||||
public:
|
||||
static PLDHashOperator
|
||||
Enumerate(nsCStringHashKey* aKey, void* aClosure)
|
||||
{
|
||||
auto* client = static_cast<Client*>(aClosure);
|
||||
MOZ_ASSERT(client);
|
||||
|
||||
client->AbortOperations(aKey->GetKey());
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
};
|
||||
|
||||
nsRefPtr<DirectoryLockImpl> lock =
|
||||
CreateDirectoryLock(aPersistenceType,
|
||||
EmptyCString(),
|
||||
|
@ -3229,7 +3214,11 @@ QuotaManager::OpenDirectoryInternal(Nullable<PersistenceType> aPersistenceType,
|
|||
|
||||
for (uint32_t index : MakeRange(uint32_t(Client::TYPE_MAX))) {
|
||||
if (origins[index]) {
|
||||
origins[index]->EnumerateEntries(Helper::Enumerate, mClients[index]);
|
||||
for (auto iter = origins[index]->Iter(); !iter.Done(); iter.Next()) {
|
||||
MOZ_ASSERT(mClients[index]);
|
||||
|
||||
mClients[index]->AbortOperations(iter.Get()->GetKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче