diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2025-11-21 10:41:12 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2025-11-24 10:19:57 +0100 |
| commit | 8e5e37aa15eab744bea1f6052a125be9b53366f3 (patch) | |
| tree | 1eac3166ac6afba3aaffc1bdfd38ddd3f89ee3a8 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 10e3bfb8ad28ecb5e8b844d2c9bda1984fbc2a33 (diff) | |
QtQml: Don't mark QJSValues on the AOT stack
QJSValue and QJSManagedValue hold persistent values which are marked
elsewhere. QJSPrimitiveValue doesn't need to be marked at all.
Amends commit 2d016a2653c59f10a57dc1903b817f71d16d0622.
Pick-to: 6.10 6.8
Fixes: QTBUG-142097
Change-Id: I50d6405a684726a81ceee506b2d4f8b90330fcaf
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 0c585183e1..822747f9cc 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -1173,6 +1173,13 @@ void tst_QmlCppCodegen::collectGarbageDuringAotCode() QVERIFY(!o2.isNull()); QTRY_COMPARE_GT(o2->objectName().toInt(), 10); + + QQmlComponent c3(&engine, QUrl(u"qrc:/qt/qml/TestTypes/markJSValue.qml"_s)); + QVERIFY2(c3.isReady(), qPrintable(c3.errorString())); + QScopedPointer<QObject> o3(c3.create()); + QVERIFY(!o3.isNull()); + + QTRY_COMPARE_GT(o3->property("count").toInt(), 10); } void tst_QmlCppCodegen::colorAsVariant() |
