mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibJS: Make Array constructor take its prototype
Let's start moving towards native JS objects taking their prototype as a constructor argument. This will eventually allow us to move prototypes off of Interpreter and into GlobalObject.
This commit is contained in:
parent
ee5816b9c8
commit
2d7b495244
7 changed files with 23 additions and 12 deletions
|
@ -985,7 +985,7 @@ void ArrayExpression::dump(int indent) const
|
|||
|
||||
Value ArrayExpression::execute(Interpreter& interpreter) const
|
||||
{
|
||||
auto* array = interpreter.heap().allocate<Array>();
|
||||
auto* array = Array::create(interpreter.global_object());
|
||||
for (auto& element : m_elements) {
|
||||
auto value = Value();
|
||||
if (element) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue