aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory/qv4mm_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/memory/qv4mm_p.h')
-rw-r--r--src/qml/memory/qv4mm_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h
index 00daf8a622..9b4c2cd8df 100644
--- a/src/qml/memory/qv4mm_p.h
+++ b/src/qml/memory/qv4mm_p.h
@@ -231,7 +231,7 @@ public:
template <typename ObjectType>
typename ObjectType::Data *allocateObject(InternalClass *ic)
{
- Heap::Object *o = allocObjectWithMemberData(align(sizeof(typename ObjectType::Data)), ic->size);
+ Heap::Object *o = allocObjectWithMemberData(ObjectType::staticVTable(), ic->size);
o->setVtable(ObjectType::staticVTable());
o->internalClass = ic;
return static_cast<typename ObjectType::Data *>(o);
@@ -241,7 +241,7 @@ public:
typename ObjectType::Data *allocateObject()
{
InternalClass *ic = ObjectType::defaultInternalClass(engine);
- Heap::Object *o = allocObjectWithMemberData(align(sizeof(typename ObjectType::Data)), ic->size);
+ Heap::Object *o = allocObjectWithMemberData(ObjectType::staticVTable(), ic->size);
o->setVtable(ObjectType::staticVTable());
Object *prototype = ObjectType::defaultPrototype(engine);
o->internalClass = ic;
@@ -433,7 +433,7 @@ protected:
/// expects size to be aligned
Heap::Base *allocString(std::size_t unmanagedSize);
Heap::Base *allocData(std::size_t size);
- Heap::Object *allocObjectWithMemberData(std::size_t size, uint nMembers);
+ Heap::Object *allocObjectWithMemberData(const QV4::VTable *vtable, uint nMembers);
#ifdef DETAILED_MM_STATS
void willAllocate(std::size_t size);