mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user