mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibJS: Forward BoundFunction::has_constructor() to bound target function
A BoundFunction only implements [[Construct]] (has_constructor() in LibJS) if its bound target function does.
This commit is contained in:
parent
7fc2807929
commit
72f5252826
Notes:
sideshowbarker
2024-07-18 02:53:26 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/72f5252826c Pull-request: https://github.com/SerenityOS/serenity/pull/10402 Reviewed-by: https://github.com/awesomekling ✅
|
@ -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; }
|
||||
|
|
Loading…
Reference in a new issue