diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index c4f59491c57..94d05e4c477 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.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/. */ +#![deny(missing_doc)] + //! Utilities for tracing JS-managed values. //! //! The lifetime of DOM objects is managed by the SpiderMonkey Garbage @@ -58,6 +60,12 @@ use dom::node::{Node, TrustedNodeAddress}; use dom::bindings::utils::WindowProxyHandler; use html5ever::tree_builder::QuirksMode; +/// A trait to allow tracing (only) DOM objects. +pub trait JSTraceable { + /// Trace `self`. + fn trace(&self, trc: *mut JSTracer); +} + impl JSTraceable for JS { fn trace(&self, trc: *mut JSTracer) { trace_reflector(trc, "", self.reflector()); @@ -66,11 +74,6 @@ impl JSTraceable for JS { no_jsmanaged_fields!(Reflector) -/// A trait to allow tracing (only) DOM objects. -pub trait JSTraceable { - fn trace(&self, trc: *mut JSTracer); -} - /// Trace a `JSVal`. pub fn trace_jsval(tracer: *mut JSTracer, description: &str, val: JSVal) { if !val.is_markable() {