aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilerscanfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp')
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp
index 0feba7bb61..4fa35f3adb 100644
--- a/src/qml/compiler/qv4compilerscanfunctions.cpp
+++ b/src/qml/compiler/qv4compilerscanfunctions.cpp
@@ -502,9 +502,6 @@ void ScanFunctions::calcEscapingVariables()
if (allVarsEscape) {
c->requiresExecutionContext = true;
c->argumentsCanEscape = true;
- for (auto &m : c->members) {
- m.canEscape = true;
- }
}
// ### for now until we have lexically scoped vars that'll require it
if (c->type == ContextType::Global)
@@ -522,13 +519,17 @@ void ScanFunctions::calcEscapingVariables()
c->requiresExecutionContext = true;
}
}
+ if (allVarsEscape) {
+ for (auto &m : c->members)
+ m.canEscape = true;
+ }
}
static const bool showEscapingVars = qEnvironmentVariableIsSet("QV4_SHOW_ESCAPING_VARS");
if (showEscapingVars) {
qDebug() << "==== escaping variables ====";
for (Context *c : qAsConst(m->contextMap)) {
- qDebug() << "Context" << c->name << ":";
+ qDebug() << "Context" << c << c->name << ":";
if (c->argumentsCanEscape)
qDebug() << " Arguments escape";
for (auto it = c->members.constBegin(); it != c->members.constEnd(); ++it) {