diff options
author | Linus Groh <mail@linusgroh.de> | 2022-12-14 17:40:33 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-12-15 06:56:37 -0500 |
commit | 22089436edec780e03960ecaa74bfc4930126534 (patch) | |
tree | f60662c28d36e8fcce4b734e09af396c68ed1aaf /Userland/Libraries/LibWeb/DOM/TreeWalker.cpp | |
parent | 2a66fc6cae8ef09e780cd795bf0b1d7f8844f4ec (diff) | |
download | serenity-22089436edec780e03960ecaa74bfc4930126534.zip |
LibJS: Convert Heap::allocate{,_without_realm}() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/TreeWalker.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/TreeWalker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/TreeWalker.cpp b/Userland/Libraries/LibWeb/DOM/TreeWalker.cpp index 2711aab3dc..fbaa0245eb 100644 --- a/Userland/Libraries/LibWeb/DOM/TreeWalker.cpp +++ b/Userland/Libraries/LibWeb/DOM/TreeWalker.cpp @@ -36,7 +36,7 @@ JS::NonnullGCPtr<TreeWalker> TreeWalker::create(Node& root, unsigned what_to_sho // 1. Let walker be a new TreeWalker object. // 2. Set walker’s root and walker’s current to root. auto& realm = root.realm(); - auto* walker = realm.heap().allocate<TreeWalker>(realm, root); + auto walker = realm.heap().allocate<TreeWalker>(realm, root); // 3. Set walker’s whatToShow to whatToShow. walker->m_what_to_show = what_to_show; @@ -45,7 +45,7 @@ JS::NonnullGCPtr<TreeWalker> TreeWalker::create(Node& root, unsigned what_to_sho walker->m_filter = filter; // 5. Return walker. - return *walker; + return walker; } // https://dom.spec.whatwg.org/#dom-treewalker-currentnode |