mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:08:11 +00:00
LibJS: Move the empty object shape from Interpreter to GlobalObject
The big remaining hurdle before a GlobalObject-agnostic Interpreter is the fact that Interpreter owns and vends the GlobalObject :^)
This commit is contained in:
parent
75f6454de7
commit
3072f9fd82
5 changed files with 13 additions and 7 deletions
|
@ -45,8 +45,12 @@ Object* Object::create_empty(Interpreter&, GlobalObject& global_object)
|
|||
|
||||
Object::Object(Object* prototype)
|
||||
{
|
||||
m_shape = interpreter().empty_object_shape();
|
||||
set_prototype(prototype);
|
||||
if (prototype) {
|
||||
m_shape = interpreter().global_object().empty_object_shape();
|
||||
set_prototype(prototype);
|
||||
} else {
|
||||
m_shape = interpreter().heap().allocate<Shape>();
|
||||
}
|
||||
}
|
||||
|
||||
Object::~Object()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue