summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-26 03:57:11 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-26 03:57:11 (GMT)
commit344b4ab658a03d81bbdb7bb5f74b2b5c8bd517e8 (patch)
treecc2ca52a14429ad37e566489e5448ef06335203e /tests/auto
parentfc47baa44aba2cbf8e0e5db58b7c7205ead9e427 (diff)
parentaa1e47a5a1a0978979e98f503cb44c85fc88dece (diff)
downloadQt-344b4ab658a03d81bbdb7bb5f74b2b5c8bd517e8.zip
Qt-344b4ab658a03d81bbdb7bb5f74b2b5c8bd517e8.tar.gz
Qt-344b4ab658a03d81bbdb7bb5f74b2b5c8bd517e8.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Make QtScript support COLLECT_ON_EVERY_ALLOCATION define Add missing API shims to QScriptValue constructors Don't crash when marking arguments object of native context
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 8de6fbc..6c89bcb 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -169,6 +169,7 @@ private slots:
void nativeFunctionScopes();
void evaluateProgram();
void collectGarbageAfterConnect();
+ void collectGarbageAfterNativeArguments();
void promoteThisObjectToQObjectInConstructor();
void qRegExpInport_data();
@@ -5040,6 +5041,16 @@ void tst_QScriptEngine::collectGarbageAfterConnect()
QVERIFY(widget == 0);
}
+void tst_QScriptEngine::collectGarbageAfterNativeArguments()
+{
+ // QTBUG-17788
+ QScriptEngine eng;
+ QScriptContext *ctx = eng.pushContext();
+ QScriptValue arguments = ctx->argumentsObject();
+ // Shouldn't crash when marking the arguments object.
+ collectGarbage_helper(eng);
+}
+
static QScriptValue constructQObjectFromThisObject(QScriptContext *ctx, QScriptEngine *eng)
{
Q_ASSERT(ctx->isCalledAsConstructor());