LibWeb: Do not store resize observer entries in a plain vector

This is not safe from GC. Unfortunately we cannot add a test to capture
the issue, as the allocation which may trigger GC is internal and not
observable from JS.
This commit is contained in:
Timothy Flynn 2024-10-31 11:30:24 -04:00 committed by Alexander Kalenik
commit 04648d93d4
Notes: github-actions[bot] 2024-10-31 23:37:30 +00:00
3 changed files with 3 additions and 3 deletions

View file

@ -5131,7 +5131,7 @@ size_t Document::broadcast_active_resize_observations()
}
// 2. Let entries be an empty list of ResizeObserverEntryies.
Vector<JS::NonnullGCPtr<ResizeObserver::ResizeObserverEntry>> entries;
JS::MarkedVector<JS::NonnullGCPtr<ResizeObserver::ResizeObserverEntry>> entries(heap());
// 3. For each observation in [[activeTargets]] perform these steps:
for (auto const& observation : observer->active_targets()) {