mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +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:
parent
7ec8f83a7f
commit
803a20fa86
Notes:
sideshowbarker
2024-07-18 22:47:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/803a20fa867
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue