aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/trace.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/trace.rs')
-rw-r--r--components/script/dom/bindings/trace.rs51
1 files changed, 24 insertions, 27 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index e3c30c943ab..8d5f0db0c0e 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -29,40 +29,24 @@
//! The `unsafe_no_jsmanaged_fields!()` macro adds an empty implementation of
//! `JSTraceable` to a datatype.
-use crate::dom::bindings::cell::DomRefCell;
-use crate::dom::bindings::error::Error;
-use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
-use crate::dom::bindings::reflector::{DomObject, Reflector};
-use crate::dom::bindings::root::{Dom, DomRoot};
-use crate::dom::bindings::str::{DOMString, USVString};
-use crate::dom::bindings::utils::WindowProxyHandler;
-use crate::dom::gpubuffer::GPUBufferState;
-use crate::dom::gpucanvascontext::WebGPUContextId;
-use crate::dom::gpucommandencoder::GPUCommandEncoderState;
-use crate::dom::htmlimageelement::SourceSet;
-use crate::dom::htmlmediaelement::HTMLMediaElementFetchContext;
-use crate::script_runtime::{ContextForRequestInterrupt, StreamConsumer};
-use crate::script_thread::IncompleteParserContexts;
-use crate::task::TaskBox;
+use std::collections::hash_map::RandomState;
+use std::collections::HashMap;
+use std::fmt::Display;
+use std::hash::{BuildHasher, Hash};
+use std::mem;
+use std::ops::{Deref, DerefMut};
+
use indexmap::IndexMap;
+/// A trait to allow tracing (only) DOM objects.
+pub use js::gc::Traceable as JSTraceable;
use js::glue::{CallObjectTracer, CallScriptTracer, CallStringTracer, CallValueTracer};
use js::jsapi::{GCTraceKindToAscii, Heap, JSObject, JSScript, JSString, JSTracer, TraceKind};
use js::jsval::JSVal;
use js::rust::{GCMethods, Handle};
-
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use parking_lot::RwLock;
use servo_arc::Arc as ServoArc;
use smallvec::SmallVec;
-
-use std::collections::hash_map::RandomState;
-use std::collections::HashMap;
-use std::fmt::Display;
-use std::hash::{BuildHasher, Hash};
-use std::mem;
-
-use std::ops::{Deref, DerefMut};
-
use style::author_styles::AuthorStyles;
use style::stylesheet_set::{AuthorStylesheetSet, DocumentStylesheetSet};
use tendril::fmt::UTF8;
@@ -70,8 +54,21 @@ use tendril::stream::LossyDecoder;
use tendril::TendrilSink;
use webxr_api::{Finger, Hand};
-/// A trait to allow tracing (only) DOM objects.
-pub use js::gc::Traceable as JSTraceable;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
+use crate::dom::bindings::reflector::{DomObject, Reflector};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::bindings::utils::WindowProxyHandler;
+use crate::dom::gpubuffer::GPUBufferState;
+use crate::dom::gpucanvascontext::WebGPUContextId;
+use crate::dom::gpucommandencoder::GPUCommandEncoderState;
+use crate::dom::htmlimageelement::SourceSet;
+use crate::dom::htmlmediaelement::HTMLMediaElementFetchContext;
+use crate::script_runtime::{ContextForRequestInterrupt, StreamConsumer};
+use crate::script_thread::IncompleteParserContexts;
+use crate::task::TaskBox;
/// A trait to allow tracing only DOM sub-objects.
pub unsafe trait CustomTraceable {