зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c64223ca7c
Коммит
51f4af4bce
|
@ -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;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче