mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
No bug - Add a comment to nsStyleSet::SizeOfIncludingThis noting that it does _not_ count the size of the sheets in mSheets, only the size of the mSheets buffer.
This commit is contained in:
parent
ec734706e6
commit
bdf4d7ea6b
@ -156,6 +156,11 @@ nsStyleSet::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
if (mRuleProcessors[i]) {
|
||||
n += mRuleProcessors[i]->SizeOfIncludingThis(aMallocSizeOf);
|
||||
}
|
||||
// mSheets is a C-style array of nsCOMArrays. We do not own the sheets in
|
||||
// the nsCOMArrays (either the nsLayoutStyleSheetCache singleton or our
|
||||
// document owns them) so we do not count the sheets here (we pass nullptr
|
||||
// as the aSizeOfElementIncludingThis argument). All we're doing here is
|
||||
// counting the size of the nsCOMArrays' buffers.
|
||||
n += mSheets[i].SizeOfExcludingThis(nullptr, aMallocSizeOf);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user