LibWeb/DOM: Create NodeIterator in document's realm

This commit is contained in:
Shannon Booth 2025-01-10 15:57:42 +13:00 committed by Sam Atkins
commit 84f22cb6b3
Notes: github-actions[bot] 2025-01-10 08:10:02 +00:00
4 changed files with 10 additions and 11 deletions

View file

@ -17,7 +17,7 @@ class NodeIterator final : public Bindings::PlatformObject {
GC_DECLARE_ALLOCATOR(NodeIterator);
public:
static WebIDL::ExceptionOr<GC::Ref<NodeIterator>> create(Node& root, unsigned what_to_show, GC::Ptr<NodeFilter>);
static WebIDL::ExceptionOr<GC::Ref<NodeIterator>> create(JS::Realm& realm, Node& root, unsigned what_to_show, GC::Ptr<NodeFilter>);
virtual ~NodeIterator() override;
@ -36,7 +36,7 @@ public:
void run_pre_removing_steps(Node&);
private:
explicit NodeIterator(Node& root);
explicit NodeIterator(JS::Realm&, Node& root);
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;