diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2018-10-12 10:44:09 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-16 10:40:22 +0000 |
commit | 1d3c08b5e25613a738766ddc3a0d3c7ca5b59e8e (patch) | |
tree | c6e008f7de54ae856d7f0952313ff224afbac73d /src | |
parent | e1eb99dfc0896f81dbcb8d5eed7bb8c18839dac6 (diff) |
QML: Extend QML loader thread's stack size
By default, on some platforms non-main threads have a very limited
stack size. Extend it so that we can parse more deeply nested QML/JS
files. The parser expects a stack size of 8MB.
Task-number: QTBUG-71078
Change-Id: I5edd6630c870e45c3dbe66e6a2a178f5c6991677
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/ftw/qqmlthread.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/qml/ftw/qqmlthread.cpp b/src/qml/qml/ftw/qqmlthread.cpp index e961ed3d0d..7d2ad354d6 100644 --- a/src/qml/qml/ftw/qqmlthread.cpp +++ b/src/qml/qml/ftw/qqmlthread.cpp @@ -131,6 +131,9 @@ QQmlThreadPrivate::QQmlThreadPrivate(QQmlThread *q) m_mainThreadWaiting(false), mainSync(nullptr), m_mainObject(this) { setObjectName(QStringLiteral("QQmlThread")); + // This size is aligned with the recursion depth limits in the parser/codegen. In case of + // absurd content we want to hit the recursion checks instead of running out of stack. + setStackSize(8 * 1024 * 1024); } bool QQmlThreadPrivate::event(QEvent *e) |