summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-10-08 23:19:42 +0100
committerLinus Groh <mail@linusgroh.de>2021-10-09 14:29:20 +0100
commit72f5252826c83f38520fff8899b6f1b4cb0c6fe5 (patch)
treef6ad2a5407c9ec224e286cec6559fbd917edcc99 /Userland
parent7fc28079295ebcd3b834bd96230aee22997b5411 (diff)
downloadserenity-72f5252826c83f38520fff8899b6f1b4cb0c6fe5.zip
LibJS: Forward BoundFunction::has_constructor() to bound target function
A BoundFunction only implements [[Construct]] (has_constructor() in LibJS) if its bound target function does.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/BoundFunction.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/BoundFunction.h b/Userland/Libraries/LibJS/Runtime/BoundFunction.h
index ccf92b6499..d5385cd24a 100644
--- a/Userland/Libraries/LibJS/Runtime/BoundFunction.h
+++ b/Userland/Libraries/LibJS/Runtime/BoundFunction.h
@@ -23,7 +23,7 @@ public:
virtual FunctionEnvironment* new_function_environment(Object* new_target) override;
virtual const FlyString& name() const override { return m_name; }
virtual bool is_strict_mode() const override { return m_bound_target_function->is_strict_mode(); }
- virtual bool has_constructor() const override { return true; }
+ virtual bool has_constructor() const override { return m_bound_target_function->has_constructor(); }
FunctionObject& bound_target_function() const { return *m_bound_target_function; }
Value bound_this() const { return m_bound_this; }