mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Add missing visit_edges() for ImageStyleValue
ImageStyleValue has a visit_edges() method, although it is not a GC-allocated object. This is necessary because it owns a GC-allocated ImageRequest that we want to visit, instead of using JS::Handle, to avoid leaks. In the future, we might want to make StyleValue be GC-allocated. For now, this change adds missing visit_edges() calls for objects that own ImageStyleValue.
This commit is contained in:
parent
b43b3d2f8d
commit
32be413f4e
Notes:
sideshowbarker
2024-07-17 07:19:27 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 32be413f4e
Pull-request: https://github.com/SerenityOS/serenity/pull/21247
4 changed files with 23 additions and 0 deletions
|
@ -22,6 +22,13 @@ HTMLBodyElement::HTMLBodyElement(DOM::Document& document, DOM::QualifiedName qua
|
|||
|
||||
HTMLBodyElement::~HTMLBodyElement() = default;
|
||||
|
||||
void HTMLBodyElement::visit_edges(Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
if (m_background_style_value)
|
||||
m_background_style_value->visit_edges(visitor);
|
||||
}
|
||||
|
||||
void HTMLBodyElement::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue