diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-01-24 15:57:09 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-01-24 15:57:09 +0100 |
commit | dfbf83a8aca8e68ec39bf013ca3bc0385dc3b108 (patch) | |
tree | b4a46ceaae308de7520a037ca4ff995efd33c80f | |
parent | d9c2bfae8764d9f7813a6b6e9267102625e3d7b8 (diff) | |
download | servo-dfbf83a8aca8e68ec39bf013ca3bc0385dc3b108.tar.gz servo-dfbf83a8aca8e68ec39bf013ca3bc0385dc3b108.zip |
Don't call transmute_copy in JS::unsafe_get.
It hasn't had borrow flags for quite a while.
-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> |