refactor: propagate CanGc arguments through callers (#35591)

Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
Auguste Baum 2025-02-23 01:34:51 +01:00 committed by GitHub
parent 02199520f2
commit b0b0289014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
74 changed files with 403 additions and 275 deletions

View file

@ -508,6 +508,7 @@ impl Element {
mode: ShadowRootMode,
clonable: bool,
slot_assignment_mode: SlotAssignmentMode,
can_gc: CanGc,
) -> Fallible<DomRoot<ShadowRoot>> {
// Step 1.
// If elements namespace is not the HTML namespace,
@ -539,7 +540,7 @@ impl Element {
mode,
slot_assignment_mode,
clonable,
CanGc::note(),
can_gc,
);
self.ensure_rare_data().shadow_root = Some(Dom::from_ref(&*shadow_root));
shadow_root
@ -3149,6 +3150,7 @@ impl ElementMethods<crate::DomTypeHolder> for Element {
init.mode,
init.clonable,
init.slotAssignment,
CanGc::note(),
)?;
// Step 2. Return thiss shadow root.