1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:47:34 +00:00

LibJS: Don't use Optional<Value> for bound |this| values

Just use a plain Value since it already has an empty state.
This commit is contained in:
Andreas Kling 2020-04-29 12:41:58 +02:00
parent 698652a548
commit a38658dc88
2 changed files with 8 additions and 12 deletions

View file

@ -44,7 +44,7 @@ public:
BoundFunction* bind(Value bound_this_value, Vector<Value> arguments);
Optional<Value> bound_this() const
Value bound_this() const
{
return m_bound_this;
}
@ -56,12 +56,12 @@ public:
protected:
explicit Function(Object& prototype);
explicit Function(Object& prototype, Optional<Value> bound_this, Vector<Value> bound_arguments);
explicit Function(Object& prototype, Value bound_this, Vector<Value> bound_arguments);
virtual const char* class_name() const override { return "Function"; }
private:
virtual bool is_function() const final { return true; }
Optional<Value> m_bound_this;
Value m_bound_this;
Vector<Value> m_bound_arguments;
};