Measure heap memory usage for more types. Fixes #6951

This commit is contained in:
Bogdan Cuza 2015-08-05 18:31:42 +03:00
parent 94c8dcd575
commit 45145108da
175 changed files with 669 additions and 94 deletions

View file

@ -51,7 +51,7 @@ use url::Url;
use util::vec::byte_swap;
#[must_root]
#[derive(JSTraceable, Clone)]
#[derive(JSTraceable, Clone, HeapSizeOf)]
pub enum CanvasFillOrStrokeStyle {
Color(RGBA),
Gradient(JS<CanvasGradient>),
@ -60,10 +60,12 @@ pub enum CanvasFillOrStrokeStyle {
// https://html.spec.whatwg.org/multipage/#canvasrenderingcontext2d
#[dom_struct]
#[derive(HeapSizeOf)]
pub struct CanvasRenderingContext2D {
reflector_: Reflector,
global: GlobalField,
renderer_id: usize,
#[ignore_heap_size_of = "Defined in ipc-channel"]
ipc_renderer: IpcSender<CanvasMsg>,
canvas: JS<HTMLCanvasElement>,
state: RefCell<CanvasContextState>,
@ -71,7 +73,7 @@ pub struct CanvasRenderingContext2D {
}
#[must_root]
#[derive(JSTraceable, Clone)]
#[derive(JSTraceable, Clone, HeapSizeOf)]
struct CanvasContextState {
global_alpha: f64,
global_composition: CompositionOrBlending,