mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
Before this change, whenever ImageStyleValue had a non-null `m_image_request`, it was always leaked along with everything related to the document to which this value belongs. The issue arises due to the use of `JS::Handle` for the image request, as it introduces a cyclic dependency where `ImageRequest` prevents the `CSSStyleSheet`, that owns `ImageStyleValue`, from being deallocated: - ImageRequest - FetchController - FetchParams - Window - HTMLDocument - HTMLHtmlElement - HTMLBodyElement - Text - HTMLHeadElement - Text - HTMLMetaElement - Text - HTMLTitleElement - Text - HTMLStyleElement - CSSStyleSheet This change solves this by visiting `m_image_request` from `visit_edges` instead of introducing new heap root by using `JS::Handle`.
20 KiB
20 KiB