From 3f8861dc42d20e8c67fe60dd6ea34dbe57aeb4fc Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Thu, 5 Oct 2023 16:58:33 +0200 Subject: 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 --- src/qml/jsruntime/qv4engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4engine.cpp') diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index f6f4c5211a..adbac53544 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -895,7 +895,7 @@ void ExecutionEngine::setProfiler(Profiling::Profiler *profiler) void ExecutionEngine::initRootContext() { Scope scope(this); - Scoped r(scope, memoryManager->allocManaged(sizeof(ExecutionContext::Data))); + Scoped r(scope, memoryManager->allocManaged()); r->d_unchecked()->init(Heap::ExecutionContext::Type_GlobalContext); r->d()->activation.set(this, globalObject->d()); jsObjects[RootContext] = r; -- cgit v1.2.3