aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/trace.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-25 23:56:32 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-26 09:48:55 +0200
commit7be32fb2371a14ba61b008a37e79761f66c073c7 (patch)
treef6ff7b73173ce6e39351199d7a5e67386c73659e /components/script/dom/bindings/trace.rs
parent0e3c54c1911ba2c3bf305ee04f04fcd9bf2fc2fe (diff)
downloadservo-7be32fb2371a14ba61b008a37e79761f66c073c7.tar.gz
servo-7be32fb2371a14ba61b008a37e79761f66c073c7.zip
Rename JS<T> to Dom<T>
Diffstat (limited to 'components/script/dom/bindings/trace.rs')
-rw-r--r--components/script/dom/bindings/trace.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index 40945fad3e3..74b78fa013a 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -18,9 +18,9 @@
//! achieved via `unsafe_no_jsmanaged_fields!` or similar.
//! 3. For all fields, `Foo::trace()`
//! calls `trace()` on the field.
-//! For example, for fields of type `JS<T>`, `JS<T>::trace()` calls
+//! For example, for fields of type `Dom<T>`, `Dom<T>::trace()` calls
//! `trace_reflector()`.
-//! 4. `trace_reflector()` calls `JS::TraceEdge()` with a
+//! 4. `trace_reflector()` calls `Dom::TraceEdge()` with a
//! pointer to the `JSObject` for the reflector. This notifies the GC, which
//! will add the object to the graph, and will trace that object as well.
//! 5. When the GC finishes tracing, it [`finalizes`](../index.html#destruction)
@@ -42,7 +42,7 @@ use dom::bindings::cell::DOMRefCell;
use dom::bindings::error::Error;
use dom::bindings::refcounted::{Trusted, TrustedPromise};
use dom::bindings::reflector::{DomObject, Reflector};
-use dom::bindings::root::{JS, Root};
+use dom::bindings::root::{Dom, Root};
use dom::bindings::str::{DOMString, USVString};
use dom::bindings::utils::WindowProxyHandler;
use dom::document::PendingRestyle;
@@ -840,16 +840,16 @@ impl<'a, T: 'static + JSTraceable> RootedVec<'a, T> {
}
}
-impl<'a, T: 'static + JSTraceable + DomObject> RootedVec<'a, JS<T>> {
- /// Create a vector of items of type JS<T> that is rooted for
+impl<'a, T: 'static + JSTraceable + DomObject> RootedVec<'a, Dom<T>> {
+ /// Create a vector of items of type Dom<T> that is rooted for
/// the lifetime of this struct
- pub fn from_iter<I>(root: &'a mut RootableVec<JS<T>>, iter: I) -> Self
+ pub fn from_iter<I>(root: &'a mut RootableVec<Dom<T>>, iter: I) -> Self
where I: Iterator<Item = Root<T>>
{
unsafe {
RootedTraceableSet::add(root);
}
- root.v.extend(iter.map(|item| JS::from_ref(&*item)));
+ root.v.extend(iter.map(|item| Dom::from_ref(&*item)));
RootedVec {
root: root,
}