LibCore: Don't reserve 2 KiB of stack memory when processing event queue

The inline capacity on ThreadEventQueue::Private::queued_events caused
us to reserve (and importantly, not initialize!) 2 KiB of stack memory
when entering ThreadEventQueue::process().

This was causing any leftover pointers to GC-allocated objects within
that memory range to keep those objects alive, even when all other
references were gone.
This commit is contained in:
Andreas Kling 2024-11-10 15:11:19 +01:00 committed by Andreas Kling
parent 11458f0d91
commit 8c809fa5ee
Notes: github-actions[bot] 2024-11-10 18:14:02 +00:00

View file

@ -35,7 +35,7 @@ struct ThreadEventQueue::Private {
};
Threading::Mutex mutex;
Vector<QueuedEvent, 128> queued_events;
Vector<QueuedEvent> queued_events;
Vector<NonnullRefPtr<Promise<NonnullRefPtr<EventReceiver>>>, 16> pending_promises;
bool warned_promise_count { false };
};