mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02: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
Notes:
sideshowbarker
2024-07-17 07:06:47 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/41a3c19cfe Pull-request: https://github.com/SerenityOS/serenity/pull/22267 Reviewed-by: https://github.com/shannonbooth ✅
@@ -81,7 +81,7 @@ private:
|
||||
|
||||
Representation m_representation { Representation::Unknown };
|
||||
|
||||
RefPtr<DecodedImageData const> image_data() const;
|
||||
JS::GCPtr<DecodedImageData> image_data() const;
|
||||
|
||||
JS::GCPtr<SharedImageRequest> m_image_request;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user