From dfc4e6f93bd2482b6eb79d7088850ceb460a1928 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Wed, 9 May 2012 10:21:56 +1000 Subject: [PATCH] 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 --- tests/auto/qml/qqmlecmascript/testtypes.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h index 90eda77..e781e77 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.h +++ b/tests/auto/qml/qqmlecmascript/testtypes.h @@ -1141,7 +1141,6 @@ public: { CircularReferenceHandle *crh = static_cast(params); qPersistentDispose(handle); - crh->m_referenced.Clear(); } static void gccallback(QV8GCCallback::Node *n) -- 1.7.2.5