aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-03-06 13:25:02 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-06 14:23:15 +0100
commit2235d6b77afd893a7c60d6c38d16f75fe2042144 (patch)
tree0714594bfdf0ab8eb0712c89488bedbe8abf2f8a /src/qml/qml/qqmlobjectcreator.cpp
parent5de274605a19fe7d8cf989978d5959826e7970c7 (diff)
[new compiler] Fix potential infinite recursion when using the incubator
Some auto-tests use the incubation controller with a one-step boolean, so shouldInterrupt() always returns true. When we're in the finalization phase enabling the bindings one-by-one, pop one off the bindings stack and enable it _before_ doing the shouldInterrupt() check. Otherwise we don't progress at all. Change-Id: Ibd5bbc253f8e8f74b08c91b018533c9e2735d2c8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index f8aadb3070..0df52edb08 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -1170,9 +1170,6 @@ QQmlContextData *QQmlObjectCreator::finalize(QQmlInstantiationInterrupt &interru
trace.event("begin binding eval");
while (!sharedState->allCreatedBindings.isEmpty()) {
- if (watcher.hasRecursed() || interrupt.shouldInterrupt())
- return 0;
-
QQmlAbstractBinding *b = sharedState->allCreatedBindings.pop();
if (!b)
continue;
@@ -1182,6 +1179,9 @@ QQmlContextData *QQmlObjectCreator::finalize(QQmlInstantiationInterrupt &interru
data->clearPendingBindingBit(b->propertyIndex());
b->setEnabled(true, QQmlPropertyPrivate::BypassInterceptor |
QQmlPropertyPrivate::DontRemoveBinding);
+
+ if (watcher.hasRecursed() || interrupt.shouldInterrupt())
+ return 0;
}
}