diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index 5345d08ee9e..e50bf68e478 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -88,6 +88,12 @@ impl JS { } } +impl JSTraceable for JS { + fn trace(&self, trc: *mut JSTracer) { + trace_reflector(trc, "", unsafe { (**self.ptr).reflector() }); + } +} + /// An unrooted reference to a DOM object for use in layout. `Layout*Helpers` /// traits must be implemented on this. #[allow_unrooted_interior] @@ -148,13 +154,6 @@ impl LayoutJS { } } -impl Reflectable for JS { - fn reflector(&self) -> &Reflector { - unsafe { - (**self.ptr).reflector() - } - } -} /// A trait to be implemented for JS-managed types that can be stored in /// mutable member fields. diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index ed16d5a2515..5a9aa5b2abb 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -88,12 +88,6 @@ pub trait JSTraceable { fn trace(&self, trc: *mut JSTracer); } -impl JSTraceable for JS { - fn trace(&self, trc: *mut JSTracer) { - trace_reflector(trc, "", self.reflector()); - } -} - no_jsmanaged_fields!(EncodingRef); no_jsmanaged_fields!(Reflector);