aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4generatorobject.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2023-10-05 16:58:33 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-10-06 19:41:52 +0000
commit3f8861dc42d20e8c67fe60dd6ea34dbe57aeb4fc (patch)
treeb6e2d2fde3e1a7a93f89d0802cbb45d8198ce2ae /src/qml/jsruntime/qv4generatorobject.cpp
parentd4bab563568a211bf05260fed1b80b4652b20507 (diff)
qv4mm: Document and extend allocManaged overload set
Add some helper overloads to centralize the sizeof computation. Add a doc note about the various variants of allocManaged, including a note why we even need the size parameter. Change-Id: I4e0c485217e87c339a7433c306cb05d6614d30e1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4generatorobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4generatorobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4generatorobject.cpp b/src/qml/jsruntime/qv4generatorobject.cpp
index 9f77d83ac3..cd2d83cff9 100644
--- a/src/qml/jsruntime/qv4generatorobject.cpp
+++ b/src/qml/jsruntime/qv4generatorobject.cpp
@@ -62,7 +62,7 @@ ReturnedValue GeneratorFunction::virtualCall(const FunctionObject *f, const Valu
ExecutionEngine *engine = gf->engine();
Scope scope(gf);
- Scoped<GeneratorObject> g(scope, engine->memoryManager->allocManaged<GeneratorObject>(sizeof(GeneratorObject::Data), engine->classes[EngineBase::Class_GeneratorObject]));
+ Scoped<GeneratorObject> g(scope, engine->memoryManager->allocManaged<GeneratorObject>(engine->classes[EngineBase::Class_GeneratorObject]));
g->setPrototypeOf(ScopedObject(scope, gf->get(scope.engine->id_prototype())));
// We need to set up a separate JSFrame for the generator, as it's being re-entered