mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +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: https://github.com/SerenityOS/serenity/commit/1fe6a422f13 Pull-request: https://github.com/SerenityOS/serenity/pull/10483 Issue: https://github.com/SerenityOS/serenity/issues/8198 Reviewed-by: https://github.com/linusg ✅
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue