mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Say farewell to in-tree HeapSizeOf
This commit is contained in:
parent
9932a5cf82
commit
cb5cd8d881
80 changed files with 245 additions and 733 deletions
|
@ -14,7 +14,6 @@ use js::jsapi::{JSContext, JSObject, RootedValue};
|
|||
use js::jsapi::{JS_IsExceptionPending, JS_ReportPendingException, JS_SetPendingException};
|
||||
use js::jsapi::{JS_RestoreFrameChain, JS_SaveFrameChain};
|
||||
use js::jsval::UndefinedValue;
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
/// DOM exceptions that can be thrown by a native DOM method.
|
||||
#[derive(Debug, Clone, HeapSizeOf)]
|
||||
|
|
|
@ -30,6 +30,7 @@ use dom::bindings::reflector::{Reflectable, Reflector};
|
|||
use dom::bindings::trace::JSTraceable;
|
||||
use dom::bindings::trace::trace_reflector;
|
||||
use dom::node::Node;
|
||||
use heapsize::HeapSizeOf;
|
||||
use js::jsapi::{Heap, JSObject, JSTracer};
|
||||
use js::jsval::JSVal;
|
||||
use layout_interface::TrustedNodeAddress;
|
||||
|
@ -40,7 +41,6 @@ use std::hash::{Hash, Hasher};
|
|||
use std::mem;
|
||||
use std::ops::Deref;
|
||||
use std::ptr;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::thread_state;
|
||||
|
||||
/// A traced reference to a DOM object
|
||||
|
|
|
@ -10,7 +10,6 @@ use std::hash::{Hash, Hasher};
|
|||
use std::ops;
|
||||
use std::str;
|
||||
use std::str::FromStr;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::is_token;
|
||||
|
||||
/// Encapsulates the IDL `ByteString` type.
|
||||
|
|
|
@ -13,6 +13,7 @@ use dom::bindings::inheritance::TopTypeId;
|
|||
use dom::bindings::trace::trace_object;
|
||||
use dom::browsingcontext;
|
||||
use dom::window;
|
||||
use heapsize::HeapSizeOf;
|
||||
use js;
|
||||
use js::error::throw_type_error;
|
||||
use js::glue::{CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper};
|
||||
|
@ -36,7 +37,6 @@ use libc::{self, c_uint};
|
|||
use std::default::Default;
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::non_geckolib::jsstring_to_str;
|
||||
|
||||
/// Proxy handler for a WindowProxy.
|
||||
|
|
|
@ -15,6 +15,7 @@ use core::nonzero::NonZero;
|
|||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::Reflectable;
|
||||
use dom::bindings::trace::JSTraceable;
|
||||
use heapsize::HeapSizeOf;
|
||||
use js::jsapi::{JSTracer, JS_GetReservedSlot, JS_SetReservedSlot};
|
||||
use js::jsval::PrivateValue;
|
||||
use libc::c_void;
|
||||
|
@ -22,7 +23,6 @@ use std::cell::{Cell, UnsafeCell};
|
|||
use std::iter::Iterator;
|
||||
use std::mem;
|
||||
use std::ops::{Deref, DerefMut, Drop};
|
||||
use util::mem::HeapSizeOf;
|
||||
|
||||
/// The index of the slot wherein a pointer to the weak holder cell is
|
||||
/// stored for weak-referenceable bindings. We use slot 1 for holding it,
|
||||
|
|
|
@ -20,6 +20,7 @@ no_jsmanaged_fields!(OsRng);
|
|||
#[dom_struct]
|
||||
pub struct Crypto {
|
||||
reflector_: Reflector,
|
||||
#[ignore_heap_size_of = "Defined in rand"]
|
||||
rng: DOMRefCell<OsRng>,
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,6 @@ use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, parse_sty
|
|||
use style::selector_impl::{NonTSPseudoClass, ServoSelectorImpl};
|
||||
use style::values::CSSFloat;
|
||||
use style::values::specified::{self, CSSColor, CSSRGBA, LengthOrPercentage};
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::{DOMString, LengthOrPercentageOrAuto};
|
||||
|
||||
// TODO: Update focus state when the top-level browsing context gains or loses system focus,
|
||||
|
|
|
@ -21,6 +21,7 @@ use dom::eventdispatcher::dispatch_event;
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::Window;
|
||||
use fnv::FnvHasher;
|
||||
use heapsize::HeapSizeOf;
|
||||
use js::jsapi::{CompileFunction, JS_GetFunctionObject, RootedValue};
|
||||
use js::jsapi::{HandleObject, JSContext, RootedFunction};
|
||||
use js::jsapi::{JSAutoCompartment, JSAutoRequest};
|
||||
|
@ -35,7 +36,6 @@ use std::rc::Rc;
|
|||
use std::{intrinsics, ptr};
|
||||
use string_cache::Atom;
|
||||
use url::Url;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[derive(PartialEq, Clone, JSTraceable)]
|
||||
|
|
|
@ -46,6 +46,7 @@ use dom::text::Text;
|
|||
use dom::virtualmethods::{VirtualMethods, vtable_for};
|
||||
use dom::window::Window;
|
||||
use euclid::rect::Rect;
|
||||
use heapsize::{HeapSizeOf, heap_size_of};
|
||||
use js::jsapi::{JSContext, JSObject, JSRuntime};
|
||||
use layout_interface::{LayoutChan, Msg};
|
||||
use libc::{self, c_void, uintptr_t};
|
||||
|
@ -63,7 +64,6 @@ use std::iter::{self, FilterMap, Peekable};
|
|||
use std::mem;
|
||||
use string_cache::{Atom, Namespace, QualName};
|
||||
use style::selector_impl::ServoSelectorImpl;
|
||||
use util::mem::{HeapSizeOf, heap_size_of};
|
||||
use util::str::DOMString;
|
||||
use util::thread_state;
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -23,10 +23,10 @@ use dom::document::Document;
|
|||
use dom::documentfragment::DocumentFragment;
|
||||
use dom::node::{Node, UnbindContext};
|
||||
use dom::text::Text;
|
||||
use heapsize::HeapSizeOf;
|
||||
use js::jsapi::JSTracer;
|
||||
use std::cell::{Cell, UnsafeCell};
|
||||
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
#[dom_struct]
|
||||
|
|
|
@ -62,7 +62,6 @@ use string_cache::Atom;
|
|||
use time;
|
||||
use timers::{ScheduledCallback, TimerHandle};
|
||||
use url::Url;
|
||||
use util::mem::HeapSizeOf;
|
||||
use util::str::DOMString;
|
||||
|
||||
pub type SendParam = BlobOrStringOrURLSearchParams;
|
||||
|
@ -127,11 +126,13 @@ pub struct XMLHttpRequest {
|
|||
response_xml: MutNullableHeap<JS<Document>>,
|
||||
#[ignore_heap_size_of = "Defined in hyper"]
|
||||
response_headers: DOMRefCell<Headers>,
|
||||
#[ignore_heap_size_of = "Defined in hyper"]
|
||||
override_mime_type: DOMRefCell<Option<Mime>>,
|
||||
#[ignore_heap_size_of = "Defined in rust-encoding"]
|
||||
override_charset: DOMRefCell<Option<EncodingRef>>,
|
||||
|
||||
// Associated concepts
|
||||
#[ignore_heap_size_of = "Defined in hyper"]
|
||||
request_method: DOMRefCell<Method>,
|
||||
request_url: DOMRefCell<Option<Url>>,
|
||||
#[ignore_heap_size_of = "Defined in hyper"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue