aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/js.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/js.rs')
-rw-r--r--components/script/dom/bindings/js.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index ee2bf53e238..f062eb8cf64 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -144,6 +144,13 @@ pub struct LayoutJS<T> {
ptr: NonZero<*const T>
}
+impl<T: Reflectable> LayoutJS<T> {
+ /// Get the reflector.
+ pub unsafe fn get_jsobject(&self) -> *mut JSObject {
+ (**self.ptr).reflector().get_jsobject()
+ }
+}
+
impl<T> Copy for JS<T> {}
impl<T> Copy for LayoutJS<T> {}
@@ -241,15 +248,6 @@ impl<T: Reflectable> Reflectable for JS<T> {
}
}
-// XXXjdm same above
-impl<T: Reflectable> Reflectable for LayoutJS<T> {
- fn reflector<'a>(&'a self) -> &'a Reflector {
- unsafe {
- (*self.unsafe_get()).reflector()
- }
- }
-}
-
/// A trait to be implemented for JS-managed types that can be stored in
/// mutable member fields.
///