diff options
Diffstat (limited to 'components/script/dom/bindings/js.rs')
-rw-r--r-- | components/script/dom/bindings/js.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index c56618d2a13..e220f181a34 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -308,11 +308,11 @@ impl<T: Reflectable> MutNullableJS<T> { } impl<T: Reflectable> JS<T> { - /// Returns an unsafe pointer to the interior of this JS object without touching the borrow - /// flags. This is the only method that be safely accessed from layout. (The fact that this - /// is unsafe is what necessitates the layout wrappers.) + /// Returns an unsafe pointer to the interior of this object. This is the + /// only method that be safely accessed from layout. (The fact that this is + /// unsafe is what necessitates the layout wrappers.) pub unsafe fn unsafe_get(&self) -> *mut T { - mem::transmute_copy(&self.ptr) + self.ptr as *mut T } /// Store an unrooted value in this field. This is safe under the assumption that JS<T> |