diff --git a/Userland/Libraries/LibJS/Runtime/Shape.cpp b/Userland/Libraries/LibJS/Runtime/Shape.cpp index 25434f3851..e07cfd01fa 100644 --- a/Userland/Libraries/LibJS/Runtime/Shape.cpp +++ b/Userland/Libraries/LibJS/Runtime/Shape.cpp @@ -98,22 +98,22 @@ Shape::Shape(Object& global_object) } Shape::Shape(Shape& previous_shape, const StringOrSymbol& property_name, PropertyAttributes attributes, TransitionType transition_type) - : m_attributes(attributes) - , m_transition_type(transition_type) - , m_global_object(previous_shape.m_global_object) + : m_global_object(previous_shape.m_global_object) , m_previous(&previous_shape) , m_property_name(property_name) , m_prototype(previous_shape.m_prototype) , m_property_count(transition_type == TransitionType::Put ? previous_shape.m_property_count + 1 : previous_shape.m_property_count) + , m_attributes(attributes) + , m_transition_type(transition_type) { } Shape::Shape(Shape& previous_shape, Object* new_prototype) - : m_transition_type(TransitionType::Prototype) - , m_global_object(previous_shape.m_global_object) + : m_global_object(previous_shape.m_global_object) , m_previous(&previous_shape) , m_prototype(new_prototype) , m_property_count(previous_shape.m_property_count) + , m_transition_type(TransitionType::Prototype) { } diff --git a/Userland/Libraries/LibJS/Runtime/Shape.h b/Userland/Libraries/LibJS/Runtime/Shape.h index 39afa6a1ce..55247bed2d 100644 --- a/Userland/Libraries/LibJS/Runtime/Shape.h +++ b/Userland/Libraries/LibJS/Runtime/Shape.h @@ -98,10 +98,6 @@ private: void ensure_property_table() const; - PropertyAttributes m_attributes { 0 }; - TransitionType m_transition_type : 6 { TransitionType::Invalid }; - bool m_unique : 1 { false }; - Object* m_global_object { nullptr }; mutable OwnPtr> m_property_table; @@ -112,6 +108,10 @@ private: StringOrSymbol m_property_name; Object* m_prototype { nullptr }; size_t m_property_count { 0 }; + + PropertyAttributes m_attributes { 0 }; + TransitionType m_transition_type : 6 { TransitionType::Invalid }; + bool m_unique : 1 { false }; }; }