mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Use GCPtr for Element::layout_node
This improves debuggability by converting a SIGSEGV into a verification failed on a null dereference.
This commit is contained in:
committed by
Andreas Kling
parent
67f659bb85
commit
aede010096
@@ -2070,12 +2070,12 @@ void Element::for_each_attribute(Function<void(FlyString const&, String const&)>
|
||||
});
|
||||
}
|
||||
|
||||
Layout::NodeWithStyle* Element::layout_node()
|
||||
JS::GCPtr<Layout::NodeWithStyle> Element::layout_node()
|
||||
{
|
||||
return static_cast<Layout::NodeWithStyle*>(Node::layout_node());
|
||||
}
|
||||
|
||||
Layout::NodeWithStyle const* Element::layout_node() const
|
||||
JS::GCPtr<Layout::NodeWithStyle const> Element::layout_node() const
|
||||
{
|
||||
return static_cast<Layout::NodeWithStyle const*>(Node::layout_node());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user