Add CanGc as arguments in methods in devtools.rs, CharacterData, CSSStyleRule, CSSStyleSheet (#36375)

Add CanGc as arguments in methods in devtools.rs, CharacterData,
CSSStyleRule, CSSStyleSheet

Testing: These changes do not require tests because they are a refactor.
Addressed 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-06 16:44:58 -07:00 committed by GitHub
parent 1f558a0d49
commit 33b00dbe40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 42 additions and 30 deletions

View file

@ -260,9 +260,9 @@ impl CharacterDataMethods<crate::DomTypeHolder> for CharacterData {
}
// https://dom.spec.whatwg.org/#dom-childnode-remove
fn Remove(&self) {
fn Remove(&self, can_gc: CanGc) {
let node = self.upcast::<Node>();
node.remove_self(CanGc::note());
node.remove_self(can_gc);
}
// https://dom.spec.whatwg.org/#dom-nondocumenttypechildnode-previouselementsibling