[script] Merge the binding design document into inline doc comments.

This commit is contained in:
Tetsuharu OHZEKI 2015-02-10 03:35:24 +09:00
parent 83a6b5d770
commit 6500544387
3 changed files with 15 additions and 51 deletions

View file

@ -12,7 +12,9 @@
//! 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 #[jstraceable] annotation
//! This is typically derived via a `#[dom_struct]` (implies `#[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
@ -21,8 +23,10 @@
//! 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)
//! any reflectors that were not reachable.
//!
//! The no_jsmanaged_fields!() macro adds an empty implementation of JSTraceable to
//! The `no_jsmanaged_fields!()` macro adds an empty implementation of `JSTraceable` to
//! a datatype.
use dom::bindings::js::JS;