mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
LibJS: Function must mark its home object
This commit is contained in:
parent
c95d48c8d6
commit
3620a6e054
2 changed files with 3 additions and 2 deletions
|
@ -90,6 +90,7 @@ void Function::visit_edges(Visitor& visitor)
|
|||
{
|
||||
Object::visit_edges(visitor);
|
||||
|
||||
visitor.visit(m_home_object);
|
||||
visitor.visit(m_bound_this);
|
||||
|
||||
for (auto argument : m_bound_arguments)
|
||||
|
|
|
@ -48,8 +48,6 @@ public:
|
|||
virtual const FlyString& name() const = 0;
|
||||
virtual LexicalEnvironment* create_environment() = 0;
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
BoundFunction* bind(Value bound_this_value, Vector<Value> arguments);
|
||||
|
||||
Value bound_this() const { return m_bound_this; }
|
||||
|
@ -65,6 +63,8 @@ public:
|
|||
virtual bool is_strict_mode() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
explicit Function(Object& prototype);
|
||||
Function(Object& prototype, Value bound_this, Vector<Value> bound_arguments);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue