mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix rooting in script
This commit is contained in:
parent
f6f0a7e4aa
commit
511e3337fb
2 changed files with 21 additions and 14 deletions
|
@ -270,6 +270,12 @@ impl<T: Reflectable> MutNullableHeap<JS<T>> {
|
|||
pub unsafe fn get_inner_as_layout(&self) -> Option<LayoutJS<T>> {
|
||||
self.ptr.get().map(|js| js.to_layout())
|
||||
}
|
||||
|
||||
/// Get a rooted value out of this object
|
||||
// FIXME(#6684)
|
||||
pub fn get_rooted(&self) -> Option<Root<T>> {
|
||||
self.get().map(|o| o.root())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: HeapGCValue+Copy> Default for MutNullableHeap<T> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue