mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:24:58 +00:00
LibJS+LibWeb: Replace GlobalObject with Realm in initialize() functions
This is a continuation of the previous commit. Calling initialize() is the first thing that's done after allocating a cell on the JS heap - and in the common case of allocating an object, that's where properties are assigned and intrinsics occasionally accessed. Since those are supposed to live on the realm eventually, this is another step into that direction.
This commit is contained in:
parent
ecd163bdf1
commit
5dd5896588
304 changed files with 608 additions and 603 deletions
|
@ -166,10 +166,8 @@ void GlobalObject::initialize_global_object()
|
|||
m_new_ordinary_function_prototype_object_shape->add_property_without_transition(vm.names.constructor, Attribute::Writable | Attribute::Configurable);
|
||||
|
||||
// Normally Heap::allocate() takes care of this, but these are allocated via allocate_without_global_object().
|
||||
|
||||
static_cast<FunctionPrototype*>(m_function_prototype)->initialize(*this);
|
||||
|
||||
static_cast<ObjectPrototype*>(m_object_prototype)->initialize(*this);
|
||||
static_cast<FunctionPrototype*>(m_function_prototype)->initialize(realm);
|
||||
static_cast<ObjectPrototype*>(m_object_prototype)->initialize(realm);
|
||||
|
||||
Object::set_prototype(m_object_prototype);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue