mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
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:
committed by
Andreas Kling
parent
11458f0d91
commit
8c809fa5ee
@@ -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 };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user