aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-04-19 18:29:22 +0200
committerMs2ger <Ms2ger@gmail.com>2015-10-29 17:25:00 +0100
commit4dbc99c7f3946b5d94266ad5c1ce932c92e3ba1f (patch)
treeebaf5e57f4088dc235b2018e24ba033aacfa50d1 /components/script/dom
parentfde40edfdc1459e2ab66e8c66580bacb7dbde430 (diff)
downloadservo-4dbc99c7f3946b5d94266ad5c1ce932c92e3ba1f.tar.gz
servo-4dbc99c7f3946b5d94266ad5c1ce932c92e3ba1f.zip
Move the DOM memory management blog post into the tree.
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/trace.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index 00a7f6c6c90..52144a35fc7 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -12,18 +12,18 @@
//! phase. (This happens through `JSClass.trace` for non-proxy bindings, and
//! through `ProxyTraps.trace` otherwise.)
//! 2. `_trace` calls `Foo::trace()` (an implementation of `JSTraceable`).
-//! This is typically derived via a `#[dom_struct]` (implies `#[derive(JSTraceable)]`) annotation.
+//! This is typically derived via a `#[dom_struct]`
+//! (implies `#[derive(JSTraceable)]`) annotation.
//! Non-JS-managed types have an empty inline `trace()` method,
//! achieved via `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
//! `trace_reflector()`.
-//! 4. `trace_reflector()` calls `trace_object()` with the `JSObject` for the
-//! reflector.
-//! 5. `trace_object()` calls `JS_CallTracer()` to notify the GC, which will
-//! add the object to the graph, and will trace that object as well.
-//! 6. When the GC finishes tracing, it [`finalizes`](../index.html#destruction)
+//! 4. `trace_reflector()` calls `JS_CallUnbarrieredObjectTracer()` 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)
//! any reflectors that were not reachable.
//!
//! The `no_jsmanaged_fields!()` macro adds an empty implementation of `JSTraceable` to