diff options
| author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-10-05 16:58:33 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-10-06 19:41:52 +0000 |
| commit | 3f8861dc42d20e8c67fe60dd6ea34dbe57aeb4fc (patch) | |
| tree | b6e2d2fde3e1a7a93f89d0802cbb45d8198ce2ae /src/qml/jsruntime/qv4engine.cpp | |
| parent | d4bab563568a211bf05260fed1b80b4652b20507 (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/qv4engine.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<ExecutionContext> r(scope, memoryManager->allocManaged<ExecutionContext>(sizeof(ExecutionContext::Data))); + Scoped<ExecutionContext> r(scope, memoryManager->allocManaged<ExecutionContext>()); r->d_unchecked()->init(Heap::ExecutionContext::Type_GlobalContext); r->d()->activation.set(this, globalObject->d()); jsObjects[RootContext] = r; |
