mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
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:
parent
bd43b78735
commit
6898eae61e
20 changed files with 137 additions and 111 deletions
|
@ -112,10 +112,10 @@ impl AttrMethods<crate::DomTypeHolder> for Attr {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-attr-value
|
||||
fn SetValue(&self, value: DOMString) {
|
||||
fn SetValue(&self, value: DOMString, can_gc: CanGc) {
|
||||
if let Some(owner) = self.owner() {
|
||||
let value = owner.parse_attribute(self.namespace(), self.local_name(), value);
|
||||
self.set_value(value, &owner, CanGc::note());
|
||||
self.set_value(value, &owner, can_gc);
|
||||
} else {
|
||||
*self.value.borrow_mut() = AttrValue::String(value.into());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue