gecko-dev/servo/components/malloc_size_of
Nicholas Nethercote 60dbe9e9a9 servo: Merge #18455 - Measure Arc<Locked<T>> fields properly (from nnethercote:measure-Arc-Locked-properly); r=jdm
Currently when we measure various Arc<Locked<T>> fields we don't measure the T
itself, but only the descendants of the T. This patch fixes this.

This fix requires introducing a new trait, MallocUnconditionalShallowSizeOf,
which is implemented for servo_arc::Arc. A similar trait,
MallocConditionalShallowSizeOf, is also introduced, though it has no uses as
yet.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they are tested in Gecko.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: bffe158fa40fda72e74afde2407cc02cd84d495d

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : b7e583f75900e5e58406802bab095f524b87398f
2017-09-12 08:40:56 -05:00
..
Cargo.toml
lib.rs
LICENSE-APACHE
LICENSE-MIT