mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
auto merge of #4711 : Ms2ger/servo/transmute, r=jdm
It hasn't had borrow flags for quite a while.
This commit is contained in:
commit
4c9d7ce5d0
1 changed files with 4 additions and 4 deletions
|
@ -308,11 +308,11 @@ impl<T: Reflectable> MutNullableJS<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Reflectable> JS<T> {
|
impl<T: Reflectable> JS<T> {
|
||||||
/// Returns an unsafe pointer to the interior of this JS object without touching the borrow
|
/// Returns an unsafe pointer to the interior of this object. This is the
|
||||||
/// flags. This is the only method that be safely accessed from layout. (The fact that this
|
/// only method that be safely accessed from layout. (The fact that this is
|
||||||
/// is unsafe is what necessitates the layout wrappers.)
|
/// unsafe is what necessitates the layout wrappers.)
|
||||||
pub unsafe fn unsafe_get(&self) -> *mut T {
|
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>
|
/// Store an unrooted value in this field. This is safe under the assumption that JS<T>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue