mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use unsafe Heap::handle wherever needed
This commit is contained in:
parent
ed0091f86f
commit
f7c039516c
3 changed files with 12 additions and 3 deletions
|
@ -604,7 +604,8 @@ impl CustomElementReaction {
|
|||
match *self {
|
||||
CustomElementReaction::Upgrade(ref definition) => upgrade_element(definition.clone(), element),
|
||||
CustomElementReaction::Callback(ref callback, ref arguments) => {
|
||||
let arguments = arguments.iter().map(|arg| arg.handle()).collect();
|
||||
// We're rooted, so it's safe to hand out a handle to objects in Heap
|
||||
let arguments = arguments.iter().map(|arg| unsafe { arg.handle() }).collect();
|
||||
let _ = callback.Call_(&*element, arguments, ExceptionHandling::Report);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue