script: Pass &mut JSContext to children_changed and adopting_steps (#43219)

Switch `VirtualMethods::children_changed` and
`VirtualMethods::adopting_steps` to `&mut JSContext`.

Testing: No behaviour change, a successful build is enough.
Part of #40600

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24
2026-03-13 14:40:40 +01:00
committed by GitHub
parent cd2c51bb3c
commit 048612fe84
30 changed files with 293 additions and 238 deletions

View File

@@ -1225,9 +1225,9 @@ impl VirtualMethods for HTMLScriptElement {
}
/// <https://html.spec.whatwg.org/multipage/#script-processing-model:the-script-element-26>
fn children_changed(&self, mutation: &ChildrenMutation, can_gc: CanGc) {
fn children_changed(&self, cx: &mut JSContext, mutation: &ChildrenMutation) {
if let Some(s) = self.super_type() {
s.children_changed(mutation, can_gc);
s.children_changed(cx, mutation);
}
if self.upcast::<Node>().is_connected() && !self.parser_inserted.get() {