summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptengine
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-03-01 09:23:51 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-03-01 09:23:51 (GMT)
commitee767e8c16742316068e83323374ea54f2b939cb (patch)
treebb3f6c94e6c1512545cd657d2c675a371a6a88f7 /tests/auto/qscriptengine
parent54869c8727e5403cea866c99a5f83ae9c8533f82 (diff)
parent2653c4fcf42ec93db16a299c29c9fe0f98680c75 (diff)
downloadQt-ee767e8c16742316068e83323374ea54f2b939cb.zip
Qt-ee767e8c16742316068e83323374ea54f2b939cb.tar.gz
Qt-ee767e8c16742316068e83323374ea54f2b939cb.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/text/qfontengine_mac.mm src/opengl/qpixmapdata_gl.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/qtextlayout/tst_qtextlayout.cpp
Diffstat (limited to 'tests/auto/qscriptengine')
-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 2d7feee..1de34b4 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -235,6 +235,7 @@ private slots:
void evaluateProgram_multipleEngines();
void evaluateProgram_empty();
void collectGarbageAfterConnect();
+ void collectGarbageAfterNativeArguments();
void promoteThisObjectToQObjectInConstructor();
void scriptValueFromQMetaObject();
@@ -5643,6 +5644,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());