mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: propagate VirtualMethods::unbind_from_tree with &mut JSContext (#44422)
Propagate `&mut JSContext` in `VirtualMethods::unbind_from_tree` Testing: Successful build is enough Fixes: #42837 --------- Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
This commit is contained in:
@@ -1883,8 +1883,8 @@ impl VirtualMethods for HTMLFormElement {
|
||||
Some(self.upcast::<HTMLElement>() as &dyn VirtualMethods)
|
||||
}
|
||||
|
||||
fn unbind_from_tree(&self, context: &UnbindContext, can_gc: CanGc) {
|
||||
self.super_type().unwrap().unbind_from_tree(context, can_gc);
|
||||
fn unbind_from_tree(&self, cx: &mut js::context::JSContext, context: &UnbindContext) {
|
||||
self.super_type().unwrap().unbind_from_tree(cx, context);
|
||||
|
||||
// Collect the controls to reset because reset_form_owner
|
||||
// will mutably borrow self.controls
|
||||
@@ -1901,7 +1901,7 @@ impl VirtualMethods for HTMLFormElement {
|
||||
control
|
||||
.as_maybe_form_control()
|
||||
.expect("Element must be a form control")
|
||||
.reset_form_owner(can_gc);
|
||||
.reset_form_owner(CanGc::from_cx(cx));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user