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:
elomscansio
2026-04-23 15:09:11 +01:00
committed by GitHub
parent ff0e9655a8
commit aa7eca43b7
25 changed files with 71 additions and 92 deletions

View File

@@ -684,8 +684,8 @@ impl VirtualMethods for HTMLTextAreaElement {
}
}
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);
let node = self.upcast::<Node>();
let el = self.upcast::<Element>();
@@ -698,8 +698,8 @@ impl VirtualMethods for HTMLTextAreaElement {
el.check_disabled_attribute();
}
self.validity_state(can_gc)
.perform_validation_and_update(ValidationFlags::all(), can_gc);
self.validity_state(CanGc::from_cx(cx))
.perform_validation_and_update(ValidationFlags::all(), CanGc::from_cx(cx));
}
// The cloning steps for textarea elements must propagate the raw value