1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibJS: Add FunctionObject constructor allowing null prototype

This just calls through to the Object constructor added in the previous
commit.
This commit is contained in:
Linus Groh 2022-02-09 19:35:36 +00:00
parent 368af9ad6e
commit 87b9fa2636
2 changed files with 6 additions and 34 deletions

View file

@ -31,7 +31,6 @@ public:
void set_function_name(Variant<PropertyKey, PrivateName> const& name_arg, Optional<StringView> const& prefix = {});
void set_function_length(double length);
ThrowCompletionOr<BoundFunction*> bind(Value bound_this_value, Vector<Value> arguments);
virtual bool is_strict_mode() const { return false; }
@ -41,6 +40,7 @@ public:
virtual Realm* realm() const { return nullptr; }
protected:
explicit FunctionObject(GlobalObject&, Object* prototype);
explicit FunctionObject(Object& prototype);
private: