1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

LibJS: Remove usage of define_native_property in OrdinaryFunctionObject

The length & name properties are supposed to be normal data properties.
This commit is contained in:
Idan Horowitz 2021-07-05 18:02:27 +03:00 committed by Linus Groh
parent b2e6088bff
commit 557424a141
2 changed files with 9 additions and 31 deletions

View file

@ -29,7 +29,7 @@ public:
virtual Value construct(FunctionObject& new_target) override;
virtual const FlyString& name() const override { return m_name; };
void set_name(const FlyString& name) { m_name = name; };
void set_name(const FlyString& name);
void set_is_class_constructor() { m_is_class_constructor = true; };
@ -49,9 +49,6 @@ private:
Value execute_function_body();
JS_DECLARE_NATIVE_GETTER(length_getter);
JS_DECLARE_NATIVE_GETTER(name_getter);
FlyString m_name;
NonnullRefPtr<Statement> m_body;
const Vector<FunctionNode::Parameter> m_parameters;