diff --git a/Libraries/LibJS/Runtime/GlobalObject.cpp b/Libraries/LibJS/Runtime/GlobalObject.cpp index 3a3a50885a..6b6cfa68fd 100644 --- a/Libraries/LibJS/Runtime/GlobalObject.cpp +++ b/Libraries/LibJS/Runtime/GlobalObject.cpp @@ -80,14 +80,14 @@ void GlobalObject::initialize() ensure_shape_is_unique(); // These are done first since other prototypes depend on their presence. - m_empty_object_shape = heap().allocate(*this, *this); + m_empty_object_shape = heap().allocate_without_global_object(*this); m_object_prototype = heap().allocate_without_global_object(*this); m_function_prototype = heap().allocate_without_global_object(*this); - m_new_object_shape = vm.heap().allocate(*this, *this); + m_new_object_shape = vm.heap().allocate_without_global_object(*this); m_new_object_shape->set_prototype_without_transition(m_object_prototype); - m_new_script_function_prototype_object_shape = vm.heap().allocate(*this, *this); + m_new_script_function_prototype_object_shape = vm.heap().allocate_without_global_object(*this); m_new_script_function_prototype_object_shape->set_prototype_without_transition(m_object_prototype); m_new_script_function_prototype_object_shape->add_property_without_transition(vm.names.constructor, Attribute::Writable | Attribute::Configurable); diff --git a/Libraries/LibJS/Runtime/Object.cpp b/Libraries/LibJS/Runtime/Object.cpp index 9fd86bf43a..5ed464624c 100644 --- a/Libraries/LibJS/Runtime/Object.cpp +++ b/Libraries/LibJS/Runtime/Object.cpp @@ -90,12 +90,12 @@ Object* Object::create_empty(GlobalObject& global_object) Object::Object(GlobalObjectTag) { // This is the global object - m_shape = heap().allocate(static_cast(*this), static_cast(*this)); + m_shape = heap().allocate_without_global_object(static_cast(*this)); } Object::Object(ConstructWithoutPrototypeTag, GlobalObject& global_object) { - m_shape = heap().allocate(global_object, global_object); + m_shape = heap().allocate_without_global_object(global_object); } Object::Object(Object& prototype) diff --git a/Libraries/LibJS/Runtime/Shape.cpp b/Libraries/LibJS/Runtime/Shape.cpp index 6c78e7c8d6..0be64ae9c9 100644 --- a/Libraries/LibJS/Runtime/Shape.cpp +++ b/Libraries/LibJS/Runtime/Shape.cpp @@ -32,7 +32,7 @@ namespace JS { Shape* Shape::create_unique_clone() const { - auto* new_shape = heap().allocate(m_global_object, m_global_object); + auto* new_shape = heap().allocate_without_global_object(m_global_object); new_shape->m_unique = true; new_shape->m_prototype = m_prototype; ensure_property_table(); @@ -47,7 +47,7 @@ Shape* Shape::create_put_transition(const StringOrSymbol& property_name, Propert TransitionKey key { property_name, attributes }; if (auto* existing_shape = m_forward_transitions.get(key).value_or(nullptr)) return existing_shape; - auto* new_shape = heap().allocate(m_global_object, *this, property_name, attributes, TransitionType::Put); + auto* new_shape = heap().allocate_without_global_object(*this, property_name, attributes, TransitionType::Put); m_forward_transitions.set(key, new_shape); return new_shape; } @@ -57,14 +57,14 @@ Shape* Shape::create_configure_transition(const StringOrSymbol& property_name, P TransitionKey key { property_name, attributes }; if (auto* existing_shape = m_forward_transitions.get(key).value_or(nullptr)) return existing_shape; - auto* new_shape = heap().allocate(m_global_object, *this, property_name, attributes, TransitionType::Configure); + auto* new_shape = heap().allocate_without_global_object(*this, property_name, attributes, TransitionType::Configure); m_forward_transitions.set(key, new_shape); return new_shape; } Shape* Shape::create_prototype_transition(Object* new_prototype) { - return heap().allocate(m_global_object, *this, new_prototype); + return heap().allocate_without_global_object(*this, new_prototype); } Shape::Shape(GlobalObject& global_object)