1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 19:25:10 +00:00

LibJS: Simplify Cell::initialize()

Remove the Interpreter& argument and pass only GlobalObject&. We can
find everything we need via the global object anyway.
This commit is contained in:
Andreas Kling 2020-07-22 17:50:18 +02:00
parent 299824de73
commit aaf6014ae1
82 changed files with 161 additions and 160 deletions

View file

@ -82,7 +82,7 @@ PropertyDescriptor PropertyDescriptor::from_dictionary(Interpreter& interpreter,
return descriptor;
}
Object* Object::create_empty(Interpreter&, GlobalObject& global_object)
Object* Object::create_empty(GlobalObject& global_object)
{
return global_object.heap().allocate<Object>(global_object, *global_object.object_prototype());
}
@ -105,7 +105,7 @@ Object::Object(Object& prototype)
set_prototype(&prototype);
}
void Object::initialize(Interpreter&, GlobalObject&)
void Object::initialize(GlobalObject&)
{
}
@ -301,7 +301,7 @@ Value Object::get_own_property_descriptor_object(const PropertyName& property_na
return js_undefined();
auto descriptor = descriptor_opt.value();
auto* descriptor_object = Object::create_empty(interpreter(), global_object());
auto* descriptor_object = Object::create_empty(global_object());
descriptor_object->define_property("enumerable", Value(descriptor.attributes.is_enumerable()));
if (interpreter().exception())
return {};