mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:27:43 +00:00
LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr
This commit is contained in:
parent
2a66fc6cae
commit
22089436ed
161 changed files with 367 additions and 370 deletions
|
@ -45,7 +45,7 @@ JS::NonnullGCPtr<NodeIterator> NodeIterator::create(Node& root, unsigned what_to
|
|||
// 2. Set iterator’s root and iterator’s reference to root.
|
||||
// 3. Set iterator’s pointer before reference to true.
|
||||
auto& realm = root.realm();
|
||||
auto* iterator = realm.heap().allocate<NodeIterator>(realm, root);
|
||||
auto iterator = realm.heap().allocate<NodeIterator>(realm, root);
|
||||
|
||||
// 4. Set iterator’s whatToShow to whatToShow.
|
||||
iterator->m_what_to_show = what_to_show;
|
||||
|
@ -54,7 +54,7 @@ JS::NonnullGCPtr<NodeIterator> NodeIterator::create(Node& root, unsigned what_to
|
|||
iterator->m_filter = filter;
|
||||
|
||||
// 6. Return iterator.
|
||||
return *iterator;
|
||||
return iterator;
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-nodeiterator-detach
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue