From 0167f5fc6115cbb52ecd1d882048c1f2cf70fc7f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 8 Sep 2017 15:12:47 +0200 Subject: Drain the markStack while collecting roots This avoids overflows in the markStack for test cases where we have a huge amount of compilation units with many runtime strings that all want to get marked. Task-number: QTBUG-63063 Change-Id: I7c1df0fdb9afada1830f8c218a0e52ebcd093850 Reviewed-by: Simon Hausmann Reviewed-by: J-P Nurmi --- src/qml/jsruntime/qv4engine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index caa6e8b7ac..8ca6b03950 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -982,10 +982,13 @@ void ExecutionEngine::markObjects(MarkStack *markStack) } classPool->markObjects(markStack); + markStack->drain(); for (QSet::ConstIterator it = compilationUnits.constBegin(), end = compilationUnits.constEnd(); - it != end; ++it) + it != end; ++it) { (*it)->markObjects(markStack); + markStack->drain(); + } } ReturnedValue ExecutionEngine::throwError(const Value &value) -- cgit v1.2.3