aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4vme_moth.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-03-24 17:33:43 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-03-25 11:31:09 +0100
commit8fe127129b4f31e7e13dbf727687d98b95984763 (patch)
treee43d2f018d4feee2381d63e12714fd858cad0d97 /src/qml/jsruntime/qv4vme_moth.cpp
parentfc636af3a723ee8b4ee42cf71864ae0df5ca4621 (diff)
Inline retrieval of QML contexts
In the good case this is just reading a few members of the relevant classes. No need to call functions for this. Change-Id: I9908cd6437cf9a1ca840f9aa0e524d3976272d67 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r--src/qml/jsruntime/qv4vme_moth.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index c5be077f3a..eb18ea933b 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -478,8 +478,8 @@ void VME::exec(MetaTypesStackFrame *frame, ExecutionEngine *engine)
}
QQmlPrivate::AOTCompiledContext aotContext;
- if (QV4::Heap::QmlContext *qmlContext = engine->qmlContext()) {
- QV4::Heap::QQmlContextWrapper *wrapper = qmlContext->qml();
+ if (auto context = QV4::ExecutionEngine::qmlContext(frame->context()->d())) {
+ QV4::Heap::QQmlContextWrapper *wrapper = static_cast<Heap::QmlContext *>(context)->qml();
aotContext.qmlScopeObject = wrapper->scopeObject;
aotContext.qmlContext = wrapper->context->asQQmlContext();
}