diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-25 09:52:49 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-25 17:51:30 +0200 |
commit | 38157a60936f2c8718e1ae9b1bc664db1c832931 (patch) | |
tree | 68ed011510f95b3de62a622a52863095102ccb64 /Userland/Libraries/LibJS/Runtime/FunctionObject.h | |
parent | e14f420a44075aecf5c212ae61705e04f821cf38 (diff) | |
download | serenity-38157a60936f2c8718e1ae9b1bc664db1c832931.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/FunctionObject.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/FunctionObject.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionObject.h b/Userland/Libraries/LibJS/Runtime/FunctionObject.h index 7f3251e0f3..4b898e3795 100644 --- a/Userland/Libraries/LibJS/Runtime/FunctionObject.h +++ b/Userland/Libraries/LibJS/Runtime/FunctionObject.h @@ -27,6 +27,8 @@ public: virtual bool is_strict_mode() const { return false; } + virtual bool has_constructor() const { return false; } + // [[Realm]] virtual Realm* realm() const { return nullptr; } |