mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +00:00
LibJS: Fix null deref in ObjectProperty::dump()
This commit is contained in:
parent
10bf91a293
commit
1fe6a422f1
Notes:
sideshowbarker
2024-07-18 02:21:28 +09:00
Author: https://github.com/davidot
Commit: 1fe6a422f1
Pull-request: https://github.com/SerenityOS/serenity/pull/10483
Issue: https://github.com/SerenityOS/serenity/issues/8198
Reviewed-by: https://github.com/linusg ✅
1 changed files with 9 additions and 2 deletions
|
@ -2272,8 +2272,15 @@ void VariableDeclarator::dump(int indent) const
|
||||||
void ObjectProperty::dump(int indent) const
|
void ObjectProperty::dump(int indent) const
|
||||||
{
|
{
|
||||||
ASTNode::dump(indent);
|
ASTNode::dump(indent);
|
||||||
m_key->dump(indent + 1);
|
|
||||||
m_value->dump(indent + 1);
|
if (m_property_type == Type::Spread) {
|
||||||
|
print_indent(indent + 1);
|
||||||
|
outln("...Spreading");
|
||||||
|
m_key->dump(indent + 1);
|
||||||
|
} else {
|
||||||
|
m_key->dump(indent + 1);
|
||||||
|
m_value->dump(indent + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectExpression::dump(int indent) const
|
void ObjectExpression::dump(int indent) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue