Bug 1182963 - Use nsTHashTable::Iterator in FramePropertyTable. r=njn

--HG--
extra : commitid : 6i0btK6r2hV
extra : rebase_source : 61febc3863f0f87999d813a7c8afde43a6de161b
This commit is contained in:
Ting-Yu Lin 2015-07-15 17:05:06 +08:00
parent dfa97f6d66
commit 10aaca0ef1
2 changed files with 4 additions and 9 deletions

View File

@ -212,20 +212,16 @@ FramePropertyTable::DeleteAllFor(nsIFrame* aFrame)
mEntries.RawRemoveEntry(entry);
}
/* static */ PLDHashOperator
FramePropertyTable::DeleteEnumerator(Entry* aEntry, void* aArg)
{
DeleteAllForEntry(aEntry);
return PL_DHASH_REMOVE;
}
void
FramePropertyTable::DeleteAll()
{
mLastFrame = nullptr;
mLastEntry = nullptr;
mEntries.EnumerateEntries(DeleteEnumerator, nullptr);
for (auto iter = mEntries.Iter(); !iter.Done(); iter.Next()) {
DeleteAllForEntry(iter.Get());
}
mEntries.Clear();
}
size_t

View File

@ -204,7 +204,6 @@ protected:
};
static void DeleteAllForEntry(Entry* aEntry);
static PLDHashOperator DeleteEnumerator(Entry* aEntry, void* aArg);
nsTHashtable<Entry> mEntries;
nsIFrame* mLastFrame;