aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp3
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index f6eb4bc40e..4e5901f8b3 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -2349,9 +2349,8 @@ bool QQmlJSCodeGenerator::compileComponent(int contextObject, const QHash<int, i
idMapping << m;
}
-
- v4CodeGen->beginContextScope(idMapping, propertyCaches.at(contextObject));
}
+ v4CodeGen->beginContextScope(idMapping, propertyCaches.at(contextObject));
if (!compileJavaScriptCodeInObjectsRecursively(contextObject, contextObject))
return false;
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index 1660e3aeb1..e72e90296f 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -382,8 +382,10 @@ void QmlContextWrapper::registerQmlDependencies(ExecutionEngine *engine, const C
const quint32 *idObjectDependency = compiledFunction->qmlIdObjectDependencyTable();
const int idObjectDependencyCount = compiledFunction->nDependingIdObjects;
- for (int i = 0; i < idObjectDependencyCount; ++i, ++idObjectDependency)
+ for (int i = 0; i < idObjectDependencyCount; ++i, ++idObjectDependency) {
+ Q_ASSERT(int(*idObjectDependency) < qmlContext->idValueCount);
capture->captureProperty(&qmlContext->idValues[*idObjectDependency].bindings);
+ }
const quint32 *contextPropertyDependency = compiledFunction->qmlContextPropertiesDependencyTable();
const int contextPropertyDependencyCount = compiledFunction->nDependingContextProperties;