Bug 1348606 - Inline nsCSSValue::Array::SizeOfIncludingThis. r=xidorn

This will make it easier to macro-ize this stuff.

MozReview-Commit-ID: Hcmg6yaTTdt
This commit is contained in:
Bobby Holley 2017-03-18 17:50:27 -07:00
Родитель c64223ca7c
Коммит 51f4af4bce
2 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@ -2775,16 +2775,6 @@ nsCSSValuePairList_heap::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf
return n; return n;
} }
size_t
nsCSSValue::Array::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
size_t n = aMallocSizeOf(this);
for (size_t i = 0; i < mCount; i++) {
n += mArray[i].SizeOfExcludingThis(aMallocSizeOf);
}
return n;
}
css::URLValueData::URLValueData(already_AddRefed<PtrHolder<nsIURI>> aURI, css::URLValueData::URLValueData(already_AddRefed<PtrHolder<nsIURI>> aURI,
nsStringBuffer* aString, nsStringBuffer* aString,
already_AddRefed<PtrHolder<nsIURI>> aBaseURI, already_AddRefed<PtrHolder<nsIURI>> aBaseURI,

Просмотреть файл

@ -1117,7 +1117,14 @@ private:
} }
} }
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
{
size_t n = aMallocSizeOf(this);
for (size_t i = 0; i < mCount; i++) {
n += mArray[i].SizeOfExcludingThis(aMallocSizeOf);
}
return n;
}
private: private:
Array(const Array& aOther) = delete; Array(const Array& aOther) = delete;