mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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
|
@ -27,6 +27,8 @@ use js::jsapi::{GetGlobalForObjectCrossCompartment};
|
|||
use js::jsapi::{JSContext, JSObject, JS_GetClass, MutableHandleValue};
|
||||
use url::Url;
|
||||
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
/// A freely-copyable reference to a rooted global object.
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum GlobalRef<'a> {
|
||||
|
@ -47,7 +49,7 @@ pub enum GlobalRoot {
|
|||
|
||||
/// A traced reference to a global object, for use in fields of traced Rust
|
||||
/// structures.
|
||||
#[derive(JSTraceable)]
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
#[must_root]
|
||||
pub enum GlobalField {
|
||||
/// A field for a `Window` object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue