mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:05:08 +00:00
LibJS+LibWeb: Pass prototype to Object constructor
Everyone who constructs an Object must now pass a prototype object when applicable. There's still a fair amount of code that passes something fetched from the Interpreter, but this brings us closer to being able to detach prototypes from Interpreter eventually.
This commit is contained in:
parent
f6d57c82f6
commit
bc1ece7f37
30 changed files with 60 additions and 28 deletions
|
@ -40,9 +40,9 @@ NumberObject* NumberObject::create(GlobalObject& global_object, double value)
|
|||
}
|
||||
|
||||
NumberObject::NumberObject(double value, Object& prototype)
|
||||
: m_value(value)
|
||||
: Object(&prototype)
|
||||
, m_value(value)
|
||||
{
|
||||
set_prototype(&prototype);
|
||||
}
|
||||
|
||||
NumberObject::~NumberObject()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue