mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +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:
@@ -63,11 +63,11 @@ ScriptFunction::ScriptFunction(GlobalObject& global_object, const FlyString& nam
|
||||
{
|
||||
}
|
||||
|
||||
void ScriptFunction::initialize(Interpreter& interpreter, GlobalObject& global_object)
|
||||
void ScriptFunction::initialize(GlobalObject& global_object)
|
||||
{
|
||||
Function::initialize(interpreter, global_object);
|
||||
Function::initialize(global_object);
|
||||
if (!m_is_arrow_function) {
|
||||
Object* prototype = Object::create_empty(interpreter, global_object);
|
||||
Object* prototype = Object::create_empty(global_object);
|
||||
prototype->define_property("constructor", this, Attribute::Writable | Attribute::Configurable);
|
||||
define_property("prototype", prototype, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user