mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibJS: Call the correct base class in LexicalEnvironment::visit_edges()
We were calling directly up to Cell, skipping over ScopeObject. This made us not mark the scope chain parent for lexical environments, sometimes causing them to get GC'd and use-after-free'd. Found by Fuzzilli. Fixes #5140.
This commit is contained in:
@@ -63,7 +63,7 @@ LexicalEnvironment::~LexicalEnvironment()
|
||||
|
||||
void LexicalEnvironment::visit_edges(Visitor& visitor)
|
||||
{
|
||||
Cell::visit_edges(visitor);
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_this_value);
|
||||
visitor.visit(m_home_object);
|
||||
visitor.visit(m_new_target);
|
||||
|
||||
Reference in New Issue
Block a user