From b393c405b7568e80628bc99501a9c53bbd0e678d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 13 Jun 2014 14:30:03 +0200 Subject: Change the object allocation scheme Instead of allocating the data directly, centralize the object and its ::Data allocation in one place in the memory manager. This is in preparation for additional pointer indirection later. Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4function.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4function.cpp') diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp index 89646ec755..bf77b4434c 100644 --- a/src/qml/jsruntime/qv4function.cpp +++ b/src/qml/jsruntime/qv4function.cpp @@ -45,6 +45,7 @@ #include "qv4value_inl_p.h" #include "qv4engine_p.h" #include "qv4lookup_p.h" +#include "qv4mm_p.h" QT_BEGIN_NAMESPACE @@ -73,7 +74,7 @@ Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, break; } // duplicate arguments, need some trick to store them - arg = (s = new (engine) String::Data(engine, arg, engine->newString(QString(0xfffe))->getPointer())).getPointer(); + arg = (s = engine->memoryManager->alloc(engine, arg, engine->newString(QString(0xfffe))->getPointer())).getPointer(); } } -- cgit v1.2.3