mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Measure heap memory usage for more types. Fixes #6951
This commit is contained in:
parent
94c8dcd575
commit
45145108da
175 changed files with 669 additions and 94 deletions
|
@ -29,7 +29,7 @@ use util::str::DOMString;
|
|||
use util::task::spawn_named;
|
||||
use rustc_serialize::base64::{Config, ToBase64, CharacterSet, Newline};
|
||||
|
||||
#[derive(PartialEq, Clone, Copy, JSTraceable)]
|
||||
#[derive(PartialEq, Clone, Copy, JSTraceable, HeapSizeOf)]
|
||||
pub enum FileReaderFunction {
|
||||
ReadAsText,
|
||||
ReadAsDataUrl,
|
||||
|
@ -37,7 +37,7 @@ pub enum FileReaderFunction {
|
|||
|
||||
pub type TrustedFileReader = Trusted<FileReader>;
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, HeapSizeOf)]
|
||||
pub struct ReadMetaData {
|
||||
pub blobtype: DOMString,
|
||||
pub label: Option<DOMString>,
|
||||
|
@ -55,11 +55,11 @@ impl ReadMetaData {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Clone, Copy, JSTraceable)]
|
||||
#[derive(PartialEq, Clone, Copy, JSTraceable, HeapSizeOf)]
|
||||
pub struct GenerationId(u32);
|
||||
|
||||
#[repr(u16)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, JSTraceable)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, JSTraceable, HeapSizeOf)]
|
||||
pub enum FileReaderReadyState {
|
||||
Empty = FileReaderConstants::EMPTY,
|
||||
Loading = FileReaderConstants::LOADING,
|
||||
|
@ -67,6 +67,7 @@ pub enum FileReaderReadyState {
|
|||
}
|
||||
|
||||
#[dom_struct]
|
||||
#[derive(HeapSizeOf)]
|
||||
pub struct FileReader {
|
||||
eventtarget: EventTarget,
|
||||
global: GlobalField,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue