1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:48:11 +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

@ -39,18 +39,19 @@ NavigatorObject::NavigatorObject(JS::GlobalObject& global_object)
{
}
void NavigatorObject::initialize(JS::Interpreter& interpreter, JS::GlobalObject& global_object)
void NavigatorObject::initialize(JS::GlobalObject& global_object)
{
auto& heap = this->heap();
auto* languages = JS::Array::create(global_object);
languages->indexed_properties().append(js_string(heap(), "en-US"));
languages->indexed_properties().append(js_string(heap, "en-US"));
define_property("appCodeName", js_string(interpreter.heap(), "Mozilla"));
define_property("appName", js_string(interpreter.heap(), "Netscape"));
define_property("appVersion", js_string(interpreter.heap(), "4.0"));
define_property("appCodeName", js_string(heap, "Mozilla"));
define_property("appName", js_string(heap, "Netscape"));
define_property("appVersion", js_string(heap, "4.0"));
define_property("language", languages->get(0));
define_property("languages", languages);
define_property("platform", js_string(interpreter.heap(), "SerenityOS"));
define_property("product", js_string(interpreter.heap(), "Gecko"));
define_property("platform", js_string(heap, "SerenityOS"));
define_property("product", js_string(heap, "Gecko"));
define_native_property("userAgent", user_agent_getter, nullptr);
}