1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 16:55:09 +00:00

LibJS: Make Function and CallFrame aware of their function name

This commit is contained in:
Linus Groh 2020-04-11 12:56:20 +01:00 committed by Andreas Kling
parent 4eceea7c62
commit eece424694
11 changed files with 39 additions and 22 deletions

View file

@ -33,8 +33,9 @@
namespace JS {
ScriptFunction::ScriptFunction(const Statement& body, Vector<FlyString> parameters)
: m_body(body)
ScriptFunction::ScriptFunction(const FlyString& name, const Statement& body, Vector<FlyString> parameters)
: m_name(name)
, m_body(body)
, m_parameters(move(parameters))
{
put("prototype", heap().allocate<Object>());