mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +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
|
@ -6,6 +6,7 @@ use base::id::WebViewId;
|
|||
use constellation_traits::{ScriptToConstellationChan, ScriptToConstellationMessage};
|
||||
use embedder_traits::EmbedderMsg;
|
||||
use ipc_channel::ipc::channel;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
|
||||
/// A trait which abstracts access to the embedder's clipboard in order to allow unit
|
||||
/// testing clipboard-dependent parts of `script`.
|
||||
|
@ -16,6 +17,7 @@ pub trait ClipboardProvider {
|
|||
fn set_text(&mut self, _: String);
|
||||
}
|
||||
|
||||
#[derive(MallocSizeOf)]
|
||||
pub(crate) struct EmbedderClipboardProvider {
|
||||
pub constellation_sender: ScriptToConstellationChan,
|
||||
pub webview_id: WebViewId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue