mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Use Cell::as_unsafe_cell in Reflector::rootable.
This commit is contained in:
parent
85a2f0b66a
commit
c0016c7438
1 changed files with 5 additions and 7 deletions
|
@ -469,13 +469,11 @@ impl Reflector {
|
||||||
self.object.set(object);
|
self.object.set(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return a pointer to the memory location at which the JS reflector object is stored.
|
/// Return a pointer to the memory location at which the JS reflector
|
||||||
/// Used by Temporary values to root the reflector, as required by the JSAPI rooting
|
/// object is stored. Used by Temporary values to root the reflector, as
|
||||||
/// APIs.
|
/// required by the JSAPI rooting APIs.
|
||||||
pub fn rootable(&self) -> *mut *mut JSObject {
|
pub unsafe fn rootable(&self) -> *mut *mut JSObject {
|
||||||
&self.object as *const Cell<*mut JSObject>
|
self.object.as_unsafe_cell().get()
|
||||||
as *mut Cell<*mut JSObject>
|
|
||||||
as *mut *mut JSObject
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create an uninitialized `Reflector`.
|
/// Create an uninitialized `Reflector`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue