aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/bindings/js.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-07-26 17:15:12 +0200
committerMs2ger <ms2ger@gmail.com>2014-07-26 17:15:12 +0200
commit69c49bb76437bb6dd71fe64cdf4c9da1dcaab11e (patch)
treefe5586501edfb1ab46457183117681b07fbe60e1 /src/components/script/dom/bindings/js.rs
parent5ed95e410b3f0c7ac5fb1c1e200452b27d6b5cda (diff)
parent2ddb32bd2f8c6fee56ff702c3230ab61c0f786b3 (diff)
downloadservo-69c49bb76437bb6dd71fe64cdf4c9da1dcaab11e.tar.gz
servo-69c49bb76437bb6dd71fe64cdf4c9da1dcaab11e.zip
Merge pull request #2931 from Ms2ger/dom-docs
Add documentation for the DOM; r=jdm
Diffstat (limited to 'src/components/script/dom/bindings/js.rs')
-rw-r--r--src/components/script/dom/bindings/js.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/script/dom/bindings/js.rs b/src/components/script/dom/bindings/js.rs
index b83115e289d..73cb19c5072 100644
--- a/src/components/script/dom/bindings/js.rs
+++ b/src/components/script/dom/bindings/js.rs
@@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+//! Smart pointers for the JS-managed DOM objects.
+//!
//! The DOM is made up of Rust types whose lifetime is entirely controlled by the whims of
//! the SpiderMonkey garbage collector. The types in this module are designed to ensure
//! that any interactions with said Rust types only occur on values that will remain alive
@@ -10,6 +12,7 @@
//! Here is a brief overview of the important types:
//!
//! - `JSRef<T>`: a freely-copyable reference to a rooted value.
+//! - `Root<T>`: a stack-based reference to a rooted value.
//! - `JS<T>`: a pointer to JS-owned memory that can automatically be traced by the GC when
//! encountered as a field of a Rust structure.
//! - `Temporary<T>`: a value that will remain rooted for the duration of its lifetime.