mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 13:19:47 +00:00
LibWeb: Make EventLoop, TaskQueue, and Task GC-allocated
...and use HeapFunction instead of SafeFunction for task steps. Since there is only one EventLoop per process, it lives as a global handle in the VM custom data. This makes it much easier to reason about lifetimes of tasks, task steps, and random stuff captured by them.
This commit is contained in:
@@ -122,7 +122,7 @@ private:
|
||||
NonnullOwnPtr<JS::ExecutionContext> m_realm_execution_context;
|
||||
JS::GCPtr<ModuleMap> m_module_map;
|
||||
|
||||
EventLoop* m_responsible_event_loop { nullptr };
|
||||
JS::GCPtr<EventLoop> m_responsible_event_loop;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#outstanding-rejected-promises-weak-set
|
||||
// The outstanding rejected promises weak set must not create strong references to any of its members, and implementations are free to limit its size, e.g. by removing old entries from it when new ones are added.
|
||||
|
||||
Reference in New Issue
Block a user