mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Add AsHandleValue trait to Heap<Value> and make Heap values rooted (#38024)
Encapsulates the unsafe conversion from Heap<Value> to HandleValue<'a>, and reducing repetitive unsafe code at call. fix #37258
This commit is contained in:
parent
9416251cab
commit
04ec710e60
17 changed files with 204 additions and 146 deletions
|
@ -422,6 +422,7 @@ impl Element {
|
|||
self.ensure_rare_data().custom_element_definition = None;
|
||||
}
|
||||
|
||||
#[cfg_attr(crown, allow(crown::unrooted_must_root))]
|
||||
pub(crate) fn push_callback_reaction(&self, function: Rc<Function>, args: Box<[Heap<JSVal>]>) {
|
||||
self.ensure_rare_data()
|
||||
.custom_element_reaction_queue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue