mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-09 08:33:28 +02:00
`DocumentObserver` register itself in Document` from constructor and unregister itself from `finalize()`. The problem is that `finalize()` won't be invoked for as long as `DocumentObserver` is visited by `Document`. By not visiting registered observers from `Document` we move this responsibility to object that allocated observer, which is always exactly what we want, e.g. once `SVGUseElement` that uses observer is gone, observer won't be visited anymore which will lead to `finalize()` being called.
287 KiB
287 KiB