mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Ensure Promise "reflector" is not GCed before the Rust object.
This commit is contained in:
parent
f89355b85d
commit
ef501603bf
3 changed files with 65 additions and 10 deletions
|
@ -270,6 +270,12 @@ impl MutHeapJSVal {
|
|||
debug_assert!(thread_state::get().is_script());
|
||||
unsafe { (*self.val.get()).get() }
|
||||
}
|
||||
|
||||
/// Get the underlying unsafe pointer to the contained value.
|
||||
pub unsafe fn get_unsafe(&self) -> *mut JSVal {
|
||||
debug_assert!(thread_state::get().is_script());
|
||||
(*self.val.get()).get_unsafe()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue