1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:18:13 +00:00

LibJS+LibWeb: Plumb local variables names to ECMAScriptFunctionObject

Saving vector of local variables names in ECMAScriptFunctionObject
will allow to get a name by index in case message of ReferenceError
needs to contain a variable name.
This commit is contained in:
Aliaksandr Kalenik 2023-07-05 17:17:16 +02:00 committed by Andreas Kling
parent 401d97c45c
commit 7765ebb5f2
10 changed files with 27 additions and 20 deletions

View file

@ -39,6 +39,8 @@ public:
// [[Realm]]
virtual Realm* realm() const { return nullptr; }
virtual Vector<DeprecatedFlyString> const& local_variables_names() const { VERIFY_NOT_REACHED(); };
protected:
explicit FunctionObject(Realm&, Object* prototype);
explicit FunctionObject(Object& prototype);