[Webkit-unassigned] [Bug 74108] [Qt] Incorrect deletion of m_replyWrapper in QtNetworkReplyHandler::finish

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 8 12:28:55 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74108





--- Comment #3 from Simon Hausmann <hausmann at webkit.org>  2011-12-08 12:28:54 PST ---
(From update of attachment 118437)
View in context: https://bugs.webkit.org/attachment.cgi?id=118437&action=review

> Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:442
> -        m_replyWrapper = nullptr;
> +        m_replyWrapper->deleteLater();

Isn't this going to cause more crashes? The QObject will be deleted later, but the OwnPtr doesn't know that and in its destructor it will try to call the m_replyWrapper's destructor again, resulting in double deletion.

Perhaps a better fix would be something along the lines of m_replyWrapper.leakPtr()->deleteLater(); - as ugly as it is...

Or simply not use an OwnPtr at all.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list