mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibJS: Object needs to protect values in its storage
Otherwise the garbage collector will eat them way too soon! This made it impossible to use "js -g" without crashing.
This commit is contained in:
parent
bb1ad4b649
commit
67f7763ab9
Notes:
sideshowbarker
2024-07-19 07:51:36 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/67f7763ab95
1 changed files with 3 additions and 0 deletions
|
@ -171,6 +171,9 @@ void Object::visit_children(Cell::Visitor& visitor)
|
|||
{
|
||||
Cell::visit_children(visitor);
|
||||
visitor.visit(m_shape);
|
||||
|
||||
for (auto& value : m_storage)
|
||||
visitor.visit(value);
|
||||
}
|
||||
|
||||
bool Object::has_own_property(const FlyString& property_name) const
|
||||
|
|
Loading…
Add table
Reference in a new issue