Closed Bug 1188745 Opened 4 years ago Closed 4 years ago

Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis()

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: njn, Assigned: njn)

References

Details

Attachments

(1 file)

SizeOf*() functions usually measure things hanging off the type. nsTArray is an
exception to this -- you have to iterate over it and measure children of the
elements separately. So I would like to change its functions to be called
ShallowSizeOf*() to make this clearer. The "Shallow" prefix has precedent in
the codebase.
This is a very boring patch. 

In some places you can see that the elements are iterated over to measure the
children separately. In the places where that isn't true...

- Sometimes there's a comment explaining why they're not measured.

- Sometimes they aren't because the element type is a scalar.

- Sometimes they aren't, they seemingly could be, and there's no explanation
  why they aren't. These cases are sub-optimal, but fixing them is way beyond
  the scope of this bug.
Attachment #8640319 - Flags: review?(nfroyd)
Attachment #8640319 - Flags: review?(nfroyd) → review+
https://hg.mozilla.org/mozilla-central/rev/aecfba7454f1
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Blocks: 1189619
You need to log in before you can comment on or make changes to this bug.