aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-03-06 10:18:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-06 13:08:19 +0100
commit5de274605a19fe7d8cf989978d5959826e7970c7 (patch)
tree847899722e62e5ec9c45a621237074feb8527941 /src/qml/compiler
parent1a38f519cbc0890d8f0163ab35c140592ab204ac (diff)
[new compiler] Fix incorrect accelerated lookups to id objects
When compiling JS code in the scope of a component, make sure to always set the id object mapping, even if it is empty. Otherwise the id objects from one scope might leak into another, leading to id object dependencies that are invalid. Change-Id: Ib2bca11203acd6924e8c74f9560a1ee3e00d7e39 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp3
1 files changed, 1 insertions, 2 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;