LibJS: Fix null deref in ObjectProperty::dump()

This commit is contained in:
davidot 2021-10-11 20:30:31 +02:00 committed by Linus Groh
parent 10bf91a293
commit 1fe6a422f1
Notes: sideshowbarker 2024-07-18 02:21:28 +09:00

View file

@ -2272,8 +2272,15 @@ void VariableDeclarator::dump(int indent) const
void ObjectProperty::dump(int indent) const
{
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