mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
script: Measure heap usage of various ignored fields (#38791)
These changes allow using MallocSizeOf/`#[conditional_malloc_size_of]` on WebIDL callback values, and then fix a grab bag of places in the script crate that previously ignored those values. There are also some commits removing ignored fields that involved Arc/Rc that are not WebIDL callbacks, since they are now easier to support with the `#[conditional_malloc_size_of]` attribute. Testing: Manual testing on about:memory for servo.org. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
604b6ea26d
commit
636e7211e0
16 changed files with 44 additions and 38 deletions
|
@ -55,7 +55,7 @@ pub(crate) trait MicrotaskRunnable {
|
|||
/// A promise callback scheduled to run during the next microtask checkpoint (#4283).
|
||||
#[derive(JSTraceable, MallocSizeOf)]
|
||||
pub(crate) struct EnqueuedPromiseCallback {
|
||||
#[ignore_malloc_size_of = "Rc has unclear ownership"]
|
||||
#[conditional_malloc_size_of]
|
||||
pub(crate) callback: Rc<PromiseJobCallback>,
|
||||
#[no_trace]
|
||||
pub(crate) pipeline: PipelineId,
|
||||
|
@ -66,7 +66,7 @@ pub(crate) struct EnqueuedPromiseCallback {
|
|||
/// identical to EnqueuedPromiseCallback once it's on the queue
|
||||
#[derive(JSTraceable, MallocSizeOf)]
|
||||
pub(crate) struct UserMicrotask {
|
||||
#[ignore_malloc_size_of = "Rc has unclear ownership"]
|
||||
#[conditional_malloc_size_of]
|
||||
pub(crate) callback: Rc<VoidFunction>,
|
||||
#[no_trace]
|
||||
pub(crate) pipeline: PipelineId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue