Propagate CanGc arguments through callers in constructors (#35541)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-20 17:17:45 +01:00 committed by GitHub
parent 5465bfc2af
commit 863d2ce871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
260 changed files with 986 additions and 603 deletions

View file

@ -34,6 +34,7 @@ impl MutationRecord {
attribute_name: &LocalName,
attribute_namespace: Option<&Namespace>,
old_value: Option<DOMString>,
can_gc: CanGc,
) -> DomRoot<MutationRecord> {
let record = Box::new(MutationRecord::new_inherited(
"attributes",
@ -46,12 +47,13 @@ impl MutationRecord {
None,
None,
));
reflect_dom_object(record, &*target.owner_window(), CanGc::note())
reflect_dom_object(record, &*target.owner_window(), can_gc)
}
pub(crate) fn character_data_mutated(
target: &Node,
old_value: Option<DOMString>,
can_gc: CanGc,
) -> DomRoot<MutationRecord> {
reflect_dom_object(
Box::new(MutationRecord::new_inherited(
@ -66,7 +68,7 @@ impl MutationRecord {
None,
)),
&*target.owner_window(),
CanGc::note(),
can_gc,
)
}
@ -76,6 +78,7 @@ impl MutationRecord {
removed_nodes: Option<&[&Node]>,
next_sibling: Option<&Node>,
prev_sibling: Option<&Node>,
can_gc: CanGc,
) -> DomRoot<MutationRecord> {
let window = target.owner_window();
let added_nodes = added_nodes.map(|list| NodeList::new_simple_list_slice(&window, list));
@ -95,7 +98,7 @@ impl MutationRecord {
prev_sibling,
)),
&*window,
CanGc::note(),
can_gc,
)
}