Bug 1424834 - LinkedList::sizeOfExcludingThis should use ConstRawType instead of T* r=njn

MozReview-Commit-ID: 2EM9cEOAkIl

--HG--
extra : rebase_source : b3950ed06e1bc014fff9aa1deb5c2387fb2eb5bb
This commit is contained in:
Valentin Gosu 2017-12-15 15:46:31 -06:00
parent d2697a43d6
commit a659128162
2 changed files with 2 additions and 2 deletions

View File

@ -551,7 +551,7 @@ public:
size_t sizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;
for (const T* t = getFirst(); t; t = t->getNext()) {
for (ConstRawType t = getFirst(); t; t = t->getNext()) {
n += aMallocSizeOf(t);
}
return n;

View File

@ -330,7 +330,7 @@ static size_t
SizeOfResolveHostCallbackListExcludingHead(const mozilla::LinkedList<RefPtr<nsResolveHostCallback>>& aCallbacks,
MallocSizeOf mallocSizeOf)
{
size_t n = 0; // TODO: should be aCallbacks.sizeOfIncludingThis(mallocSizeOf);
size_t n = aCallbacks.sizeOfIncludingThis(mallocSizeOf);
for (const nsResolveHostCallback* t = aCallbacks.getFirst(); t; t = t->getNext()) {
n += t->SizeOfIncludingThis(mallocSizeOf);