Commit graph

3 commits

Author SHA1 Message Date
Shannon Booth
b543523717 LibWeb: Fire slotchange events when a slot is changed 2025-03-10 14:37:26 -04:00
Andreas Kling
53c9c6f3ee LibWeb: Make Agent's MutationObserver list weak
Before this change, Agent held on to all of the live MutationObserver
objects via GC::Root. This prevented them from ever getting
garbage-collected.

Instead of roots, we now use a simple IntrusiveList and remove them
from it in the finalizer for MutationObserver.

This fixes a massive GC leak on Speedometer.
2025-02-07 16:53:11 +01:00
Shannon Booth
64eeda6450 LibWeb: Return a representation of an 'Agent' in 'relevant agent'
This makes it more convenient to use the 'relvant agent' concept,
instead of the awkward dynamic casts we needed to do for every call
site.

mutation_observers is also changed to hold a GC::Root instead of raw
GC::Ptr. Somehow this was not causing problems before, but trips up CI
after these changes.
2025-01-11 10:39:48 -05:00