mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
LibJS: Allow cells to mark null pointers
This simplifies the cell visiting functions by letting them not worry about the pointers they pass to the visitor being null.
This commit is contained in:
parent
1f4e3dd073
commit
1b391d78ae
5 changed files with 16 additions and 13 deletions
|
@ -45,8 +45,7 @@ LexicalEnvironment::~LexicalEnvironment()
|
|||
void LexicalEnvironment::visit_children(Visitor& visitor)
|
||||
{
|
||||
Cell::visit_children(visitor);
|
||||
if (m_parent)
|
||||
visitor.visit(m_parent);
|
||||
visitor.visit(m_parent);
|
||||
for (auto& it : m_variables)
|
||||
visitor.visit(it.value.value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue