From 0eacf28b4627b0cd7c3a767cff8708341e36886b Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 16 Jun 2015 21:09:39 -0700 Subject: [PATCH] Bug 1174631 (part 4) - Replace nsFrameManager's uses of PL_DHashTableEnumerate() with PLDHashTable::Iterator. r=dholbert. --HG-- extra : rebase_source : a328e9bceffb9940108fdebca8cca7c70e9cea58 --- layout/base/nsFrameManager.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/layout/base/nsFrameManager.cpp b/layout/base/nsFrameManager.cpp index eefb5125e2ea..16359ae5026b 100644 --- a/layout/base/nsFrameManager.cpp +++ b/layout/base/nsFrameManager.cpp @@ -203,19 +203,13 @@ nsFrameManager::UnregisterPlaceholderFrame(nsPlaceholderFrame* aPlaceholderFrame aPlaceholderFrame->GetOutOfFlowFrame()); } -static PLDHashOperator -UnregisterPlaceholders(PLDHashTable* table, PLDHashEntryHdr* hdr, - uint32_t number, void* arg) -{ - PlaceholderMapEntry* entry = static_cast(hdr); - entry->placeholderFrame->SetOutOfFlowFrame(nullptr); - return PL_DHASH_NEXT; -} - void nsFrameManager::ClearPlaceholderFrameMap() { - PL_DHashTableEnumerate(&mPlaceholderMap, UnregisterPlaceholders, nullptr); + for (auto iter = mPlaceholderMap.Iter(); !iter.Done(); iter.Next()) { + auto entry = static_cast(iter.Get()); + entry->placeholderFrame->SetOutOfFlowFrame(nullptr); + } mPlaceholderMap.Clear(); }