Handle exceptions during upgrades

This commit is contained in:
Connor Brewster 2017-07-21 14:38:58 -06:00
parent 6d9d4add61
commit e700006fb2
18 changed files with 71 additions and 156 deletions

View file

@ -774,11 +774,13 @@ impl ScriptThread {
})
}
pub fn enqueue_callback_reaction(element: &Element, reaction: CallbackReaction) {
pub fn enqueue_callback_reaction(element: &Element,
reaction: CallbackReaction,
definition: Option<Rc<CustomElementDefinition>>) {
SCRIPT_THREAD_ROOT.with(|root| {
if let Some(script_thread) = root.get() {
let script_thread = unsafe { &*script_thread };
script_thread.custom_element_reaction_stack.enqueue_callback_reaction(element, reaction);
script_thread.custom_element_reaction_stack.enqueue_callback_reaction(element, reaction, definition);
}
})
}