add CanGc as argument to methods in ElementInternals, GlobalScope, HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement (#36492)

add CanGc as argument to methods in ElementInternals, GlobalScope,
HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement

Testing: These changes do not require tests because they are a refactor.
Addresses part of https://github.com/servo/servo/issues/34573.

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
Yerkebulan Tulibergenov 2025-04-12 22:15:07 -07:00 committed by GitHub
parent dcc88b53aa
commit 70c0faa0e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 29 additions and 27 deletions

View file

@ -362,7 +362,7 @@ impl HTMLAreaElementMethods<crate::DomTypeHolder> for HTMLAreaElement {
}
/// <https://html.spec.whatwg.org/multipage/#dom-area-rellist>
fn RelList(&self) -> DomRoot<DOMTokenList> {
fn RelList(&self, can_gc: CanGc) -> DomRoot<DOMTokenList> {
self.rel_list.or_init(|| {
DOMTokenList::new(
self.upcast(),
@ -372,7 +372,7 @@ impl HTMLAreaElementMethods<crate::DomTypeHolder> for HTMLAreaElement {
Atom::from("noreferrer"),
Atom::from("opener"),
]),
CanGc::note(),
can_gc,
)
})
}