mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibWeb: Add GC finalizer to DOM::NodeIterator
It's potentially unsafe to access `m_root` in the destructor since it may have been swept, so move unregistration of the NodeIterator into a GC finalizer instead.
This commit is contained in:
parent
e7da96acaf
commit
eda566d112
2 changed files with 5 additions and 1 deletions
|
@ -38,6 +38,7 @@ private:
|
|||
explicit NodeIterator(Node& root);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
virtual void finalize() override;
|
||||
|
||||
enum class Direction {
|
||||
Next,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue