mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-08 16:12:23 +02:00
The DeferredInvocationContext only existed to satisfy the requirement in ThreadEventQueue that each event has an EventReceiver. However, deferred_invoke() was not even using the EventReceiver to call its callback. Therefore, we don't need to allocate one for every deferred invocation. This also prevents WeakPtr::strong_ref() from racing and leaking the context object when invoking a function across threads.
22 KiB
22 KiB