mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
Define conditional_malloc_size_of for all Rc (#39660)
This updates all Rc that were ignored for malloc_size_of to use conditional_malloc_size_of, unless the type in the Rc itself doesn't support malloc_size. Regular expressions used to search for all occurrences: ``` ignore_malloc_size_of = "Rc.*" ignore_malloc_size_of = "Arc.*" ``` There are a couple left since they have nested Rc, which I don't know how to fix. To be able to define these, several new implementations were added to `malloc_size_of/lib.rs` as well as `HashMapTracedValues`. Testing: if it compiles, it's safe Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
committed by
GitHub
parent
19a8f826a5
commit
6a0f9d1bcb
@@ -29,7 +29,7 @@ use crate::script_runtime::CanGc;
|
||||
#[dom_struct]
|
||||
pub(crate) struct HTMLObjectElement {
|
||||
htmlelement: HTMLElement,
|
||||
#[ignore_malloc_size_of = "Arc"]
|
||||
#[ignore_malloc_size_of = "RasterImage"]
|
||||
#[no_trace]
|
||||
image: DomRefCell<Option<Arc<RasterImage>>>,
|
||||
form_owner: MutNullableDom<HTMLFormElement>,
|
||||
|
||||
Reference in New Issue
Block a user