mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09: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: 67f7763ab9
1 changed files with 3 additions and 0 deletions
|
@ -171,6 +171,9 @@ void Object::visit_children(Cell::Visitor& visitor)
|
||||||
{
|
{
|
||||||
Cell::visit_children(visitor);
|
Cell::visit_children(visitor);
|
||||||
visitor.visit(m_shape);
|
visitor.visit(m_shape);
|
||||||
|
|
||||||
|
for (auto& value : m_storage)
|
||||||
|
visitor.visit(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Object::has_own_property(const FlyString& property_name) const
|
bool Object::has_own_property(const FlyString& property_name) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue