mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibJS: Stop having AsyncFunctionDriverWrapper leak itself
Async functions whose promise is never resolved were leaking, since they had a strong root JS::Handle on themselves. This doesn't appear to actually be necessary, since the wrapper will be kept alive as long as it's reachable (and if it's not reachable, nobody is going to resolve/reject the promise either). This fixes the vast majority of leaks on Speedometer, bringing memory usage at the end of a full run from ~12 GiB to ~3 GiB.
This commit is contained in:
parent
10724a7cb3
commit
b6a5b7e186
Notes:
github-actions[bot]
2024-11-12 16:39:22 +00:00
Author: https://github.com/awesomekling
Commit: b6a5b7e186
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2301
Reviewed-by: https://github.com/Hendiadyoin1
2 changed files with 1 additions and 11 deletions
|
@ -38,7 +38,6 @@ private:
|
|||
NonnullGCPtr<GeneratorObject> m_generator_object;
|
||||
NonnullGCPtr<Promise> m_top_level_promise;
|
||||
GCPtr<Promise> m_current_promise { nullptr };
|
||||
Handle<AsyncFunctionDriverWrapper> m_self_handle;
|
||||
OwnPtr<ExecutionContext> m_suspended_execution_context;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue