aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsengine/tst_qjsengine.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-28 01:00:54 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-28 01:00:54 +0100
commit4407f1f81813216bf64021eab7dcecc88d3056fe (patch)
treeaba2c7ed9a8f8d04898faced151c30b9dfbe0508 /tests/auto/qml/qjsengine/tst_qjsengine.cpp
parent187b2e0efccb9e803a72fc87a3659d8b76a73ca9 (diff)
parent3507c29e8d9ea42e63fd0c01e27ee9263d939256 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'tests/auto/qml/qjsengine/tst_qjsengine.cpp')
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 3e871108bc..620e31e01a 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -236,6 +236,7 @@ private slots:
void importExportErrors();
void equality();
+ void aggressiveGc();
public:
Q_INVOKABLE QJSValue throwingCppMethod1();
@@ -4632,6 +4633,18 @@ void tst_QJSEngine::equality()
QCOMPARE(ok.toString(), QString("ok"));
}
+void tst_QJSEngine::aggressiveGc()
+{
+ const QByteArray origAggressiveGc = qgetenv("QV4_MM_AGGRESSIVE_GC");
+ qputenv("QV4_MM_AGGRESSIVE_GC", "true");
+ {
+ QJSEngine engine; // ctor crashes if core allocation methods don't properly scope things.
+ QJSValue obj = engine.newObject();
+ QVERIFY(obj.isObject());
+ }
+ qputenv("QV4_MM_AGGRESSIVE_GC", origAggressiveGc);
+}
+
QTEST_MAIN(tst_QJSEngine)
#include "tst_qjsengine.moc"