diff options
| author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-06-30 10:33:37 +0200 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@qt.io> | 2017-06-30 08:57:14 +0000 |
| commit | b31ac3e4870ac73034e678fbdd8bca04de282dfc (patch) | |
| tree | 3c30c389b75691c500383c15f998fb01607a1739 /src/qml/compiler/qv4codegen.cpp | |
| parent | 6f1b4931d75993227def93c06935a933e8692f0b (diff) | |
Re-add missing captureRequired flag
Change-Id: I79b49655a55f98906723351ef7dd79099697bea1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
| -rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 8 |
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); |
