diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-29 12:41:58 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-29 12:41:58 +0200 |
commit | a38658dc887e0bfa52d754799fba5938f889d3a4 (patch) | |
tree | c3cb66d27c0dc6d46e5573735e1786e3667ef9da /Libraries/LibJS/Runtime/Function.h | |
parent | 698652a5484795c88b1f64dcc59765ca34f884a9 (diff) | |
download | serenity-a38658dc887e0bfa52d754799fba5938f889d3a4.zip |
LibJS: Don't use Optional<Value> for bound |this| values
Just use a plain Value since it already has an empty state.
Diffstat (limited to 'Libraries/LibJS/Runtime/Function.h')
-rw-r--r-- | Libraries/LibJS/Runtime/Function.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Libraries/LibJS/Runtime/Function.h b/Libraries/LibJS/Runtime/Function.h index eb1cd2b9f2..7c6f66e987 100644 --- a/Libraries/LibJS/Runtime/Function.h +++ b/Libraries/LibJS/Runtime/Function.h @@ -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; }; |