Fix weak reference callback in test case
authorChris Adams <christopher.adams@nokia.com>
Wed, 9 May 2012 00:21:56 +0000 (10:21 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 9 May 2012 01:26:54 +0000 (03:26 +0200)
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>
tests/auto/qml/qqmlecmascript/testtypes.h

index 90eda77..e781e77 100644 (file)
@@ -1141,7 +1141,6 @@ public:
     {
         CircularReferenceHandle *crh = static_cast<CircularReferenceHandle*>(params);
         qPersistentDispose(handle);
-        crh->m_referenced.Clear();
     }
 
     static void gccallback(QV8GCCallback::Node *n)