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
parent be1d400369
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

@@ -31,7 +31,7 @@ public:
void unobserve(DOM::Element& target);
void disconnect();
void invoke_callback(Vector<JS::NonnullGCPtr<ResizeObserverEntry>>& entries) const;
void invoke_callback(ReadonlySpan<JS::NonnullGCPtr<ResizeObserverEntry>> entries) const;
Vector<JS::NonnullGCPtr<ResizeObservation>>& observation_targets() { return m_observation_targets; }
Vector<JS::NonnullGCPtr<ResizeObservation>>& active_targets() { return m_active_targets; }