mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibWeb: Make HTML::DecodedImageData to be GC-allocated
This change fixes GC-leak caused by following mutual dependency: - SVGDecodedImageData owns JS::Handle for Page. - SVGDecodedImageData is owned by visited objects. by making everything inherited from HTML::DecodedImageData and ListOfAvailableImages to be GC-allocated. Generally, if visited object has a handle, very likely we leak everything visited from object in a handle.
This commit is contained in:
committed by
Andreas Kling
parent
57a04c536c
commit
41a3c19cfe
@@ -354,7 +354,7 @@ i32 HTMLObjectElement::default_tab_index_value() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
RefPtr<DecodedImageData const> HTMLObjectElement::image_data() const
|
||||
JS::GCPtr<DecodedImageData> HTMLObjectElement::image_data() const
|
||||
{
|
||||
if (!m_image_request)
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user