Add can_gc to HTMLDocument NamedGetter (#38455)

Just fixing something missed on my last PR
https://github.com/servo/servo/pull/38433#discussion_r2250744925

Signed-off-by: Leo Ring <leoring03@gmail.com>
This commit is contained in:
Leo Ring 2025-08-04 12:41:53 +01:00 committed by GitHub
parent c59ee57b5d
commit 26d2d0f7d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -30,7 +30,7 @@ impl HTMLDocumentMethods<crate::DomTypeHolder> for HTMLDocument {
}
/// <https://html.spec.whatwg.org/multipage/#dom-tree-accessors:dom-document-nameditem-filter>
fn NamedGetter(&self, name: DOMString) -> Option<NamedPropertyValue> {
self.document.NamedGetter(name, CanGc::note())
fn NamedGetter(&self, name: DOMString, can_gc: CanGc) -> Option<NamedPropertyValue> {
self.document.NamedGetter(name, can_gc)
}
}