mirror of
https://github.com/RGBCube/serenity
synced 2025-06-30 10:12:07 +00:00
LibJS: Pass prototype to Function constructors
This commit is contained in:
parent
205ac0090d
commit
f6d57c82f6
21 changed files with 66 additions and 24 deletions
|
@ -54,6 +54,9 @@ Interpreter::Interpreter()
|
|||
m_object_prototype = heap().allocate<ObjectPrototype>();
|
||||
m_function_prototype = heap().allocate<FunctionPrototype>();
|
||||
|
||||
static_cast<FunctionPrototype*>(m_function_prototype)->initialize();
|
||||
static_cast<ObjectPrototype*>(m_object_prototype)->initialize();
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
|
||||
if (!m_##snake_name##_prototype) \
|
||||
m_##snake_name##_prototype = heap().allocate<PrototypeName>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue