mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Return *const T from JS::unsafe_get() (fixes #4712).
This commit is contained in:
parent
4c9d7ce5d0
commit
801949556d
2 changed files with 5 additions and 7 deletions
|
@ -311,8 +311,8 @@ impl<T: Reflectable> JS<T> {
|
|||
/// 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 {
|
||||
self.ptr as *mut T
|
||||
pub unsafe fn unsafe_get(&self) -> *const T {
|
||||
self.ptr
|
||||
}
|
||||
|
||||
/// 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