aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/testtypes.h
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2012-05-09 10:21:56 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-09 03:26:54 +0200
commitdfc4e6f93bd2482b6eb79d7088850ceb460a1928 (patch)
tree52f0b069077a3e683bcd23501a03759af26abfff /tests/auto/qml/qqmlecmascript/testtypes.h
parenta1994d440b32e14535eed2450db379dc55e869d5 (diff)
Fix weak reference callback in test case
Previously, the handle reference management weak-reference callback would cast the data pointer to a class instance ptr, and clear that instance's handle. This is invalid if the callback gets called after the instance is deleted. Change-Id: I3f77bffa1cb05f8b625c69f08d85662cc3b2e5e1 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/testtypes.h')
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index 90eda77fee..e781e7703b 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -1141,7 +1141,6 @@ public:
{
CircularReferenceHandle *crh = static_cast<CircularReferenceHandle*>(params);
qPersistentDispose(handle);
- crh->m_referenced.Clear();
}
static void gccallback(QV8GCCallback::Node *n)