summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-10-02 11:12:58 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2018-10-04 08:53:24 +0000
commit074190902a96c550d9aeb55ead19c0697ce1cbc3 (patch)
tree115af9fea4a4bffda57f8b0dbdac3a13685a8b48
parentf27a16b7bdd5f55ce210053773276c4977466efd (diff)
Mark QML captured scope/context loads as having side effects
Task-number: QTBUG-69973 Change-Id: I8636d74c76db3859a6bd5134fd5e52f571340a71 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/compiler/qv4codegen_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index d51dc29517..1db788154e 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -201,6 +201,10 @@ public:
bool isValid() const { return type != Invalid; }
bool loadTriggersSideEffect() const {
switch (type) {
+ case QmlScopeObject:
+ return capturePolicy != DontCapture;
+ case QmlContextObject:
+ return capturePolicy != DontCapture;
case Name:
case Member:
case Subscript: