From dfbf83a8aca8e68ec39bf013ca3bc0385dc3b108 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 24 Jan 2015 15:57:09 +0100 Subject: [PATCH] Don't call transmute_copy in JS::unsafe_get. It hasn't had borrow flags for quite a while. --- components/script/dom/bindings/js.rs | 8 ++++---- 1 file 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 MutNullableJS { } impl JS { - /// 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