Issue #2828 - Part 12: Implement cascade layer SizeOfIncludingThis

This commit is contained in:
Francis Dominic Fajardo 2025-07-22 12:29:41 +08:00 committed by roytam1
commit e3476d33ed
3 changed files with 33 additions and 2 deletions

View file

@ -223,8 +223,9 @@ CascadeLayerRuleProcessor::SizeOfExcludingThis(
mozilla::MallocSizeOf aMallocSizeOf) const
{
size_t n = 0;
n += mCascade->SizeOfIncludingThis(aMallocSizeOf);
// FIXME: size of attached cascade layer is not included.
// The cascade layer owns the rule cascade, so we don't count it here.
// We do count the layer itself, though.
n += mLayer->SizeOfIncludingThis(aMallocSizeOf);
return n;
}