mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -484,7 +484,7 @@ impl Tokenizer {
|
|||
|
||||
document
|
||||
.upcast::<Node>()
|
||||
.AppendChild(doctype.upcast())
|
||||
.AppendChild(doctype.upcast(), can_gc)
|
||||
.expect("Appending failed");
|
||||
},
|
||||
ParseOperation::AddAttrsIfMissing { target, attrs } => {
|
||||
|
@ -503,7 +503,7 @@ impl Tokenizer {
|
|||
},
|
||||
ParseOperation::RemoveFromParent { target } => {
|
||||
if let Some(ref parent) = self.get_node(&target).GetParentNode() {
|
||||
parent.RemoveChild(&self.get_node(&target)).unwrap();
|
||||
parent.RemoveChild(&self.get_node(&target), can_gc).unwrap();
|
||||
}
|
||||
},
|
||||
ParseOperation::MarkScriptAlreadyStarted { node } => {
|
||||
|
@ -517,7 +517,7 @@ impl Tokenizer {
|
|||
let parent = self.get_node(&parent);
|
||||
let new_parent = self.get_node(&new_parent);
|
||||
while let Some(child) = parent.GetFirstChild() {
|
||||
new_parent.AppendChild(&child).unwrap();
|
||||
new_parent.AppendChild(&child, can_gc).unwrap();
|
||||
}
|
||||
},
|
||||
ParseOperation::AssociateWithForm {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue