mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 04:08:08 +00:00
LibJS: Make global objects have unique shape from the start
There's no point in trying to achieve shape sharing for global objects, so we can simply make the shape unique from the start and avoid making a transition chain.
This commit is contained in:
@@ -75,6 +75,8 @@ GlobalObject::GlobalObject()
|
||||
|
||||
void GlobalObject::initialize()
|
||||
{
|
||||
ensure_shape_is_unique();
|
||||
|
||||
// These are done first since other prototypes depend on their presence.
|
||||
m_empty_object_shape = heap().allocate<Shape>(*this, *this);
|
||||
m_object_prototype = heap().allocate_without_global_object<ObjectPrototype>(*this);
|
||||
|
||||
Reference in New Issue
Block a user