script: Pass &mut JSContext to reflect_node_with_proto (#43952)

A lot (and I mean, really a lot) depends on these constructors.
Therefore, this is the one spaghetti ball that I could extract and
convert all `can_gc` to `cx`. There are some new introductions of
`temp_cx` in the callbacks of the servo parser, but we already had some
in other callbacks.

Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe
2026-04-05 20:07:30 +02:00
committed by GitHub
parent 621f6b0cf7
commit a1c8896eda
97 changed files with 354 additions and 414 deletions

View File

@@ -141,19 +141,19 @@ impl HTMLTextAreaElement {
}
pub(crate) fn new(
cx: &mut js::context::JSContext,
local_name: LocalName,
prefix: Option<Prefix>,
document: &Document,
proto: Option<HandleObject>,
can_gc: CanGc,
) -> DomRoot<HTMLTextAreaElement> {
Node::reflect_node_with_proto(
cx,
Box::new(HTMLTextAreaElement::new_inherited(
local_name, prefix, document,
)),
document,
proto,
can_gc,
)
}