mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-08 18:46:03 +00:00
LibJS: Move has_constructor() from NativeFunction to FunctionObject
At a later point this will indicate whether some FunctionObject "has a [[Construct]] internal method" (separate from the current FunctionObject call() / construct()), to help with a more spec-compliant implementation of [[Call]] and [[Construct]]. This means that it is no longer relevant to just NativeFunction.
This commit is contained in:
parent
e14f420a44
commit
38157a6093
Notes:
sideshowbarker
2024-07-18 03:27:42 +09:00
Author: https://github.com/linusg
Commit: 38157a6093
Pull-request: https://github.com/SerenityOS/serenity/pull/10203
Reviewed-by: https://github.com/IdanHo ✅
Reviewed-by: https://github.com/davidot
7 changed files with 16 additions and 11 deletions
|
@ -24,6 +24,7 @@ public:
|
|||
virtual Value construct(FunctionObject& new_target) override;
|
||||
virtual const FlyString& name() const override;
|
||||
virtual FunctionEnvironment* create_environment(FunctionObject&) override;
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
|
||||
const Object& target() const { return m_target; }
|
||||
const Object& handler() const { return m_handler; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue