Add CanGc as arguments in methods in Attr and Node (#36371)

Add CanGc as argument to methods in `Attr` and `Node`.

Addressed part of https://github.com/servo/servo/issues/34573.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they are a refactor.

Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
This commit is contained in:
Yerkebulan Tulibergenov 2025-04-05 23:27:59 -07:00 committed by GitHub
parent bd43b78735
commit 6898eae61e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 137 additions and 111 deletions

View file

@ -1928,7 +1928,7 @@ impl HTMLMediaElement {
.SetTextContent(Some(DOMString::from(media_controls_script)), can_gc);
if let Err(e) = shadow_root
.upcast::<Node>()
.AppendChild(script.upcast::<Node>())
.AppendChild(script.upcast::<Node>(), can_gc)
{
warn!("Could not render media controls {:?}", e);
return;
@ -1949,7 +1949,7 @@ impl HTMLMediaElement {
if let Err(e) = shadow_root
.upcast::<Node>()
.AppendChild(style.upcast::<Node>())
.AppendChild(style.upcast::<Node>(), can_gc)
{
warn!("Could not render media controls {:?}", e);
}