mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
refactor: propagate CanGc arguments through callers (#35591)
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
This commit is contained in:
parent
02199520f2
commit
b0b0289014
74 changed files with 403 additions and 275 deletions
|
@ -81,9 +81,10 @@ impl MutationRecord {
|
|||
can_gc: CanGc,
|
||||
) -> DomRoot<MutationRecord> {
|
||||
let window = target.owner_window();
|
||||
let added_nodes = added_nodes.map(|list| NodeList::new_simple_list_slice(&window, list));
|
||||
let added_nodes =
|
||||
added_nodes.map(|list| NodeList::new_simple_list_slice(&window, list, can_gc));
|
||||
let removed_nodes =
|
||||
removed_nodes.map(|list| NodeList::new_simple_list_slice(&window, list));
|
||||
removed_nodes.map(|list| NodeList::new_simple_list_slice(&window, list, can_gc));
|
||||
|
||||
reflect_dom_object(
|
||||
Box::new(MutationRecord::new_inherited(
|
||||
|
@ -158,13 +159,13 @@ impl MutationRecordMethods<crate::DomTypeHolder> for MutationRecord {
|
|||
// https://dom.spec.whatwg.org/#dom-mutationrecord-addednodes
|
||||
fn AddedNodes(&self) -> DomRoot<NodeList> {
|
||||
self.added_nodes
|
||||
.or_init(|| NodeList::empty(&self.target.owner_window()))
|
||||
.or_init(|| NodeList::empty(&self.target.owner_window(), CanGc::note()))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-mutationrecord-removednodes
|
||||
fn RemovedNodes(&self) -> DomRoot<NodeList> {
|
||||
self.removed_nodes
|
||||
.or_init(|| NodeList::empty(&self.target.owner_window()))
|
||||
.or_init(|| NodeList::empty(&self.target.owner_window(), CanGc::note()))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-mutationrecord-previoussibling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue