aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 0440a7801a..6980e69ff7 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -3275,6 +3275,7 @@ Codegen::Reference &Codegen::Reference::operator =(const Reference &other)
case QmlContextObject:
qmlCoreIndex = other.qmlCoreIndex;
qmlNotifyIndex = other.qmlNotifyIndex;
+ requiresCapture = other.requiresCapture;
break;
case This:
break;
@@ -3318,7 +3319,8 @@ bool Codegen::Reference::operator==(const Codegen::Reference &other) const
return closureId == other.closureId;
case QmlScopeObject:
case QmlContextObject:
- return qmlCoreIndex == other.qmlCoreIndex && qmlNotifyIndex == other.qmlNotifyIndex;
+ return qmlCoreIndex == other.qmlCoreIndex && qmlNotifyIndex == other.qmlNotifyIndex &&
+ requiresCapture == other.requiresCapture;
case This:
return true;
}
@@ -3515,7 +3517,7 @@ void Codegen::Reference::load(uint tmp) const
Instruction::LoadScopeObjectProperty load;
load.base = base;
load.propertyIndex = qmlCoreIndex;
- load.captureRequired = true; // ### captureRequired;
+ load.captureRequired = requiresCapture;
load.result = temp;
codegen->bytecodeGenerator->addInstruction(load);
codegen->_function->scopeObjectPropertyDependencies.insert(qmlCoreIndex, qmlNotifyIndex);
@@ -3523,7 +3525,7 @@ void Codegen::Reference::load(uint tmp) const
Instruction::LoadContextObjectProperty load;
load.base = base;
load.propertyIndex = qmlCoreIndex;
- load.captureRequired = true; // ### captureRequired;
+ load.captureRequired = requiresCapture;
load.result = temp;
codegen->bytecodeGenerator->addInstruction(load);
codegen->_function->contextObjectPropertyDependencies.insert(qmlCoreIndex, qmlNotifyIndex);