mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02: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:
Notes:
sideshowbarker
2024-07-18 03:27:42 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/38157a60936 Pull-request: https://github.com/SerenityOS/serenity/pull/10203 Reviewed-by: https://github.com/IdanHo ✅ Reviewed-by: https://github.com/davidot
@@ -71,6 +71,8 @@ public:
|
||||
// This is for IsSimpleParameterList (static semantics)
|
||||
bool has_simple_parameter_list() const { return m_has_simple_parameter_list; }
|
||||
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
|
||||
protected:
|
||||
virtual bool is_strict_mode() const final { return m_strict; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user